pub struct SecretKey { /* private fields */ }Available on crate feature
xdsa only.Expand description
SecretKey is an ML-DSA-65 private key paired with an Ed25519 private key for creating and verifying quantum resistant digital signatures.
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn compose(ml_key: SecretKey, ed_key: SecretKey) -> Self
pub fn compose(ml_key: SecretKey, ed_key: SecretKey) -> Self
compose creates a secret key from its constituent ML-DSA-65 and Ed25519 secret keys.
Sourcepub fn split(self) -> (SecretKey, SecretKey)
pub fn split(self) -> (SecretKey, SecretKey)
split decomposes a secret key into its constituent ML-DSA-65 and Ed25519 secret keys.
Sourcepub fn from_bytes(seed: &[u8; 64]) -> Self
pub fn from_bytes(seed: &[u8; 64]) -> Self
from_bytes creates a private key from a 64-byte seed.
Sourcepub fn from_der(der: &[u8]) -> Result<Self, Box<dyn Error>>
pub fn from_der(der: &[u8]) -> Result<Self, Box<dyn Error>>
from_der parses a DER buffer into a private key.
Sourcepub fn from_pem(pem_str: &str) -> Result<Self, Box<dyn Error>>
pub fn from_pem(pem_str: &str) -> Result<Self, Box<dyn Error>>
from_pem parses a PEM string into a private key.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
public_key retrieves the public counterpart of the secret key.
Sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
fingerprint returns a 256bit unique identifier for this key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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