Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

verify

Verifies that two encryptions for two keys are valid and that they are encrypting the same amount b. For this proof, the prover knows only one of the randoms values and knows the secret of the public key that does not know the random for. Let (L1, R1) = (g^b y^_r, g^_r), _r is unknown to the prover. The prover can decrypt b with the knowledge of x. By showing that L1 = g^b R^x whe can prove that the ElGamal encryption indeed encrypts b. The protocol runs as follows

    P:  kx, kb, kr <-- R     sends    Ax=g^kx, AL1 = g^kb R^kx, AL2 = g^kb y2^kr, AR2 = g^kr
    V:  c <-- R              sends    c
    P:  sx = k + c*x         sends    s
    P:  sb = kb + c*b        sends    sb
    P:  sr = kr + c*r        sends    sr

The verifier asserts:

  • g^sx == Ax * (y^c) [poe]

  • g^sb R1^sx == AL1 * (L1^c) [poe2]

  • verifyElGamal for (L2,R2)

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

EC_MUL: 10; EC_ADD: 6

Fully qualified path: she::protocols::SameEncryptionUnknownRandom::verify

pub fn verify(
    inputs: SameEncryptionUnknownRandomInputs, proof: SameEncryptionUnknownRandomProof,
) -> Result<(), Errors>