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]
&self,
other: &Rhs,
out: &mut dyn WriteBuffer
) -> Result<(), Error>
Expand description
Perform a key exchange, writing the result to the provided buffer.
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.
Implementors
impl KeyExchange<K256KeyPair> for K256KeyPair
[src]
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]
&self,
other: &Self,
out: &mut dyn WriteBuffer
) -> Result<(), Error>
impl KeyExchange<P256KeyPair> for P256KeyPair
[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]
&self,
other: &Self,
out: &mut dyn WriteBuffer
) -> Result<(), Error>
impl KeyExchange<X25519KeyPair> for X25519KeyPair
[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]
&self,
other: &Self,
out: &mut dyn WriteBuffer
) -> Result<(), Error>