ECM(1) | April 22, 2003 | ECM(1) |

alternatively one may use the
*B2min*-*B2max* form, which means that all primes *B2min* <=
p <= *B2max* should be processed. Thus specifying *B2* only
corresponds to *B1*-*B2*. The values of *B2min* and
*B2max* may be arbitrarily large, but their difference must not exceed
approximately 9e23, subject to the number of blocks *k*.

Perform P-1 instead of the default method
(ECM).

Perform P+1 instead of the default method
(ECM).

[ECM, P-1, P+1] Use *x*
(arbitrary-precision integer or rational) as initial point. For example,
**-x0 1/3** is valid. If not given, *x* is generated from the sigma
value for ECM, or at random for P-1 and P+1.

[ECM] Use *s* (arbitrary-precision
integer) as curve generator. If omitted, *s* is generated at
random.

[ECM] Use *a* (arbitrary-precision
integer) as curve parameter. If omitted, is it generated from the sigma
value.

[ECM, P-1, P+1] Multiply the initial point by
*val*, which can any valid expression, possibly containing the special
character N as place holder for the current input number. Example:

ecm -pp1 -go "N^2-1" 1e6 < composite2000

[ECM, P-1, P+1] Perform *k* blocks in
step 2. For a given *B2* value, increasing *k* decreases the memory
usage of step 2, at the expense of more cpu time.

Stores some tables of data in disk files to
reduce the amount of memory occupied in step 2, at the expense of disk I/O.
Data will be written to files *file*.1, *file*.2 etc. Does not work
with fast stage 2 for P+1 and P-1.

[ECM, P-1] Use x^*n* for
Brent-Suyama´s extension ( **-power 1** disables
Brent-Suyama´s extension). The default polynomial is chosen depending
on the method and B2. For P-1 and P+1, disables the fast stage 2. For P-1,
*n* must be even.

[ECM, P-1] Use degree-*n*
Dickson´s polynomial for Brent-Suyama´s extension. For P-1 and
P+1, disables the fast stage 2. Like for **-power**, *n* must be even
for P-1.

Use at most *n* megabytes of memory in
stage 2.

Enable or disable the Number-Theoretic
Transform code for polynomial arithmetic in stage 2. With NTT, dF is chosen to
be a power of 2, and is limited by the number suitable primes that fit in a
machine word (which is a limitation only on 32 bit systems). The -no-ntt
variant uses more memory, but is faster than NTT with large input numbers. By
default, NTT is used for P-1, P+1 and for ECM on numbers of size at most 30
machine words.

Quiet mode. Found factorizations are printed
on standard output, with factors separated by white spaces, one line per input
number (if no factor was found, the input number is simply copied).

Verbose mode. More information is printed,
more **-v** options increase verbosity. With one **-v**, the kind of
modular multiplication used, initial x0 value, step 2 parameters and progress,
and expected curves and time to find factors of different sizes for ECM are
printed. With **-v -v**, the A value for ECM and residues at the end of
step 1 and step 2 are printed. More **-v** print internal data for
debugging.

Print a time stamp whenever a new ECM curve or
P+1 or P-1 run is processed.

Use GMP´s mpz_mod function
(sub-quadratic for large inputs, but induces some overhead for small
ones).

Use Montgomery´s multiplication
(quadratic version). Usually best method for small input.

Use Montgomery´s multiplication
(sub-quadratic version). Theoretically optimal for large input.

Disable special base-2 code (which is used
when the input number is a large factor of 2^n+1 or 2^n-1, see
**-v**).

Force use of special base-2 code, input number
must divide 2^ *n*+1 if *n* > 0, or 2^| *n*|-1 if *n*
< 0.

Take input from file *file* instead of
from standard input.

Save result of step 1 in *file*. If
*file* exists, an error is raised. Example: to perform only step 1 with
*B1*=1000000 on the composite number in the file "c155" and
save its result in file "foo", use

ecm -save foo 1e6 1 < c155

Like **-save**, but appends to existing
files.

Resume residues from *file*, reads from
standard input if *file* is "-". Example: to perform step 2
following the above step 1 computation, use

ecm -resume foo 1e6

Periodically write the current residue in
stage 1 to *file*. In case of a power failure, etc., the computation can
be continued with the **-resume** option.

ecm -chkpnt foo -pm1 1e10 < largenumber.txt

Perform *n* runs on each input number
(default is one). This option is mainly useful for P+1 (for example with
*n*=3) or for ECM, where *n* could be set to the expected number of
curves to find a d-digit factor with a given step 1 bound. This option is
incompatible with **-resume, -sigma, -x0**. Giving **-c 0** produces an
infinite loop until a factor is found.

In loop mode, stop when a factor is found; the
default is to continue until the cofactor is prime or the specified number of
runs are done.

Breadth-first processing: in loop mode, run
one curve for each input number, then a second curve for each one, and so on.
This is the default mode with **-inp**.

Depth-first processing: in loop mode, run
*n* curves for the first number, then *n* curves for the second one
and so on. This is the default mode with standard input.

In loop mode, multiply *B1* by a factor
depending on *n* after each curve. Default is one which should be optimal
on one machine, while **-I 10** could be used when trying to factor the
same number simultaneously on 10 identical machines.

Add *n* seconds to stage 1 time. This is
useful to get correct expected time with *-v* if part of stage 1 was done
in another run.

Display a short description of ecm usage,
parameters and command line options.

Prints configuration parameters used for the
compilation and exits.

0 if normal program termination, 1 if error
occurred

Bit 1
0 if no proper factor was found, 1
otherwise

Bit 2
0 if factor is composite, 1 if factor is a
probable prime

Bit 3
0 if cofactor is composite, 1 if cofactor is a
probable prime

Thus, the following exit status values may occur:
0
Normal program termination, no factor
found

1
Error

2
Composite factor found, cofactor is
composite

6
Probable prime factor found, cofactor is
composite

8
Input number found

10
Composite factor found, cofactor is a probable
prime

14
Probable prime factor found, cofactor is a
probable prime

03/01/2013 | April 22, 2003 |