Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

_verify

Proof of Bit: verifies that a commited V = g^b h^r is the ciphertext of either b=0 OR b=1. If b=0 then V = h^r and a proof of exponet for r is enough. If b=1 then V/g = h^r can be also proven with a POE. This is combined in a OR statement and the protocol can validate that one of the cases is valid without leaking which one is the valid one.

EC_MUL: 4; EC_ADD: 3

Fully qualified path: she::protocols::bit::_verify

pub fn _verify(
    V: NonZero<EcPoint>,
    g1: NonZero<EcPoint>,
    g2: NonZero<EcPoint>,
    A0: NonZero<EcPoint>,
    A1: NonZero<EcPoint>,
    c: felt252,
    c0: felt252,
    s0: felt252,
    s1: felt252,
) -> Result<(), Errors>