Trait adnl::AdnlPrivateKey
source · pub trait AdnlPrivateKey {
type PublicKey: AdnlPublicKey;
// Required methods
fn key_agreement<P: AdnlPublicKey>(&self, their_public: P) -> AdnlSecret;
fn public(&self) -> Self::PublicKey;
}
Expand description
Trait which must be implemented to perform key agreement inside [AdnlHandshake
]
Required Associated Types§
type PublicKey: AdnlPublicKey
Required Methods§
sourcefn key_agreement<P: AdnlPublicKey>(&self, their_public: P) -> AdnlSecret
fn key_agreement<P: AdnlPublicKey>(&self, their_public: P) -> AdnlSecret
Perform key agreement protocol (usually x25519) between our private key and their public
Object Safety§
This trait is not object safe.