Trait tari_crypto::keys::DiffieHellmanSharedSecret[][src]

pub trait DiffieHellmanSharedSecret: ByteArray + Clone + PartialEq + Eq + Add<Output = Self> + Default {
    type PK: PublicKey;
    fn shared_secret(k: &<Self::PK as PublicKey>::K, pk: &Self::PK) -> Self::PK;
}
Expand description

This trait provides a common mechanism to calculate a shared secret using the private and public key of two parties

Associated Types

Required methods

Generate a shared secret from one party’s private key and another party’s public key

Implementors