pub trait LweCiphertextTrivialDecryptionEngine<Ciphertext, Plaintext>: AbstractEnginewhere
Ciphertext: LweCiphertextEntity,
Plaintext: PlaintextEntity,{
fn trivially_decrypt_lwe_ciphertext(
&mut self,
input: &Ciphertext
) -> Result<Plaintext, LweCiphertextTrivialDecryptionError<Self::EngineError>>;
unsafe fn trivially_decrypt_lwe_ciphertext_unchecked(
&mut self,
input: &Ciphertext
) -> Plaintext;
}
Expand description
A trait for engines trivially decrypting LWE ciphertexts.
Semantics
This pure operation generates a plaintext containing the
trivial decryption of the input
ciphertext.
Formal Definition
see here
Required Methods
sourcefn trivially_decrypt_lwe_ciphertext(
&mut self,
input: &Ciphertext
) -> Result<Plaintext, LweCiphertextTrivialDecryptionError<Self::EngineError>>
fn trivially_decrypt_lwe_ciphertext(
&mut self,
input: &Ciphertext
) -> Result<Plaintext, LweCiphertextTrivialDecryptionError<Self::EngineError>>
Decrypts an LWE ciphertext vector into a plaintext vector.
sourceunsafe fn trivially_decrypt_lwe_ciphertext_unchecked(
&mut self,
input: &Ciphertext
) -> Plaintext
unsafe fn trivially_decrypt_lwe_ciphertext_unchecked(
&mut self,
input: &Ciphertext
) -> Plaintext
Unsafely trivially decrypts an LWE ciphertext into a plaintext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextTrivialDecryptionError
. For safety concerns specific to an
engine, refer to the implementer safety section.