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]

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 PrecomputedRandomness, RawCiphertext<'d>> for Paillier
[src]

impl<'m, 'd> Encrypt<DecryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
[src]

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 PrecomputedRandomness, RawCiphertext<'d>> for Paillier
[src]

impl<'ek, 'r> PrecomputeRandomness<&'ek EncryptionKey, &'r BigInt, PrecomputedRandomness> for Paillier
[src]

impl<'c, 'd> Rerandomize<EncryptionKey, RawCiphertext<'c>, RawCiphertext<'d>> for Paillier
[src]

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]

TODO

Efficient decryption using CRT based on Paillier99, section 7

Decrypt ciphertext c using key dk into a plaintext.

impl<'c, 'm> Decrypt<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
[src]

TODO

Efficient decryption using CRT based on Paillier99, section 7

Decrypt ciphertext c using key dk into a plaintext.

impl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
[src]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

Decrypt ciphertext c using key dk into a plaintext.

impl<DK, C> Decrypt<DK, C, Vec<u64>> for Paillier where
    Self: Decrypt<DK, RawCiphertext<'c>, RawPlaintext<'p>>,
    C: Borrow<EncodedCiphertext<Vec<u64>>>, 
[src]

Important traits for Vec<u8>

Decrypt ciphertext c using key dk into a plaintext.

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

Generate fresh key pair with security level specified as the bit_length of the modulus. Read more

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 CorrectKey<EncryptionKey, DecryptionKey> for Paillier
[src]

Generate challenge for given encryption key.

Generate proof given decryption key.

Verify proof.

impl RangeProof for Paillier
[src]

Verifier commits to a t-bit vector e where e is STATISTICAL_ERROR_FACTOR.

Prover generates t random pairs, each pair encrypts a number in {q/3, 2q/3} and a number in {0, q/3}

Verifier decommits to vector e. Prover check correctness using: Read more

Prover calcuate z_i according to bit e_i and returns a vector z

Verifier verifies the proof

impl RangeProofNI for Paillier
[src]

Auto Trait Implementations

impl Send for Paillier

impl Sync for Paillier