Skip to main content

decrypt

Function decrypt 

Source
pub fn decrypt<P: Params>(dk_pke: &[u8], c: &[u8]) -> [u8; 32]
Expand description

Decrypt a K-PKE ciphertext to recover the 32-byte message (Algorithm 15).

Decompresses u and v from the ciphertext, decodes the secret key s, then computes w = v - NTT_inv(s_hat^T * NTT(u)) and compresses w to recover the original one-bit-per-coefficient message.

The secret key polynomial s_hat and the accumulator are zeroized after use.

§Arguments

  • dk_pke - The K-PKE decapsulation key (ByteEncode_12(s_hat)).
  • c - The ciphertext.

§Returns

The recovered 32-byte message.