group: Document that Group::random is non-deterministic

This commit is contained in:
Jack Grigg 2020-08-12 08:16:44 +01:00
parent ed6b7eceef
commit 418cba0e85
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ pub trait Group:
/// Scalars modulo the order of this group's scalar field.
type Scalar: PrimeField;
/// Returns an element chosen uniformly at random using a user-provided RNG.
/// Returns an element chosen uniformly at random from this group.
///
/// This function is non-deterministic, and samples from the user-provided RNG.
fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self;
/// Returns the additive identity, also known as the "neutral element".