pub trait GlweCiphertextConversionEngine<Input, Output>: AbstractEnginewhere
Input: GlweCiphertextEntity,
Output: GlweCiphertextEntity,{
fn convert_glwe_ciphertext(
&mut self,
input: &Input
) -> Result<Output, GlweCiphertextConversionError<Self::EngineError>>;
unsafe fn convert_glwe_ciphertext_unchecked(
&mut self,
input: &Input
) -> Output;
}
Expand description
A trait for engines converting GLWE ciphertexts.
Semantics
This pure operation generates a GLWE ciphertext containing the
conversion of the input
GLWE ciphertext to a type with a different representation (for
instance from cpu to gpu memory).
Formal Definition
Required Methods
sourcefn convert_glwe_ciphertext(
&mut self,
input: &Input
) -> Result<Output, GlweCiphertextConversionError<Self::EngineError>>
fn convert_glwe_ciphertext(
&mut self,
input: &Input
) -> Result<Output, GlweCiphertextConversionError<Self::EngineError>>
Converts a GLWE ciphertext.
sourceunsafe fn convert_glwe_ciphertext_unchecked(&mut self, input: &Input) -> Output
unsafe fn convert_glwe_ciphertext_unchecked(&mut self, input: &Input) -> Output
Unsafely converts a GLWE ciphertext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of GlweCiphertextConversionError
. For safety concerns specific to an engine, refer to
the implementer safety section.