pub trait Dh: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn pub_len(&self) -> usize;
fn priv_len(&self) -> usize;
fn set(&mut self, privkey: &[u8]);
fn generate(&mut self, rng: &mut dyn Random);
fn pubkey(&self) -> &[u8] ⓘ;
fn privkey(&self) -> &[u8] ⓘ;
fn dh(&self, pubkey: &[u8], out: &mut [u8]) -> Result<(), Error>;
}
Expand description
Diffie-Hellman operations