pub trait LweCiphertextTrivialEncryptionEngine<Plaintext, Ciphertext>: AbstractEnginewhere
    Plaintext: PlaintextEntity,
    Ciphertext: LweCiphertextEntity,
{ fn trivially_encrypt_lwe_ciphertext(
        &mut self,
        lwe_size: LweSize,
        input: &Plaintext
    ) -> Result<Ciphertext, LweCiphertextTrivialEncryptionError<Self::EngineError>>; unsafe fn trivially_encrypt_lwe_ciphertext_unchecked(
        &mut self,
        lwe_size: LweSize,
        input: &Plaintext
    ) -> Ciphertext; }
Expand description

A trait for engines trivially encrypting LWE ciphertext.

Semantics

This pure operation generates anLWE ciphertext containing the trivial encryption of the input plaintext with the requested lwe_size.

Formal Definition

A trivial encryption uses a zero mask and no noise. It is absolutely not secure, as the body contains a direct copy of the plaintext. However, it is useful for some FHE algorithms taking public information as input. For example, a trivial GLWE encryption of a public lookup table is used in the bootstrap.

Required Methods

Trivially encrypts an LWE ciphertext.

Unsafely creates the trivial LWE encryption of the plaintext.

Safety

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

Implementors