Browse Source

Specify pre-conditions for signature validation

ci_integration
Jack Grigg 6 years ago
parent
commit
840c23bd23
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 4
      src/redjubjub.rs

4
src/redjubjub.rs

@ -71,6 +71,10 @@ impl<E: JubjubEngine> PublicKey<E> {
PublicKey(res)
}
// Pre-conditions:
// - rbar was the canonical representation of a point on the curve.
// - sig.s < order(G)
// TODO(str4d): Enforce these during deserialization of Signature
pub fn verify(&self, msg: &[u8], sig: &Signature<E>, params: &E::Params) -> bool {
// c = H*(Rbar || M)
let mut rbar = [0u8; 32];

Loading…
Cancel
Save