Struct zk_paillier::zkproofs::CorrectKey
source · pub struct CorrectKey;
Expand description
Zero-knowledge proof of co-primality between the encryption modulus and its order.
The sub-protocol for proving knowledge of challenge plaintexts is made non-interactive using the Fiat-Shamir heuristic.
References:
- section 3.1 in Lindell’17
- section 3.3 in HMRTN’12
- section 4.2 in DJ’01
Implementations
sourceimpl CorrectKey
impl CorrectKey
pub fn challenge(ek: &EncryptionKey) -> (Challenge, VerificationAid)
pub fn prove(
dk: &DecryptionKey,
challenge: &Challenge
) -> Result<CorrectKeyProof, CorrectKeyProveError>
pub fn verify(
proof: &CorrectKeyProof,
va: &VerificationAid
) -> Result<(), IncorrectProof>
Auto Trait Implementations
impl RefUnwindSafe for CorrectKey
impl Send for CorrectKey
impl Sync for CorrectKey
impl Unpin for CorrectKey
impl UnwindSafe for CorrectKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more