1 2 3 4 5 6 7 8 9 10 11 12 13 14
//! Key exchange traits. use zeroize::Zeroize; use super::key::{PublicKey, SharedSecretKey}; /// Diffie-Hellman key exchange. pub trait DiffieHellman: Zeroize { type SSK: SharedSecretKey; type PK: PublicKey; /// Derives `SharedSecretKey` from the other `PublicKey` fn diffie_hellman(&self, peer_public: &Self::PK) -> Self::SSK; }