[][src]Function rust_elgamal::util::random_point

pub fn random_point<R: RngCore + CryptoRng>(mut rng: R) -> RistrettoPoint

Generate a random curve point from the provided randomness source.

Note: Unfortunately curve25519-dalek uses an old version of rand, so we need to copy its implementation of RistrettoPoint::random. See also https://github.com/dalek-cryptography/curve25519-dalek/pull/338.

Source: https://github.com/dalek-cryptography/curve25519-dalek/blob/master/src/ristretto.rs