pub struct RustCryptoEcdhKey(/* private fields */);Expand description
Opaque RustCrypto ECDH key with a fixed named-curve domain.
Implementations§
Source§impl RustCryptoEcdhKey
impl RustCryptoEcdhKey
Sourcepub fn from_scalar(
curve: EcdhCurve,
bytes: &[u8],
) -> Result<Self, ProviderError>
pub fn from_scalar( curve: EcdhCurve, bytes: &[u8], ) -> Result<Self, ProviderError>
Import a fixed-width big-endian private scalar. Zero and out-of-range values are rejected, not reduced modulo the curve order.
Sourcepub fn public_key(&self) -> Vec<u8> ⓘ
pub fn public_key(&self) -> Vec<u8> ⓘ
Export the public SEC1 uncompressed point, never private material.
Trait Implementations§
Source§impl Debug for RustCryptoEcdhKey
impl Debug for RustCryptoEcdhKey
Source§impl KeyAgreementKey for RustCryptoEcdhKey
impl KeyAgreementKey for RustCryptoEcdhKey
Source§fn agree(
&self,
parameters: &KeyAgreementParameters<'_>,
) -> Result<Vec<u8>, ProviderError>
fn agree( &self, parameters: &KeyAgreementParameters<'_>, ) -> Result<Vec<u8>, ProviderError>
Derive the raw shared secret for the supplied peer and parameters.
Source§fn dh_domain_bits(&self) -> Option<(usize, usize)>
fn dh_domain_bits(&self) -> Option<(usize, usize)>
Public modulus/subgroup bit widths for finite-field DH. Operations use
these to recheck key strength under their own policy; no secret is exported.
Source§fn provider_binding(&self) -> Option<&ProviderBinding>
fn provider_binding(&self) -> Option<&ProviderBinding>
External execution domain, when the private key resides outside this process.
Auto Trait Implementations§
impl Freeze for RustCryptoEcdhKey
impl RefUnwindSafe for RustCryptoEcdhKey
impl Send for RustCryptoEcdhKey
impl Sync for RustCryptoEcdhKey
impl Unpin for RustCryptoEcdhKey
impl UnsafeUnpin for RustCryptoEcdhKey
impl UnwindSafe for RustCryptoEcdhKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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