Trait askar_crypto::kdf::KeyExchange[][src]

pub trait KeyExchange<Rhs: ?Sized = Self> {
    fn write_key_exchange(
        &self,
        other: &Rhs,
        out: &mut dyn WriteBuffer
    ) -> Result<(), Error>; fn key_exchange_bytes(&self, other: &Rhs) -> Result<SecretBytes, Error> { ... } }
Expand description

Trait for keys supporting Diffie-Helman key exchange

Required methods

fn write_key_exchange(
    &self,
    other: &Rhs,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

Expand description

Perform a key exchange, writing the result to the provided buffer.

Loading content...

Provided methods

fn key_exchange_bytes(&self, other: &Rhs) -> Result<SecretBytes, Error>[src]

This is supported on crate feature alloc only.
Expand description

Perform a key exchange and return a new allocated buffer.

Loading content...

Implementors

impl KeyExchange<K256KeyPair> for K256KeyPair[src]

This is supported on crate feature k256 only.

fn write_key_exchange(
    &self,
    other: &Self,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

impl KeyExchange<P256KeyPair> for P256KeyPair[src]

This is supported on crate feature p256 only.

fn write_key_exchange(
    &self,
    other: &Self,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

impl KeyExchange<X25519KeyPair> for X25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn write_key_exchange(
    &self,
    other: &Self,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

Loading content...