factorlib

package module
v0.0.0-...-a59e713 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2019 License: Unlicense Imports: 11 Imported by: 0

README

factorlib

A library for factoring big integers in Go

Author: Keith Randall

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Factorizers = map[string]func(big.Int, *rand.Rand, *log.Logger) ([]big.Int, error){
	"trial":      trial.Factor,
	"primepower": primepower.Factor,
	"ecm":        ecm.Factor,
	"qs":         qs.Factor,
	"mpqs":       mpqs.Factor,
}

Set of factoring algorithms to choose from. Algorithms can add themselves here in an initializer. Eventually, we should choose one automagically.

Functions

func Factor

func Factor(n big.Int, alg string, rnd *rand.Rand, logger *log.Logger) ([]big.Int, error)

Factor returns the prime factorization of n. alg is a hint about which factoring algorithm to choose. rnd is a random source for use by the factoring algorithm.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL