Skip to content

Commit

Permalink
elliptic-curve: relax Sized requirements on Rng (#1767)
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo authored Feb 23, 2025
1 parent fbb4321 commit 28b6e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elliptic-curve/src/scalar/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ where
C: CurveArithmetic,
{
/// Generate a random `NonZeroScalar`.
pub fn random<R: CryptoRng>(mut rng: &mut R) -> Self {
pub fn random<R: CryptoRng + ?Sized>(mut rng: &mut R) -> Self {
// Use rejection sampling to eliminate zero values.
// While this method isn't constant-time, the attacker shouldn't learn
// anything about unrelated outputs so long as `rng` is a secure `CryptoRng`.
Expand Down

0 comments on commit 28b6e0d

Please sign in to comment.