pub trait GlweCiphertextVectorZeroEncryptionEngine<SecretKey, CiphertextVector>: AbstractEnginewhere
SecretKey: GlweSecretKeyEntity,
CiphertextVector: GlweCiphertextVectorEntity,{
fn zero_encrypt_glwe_ciphertext_vector(
&mut self,
key: &SecretKey,
noise: Variance,
count: GlweCiphertextCount
) -> Result<CiphertextVector, GlweCiphertextVectorZeroEncryptionError<Self::EngineError>>;
unsafe fn zero_encrypt_glwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
count: GlweCiphertextCount
) -> CiphertextVector;
}
Expand description
A trait for engines encrypting zero in GLWE ciphertext vectors.
Semantics
This pure operation generates a GLWE ciphertext vector containing
encryptions of zeros, under the key
secret key.
Formal Definition
This generates a vector of GLWE encryption
of zero.
Required Methods
sourcefn zero_encrypt_glwe_ciphertext_vector(
&mut self,
key: &SecretKey,
noise: Variance,
count: GlweCiphertextCount
) -> Result<CiphertextVector, GlweCiphertextVectorZeroEncryptionError<Self::EngineError>>
fn zero_encrypt_glwe_ciphertext_vector(
&mut self,
key: &SecretKey,
noise: Variance,
count: GlweCiphertextCount
) -> Result<CiphertextVector, GlweCiphertextVectorZeroEncryptionError<Self::EngineError>>
Encrypts zero in a GLWE ciphertext vector.
sourceunsafe fn zero_encrypt_glwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
count: GlweCiphertextCount
) -> CiphertextVector
unsafe fn zero_encrypt_glwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
count: GlweCiphertextCount
) -> CiphertextVector
Unsafely encrypts zero in a GLWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of GlweCiphertextVectorZeroEncryptionError
. For safety concerns specific to an engine,
refer to the implementer safety section.
Implementors
impl GlweCiphertextVectorZeroEncryptionEngine<GlweSecretKey32, GlweCiphertextVector32> for DefaultEngine
Description:
Implementation of GlweCiphertextVectorZeroEncryptionEngine
for DefaultEngine
that
operates on 32 bits integers.
impl GlweCiphertextVectorZeroEncryptionEngine<GlweSecretKey64, GlweCiphertextVector64> for DefaultEngine
Description:
Implementation of GlweCiphertextVectorZeroEncryptionEngine
for DefaultEngine
that
operates on 64 bits integers.