Struct zk_paillier::zkproofs::NiCorrectKeyProof
source · Expand description
This protocol is based on the NIZK protocol in https://eprint.iacr.org/2018/057.pdf for parameters = e = N, m2 = 11, alpha = 6370 see https://eprint.iacr.org/2018/987.pdf 6.2.3 for full details.
Fields
sigma_vec: Vec<BigInt>
Implementations
sourceimpl NiCorrectKeyProof
impl NiCorrectKeyProof
pub fn proof(
dk: &DecryptionKey,
salt_str: Option<&'static [u8]>
) -> NiCorrectKeyProof
pub fn verify(
&self,
ek: &EncryptionKey,
salt_str: &[u8]
) -> Result<(), IncorrectProof>
Trait Implementations
sourceimpl Clone for NiCorrectKeyProof
impl Clone for NiCorrectKeyProof
sourcefn clone(&self) -> NiCorrectKeyProof
fn clone(&self) -> NiCorrectKeyProof
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for NiCorrectKeyProof
impl Debug for NiCorrectKeyProof
sourceimpl<'de> Deserialize<'de> for NiCorrectKeyProof
impl<'de> Deserialize<'de> for NiCorrectKeyProof
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for NiCorrectKeyProof
impl Serialize for NiCorrectKeyProof
Auto Trait Implementations
impl RefUnwindSafe for NiCorrectKeyProof
impl Send for NiCorrectKeyProof
impl Sync for NiCorrectKeyProof
impl Unpin for NiCorrectKeyProof
impl UnwindSafe for NiCorrectKeyProof
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