DecryptionFactorVerifier

helios_verifier.verifiers.DecryptionFactorVerifier.verify_partial_decryption_proof(ciphertext, decryption_factor, proof, public_key)

Protocol verifying that the given decryption factor decrypts to the claimed result with the claimed proof. This means proving that (public_key.g, public_key.y, ciphertext.alpha, decryption_factor) is a DDH tuple and therefore proving the knowledge of the secret key.

Parameters
  • ciphertext – ciphertext of an encrypted answer (choice)

  • decryption_factor – decryption_factor corresponding to the encrypted choice

  • proof – ZKProof corresponding to the encrypted choice

  • public_key – public_key of the election

Returns

bool, False if the discrete logs are not equal or the challenges do not match, True otherwise