pub trait GlweCiphertextEncryptionEngine<SecretKey, PlaintextVector, Ciphertext>: AbstractEngine where
    SecretKey: GlweSecretKeyEntity,
    PlaintextVector: PlaintextVectorEntity,
    Ciphertext: GlweCiphertextEntity<KeyDistribution = SecretKey::KeyDistribution>, 
{ fn encrypt_glwe_ciphertext(
        &mut self,
        key: &SecretKey,
        input: &PlaintextVector,
        noise: Variance
    ) -> Result<Ciphertext, GlweCiphertextEncryptionError<Self::EngineError>>;
unsafe fn encrypt_glwe_ciphertext_unchecked(
        &mut self,
        key: &SecretKey,
        input: &PlaintextVector,
        noise: Variance
    ) -> Ciphertext; }
Expand description

A trait for engines encrypting GLWE ciphertexts.

Semantics

This pure operation generates a GLWE ciphertext containing the encryptions of the input plaintext vector, under the key secret key.

Formal Definition

Required methods

Encrypts a plaintext vector into a GLWE ciphertext.

Unsafely encrypts a plaintext vector into a GLWE ciphertext.

Safety

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

Implementors