ProofVerifier
- helios_verifier.verifiers.ProofVerifier.verify_disjunctive_0_max_proof(ciphertext, max, disjunctive_proof, public_key)
Verifies a list of max disjunctive zero-knowledge proofs, one for each possible value of the plaintext between 0 and max. The challenges of all the single zero-knowledge proofs must sum up to the actual challenge of the protocol to ensure that there is one real proof whereas the others are simulated
- Parameters
ciphertext – ElGamalCiphertext
max – maximum value that the ciphertext encodes (a ciphertext encodes a value between o and max)
disjunctive_proof – list[ZkProof], one for each value between 0 and max
public_key – public_key of the election
- Returns
bool indicating whether verification succeeded or not
- helios_verifier.verifiers.ProofVerifier.verify_proof(ciphertext, plaintext, proof, public_key)
Verification of an individual non-interactive proof according to the Chaum-Pedersen protocol that the corresponding ciphertext encodes the integer given by the plaintext
- Parameters
ciphertext – ElGamalCiphertext
plaintext – plain value encoded by the ciphertext
proof – (Chaum-Pedersen-) ZkProof for the plaintext encoded by the ciphertext
public_key – public_key of the election
- Returns
bool indicating whether the verification succeeded or not