pub trait Ecdh: EcSk {
type SharedSecret: Copy + Eq + Sized + Send + AsRef<[u8]>;
// Required method
fn ecdh(&self, pk: &Self::Pk) -> Result<Self::SharedSecret, EcdhError>;
}Expand description
Elliptic-curve based public key type which can be used for ECDH.
§Safety
The type provides no guarantees on the key validity upon deserialization.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Implementors§
Source§impl Ecdh for PrivateKey
Available on crate feature x25519 only.
impl Ecdh for PrivateKey
Available on crate feature
x25519 only.