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
- Recover sigma from the pairing
- Recover the message
- Recompute r = H3(sigma || message)
- Verify that U = r * G matches the ciphertext
§Arguments
signature
- Signature over the target payloadciphertext
- Ciphertext to decrypt
§Returns
Option<Block>
- The decrypted message