Struct zk_paillier::zkproofs::CorrectMessageProof
source · pub struct CorrectMessageProof { /* private fields */ }
Expand description
In the case that the message space size is small (a message can be only one of a few possibilities ), it is possible to create a “ring” like structure that proves that the encrypted value is a message from the message space without revealing the message. reference: https://paillier.daylightingsociety.org/Paillier_Zero_Knowledge_Proof.pdf
Implementations
sourceimpl CorrectMessageProof
impl CorrectMessageProof
pub fn prove(
ek: &EncryptionKey,
valid_messages: &[BigInt],
message_to_encrypt: &BigInt
) -> CorrectMessageProof
pub fn verify(&self) -> Result<(), IncorrectProof>
Auto Trait Implementations
impl RefUnwindSafe for CorrectMessageProof
impl Send for CorrectMessageProof
impl Sync for CorrectMessageProof
impl Unpin for CorrectMessageProof
impl UnwindSafe for CorrectMessageProof
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