Function sequoia_openpgp::crypto::ecdh::decrypt_unwrap2

source ·
pub fn decrypt_unwrap2(
    recipient: &Key<PublicParts, UnspecifiedRole>,
    S: &Protected,
    ciphertext: &Ciphertext,
    plaintext_len: Option<usize>,
) -> Result<SessionKey>
Expand description

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.