Trait paillier::proof::RangeProofNI [−][src]
pub trait RangeProofNI { fn prover(
ek: &EncryptionKey,
range: &BigInt,
secret_x: &BigInt,
secret_r: &BigInt
) -> (EncryptedPairs, ChallengeBits, Proof); fn verifier(
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
z: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>; }
Zero-knowledge range proof that a value x<q/3 lies in interval [0,q].
The verifier is given only c = ENC(ek,x). The prover has input x, dk, r (randomness used for calculating c) It is assumed that q is known to both.
References:
- Appendix A in Lindell'17
- Section 1.2.2 in Boudot '00
This is a non-interactive version of the proof, using Fiat Shamir Transform and assuming Random Oracle Model
Required Methods
fn prover(
ek: &EncryptionKey,
range: &BigInt,
secret_x: &BigInt,
secret_r: &BigInt
) -> (EncryptedPairs, ChallengeBits, Proof)
ek: &EncryptionKey,
range: &BigInt,
secret_x: &BigInt,
secret_r: &BigInt
) -> (EncryptedPairs, ChallengeBits, Proof)
fn verifier(
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
z: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
z: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>
Implementors
impl RangeProofNI for Paillier