pub trait LweCiphertextVectorZeroEncryptionEngine<SecretKey, CiphertextVector>: AbstractEngine where
SecretKey: LweSecretKeyEntity,
CiphertextVector: LweCiphertextVectorEntity<KeyDistribution = SecretKey::KeyDistribution>, {
fn zero_encrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
noise: Variance,
count: LweCiphertextCount
) -> Result<CiphertextVector, LweCiphertextVectorZeroEncryptionError<Self::EngineError>>;
unsafe fn zero_encrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
count: LweCiphertextCount
) -> CiphertextVector;
}
Expand description
A trait for engines encrypting zero in LWE ciphertext vectors.
Semantics
This pure operation generates an LWE ciphertext vector containing
encryptions of zeros, under the key
secret key.
Formal Definition
This generates a vector of [LWE encryption
]
(crate::specification::engines::LweCiphertextEncryptionEngine
) of zero.
Required Methods
fn zero_encrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
noise: Variance,
count: LweCiphertextCount
) -> Result<CiphertextVector, LweCiphertextVectorZeroEncryptionError<Self::EngineError>>
fn zero_encrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
noise: Variance,
count: LweCiphertextCount
) -> Result<CiphertextVector, LweCiphertextVectorZeroEncryptionError<Self::EngineError>>
Encrypts zeros in an LWE ciphertext vector.
unsafe fn zero_encrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
count: LweCiphertextCount
) -> CiphertextVector
unsafe fn zero_encrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
count: LweCiphertextCount
) -> CiphertextVector
Unsafely encrypts zeros in an LWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorZeroEncryptionError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
impl LweCiphertextVectorZeroEncryptionEngine<LweSecretKey32, LweCiphertextVector32> for DefaultEngine
Description:
Implementation of LweCiphertextVectorZeroEncryptionEngine
for DefaultEngine
that
operates on 32 bits integers.
impl LweCiphertextVectorZeroEncryptionEngine<LweSecretKey64, LweCiphertextVector64> for DefaultEngine
Description:
Implementation of LweCiphertextVectorZeroEncryptionEngine
for DefaultEngine
that
operates on 64 bits integers.