mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-12 01:55:48 +00:00
Change signature verification equation to permit batch verification.
This commit is contained in:
parent
3e43cae526
commit
cae9715a8e
@ -145,8 +145,11 @@ impl<E: JubjubEngine> PublicKey<E> {
|
||||
Ok(s) => s,
|
||||
Err(_) => return false,
|
||||
};
|
||||
// S . P_G = R + c . vk
|
||||
self.0.mul(c, params).add(&r, params) == params.generator(p_g).mul(s, params).into()
|
||||
// 0 = 8(-S . P_G + R + c . vk)
|
||||
self.0.mul(c, params).add(&r, params).add(
|
||||
¶ms.generator(p_g).mul(s, params).negate().into(),
|
||||
params
|
||||
).mul_by_cofactor(params).eq(&Point::zero())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user