mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-11-02 12:27:02 +00:00
Specify pre-conditions for signature validation
This commit is contained in:
@@ -71,6 +71,10 @@ impl<E: JubjubEngine> PublicKey<E> {
|
|||||||
PublicKey(res)
|
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 {
|
pub fn verify(&self, msg: &[u8], sig: &Signature<E>, params: &E::Params) -> bool {
|
||||||
// c = H*(Rbar || M)
|
// c = H*(Rbar || M)
|
||||||
let mut rbar = [0u8; 32];
|
let mut rbar = [0u8; 32];
|
||||||
|
|||||||
Reference in New Issue
Block a user