pub trait LweCiphertextVectorDecryptionEngine<SecretKey, CiphertextVector, PlaintextVector>: AbstractEngine where
SecretKey: LweSecretKeyEntity,
CiphertextVector: LweCiphertextVectorEntity<KeyDistribution = SecretKey::KeyDistribution>,
PlaintextVector: PlaintextVectorEntity, {
fn decrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
input: &CiphertextVector
) -> Result<PlaintextVector, LweCiphertextVectorDecryptionError<Self::EngineError>>;
unsafe fn decrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
input: &CiphertextVector
) -> PlaintextVector;
}
Expand description
A trait for engines decrypting LWE ciphertext vectors.
Semantics
This pure operation generates a plaintext vector containing
the element-wise decryption of the input
LWE ciphertext vector under the key
secret key.
Formal Definition
cf here
Required Methods
fn decrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
input: &CiphertextVector
) -> Result<PlaintextVector, LweCiphertextVectorDecryptionError<Self::EngineError>>
fn decrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
input: &CiphertextVector
) -> Result<PlaintextVector, LweCiphertextVectorDecryptionError<Self::EngineError>>
Decrypts an LWE ciphertext vector.
unsafe fn decrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
input: &CiphertextVector
) -> PlaintextVector
unsafe fn decrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
input: &CiphertextVector
) -> PlaintextVector
Unsafely decrypts an LWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorDecryptionError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
impl LweCiphertextVectorDecryptionEngine<LweSecretKey32, LweCiphertextVector32, PlaintextVector32> for DefaultEngine
Description:
Implementation of LweCiphertextVectorDecryptionEngine
for DefaultEngine
that operates on
32 bits integers.
impl LweCiphertextVectorDecryptionEngine<LweSecretKey64, LweCiphertextVector64, PlaintextVector64> for DefaultEngine
Description:
Implementation of LweCiphertextVectorDecryptionEngine
for DefaultEngine
that operates on
64 bits integers.