Documentation
¶
Index ¶
Constants ¶
const ( POLLARD_RHO = iota POLLARD_PMINUS1 WILLIAM_PPLUS1 LENSTRA_ECM QUADRATIC_SIEVE )
list of known algorithms
const ( PM1_RETRY = 100 PM1_BMAX = 10000 )
Algorithm constants
const ( RHO_RETRY = 100 RHO_LOOP = 8192 )
Algorithm constants
const ( PP1_MAXSTEP = 100 PP1_AMAX = 10000 )
Algorithm constants
const (
INTERVAL_SIZE = 1000000
)
Variables ¶
var MAX_SMALL = math.NewInt(25000)
MAX_SMALL is the number of small primes to be (always) checked
Functions ¶
This section is empty.
Types ¶
type EllipticCurve ¶
type EllipticCurve struct {
// contains filtered or unexported fields
}
Simple elliptic curve in Montgomery representation: By^2= x^3 + Ax^2 + x"
func NewEllipticCurve ¶
func NewEllipticCurve(n *math.Int, g *Point) *EllipticCurve
Instanciate a random elliptic curve over Fn through point P @param n - field generator (mod n) @param g Point - base point (generator)
type FactorFinder ¶
FactorFinder interface implement by different algorithms
type Factorizer ¶
type Factorizer struct {
// contains filtered or unexported fields
}
Factorizer uses various algorithm for integer factorization
func NewFactorizer ¶
func NewFactorizer(algs ...int) *Factorizer
Instantiate new Factorizer with given algorithms. @param algs - list of algorithm identifiers
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
Simple point in Montgomery representation (affine coordinates).
type Pollard_Pminus1 ¶
type Pollard_Pminus1 struct{}
Find a factor of number n using Pollards p-1 algorithm.
type Pollard_rho ¶
type Pollard_rho struct{}
Find a factor of number n using Pollards rho algorithm.
type ProjPoint ¶
type ProjPoint struct {
Point
// contains filtered or unexported fields
}
Point in projective coordionates.
func NewProjPoint ¶
Instanciate projective point from affine coordinates @param P - point in affine coordinates @return - projective point
type QuadraticSieve ¶
type QuadraticSieve struct{}
Decompose integer into two (hopefully prime) factors using the quadratic
type William_Pplus1 ¶
type William_Pplus1 struct{}
Find a factor of number n using Williams p+1 algorithm.