Browse Source

Match additive notation with variable name

master
Jack Grigg 7 years ago
parent
commit
45e4ca38e4
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
  1. 6
      src/redjubjub.rs

6
src/redjubjub.rs

@ -37,11 +37,11 @@ impl<E: JubjubEngine> PrivateKey<E> {
let r = h_star::<E>(&t[..], msg); let r = h_star::<E>(&t[..], msg);
// R = r . G // R = r . G
let g_r = params let r_g = params
.generator(FixedGenerators::SpendingKeyGenerator) .generator(FixedGenerators::SpendingKeyGenerator)
.mul(r, params); .mul(r, params);
let mut rbar = [0u8; 32]; let mut rbar = [0u8; 32];
g_r.write(&mut rbar[..]) r_g.write(&mut rbar[..])
.expect("Jubjub points should serialize to 32 bytes"); .expect("Jubjub points should serialize to 32 bytes");
// S = r + H*(Rbar || M) . sk // S = r + H*(Rbar || M) . sk
@ -49,7 +49,7 @@ impl<E: JubjubEngine> PrivateKey<E> {
s.mul_assign(&self.0); s.mul_assign(&self.0);
s.add_assign(&r); s.add_assign(&r);
Signature { r: g_r.into(), s } Signature { r: r_g.into(), s }
} }
} }

Loading…
Cancel
Save