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§
Object Safety§
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.