pub trait LweCiphertextVectorTrivialEncryptionEngine<PlaintextVector, CiphertextVector>: AbstractEngine where
    PlaintextVector: PlaintextVectorEntity,
    CiphertextVector: LweCiphertextVectorEntity
{ fn trivially_encrypt_lwe_ciphertext_vector(
        &mut self,
        lwe_size: LweSize,
        input: &PlaintextVector
    ) -> Result<CiphertextVector, LweCiphertextVectorTrivialEncryptionError<Self::EngineError>>;
unsafe fn trivially_encrypt_lwe_ciphertext_vector_unchecked(
        &mut self,
        lwe_size: LweSize,
        input: &PlaintextVector
    ) -> CiphertextVector; }
Expand description

A trait for engines trivially encrypting LWE ciphertext vectors.

Semantics

This pure operation generates an LWE ciphertext vector containing the element-wise trivial encryption of the input plaintext vector, 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.

Required methods

Trivially encrypts an LWE ciphertext vector.

Unsafely creates the trivial LWE encryption of the plaintext vector.

Safety

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

Implementors