LweCiphertextLoadingEngine

Trait LweCiphertextLoadingEngine 

Source
pub trait LweCiphertextLoadingEngine<CiphertextVector, Ciphertext>: AbstractEngine
where Ciphertext: LweCiphertextEntity, CiphertextVector: LweCiphertextVectorEntity<KeyDistribution = Ciphertext::KeyDistribution>,
{ // Required methods fn load_lwe_ciphertext( &mut self, vector: &CiphertextVector, i: LweCiphertextIndex, ) -> Result<Ciphertext, LweCiphertextLoadingError<Self::EngineError>>; unsafe fn load_lwe_ciphertext_unchecked( &mut self, vector: &CiphertextVector, i: LweCiphertextIndex, ) -> Ciphertext; }
Expand description

A trait for engines loading LWE ciphertexts from LWE ciphertext vectors.

§Semantics

This pure operation generates an LWE ciphertext containing the ith LWE ciphertext of the vector LWE ciphertext vector.

§Formal Definition

Required Methods§

Source

fn load_lwe_ciphertext( &mut self, vector: &CiphertextVector, i: LweCiphertextIndex, ) -> Result<Ciphertext, LweCiphertextLoadingError<Self::EngineError>>

Loads an LWE ciphertext from an LWE ciphertext vector.

Source

unsafe fn load_lwe_ciphertext_unchecked( &mut self, vector: &CiphertextVector, i: LweCiphertextIndex, ) -> Ciphertext

Unsafely loads an LWE ciphertext from an LWE ciphertext vector.

§Safety

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

Implementors§