pub trait LweCiphertextZeroEncryptionEngine<SecretKey, Ciphertext>: AbstractEnginewhere
SecretKey: LweSecretKeyEntity,
Ciphertext: LweCiphertextEntity,{
// Required methods
fn zero_encrypt_lwe_ciphertext(
&mut self,
key: &SecretKey,
noise: Variance,
) -> Result<Ciphertext, LweCiphertextZeroEncryptionError<Self::EngineError>>;
unsafe fn zero_encrypt_lwe_ciphertext_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
) -> Ciphertext;
}Expand description
Required Methods§
Sourcefn zero_encrypt_lwe_ciphertext(
&mut self,
key: &SecretKey,
noise: Variance,
) -> Result<Ciphertext, LweCiphertextZeroEncryptionError<Self::EngineError>>
fn zero_encrypt_lwe_ciphertext( &mut self, key: &SecretKey, noise: Variance, ) -> Result<Ciphertext, LweCiphertextZeroEncryptionError<Self::EngineError>>
Encrypts zero into an LWE ciphertext.
Sourceunsafe fn zero_encrypt_lwe_ciphertext_unchecked(
&mut self,
key: &SecretKey,
noise: Variance,
) -> Ciphertext
unsafe fn zero_encrypt_lwe_ciphertext_unchecked( &mut self, key: &SecretKey, noise: Variance, ) -> Ciphertext
Safely encrypts zero into an LWE ciphertext.
§Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextZeroEncryptionError. For safety concerns specific to an engine, refer
to the implementer safety section.
Implementors§
impl LweCiphertextZeroEncryptionEngine<LweSecretKey32, LweCiphertext32> for DefaultEngine
§Description:
Implementation of LweCiphertextZeroEncryptionEngine for DefaultEngine that
operates on 32 bits integers.
impl LweCiphertextZeroEncryptionEngine<LweSecretKey64, LweCiphertext64> for DefaultEngine
§Description:
Implementation of LweCiphertextZeroEncryptionEngine for DefaultEngine that
operates on 64 bits integers.