From a1e2c83d3183f1f83c86b675cd18be867509566b Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Wed, 25 Jul 2018 18:52:52 -0400 Subject: [PATCH] Fix distribution of curve points for hashing to Ristretto points. --- src/ristretto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ristretto.rs b/src/ristretto.rs index c0041f5..0976eef 100644 --- a/src/ristretto.rs +++ b/src/ristretto.rs @@ -646,7 +646,7 @@ impl RistrettoPoint { let R_1 = RistrettoPoint::elligator_ristretto_flavor(&r_1); let mut r_2_bytes = [0u8; 32]; - r_2_bytes.copy_from_slice(&output.as_slice()[0..32]); + r_2_bytes.copy_from_slice(&output.as_slice()[32..64]); let r_2 = FieldElement::from_bytes(&r_2_bytes); let R_2 = RistrettoPoint::elligator_ristretto_flavor(&r_2);