Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

_verify

Proof of Exponent 2: validate a proof of knowledge of the exponent y = g1^x1 g2^x2. The sigma protocol runs as follows:

    P:  k1,k2 <-- R        sends    A = g1^k1 g2^k2
    V:  c <-- R            sends    c
    P:  s1 = k1 + c*x1
    P:  s2 = k2 + c*x2     sends    s1, s2

The verifier asserts:

  • g1^s1 g2^s2 == A * (y^c)

notation: (P)rover (V)erifier (R)andom

EC_MUL: 3; EC_ADD: 2

Fully qualified path: she::protocols::poe2::_verify

pub fn _verify(
    y: NonZero<EcPoint>,
    g1: NonZero<EcPoint>,
    g2: NonZero<EcPoint>,
    A: NonZero<EcPoint>,
    c: felt252,
    s1: felt252,
    s2: felt252,
) -> Result<(), Errors>