Struct frost_core::batch::Verifier
source · pub struct Verifier<C: Ciphersuite> { /* private fields */ }
Expand description
A batch verification context.
Implementations§
source§impl<C> Verifier<C>where
C: Ciphersuite,
impl<C> Verifier<C>where C: Ciphersuite,
sourcepub fn verify<R: RngCore + CryptoRng>(self, rng: R) -> Result<(), Error<C>>
pub fn verify<R: RngCore + CryptoRng>(self, rng: R) -> Result<(), Error<C>>
Performs batch verification, returning Ok(())
if all signatures were
valid and Err
otherwise.
The batch verification equation is:
h_G * -[sum(z_i * s_i)]P_G + sum([z_i]R_i + [z_i * c_i]VK_i) = 0_G
which we split out into:
h_G * -[sum(z_i * s_i)]P_G + sum([z_i]R_i) + sum([z_i * c_i]VK_i) = 0_G
so that we can use multiscalar multiplication speedups.
where for each signature i,
- VK_i is the verification key;
- R_i is the signature’s R value;
- s_i is the signature’s s value;
- c_i is the hash of the message and other data;
- z_i is a random 128-bit Scalar;
- h_G is the cofactor of the group;
- P_G is the generator of the subgroup;
As follows elliptic curve scalar multiplication convention, scalar variables are lowercase and group point variables are uppercase. This does not exactly match the RedDSA notation in the protocol specification §B.1.