[][src]Function sequoia_openpgp::crypto::ecdh::decrypt_unwrap

pub fn decrypt_unwrap<R>(
    recipient: &Key<PublicParts, R>,
    S: &Protected,
    ciphertext: &Ciphertext
) -> Result<SessionKey> where
    R: KeyRole

Unwraps a session key.

After using Elliptic-curve Diffie-Hellman to compute the shared secret, this function deterministically derives the wrapping key from the shared secret, and uses it to unwrap (i.e. decrypt) the session key.

recipient is the message receiver's public key, S is the shared Diffie-Hellman secret used to encrypt ciphertext.