Trait paillier::traits::Addition
[−]
[src]
pub trait Addition<EK, CT1, CT2, CT> { fn add(ek: &EK, c1: &CT1, c2: &CT2) -> CT; }
Addition of two ciphertexts.
Required Methods
fn add(ek: &EK, c1: &CT1, c2: &CT2) -> CT
Homomorphically combine ciphertexts c1
and c2
to obtain a ciphertext containing
the sum of the two underlying plaintexts, reduced modulus n
from ek
.
Implementors
impl<I, S> Addition<EncryptionKey<I>, Ciphertext<I>, Ciphertext<I>, Ciphertext<I>> for S where S: AbstractScheme<BigInteger=I>,
&'a I: Mul<&'b I, Output=I>,
I: Rem<&'b I, Output=I>impl<I, T, S, EK> Addition<EK, Ciphertext<I, T>, Ciphertext<I, T>, Ciphertext<I, T>> for S where S: AbstractScheme<BigInteger=I>,
S: Addition<EK, Ciphertext<I>, Ciphertext<I>, Ciphertext<I>>impl<I, T, S, EK> Addition<EK, Ciphertext<I, T>, Ciphertext<I, T>, Ciphertext<I, T>> for S where S: AbstractScheme<BigInteger=I>,
S: Addition<EK, Ciphertext<I>, Ciphertext<I>, Ciphertext<I>>