Documentation ¶
Index ¶
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.