mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
Merge pull request #233 from dalek-cryptography/revert-rng-changes-from-219
Revert #219.
This commit is contained in:
commit
d4cc9997ec
2 changed files with 2 additions and 2 deletions
|
|
@ -638,7 +638,7 @@ impl RistrettoPoint {
|
|||
/// discrete log of the output point with respect to any other
|
||||
/// point should be unknown. The map is applied twice and the
|
||||
/// results are added, to ensure a uniform distribution.
|
||||
pub fn random<T: RngCore + CryptoRng>(mut rng: T) -> Self {
|
||||
pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self {
|
||||
let mut uniform_bytes = [0u8; 64];
|
||||
rng.fill_bytes(&mut uniform_bytes);
|
||||
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ impl Scalar {
|
|||
/// let mut csprng: OsRng = OsRng::new().unwrap();
|
||||
/// let a: Scalar = Scalar::random(&mut csprng);
|
||||
/// # }
|
||||
pub fn random<T: RngCore + CryptoRng>(mut rng: T) -> Self {
|
||||
pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self {
|
||||
let mut scalar_bytes = [0u8; 64];
|
||||
rng.fill_bytes(&mut scalar_bytes);
|
||||
Scalar::from_bytes_mod_order_wide(&scalar_bytes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue