pub fn open(
c: &[u8],
n: &Nonce,
pk: &PublicKey,
sk: &SecretKey,
) -> Result<Vec<u8>, ()>
Expand description
open()
verifies and decrypts a ciphertext c
using the receiver’s secret key sk
,
the senders public key pk
, and a nonce n
. It returns a plaintext Ok(m)
.
If the ciphertext fails verification, open()
returns Err(())
.