Documentation ¶
Index ¶
- func GenerateSafePrime(bits int, values chan *big.Int, quit chan int) (p *big.Int, err error)
- func IsInInterval(b *big.Int, bound *big.Int) bool
- func RandomNum(n *big.Int) *big.Int
- func RandomPrimeNum(n *big.Int) (*big.Int, error)
- func SHA256Int(in ...*big.Int) *big.Int
- func SHA512Int(in ...*big.Int) *big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSafePrime ¶
GenerateSafePrime generates a prime number `p`; a prime 'p' such that 2p+1 is also prime.
func RandomNum ¶
RandomNum generates a random number r, 1 < r < n. Input n has to be greater than 1, otherwise panic
func RandomPrimeNum ¶
RandomPrimeNum `r < n` and `gcd(r,n) = 1`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.