  
  [1X1 [33X[0;0YPreface[133X[101X
  
  [33X[0;0YFactoring  large  integers  is a computationally very difficult problem, and
  there  is  no  general  factorization  algorithm known which can be used for
  factoring  products  of  two  primes with more than about 100 decimal digits
  each  on currently existing computers. But there are methods (not algorithms
  in  the  sense  that it is guaranteed that they will give the desired result
  after  a  finite  number of steps) for factoring integers with prime factors
  being far beyond the range where trial division is feasible.[133X
  
  [33X[0;0YOne  important  class of such methods is based on exponentiation in suitably
  chosen  groups  acting on subsets of the [22Xk[122X-fold cartesian product of the set
  of  residue  classes  (mod  [22Xn[122X),  where  [22Xn[122X denotes the number to be factored.
  Representatives  of  this  class  are  the  Elliptic  Curves  Method  (ECM),
  Pollard's [22Xp-1[122X  and  Williams' [22Xp+1[122X. These methods have the important property
  that they find smaller factors usually considerably faster than larger ones.
  This  however  comes  along  with the drawback of suboptimal performance for
  large factors.[133X
  
  [33X[0;0YThe  other  important  class  consists of the so-called factor base methods.
  Their  run time depends only on the size of the number [22Xn[122X to be factored, and
  not  on  the size of its factors. Factor base methods compute factorizations
  of  perfect  squares  (mod [22Xn[122X)  over  an  appropriately chosen factor base. A
  factor  base is a set of small prime numbers, or of prime ideals in the case
  of  the  Generalized  Number  Field Sieve. The factor base methods use these
  factorizations  to  determine a pair of integers [22X(x,y)[122X such that [22Xx^2[122X and [22Xy^2[122X
  are  congruent  (mod [22Xn[122X),  but [22X± x[122X and [22X± y[122X are not. In this situation, taking
  [22Xgcd(n,x-y)[122X  will  yield  a  nontrivial divisor of [22Xn[122X. Representatives of this
  class  are the Continued Fraction Algorithm (CFRAC), the Multiple Polynomial
  Quadratic  Sieve  (MPQS)  and the already mentioned Generalized Number Field
  Sieve   (GNFS).  The  latter  has  the  asymptotically  lowest  average-case
  complexity of all factoring methods known today. It has however the drawback
  of  being more efficient than the MPQS only for numbers with more than about
  100  decimal digits, which is probably not within the feasible range of such
  a function implemented in [5XGAP[105X. The first two methods are implemented in this
  package.[133X
  
  [33X[0;0YExcept of the [21Xnaive[121X methods like trial division and some [21Xhistorical[121X methods,
  the  only  method  which I am aware of that does not fit into one of the two
  classes  mentioned  above  is Pollard's Rho, which is already implemented in
  the [5XGAP[105X Library.[133X
  
  [33X[0;0YWith  respect  to the current state-of-the-art in integer factorization, see
  the                            Factoring                           Challenge
  ([7Xhttp://www.rsasecurity.com/rsalabs/node.asp?id=2093[107X)     of     the     RSA
  Laboratories.[133X
  
