pub trait LweCiphertextZeroEncryptionEngine<SecretKey, Ciphertext>: AbstractEngine where
    SecretKey: LweSecretKeyEntity,
    Ciphertext: LweCiphertextEntity<KeyDistribution = SecretKey::KeyDistribution>, 
{ fn zero_encrypt_lwe_ciphertext(
        &mut self,
        key: &SecretKey,
        noise: Variance
    ) -> Result<Ciphertext, LweCiphertextZeroEncryptionError<Self::EngineError>>; unsafe fn zero_encrypt_lwe_ciphertext_unchecked(
        &mut self,
        key: &SecretKey,
        noise: Variance
    ) -> Ciphertext; }
Expand description

A trait for engines encrypting zero in LWE ciphertexts.

Semantics

This pure operation generates an LWE ciphertext containing an encryption of zero, under the key secret key.

Formal Definition

This generates a [LWE encryption] (crate::specification::engines::LweCiphertextEncryptionEngine) of zero.

Required Methods

Encrypts zero into an LWE ciphertext.

Safely encrypts zero into an LWE ciphertext.

Safety

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

Implementors