pub trait GlweCiphertextVectorEncryptionEngine<SecretKey, PlaintextVector, CiphertextVector>: AbstractEnginewhere
SecretKey: GlweSecretKeyEntity,
PlaintextVector: PlaintextVectorEntity,
CiphertextVector: GlweCiphertextVectorEntity,{
fn encrypt_glwe_ciphertext_vector(
&mut self,
key: &SecretKey,
input: &PlaintextVector,
noise: Variance
) -> Result<CiphertextVector, GlweCiphertextVectorEncryptionError<Self::EngineError>>;
unsafe fn encrypt_glwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
input: &PlaintextVector,
noise: Variance
) -> CiphertextVector;
}
Expand description
A trait for engines encrypting GLWE ciphertext vectors.
Semantics
This pure operation generates a GLWE ciphertext vector containing
the piece-wise encryptions of the input
plaintext vector, under the key
secret key.
Formal Definition
cf here
Required Methods
sourcefn encrypt_glwe_ciphertext_vector(
&mut self,
key: &SecretKey,
input: &PlaintextVector,
noise: Variance
) -> Result<CiphertextVector, GlweCiphertextVectorEncryptionError<Self::EngineError>>
fn encrypt_glwe_ciphertext_vector(
&mut self,
key: &SecretKey,
input: &PlaintextVector,
noise: Variance
) -> Result<CiphertextVector, GlweCiphertextVectorEncryptionError<Self::EngineError>>
Encrypts a GLWE ciphertext vector.
sourceunsafe fn encrypt_glwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
input: &PlaintextVector,
noise: Variance
) -> CiphertextVector
unsafe fn encrypt_glwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
input: &PlaintextVector,
noise: Variance
) -> CiphertextVector
Unsafely encrypts a GLWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of GlweCiphertextVectorEncryptionError
. For safety concerns specific to an engine,
refer to the implementer safety section.
Implementors
impl GlweCiphertextVectorEncryptionEngine<GlweSecretKey32, PlaintextVector32, GlweCiphertextVector32> for DefaultEngine
Description:
Implementation of GlweCiphertextVectorEncryptionEngine
for DefaultEngine
that operates
on 32 bits integers.
impl GlweCiphertextVectorEncryptionEngine<GlweSecretKey64, PlaintextVector64, GlweCiphertextVector64> for DefaultEngine
Description:
Implementation of GlweCiphertextVectorEncryptionEngine
for DefaultEngine
that operates
on 64 bits integers.