pub struct Ecdh;Expand description
Stateless ECDH helper.
Implementations§
Source§impl Ecdh
impl Ecdh
Sourcepub fn derive_public_key<P, const LIMBS: usize>(
base_point: &P,
secret: &SecretScalar<LIMBS>,
curve: &P::Curve,
) -> Pwhere
P: PointOps,
pub fn derive_public_key<P, const LIMBS: usize>(
base_point: &P,
secret: &SecretScalar<LIMBS>,
curve: &P::Curve,
) -> Pwhere
P: PointOps,
Derive a public key [secret]G from a fixed generator/base point.
Sourcepub fn keypair_from_secret<P, const LIMBS: usize>(
base_point: &P,
secret: SecretScalar<LIMBS>,
curve: &P::Curve,
) -> KeyPair<P, LIMBS>where
P: PointOps,
pub fn keypair_from_secret<P, const LIMBS: usize>(
base_point: &P,
secret: SecretScalar<LIMBS>,
curve: &P::Curve,
) -> KeyPair<P, LIMBS>where
P: PointOps,
Build a deterministic key pair from a secret scalar.
Compute a shared point [my_secret] peer_public.
Returns None when the peer public key is the identity.
Auto Trait Implementations§
impl Freeze for Ecdh
impl RefUnwindSafe for Ecdh
impl Send for Ecdh
impl Sync for Ecdh
impl Unpin for Ecdh
impl UnsafeUnpin for Ecdh
impl UnwindSafe for Ecdh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more