Browse Source
Specify pre-conditions for signature validation
ci_integration
Jack Grigg
6 years ago
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with
4 additions and
0 deletions
-
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]; |
|
|
|