pub trait LweCiphertextCreationEngine<Container, Ciphertext>: AbstractEnginewhere
Ciphertext: LweCiphertextEntity,{
fn create_lwe_ciphertext_from(
&mut self,
container: Container
) -> Result<Ciphertext, LweCiphertextCreationError<Self::EngineError>>;
unsafe fn create_lwe_ciphertext_from_unchecked(
&mut self,
container: Container
) -> Ciphertext;
}
Expand description
Required Methods
sourcefn create_lwe_ciphertext_from(
&mut self,
container: Container
) -> Result<Ciphertext, LweCiphertextCreationError<Self::EngineError>>
fn create_lwe_ciphertext_from(
&mut self,
container: Container
) -> Result<Ciphertext, LweCiphertextCreationError<Self::EngineError>>
Creates an LWE ciphertext from an arbitrary container.
sourceunsafe fn create_lwe_ciphertext_from_unchecked(
&mut self,
container: Container
) -> Ciphertext
unsafe fn create_lwe_ciphertext_from_unchecked(
&mut self,
container: Container
) -> Ciphertext
Unsafely creates an LWE ciphertext from an arbitrary container.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextCreationError
. For safety concerns specific to an engine, refer to
the implementer safety section.
Implementors
impl LweCiphertextCreationEngine<Vec<u32, Global>, LweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextCreationEngine
for DefaultEngine
which returns an
LweCiphertext32
.
impl LweCiphertextCreationEngine<Vec<u64, Global>, LweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextCreationEngine
for DefaultEngine
which returns an
LweCiphertext64
.
impl<'data> LweCiphertextCreationEngine<&'data [u32], LweCiphertextView32<'data>> for DefaultEngine
Description:
Implementation of LweCiphertextCreationEngine
for DefaultEngine
which returns an
immutable LweCiphertextView32
that does not own its memory.
impl<'data> LweCiphertextCreationEngine<&'data [u64], LweCiphertextView64<'data>> for DefaultEngine
Description:
Implementation of LweCiphertextCreationEngine
for DefaultEngine
which returns an
immutable LweCiphertextView64
that does not own its memory.
impl<'data> LweCiphertextCreationEngine<&'data mut [u32], LweCiphertextMutView32<'data>> for DefaultEngine
Description:
Implementation of LweCiphertextCreationEngine
for DefaultEngine
which returns a mutable
LweCiphertextMutView32
that does not own its memory.
impl<'data> LweCiphertextCreationEngine<&'data mut [u64], LweCiphertextMutView64<'data>> for DefaultEngine
Description:
Implementation of LweCiphertextCreationEngine
for DefaultEngine
which returns a mutable
LweCiphertextMutView64
that does not own its memory.