Skip to main content

Module elgamal

Module elgamal 

Source
Expand description

The ElGamal cryptosystem, as used in PEP

Modules§

rsk
Utilities for Triple::rsk
serde_impls 🔒

Macros§

osrng 🔒

Structs§

PrivateKey
Private key - load using PrivateKey::from_hex or generate with PrivateKey::random.
PublicKey
Public key - obtained using PublicKey::from_hex or PrivateKey::public_key.
SharedSecret
Shared secret created by combining a PrivateKey with a PublicKey, which, although it is basically the encoding of a RistrettoPoint, is given a separate interface to limit its usage.
Triple
ElGamal ciphertext - the result of PublicKey::encrypt.

Traits§

Encoding
Adds encoding and decoding methods to PrivateKey, PublicKey, Triple, Scalar and RistrettoPoint which can all be represented as [u8; N]s for some N.

Functions§

random_point
Returns a random Ristretto point, mainly for examples.
random_scalar
Returns a random scalar, mainly for examples.