pub struct RustCryptoX25519Key(/* private fields */);Expand description
Opaque RustCrypto X25519 private key. Its scalar is zeroized on drop and is never exposed through Debug or a byte-export accessor.
Implementations§
Source§impl RustCryptoX25519Key
impl RustCryptoX25519Key
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Import the 32-byte scalar encoding; clamping follows RFC 7748 section 5.
Sourcepub fn public_key(&self) -> [u8; 32]
pub fn public_key(&self) -> [u8; 32]
Return the public u-coordinate encoding defined by RFC 7748 section 5.
Trait Implementations§
Source§impl Debug for RustCryptoX25519Key
impl Debug for RustCryptoX25519Key
Source§impl KeyAgreementKey for RustCryptoX25519Key
impl KeyAgreementKey for RustCryptoX25519Key
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 RustCryptoX25519Key
impl RefUnwindSafe for RustCryptoX25519Key
impl Send for RustCryptoX25519Key
impl Sync for RustCryptoX25519Key
impl Unpin for RustCryptoX25519Key
impl UnsafeUnpin for RustCryptoX25519Key
impl UnwindSafe for RustCryptoX25519Key
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