Package de.tilman_neumann.jml.factor.ecm
Class TinyEcm63
- java.lang.Object
-
- de.tilman_neumann.jml.factor.FactorAlgorithm
-
- de.tilman_neumann.jml.factor.ecm.TinyEcm63
-
public class TinyEcm63 extends FactorAlgorithm
A port of Ben Buhrow's tinyecm.c (https://www.mersenneforum.org/showpost.php?p=521028&postcount=84) an ECM implementation for unsigned 64 bit integers. This variant ignores carry-bits in the multiplication of 64 bit integers. Fails for more N than TinyEcm64 when N>54 bit.- Author:
- Tilman Neumann
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TinyEcm63.EcmResult
-
Field Summary
-
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
DEFAULT, NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit
-
-
Constructor Summary
Constructors Constructor Description TinyEcm63()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BigInteger
findSingleFactor(BigInteger N)
Find a single factor of the given N, which is composite and odd.String
getName()
static void
main(String[] args)
static long
montMul63(long a, long b, long N, long Nhat)
Montgomery multiplication of a*b mod n with regard to R=2^63.-
Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor, factor, searchFactors
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in classFactorAlgorithm
- Returns:
- The name of the algorithm, possibly including important parameters.
-
montMul63
public static long montMul63(long a, long b, long N, long Nhat)
Montgomery multiplication of a*b mod n with regard to R=2^63. ("mulredc63x" in Yafu)- Parameters:
a
-b
-N
-Nhat
- complement of N mod 2^63- Returns:
- Montgomery multiplication of a*b mod n
-
findSingleFactor
public BigInteger findSingleFactor(BigInteger N)
Description copied from class:FactorAlgorithm
Find a single factor of the given N, which is composite and odd.- Specified by:
findSingleFactor
in classFactorAlgorithm
- Returns:
- factor
-
main
public static void main(String[] args)
-
-