#### D.12.2.34 factorLenstraECM

Procedure from library `crypto.lib` (see crypto_lib).

Usage:
  factorLenstraECM(N,S,B); optional: factorLenstraECM(N,S,B,d); d+1 the number of loops in the algorithm (default d=0)

Return:
  a factor of N or the message no factor found

Note:
  - computes a factor of N using Lenstra's ECM factorization
  - the idea is that the fact that N is not prime is detected using the operations on the elliptic curve
  - is similarly to Pollard's p-1-factorization

Example:

    LIB "crypto.lib";
    list L=primList(1000);
    factorLenstraECM(181*32003,L,10,5);
    ==> 181
    bigint h=10;
    h=h^30+25;
    factorLenstraECM(h,L,4,3);
    ==> 13

User manual for Singular version 4.4.1, 2025, generated by texi2html.