LweCiphertextVectorEncryptionEngine

Trait LweCiphertextVectorEncryptionEngine 

Source
pub trait LweCiphertextVectorEncryptionEngine<SecretKey, PlaintextVector, CiphertextVector>: AbstractEngine
where SecretKey: LweSecretKeyEntity, PlaintextVector: PlaintextVectorEntity, CiphertextVector: LweCiphertextVectorEntity,
{ // Required methods fn encrypt_lwe_ciphertext_vector( &mut self, key: &SecretKey, input: &PlaintextVector, noise: Variance, ) -> Result<CiphertextVector, LweCiphertextVectorEncryptionError<Self::EngineError>>; unsafe fn encrypt_lwe_ciphertext_vector_unchecked( &mut self, key: &SecretKey, input: &PlaintextVector, noise: Variance, ) -> CiphertextVector; }
Expand description

A trait for engines encrypting LWE ciphertext vectors.

§Semantics

This pure operation generates an LWE ciphertext vector containing the element-wise encryption of the input plaintext vector, under the key secret key.

§Formal Definition

cf here

Required Methods§

Source

fn encrypt_lwe_ciphertext_vector( &mut self, key: &SecretKey, input: &PlaintextVector, noise: Variance, ) -> Result<CiphertextVector, LweCiphertextVectorEncryptionError<Self::EngineError>>

Encrypts an LWE ciphertext vector.

Source

unsafe fn encrypt_lwe_ciphertext_vector_unchecked( &mut self, key: &SecretKey, input: &PlaintextVector, noise: Variance, ) -> CiphertextVector

Unsafely encrypts an LWE ciphertext vector.

§Safety

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

Implementors§