pub trait LweCiphertextDiscardingEncryptionEngine<SecretKey, Plaintext, Ciphertext>: AbstractEnginewhere
    SecretKey: LweSecretKeyEntity,
    Plaintext: PlaintextEntity,
    Ciphertext: LweCiphertextEntity,
{ fn discard_encrypt_lwe_ciphertext(
        &mut self,
        key: &SecretKey,
        output: &mut Ciphertext,
        input: &Plaintext,
        noise: Variance
    ) -> Result<(), LweCiphertextDiscardingEncryptionError<Self::EngineError>>; unsafe fn discard_encrypt_lwe_ciphertext_unchecked(
        &mut self,
        key: &SecretKey,
        output: &mut Ciphertext,
        input: &Plaintext,
        noise: Variance
    ); }
Expand description

A trait for engines encrypting (discarding) LWE ciphertexts.

Semantics

This discarding operation fills the output LWE ciphertext with the encryption of the input plaintext, under the key secret key.

Formal Definition

cf here

Required Methods

Encrypts an LWE ciphertext.

Unsafely encrypts an LWE ciphertext.

Safety

For the general safety concerns regarding this operation, refer to the different variants of LweCiphertextDiscardingEncryptionError. For safety concerns specific to an engine, refer to the implementer safety section.

Implementors