pub trait LweCiphertextDiscardingDecryptionEngine<SecretKey, Ciphertext, Plaintext>: AbstractEngine where
SecretKey: LweSecretKeyEntity,
Ciphertext: LweCiphertextEntity<KeyDistribution = SecretKey::KeyDistribution>,
Plaintext: PlaintextEntity, {
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
cf here
Required Methods
fn discard_decrypt_lwe_ciphertext(
&mut self,
key: &SecretKey,
output: &mut Plaintext,
input: &Ciphertext
) -> Result<(), LweCiphertextDiscardingDecryptionError<Self::EngineError>>
fn discard_decrypt_lwe_ciphertext(
&mut self,
key: &SecretKey,
output: &mut Plaintext,
input: &Ciphertext
) -> Result<(), LweCiphertextDiscardingDecryptionError<Self::EngineError>>
Decrypts an LWE ciphertext.
unsafe fn discard_decrypt_lwe_ciphertext_unchecked(
&mut self,
key: &SecretKey,
output: &mut Plaintext,
input: &Ciphertext
)
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
impl LweCiphertextDiscardingDecryptionEngine<LweSecretKey32, LweCiphertext32, Plaintext32> for DefaultEngine
Description:
Implementation of LweCiphertextDiscardingDecryptionEngine
for DefaultEngine
that
operates on 32 bits integers.
impl LweCiphertextDiscardingDecryptionEngine<LweSecretKey64, LweCiphertext64, Plaintext64> for DefaultEngine
Description:
Implementation of LweCiphertextDiscardingDecryptionEngine
for DefaultEngine
that
operates on 64 bits integers.