pub trait GlweCiphertextDecryptionEngine<SecretKey, Ciphertext, PlaintextVector>: AbstractEnginewhere
    SecretKey: GlweSecretKeyEntity,
    Ciphertext: GlweCiphertextEntity,
    PlaintextVector: PlaintextVectorEntity,
{ fn decrypt_glwe_ciphertext(
        &mut self,
        key: &SecretKey,
        input: &Ciphertext
    ) -> Result<PlaintextVector, GlweCiphertextDecryptionError<Self::EngineError>>; unsafe fn decrypt_glwe_ciphertext_unchecked(
        &mut self,
        key: &SecretKey,
        input: &Ciphertext
    ) -> PlaintextVector; }
Expand description

A trait for engines decrypting GLWE ciphertexts.

Semantics

This pure operation generates a plaintext vector containing the decryption of the input ciphertext, under the key secret key.

Formal Definition

GLWE Decryption

inputs:
  • $\mathsf{CT} = \left( \vec{A} , B \right) \in \mathsf{GLWE}_{\vec{S}}( \mathsf{PT} )\subseteq \mathcal{R}_q^{k+1}$: an GLWE ciphertext
  • $\vec{S} \in\mathcal{R}_q^k$: a secret key
outputs:
  • $\mathsf{PT}\in\mathcal{R}_q$: a plaintext
algorithm:
  1. compute $\mathsf{PT} = B - \left\langle \vec{A} , \vec{S} \right\rangle \in\mathcal{R}_q$
  2. output $\mathsf{PT}$

Remark: Observe that the decryption is followed by a decoding phase that will contain a rounding.

Required Methods

Decrypts a GLWE ciphertext into a plaintext vector.

Unsafely decrypts a GLWE ciphertext into a plaintext vector.

Safety

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

Implementors