LweCiphertextVectorZeroEncryptionEngine

Trait LweCiphertextVectorZeroEncryptionEngine 

Source
pub trait LweCiphertextVectorZeroEncryptionEngine<SecretKey, CiphertextVector>: AbstractEngine
where SecretKey: LweSecretKeyEntity, CiphertextVector: LweCiphertextVectorEntity,
{ // Required methods fn zero_encrypt_lwe_ciphertext_vector( &mut self, key: &SecretKey, noise: Variance, count: LweCiphertextCount, ) -> Result<CiphertextVector, LweCiphertextVectorZeroEncryptionError<Self::EngineError>>; unsafe fn zero_encrypt_lwe_ciphertext_vector_unchecked( &mut self, key: &SecretKey, noise: Variance, count: LweCiphertextCount, ) -> CiphertextVector; }
Expand description

A trait for engines encrypting zero in LWE ciphertext vectors.

§Semantics

This pure operation generates an LWE ciphertext vector containing encryptions of zeros, under the key secret key.

§Formal Definition

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

Required Methods§

Source

fn zero_encrypt_lwe_ciphertext_vector( &mut self, key: &SecretKey, noise: Variance, count: LweCiphertextCount, ) -> Result<CiphertextVector, LweCiphertextVectorZeroEncryptionError<Self::EngineError>>

Encrypts zeros in an LWE ciphertext vector.

Source

unsafe fn zero_encrypt_lwe_ciphertext_vector_unchecked( &mut self, key: &SecretKey, noise: Variance, count: LweCiphertextCount, ) -> CiphertextVector

Unsafely encrypts zeros in an LWE ciphertext vector.

§Safety

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

Implementors§