decrypt

Function decrypt 

Source
pub fn decrypt<V: Variant>(
    signature: &V::Signature,
    ciphertext: &Ciphertext<V>,
) -> Option<Block>
Expand description

Decrypt a ciphertext with a signature over the target specified during encrypt.

§Steps

  1. Recover sigma from the pairing
  2. Recover the message
  3. Recompute r = H3(sigma || message)
  4. Verify that U = r * G matches the ciphertext

§Arguments

  • signature - Signature over the target payload
  • ciphertext - Ciphertext to decrypt

§Returns

  • Option<Block> - The decrypted message