Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGermainPrime ¶
GetGermainPrime returns a prime number p for which 2*p + 1 is also prime. Note that conversely 2*p + 1 is called a safe prime.
Types ¶
type ElGamal ¶
type ElGamal struct { Y *big.Int // public key G *big.Int // generator P *big.Int // modulus Q *big.Int // (P - 1) / 2, i.e. order of G }
ElGamal holds paramenters for ElGamal scheme.
func NewElGamal ¶
NewElGamal creates parameters for ElGamal scheme. Implementation is adapted from https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/PublicKey/ElGamal.py.
Click to show internal directories.
Click to hide internal directories.