Struct paillier::EncryptionKey [−][src]
pub struct EncryptionKey { /* fields omitted */ }
Public encryption key.
Trait Implementations
impl<'e> From<&'e EncryptionKey> for MinimalEncryptionKey
[src]
impl<'e> From<&'e EncryptionKey> for MinimalEncryptionKey
fn from(ek: &'e EncryptionKey) -> Self
[src]
fn from(ek: &'e EncryptionKey) -> Self
Performs the conversion.
impl<'e> From<MinimalEncryptionKey> for EncryptionKey
[src]
impl<'e> From<MinimalEncryptionKey> for EncryptionKey
fn from(ek: MinimalEncryptionKey) -> Self
[src]
fn from(ek: MinimalEncryptionKey) -> Self
Performs the conversion.
impl<'kp> From<&'kp Keypair> for EncryptionKey
[src]
impl<'kp> From<&'kp Keypair> for EncryptionKey
impl<'n> From<&'n BigInt> for EncryptionKey
[src]
impl<'n> From<&'n BigInt> for EncryptionKey
impl Serialize for EncryptionKey
[src]
impl Serialize for EncryptionKey
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for EncryptionKey
[src]
impl<'de> Deserialize<'de> for EncryptionKey
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<'m, 'd> Encrypt<EncryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
[src]
impl<'m, 'd> Encrypt<EncryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
fn encrypt(ek: &EncryptionKey, m: RawPlaintext<'m>) -> RawCiphertext<'d>
[src]
fn encrypt(ek: &EncryptionKey, m: RawPlaintext<'m>) -> RawCiphertext<'d>
Encrypt plaintext m
under key ek
into a ciphertext.
impl<'m, 'r, 'd> EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
[src]
impl<'m, 'r, 'd> EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
r: &'r Randomness
) -> RawCiphertext<'d>
[src]
fn encrypt_with_chosen_randomness(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
r: &'r Randomness
) -> RawCiphertext<'d>
impl<'m, 'r, 'd> EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r PrecomputedRandomness, RawCiphertext<'d>> for Paillier
[src]
impl<'m, 'r, 'd> EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r PrecomputedRandomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
rn: &'r PrecomputedRandomness
) -> RawCiphertext<'d>
[src]
fn encrypt_with_chosen_randomness(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
rn: &'r PrecomputedRandomness
) -> RawCiphertext<'d>
impl<'ek, 'r> PrecomputeRandomness<&'ek EncryptionKey, &'r BigInt, PrecomputedRandomness> for Paillier
[src]
impl<'ek, 'r> PrecomputeRandomness<&'ek EncryptionKey, &'r BigInt, PrecomputedRandomness> for Paillier
fn precompute(ek: &'ek EncryptionKey, r: &'r BigInt) -> PrecomputedRandomness
[src]
fn precompute(ek: &'ek EncryptionKey, r: &'r BigInt) -> PrecomputedRandomness
impl<'c, 'd> Rerandomize<EncryptionKey, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
[src]
impl<'c, 'd> Rerandomize<EncryptionKey, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
fn rerandomize(ek: &EncryptionKey, c: RawCiphertext<'c>) -> RawCiphertext<'d>
[src]
fn rerandomize(ek: &EncryptionKey, c: RawCiphertext<'c>) -> RawCiphertext<'d>
Rerandomise ciphertext c
to hide any history of which homomorphic operations were used to compute it, making it look exactly like a fresh encryption of the same plaintext. Read more
impl<'c1, 'c2, 'd> Add<EncryptionKey, RawCiphertext<'c1>, RawCiphertext<'c2>, RawCiphertext<'d>> for Paillier
[src]
impl<'c1, 'c2, 'd> Add<EncryptionKey, RawCiphertext<'c1>, RawCiphertext<'c2>, RawCiphertext<'d>> for Paillier
fn add(
ek: &EncryptionKey,
c1: RawCiphertext<'c1>,
c2: RawCiphertext<'c2>
) -> RawCiphertext<'d>
[src]
fn add(
ek: &EncryptionKey,
c1: RawCiphertext<'c1>,
c2: RawCiphertext<'c2>
) -> RawCiphertext<'d>
Homomorphically combine ciphertexts c1
and c2
to obtain a ciphertext containing the sum of the two underlying plaintexts, reduced modulus n
from ek
. Read more
impl<'c, 'm, 'd> Add<EncryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
[src]
impl<'c, 'm, 'd> Add<EncryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
fn add(
ek: &EncryptionKey,
c: RawCiphertext<'c>,
m: RawPlaintext<'m>
) -> RawCiphertext<'d>
[src]
fn add(
ek: &EncryptionKey,
c: RawCiphertext<'c>,
m: RawPlaintext<'m>
) -> RawCiphertext<'d>
Homomorphically combine ciphertexts c1
and c2
to obtain a ciphertext containing the sum of the two underlying plaintexts, reduced modulus n
from ek
. Read more
impl<'c, 'm, 'd> Add<EncryptionKey, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
[src]
impl<'c, 'm, 'd> Add<EncryptionKey, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
fn add(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
c: RawCiphertext<'c>
) -> RawCiphertext<'d>
[src]
fn add(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
c: RawCiphertext<'c>
) -> RawCiphertext<'d>
Homomorphically combine ciphertexts c1
and c2
to obtain a ciphertext containing the sum of the two underlying plaintexts, reduced modulus n
from ek
. Read more
impl<'c, 'm, 'd> Mul<EncryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
[src]
impl<'c, 'm, 'd> Mul<EncryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
fn mul(
ek: &EncryptionKey,
c: RawCiphertext<'c>,
m: RawPlaintext<'m>
) -> RawCiphertext<'d>
[src]
fn mul(
ek: &EncryptionKey,
c: RawCiphertext<'c>,
m: RawPlaintext<'m>
) -> RawCiphertext<'d>
Homomorphically combine ciphertext c1
and plaintext m2
to obtain a ciphertext containing the multiplication of the (underlying) plaintexts, reduced modulus n
from ek
. Read more
impl<'c, 'm, 'd> Mul<EncryptionKey, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
[src]
impl<'c, 'm, 'd> Mul<EncryptionKey, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
fn mul(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
c: RawCiphertext<'c>
) -> RawCiphertext<'d>
[src]
fn mul(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
c: RawCiphertext<'c>
) -> RawCiphertext<'d>
Homomorphically combine ciphertext c1
and plaintext m2
to obtain a ciphertext containing the multiplication of the (underlying) plaintexts, reduced modulus n
from ek
. Read more
impl<'m, 'r, 'c, R, CT> CorrectOpening<EncryptionKey, RawPlaintext<'m>, &'r R, &'c CT> for Paillier where
Self: EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r R, CT>,
CT: PartialEq,
[src]
impl<'m, 'r, 'c, R, CT> CorrectOpening<EncryptionKey, RawPlaintext<'m>, &'r R, &'c CT> for Paillier where
Self: EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r R, CT>,
CT: PartialEq,
fn verify_opening(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
r: &'r R,
c: &'c CT
) -> bool
[src]
fn verify_opening(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
r: &'r R,
c: &'c CT
) -> bool
impl CorrectKey<EncryptionKey, DecryptionKey> for Paillier
[src]
impl CorrectKey<EncryptionKey, DecryptionKey> for Paillier
fn challenge(ek: &EncryptionKey) -> (Challenge, VerificationAid)
[src]
fn challenge(ek: &EncryptionKey) -> (Challenge, VerificationAid)
Generate challenge for given encryption key.
fn prove(
dk: &DecryptionKey,
challenge: &Challenge
) -> Result<CorrectKeyProof, CorrectKeyProofError>
[src]
fn prove(
dk: &DecryptionKey,
challenge: &Challenge
) -> Result<CorrectKeyProof, CorrectKeyProofError>
Generate proof given decryption key.
fn verify(
proof: &CorrectKeyProof,
va: &VerificationAid
) -> Result<(), CorrectKeyProofError>
[src]
fn verify(
proof: &CorrectKeyProof,
va: &VerificationAid
) -> Result<(), CorrectKeyProofError>
Verify proof.
impl Clone for EncryptionKey
[src]
impl Clone for EncryptionKey
fn clone(&self) -> EncryptionKey
[src]
fn clone(&self) -> EncryptionKey
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for EncryptionKey
[src]
impl Debug for EncryptionKey
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for EncryptionKey
[src]
impl PartialEq for EncryptionKey
fn eq(&self, other: &EncryptionKey) -> bool
[src]
fn eq(&self, other: &EncryptionKey) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &EncryptionKey) -> bool
[src]
fn ne(&self, other: &EncryptionKey) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for EncryptionKey
impl Send for EncryptionKey
impl Sync for EncryptionKey
impl Sync for EncryptionKey