Function elgamal::generate_keys
source · pub fn generate_keys(
randomness: &mut Randomness
) -> Result<(DecryptionKey, EncryptionKey), Error>
Expand description
To generate a pair of encryption and decryption keys, first the decryption key is drawn uniformly at random from the set of scalars. Then the corresponding encryption key is generated by scalar multiplication of the group generator with the decryption key.