pub trait LweCiphertextDiscardingDecryptionEngine<SecretKey, Ciphertext, Plaintext>: AbstractEnginewhere
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§
Sourcefn 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.
Sourceunsafe 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 CoreEngine
§Description:
Implementation of LweCiphertextDiscardingDecryptionEngine for CoreEngine that operates
on 32 bits integers.
impl LweCiphertextDiscardingDecryptionEngine<LweSecretKey64, LweCiphertext64, Plaintext64> for CoreEngine
§Description:
Implementation of LweCiphertextDiscardingDecryptionEngine for CoreEngine that operates
on 64 bits integers.