From e088e3d85cc1e4c8909416a7d9715f016b4fdd70 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 31 Jul 2020 16:02:51 +0200 Subject: openpgp: Fix documentation. - encrypt_shared is also used by the ECDH over NIST curves. --- openpgp/src/crypto/ecdh.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'openpgp/src/crypto') diff --git a/openpgp/src/crypto/ecdh.rs b/openpgp/src/crypto/ecdh.rs index e4ae971e..94bab2ec 100644 --- a/openpgp/src/crypto/ecdh.rs +++ b/openpgp/src/crypto/ecdh.rs @@ -19,8 +19,9 @@ pub use crate::crypto::backend::ecdh::{encrypt, decrypt}; /// secret, this function deterministically encrypts the given session /// key. /// -/// `VB` is the ephemeral public key (with 0x40 prefix), `S` is the -/// shared Diffie-Hellman secret. +/// `VB` is the ephemeral public key encoded appropriately as MPI +/// (i.e. with the 0x40 prefix for X25519, or 0x04 for the NIST +/// curves), `S` is the shared Diffie-Hellman secret. #[allow(non_snake_case)] pub fn encrypt_shared(recipient: &Key, session_key: &SessionKey, VB: MPI, -- cgit v1.2.3