pub trait LweCiphertextLoadingEngine<CiphertextVector, Ciphertext>: AbstractEnginewhere
Ciphertext: LweCiphertextEntity,
CiphertextVector: LweCiphertextVectorEntity,{
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
i
th LWE ciphertext of the vector
LWE ciphertext vector.
Formal Definition
Required Methods
sourcefn load_lwe_ciphertext(
&mut self,
vector: &CiphertextVector,
i: LweCiphertextIndex
) -> Result<Ciphertext, LweCiphertextLoadingError<Self::EngineError>>
fn load_lwe_ciphertext(
&mut self,
vector: &CiphertextVector,
i: LweCiphertextIndex
) -> Result<Ciphertext, LweCiphertextLoadingError<Self::EngineError>>
Loads an LWE ciphertext from an LWE ciphertext vector.
sourceunsafe fn load_lwe_ciphertext_unchecked(
&mut self,
vector: &CiphertextVector,
i: LweCiphertextIndex
) -> Ciphertext
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.