Struct paillier::Paillier [−][src]
pub struct Paillier;
Main struct onto which most operations are added.
Trait Implementations
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<'m, 'd> Encrypt<DecryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
[src]
impl<'m, 'd> Encrypt<DecryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
fn encrypt(dk: &DecryptionKey, m: RawPlaintext<'m>) -> RawCiphertext<'d>
[src]
fn encrypt(dk: &DecryptionKey, m: RawPlaintext<'m>) -> RawCiphertext<'d>
Encrypt plaintext m
under key ek
into a ciphertext.
impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
[src]
impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness(
dk: &DecryptionKey,
m: RawPlaintext<'m>,
r: &'r Randomness
) -> RawCiphertext<'d>
[src]
fn encrypt_with_chosen_randomness(
dk: &DecryptionKey,
m: RawPlaintext<'m>,
r: &'r Randomness
) -> RawCiphertext<'d>
impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r PrecomputedRandomness, RawCiphertext<'d>> for Paillier
[src]
impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r PrecomputedRandomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness(
dk: &DecryptionKey,
m: RawPlaintext<'m>,
rn: &'r PrecomputedRandomness
) -> RawCiphertext<'d>
[src]
fn encrypt_with_chosen_randomness(
dk: &DecryptionKey,
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<'c, 'm> Decrypt<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
[src]
impl<'c, 'm> Decrypt<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
TODO
Efficient decryption using CRT based on Paillier99, section 7
fn decrypt(dk: &DecryptionKey, c: RawCiphertext<'c>) -> RawPlaintext<'m>
[src]
fn decrypt(dk: &DecryptionKey, c: RawCiphertext<'c>) -> RawPlaintext<'m>
Decrypt ciphertext c
using key dk
into a plaintext.
impl<'c, 'm> Decrypt<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
[src]
impl<'c, 'm> Decrypt<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
TODO
Efficient decryption using CRT based on Paillier99, section 7
fn decrypt(dk: &DecryptionKey, c: &'c RawCiphertext<'c>) -> RawPlaintext<'m>
[src]
fn decrypt(dk: &DecryptionKey, c: &'c RawCiphertext<'c>) -> RawPlaintext<'m>
Decrypt ciphertext c
using key dk
into a plaintext.
impl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
[src]
impl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
fn open(
dk: &DecryptionKey,
c: RawCiphertext<'c>
) -> (RawPlaintext<'m>, Randomness)
[src]
fn open(
dk: &DecryptionKey,
c: RawCiphertext<'c>
) -> (RawPlaintext<'m>, Randomness)
Open ciphertext c
using key dk
into a plaintext and a randomness.
impl<'c, 'm> Open<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
[src]
impl<'c, 'm> Open<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
fn open(
dk: &DecryptionKey,
c: &'c RawCiphertext<'c>
) -> (RawPlaintext<'m>, Randomness)
[src]
fn open(
dk: &DecryptionKey,
c: &'c RawCiphertext<'c>
) -> (RawPlaintext<'m>, Randomness)
Open ciphertext c
using key dk
into a plaintext and a randomness.
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<EK> Encrypt<EK, u64, EncodedCiphertext<u64>> for Paillier where
Self: Encrypt<EK, RawPlaintext<'p>, RawCiphertext<'c>>,
[src]
impl<EK> Encrypt<EK, u64, EncodedCiphertext<u64>> for Paillier where
Self: Encrypt<EK, RawPlaintext<'p>, RawCiphertext<'c>>,
fn encrypt(ek: &EK, m: u64) -> EncodedCiphertext<u64>
[src]
fn encrypt(ek: &EK, m: u64) -> EncodedCiphertext<u64>
Encrypt plaintext m
under key ek
into a ciphertext.
impl<'m, EK> Encrypt<EK, &'m [u64], EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Encrypt<EK, RawPlaintext<'p>, RawCiphertext<'c>>,
[src]
impl<'m, EK> Encrypt<EK, &'m [u64], EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Encrypt<EK, RawPlaintext<'p>, RawCiphertext<'c>>,
fn encrypt(ek: &EK, m: &'m [u64]) -> EncodedCiphertext<Vec<u64>>
[src]
fn encrypt(ek: &EK, m: &'m [u64]) -> EncodedCiphertext<Vec<u64>>
Encrypt plaintext m
under key ek
into a ciphertext.
impl<EK, C> Rerandomize<EK, C, EncodedCiphertext<u64>> for Paillier where
Self: Rerandomize<EK, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
[src]
impl<EK, C> Rerandomize<EK, C, EncodedCiphertext<u64>> for Paillier where
Self: Rerandomize<EK, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
fn rerandomize(ek: &EK, c: C) -> EncodedCiphertext<u64>
[src]
fn rerandomize(ek: &EK, c: C) -> EncodedCiphertext<u64>
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<EK, C> Rerandomize<EK, C, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Rerandomize<EK, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
[src]
impl<EK, C> Rerandomize<EK, C, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Rerandomize<EK, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
fn rerandomize(ek: &EK, c: C) -> EncodedCiphertext<Vec<u64>>
[src]
fn rerandomize(ek: &EK, c: C) -> EncodedCiphertext<Vec<u64>>
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<DK, C> Decrypt<DK, C, u64> for Paillier where
Self: Decrypt<DK, RawCiphertext<'c>, RawPlaintext<'p>>,
C: Borrow<EncodedCiphertext<u64>>,
[src]
impl<DK, C> Decrypt<DK, C, u64> for Paillier where
Self: Decrypt<DK, RawCiphertext<'c>, RawPlaintext<'p>>,
C: Borrow<EncodedCiphertext<u64>>,
impl<DK, C> Decrypt<DK, C, Vec<u64>> for Paillier where
Self: Decrypt<DK, RawCiphertext<'c>, RawPlaintext<'p>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
[src]
impl<DK, C> Decrypt<DK, C, Vec<u64>> for Paillier where
Self: Decrypt<DK, RawCiphertext<'c>, RawPlaintext<'p>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
impl<EK, C1, C2> Add<EK, C1, C2, EncodedCiphertext<u64>> for Paillier where
Self: Add<EK, RawCiphertext<'c1>, RawCiphertext<'c2>, RawCiphertext<'d>>,
C1: Borrow<EncodedCiphertext<u64>>,
C2: Borrow<EncodedCiphertext<u64>>,
[src]
impl<EK, C1, C2> Add<EK, C1, C2, EncodedCiphertext<u64>> for Paillier where
Self: Add<EK, RawCiphertext<'c1>, RawCiphertext<'c2>, RawCiphertext<'d>>,
C1: Borrow<EncodedCiphertext<u64>>,
C2: Borrow<EncodedCiphertext<u64>>,
fn add(ek: &EK, c1: C1, c2: C2) -> EncodedCiphertext<u64>
[src]
fn add(ek: &EK, c1: C1, c2: C2) -> EncodedCiphertext<u64>
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<EK, C1, C2> Add<EK, C1, C2, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Add<EK, RawCiphertext<'c1>, RawCiphertext<'c2>, RawCiphertext<'d>>,
C1: Borrow<EncodedCiphertext<Vec<u64>>>,
C2: Borrow<EncodedCiphertext<Vec<u64>>>,
[src]
impl<EK, C1, C2> Add<EK, C1, C2, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Add<EK, RawCiphertext<'c1>, RawCiphertext<'c2>, RawCiphertext<'d>>,
C1: Borrow<EncodedCiphertext<Vec<u64>>>,
C2: Borrow<EncodedCiphertext<Vec<u64>>>,
fn add(ek: &EK, c1: C1, c2: C2) -> EncodedCiphertext<Vec<u64>>
[src]
fn add(ek: &EK, c1: C1, c2: C2) -> EncodedCiphertext<Vec<u64>>
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<EK, C> Add<EK, C, u64, EncodedCiphertext<u64>> for Paillier where
Self: Add<EK, RawCiphertext<'c>, RawPlaintext<'p>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
[src]
impl<EK, C> Add<EK, C, u64, EncodedCiphertext<u64>> for Paillier where
Self: Add<EK, RawCiphertext<'c>, RawPlaintext<'p>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
fn add(ek: &EK, c: C, p: u64) -> EncodedCiphertext<u64>
[src]
fn add(ek: &EK, c: C, p: u64) -> EncodedCiphertext<u64>
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<EK, C> Add<EK, C, u64, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Add<EK, RawCiphertext<'c>, RawPlaintext<'p>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
[src]
impl<EK, C> Add<EK, C, u64, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Add<EK, RawCiphertext<'c>, RawPlaintext<'p>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
fn add(ek: &EK, c: C, p: u64) -> EncodedCiphertext<Vec<u64>>
[src]
fn add(ek: &EK, c: C, p: u64) -> EncodedCiphertext<Vec<u64>>
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<EK, C2> Add<EK, u64, C2, EncodedCiphertext<u64>> for Paillier where
Self: Add<EK, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>>,
C2: Borrow<EncodedCiphertext<u64>>,
[src]
impl<EK, C2> Add<EK, u64, C2, EncodedCiphertext<u64>> for Paillier where
Self: Add<EK, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>>,
C2: Borrow<EncodedCiphertext<u64>>,
fn add(ek: &EK, m1: u64, c2: C2) -> EncodedCiphertext<u64>
[src]
fn add(ek: &EK, m1: u64, c2: C2) -> EncodedCiphertext<u64>
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<EK, C> Mul<EK, C, u64, EncodedCiphertext<u64>> for Paillier where
Self: Mul<EK, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
[src]
impl<EK, C> Mul<EK, C, u64, EncodedCiphertext<u64>> for Paillier where
Self: Mul<EK, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
fn mul(ek: &EK, c: C, m: u64) -> EncodedCiphertext<u64>
[src]
fn mul(ek: &EK, c: C, m: u64) -> EncodedCiphertext<u64>
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<EK, C> Mul<EK, C, u64, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Mul<EK, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
[src]
impl<EK, C> Mul<EK, C, u64, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Mul<EK, RawCiphertext<'c>, RawPlaintext<'m>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
fn mul(ek: &EK, c: C, m: u64) -> EncodedCiphertext<Vec<u64>>
[src]
fn mul(ek: &EK, c: C, m: u64) -> EncodedCiphertext<Vec<u64>>
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<EK, C> Mul<EK, u64, C, EncodedCiphertext<u64>> for Paillier where
Self: Mul<EK, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
[src]
impl<EK, C> Mul<EK, u64, C, EncodedCiphertext<u64>> for Paillier where
Self: Mul<EK, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<u64>>,
fn mul(ek: &EK, m: u64, c: C) -> EncodedCiphertext<u64>
[src]
fn mul(ek: &EK, m: u64, c: C) -> EncodedCiphertext<u64>
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<EK, C> Mul<EK, u64, C, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Mul<EK, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
[src]
impl<EK, C> Mul<EK, u64, C, EncodedCiphertext<Vec<u64>>> for Paillier where
Self: Mul<EK, RawPlaintext<'m>, RawCiphertext<'c>, RawCiphertext<'d>>,
C: Borrow<EncodedCiphertext<Vec<u64>>>,
fn mul(ek: &EK, m: u64, c: C) -> EncodedCiphertext<Vec<u64>>
[src]
fn mul(ek: &EK, m: u64, c: C) -> EncodedCiphertext<Vec<u64>>
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 KeyGeneration<Keypair> for Paillier
[src]
impl KeyGeneration<Keypair> for Paillier
fn keypair_with_modulus_size(bit_length: usize) -> Keypair
[src]
fn keypair_with_modulus_size(bit_length: usize) -> Keypair
Generate fresh key pair with security level specified as the bit_length
of the modulus. Read more
fn keypair() -> KP
[src]
fn keypair() -> KP
Generate fresh key pair with currently recommended security level (2048 bit modulus).
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 RangeProof for Paillier
[src]
impl RangeProof for Paillier
fn verifier_commit(
ek: &EncryptionKey
) -> (Commitment, ChallengeRandomness, ChallengeBits)
[src]
fn verifier_commit(
ek: &EncryptionKey
) -> (Commitment, ChallengeRandomness, ChallengeBits)
Verifier commits to a t-bit vector e where e is STATISTICAL_ERROR_FACTOR.
fn generate_encrypted_pairs(
ek: &EncryptionKey,
range: &BigInt
) -> (EncryptedPairs, DataRandomnessPairs)
[src]
fn generate_encrypted_pairs(
ek: &EncryptionKey,
range: &BigInt
) -> (EncryptedPairs, DataRandomnessPairs)
Prover generates t random pairs, each pair encrypts a number in {q/3, 2q/3} and a number in {0, q/3}
fn verify_commit(
ek: &EncryptionKey,
com: &Commitment,
r: &ChallengeRandomness,
e: &ChallengeBits
) -> Result<(), CorrectKeyProofError>
[src]
fn verify_commit(
ek: &EncryptionKey,
com: &Commitment,
r: &ChallengeRandomness,
e: &ChallengeBits
) -> Result<(), CorrectKeyProofError>
Verifier decommits to vector e. Prover check correctness using: Read more
fn generate_proof(
ek: &EncryptionKey,
secret_x: &BigInt,
secret_r: &BigInt,
e: &ChallengeBits,
range: &BigInt,
data: &DataRandomnessPairs
) -> Proof
[src]
fn generate_proof(
ek: &EncryptionKey,
secret_x: &BigInt,
secret_r: &BigInt,
e: &ChallengeBits,
range: &BigInt,
data: &DataRandomnessPairs
) -> Proof
Prover calcuate z_i according to bit e_i and returns a vector z
fn verifier_output(
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
proof: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>
[src]
fn verifier_output(
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
proof: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>
Verifier verifies the proof
impl RangeProofNI for Paillier
[src]
impl RangeProofNI for Paillier
fn prover(
ek: &EncryptionKey,
range: &BigInt,
secret_x: &BigInt,
secret_r: &BigInt
) -> (EncryptedPairs, ChallengeBits, Proof)
[src]
fn prover(
ek: &EncryptionKey,
range: &BigInt,
secret_x: &BigInt,
secret_r: &BigInt
) -> (EncryptedPairs, ChallengeBits, Proof)
fn verifier(
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
proof: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>
[src]
fn verifier(
ek: &EncryptionKey,
e: &ChallengeBits,
encrypted_pairs: &EncryptedPairs,
proof: &Proof,
range: &BigInt,
cipher_x: RawCiphertext
) -> Result<(), CorrectKeyProofError>