diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-07-31 16:02:51 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-07-31 17:58:01 +0200 |
commit | e088e3d85cc1e4c8909416a7d9715f016b4fdd70 (patch) | |
tree | ff79a46f949ffe7e9adefb84e4f52ff5a505a81e | |
parent | 3f89f7c3607f438c984536398fbc02fe657c224a (diff) |
openpgp: Fix documentation.
- encrypt_shared is also used by the ECDH over NIST curves.
-rw-r--r-- | openpgp/src/crypto/ecdh.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<R>(recipient: &Key<key::PublicParts, R>, session_key: &SessionKey, VB: MPI, |