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

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;
}

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

Associated Types

Loading content...

Required methods

fn shared_secret(k: &<Self::PK as PublicKey>::K, pk: &Self::PK) -> Self::PK

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

Loading content...

Implementors

impl DiffieHellmanSharedSecret for RistrettoPublicKey[src]

type PK = RistrettoPublicKey

fn shared_secret(k: &<Self::PK as PublicKey>::K, pk: &Self::PK) -> Self::PK[src]

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

Loading content...