pub trait HomomorphicAddition: EncryptionKey {
    fn add(
        &self,
        ciphertext_a: &Self::Ciphertext,
        ciphertext_b: &Self::Ciphertext
    ) -> Self::Ciphertext; fn sub(
        &self,
        ciphertext_a: &Self::Ciphertext,
        ciphertext_b: &Self::Ciphertext
    ) -> Self::Ciphertext; fn mul_constant(
        &self,
        ciphertext: &Self::Ciphertext,
        input: &Self::Input
    ) -> Self::Ciphertext; fn add_constant(
        &self,
        ciphertext: &Self::Ciphertext,
        constant: &Self::Plaintext
    ) -> Self::Ciphertext; fn sub_constant(
        &self,
        ciphertext: &Self::Ciphertext,
        constant: &Self::Plaintext
    ) -> Self::Ciphertext; }
Expand description

Trait implemented by additively homomorphic cryptosystems

Required Methods

Combines two ciphertexts so that their decrypted value reflects some addition operation

Combines two ciphertexts so that their decrypted value reflects some subtract operation

Applies some operation on a ciphertext so that the decrypted value reflects some multiplication with input

Combines two ciphertexts so that their decrypted value reflects some addition operation with a constant

Combines two ciphertexts so that their decrypted value reflects some subtract operation with a constant

Implementors