diff --git a/src/lib.rs b/src/lib.rs index 56ebf1e..ab7e7d8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,6 +77,9 @@ pub trait Field: /// Returns an element chosen uniformly at random using a user-provided RNG. fn random(rng: &mut R) -> Self; + /// Returns an element chosen uniformly at random using a user-provided RNG. + fn try_from_rng(rng: &mut R) -> Self; + /// Returns true iff this element is zero. fn is_zero(&self) -> Choice { self.ct_eq(&Self::ZERO)