Skip to content

Commit 28b6e0d

Browse files
authored
elliptic-curve: relax Sized requirements on Rng (#1767)
1 parent fbb4321 commit 28b6e0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elliptic-curve/src/scalar/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ where
4747
C: CurveArithmetic,
4848
{
4949
/// Generate a random `NonZeroScalar`.
50-
pub fn random<R: CryptoRng>(mut rng: &mut R) -> Self {
50+
pub fn random<R: CryptoRng + ?Sized>(mut rng: &mut R) -> Self {
5151
// Use rejection sampling to eliminate zero values.
5252
// While this method isn't constant-time, the attacker shouldn't learn
5353
// anything about unrelated outputs so long as `rng` is a secure `CryptoRng`.

0 commit comments

Comments
 (0)