LweCiphertextDiscardingDecryptionEngine

Trait LweCiphertextDiscardingDecryptionEngine 

Source
pub trait LweCiphertextDiscardingDecryptionEngine<SecretKey, Ciphertext, Plaintext>: AbstractEngine
where SecretKey: LweSecretKeyEntity, Ciphertext: LweCiphertextEntity<KeyDistribution = SecretKey::KeyDistribution>, Plaintext: PlaintextEntity,
{ // Required methods fn discard_decrypt_lwe_ciphertext( &mut self, key: &SecretKey, output: &mut Plaintext, input: &Ciphertext, ) -> Result<(), LweCiphertextDiscardingDecryptionError<Self::EngineError>>; unsafe fn discard_decrypt_lwe_ciphertext_unchecked( &mut self, key: &SecretKey, output: &mut Plaintext, input: &Ciphertext, ); }
Expand description

A trait for engines decrypting (discarding) LWE ciphertexts.

§Semantics

This discarding operation fills the output plaintext with the decryption of the input LWE ciphertext, under the key secret key.

§Formal Definition

Required Methods§

Source

fn discard_decrypt_lwe_ciphertext( &mut self, key: &SecretKey, output: &mut Plaintext, input: &Ciphertext, ) -> Result<(), LweCiphertextDiscardingDecryptionError<Self::EngineError>>

Decrypts an LWE ciphertext.

Source

unsafe fn discard_decrypt_lwe_ciphertext_unchecked( &mut self, key: &SecretKey, output: &mut Plaintext, input: &Ciphertext, )

Unsafely decrypts an LWE ciphertext.

§Safety

For the general safety concerns regarding this operation, refer to the different variants of LweCiphertextDiscardingDecryptionError. For safety concerns specific to an engine, refer to the implementer safety section.

Implementors§