Documentation
¶
Index ¶
- Constants
- func Abs(x *big.Int) *big.Int
- func BarrettReduce(x, q, mu uint64) uint64
- func BitReverse(x int) int
- func FactorByPollardRho(n *big.Int) []uint64
- func FindPrimitiveRoots(q, order uint64, factors []uint64) uint64
- func ModInverse32(q uint32) uint32
- func ModMul(a, b, mod int) int
- func ModPow(base, exp, mod int) int
- func ModPowWithBarrett(base, exp, q uint64) uint64
Constants ¶
View Source
const MAX_PRIMALITY_CHECK = 5
Variables ¶
This section is empty.
Functions ¶
func BarrettReduce ¶
func BitReverse ¶
func FactorByPollardRho ¶
FactorByPollardRho finds the prime factors by applying PollardRho technique.
func FindPrimitiveRoots ¶
FindPrimitiveRoots discovers all primitive N-th roots of unity modulo Q. It iterates over candidates in [2, Q) and tests each using the Extended Euclidean Algorithm to verify that it generates the full multiplicative order (Q-1)/gcd(N, Q-1) and in returns the count of valid primitive roots.
func ModInverse32 ¶
func ModPowWithBarrett ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.