pub struct SecretKey { /* private fields */ }Expand description
A suite-1 composite private key: mldsaSeed (FIPS 204 ξ, 32 B) ‖ edSK (32 B).
Never on the wire. Debug is redacted and the bytes are zeroized on drop. Its component
keys are used only inside this composite (RFC 10073 §3.1).
The ML-DSA-65 expanded signing key is derived from the seed once, on first use, and kept
with the key (it is zeroized on drop too): deriving it is about a fifth of the cost of a
signature, and a host signs a session proof for every session.hello.
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn from_bytes(bytes: &[u8; 64]) -> Self
pub fn from_bytes(bytes: &[u8; 64]) -> Self
Wraps the 64-byte encoding. The caller zeroizes its own copy.
Sourcepub const fn expose_secret(&self) -> &[u8; 64]
pub const fn expose_secret(&self) -> &[u8; 64]
The 64-byte encoding, for sealed storage only.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
The composite public key (§3.4): suite 0x01 ‖ mldsaPK ‖ edPK.
Trait Implementations§
impl ZeroizeOnDrop for SecretKey
Auto Trait Implementations§
impl !Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnsafeUnpin for SecretKey
impl UnwindSafe for SecretKey
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