pub struct MlDsa65;Expand description
Marker type implementing [quantaegis_core::Signature] for
ML-DSA-65 (NIST Security Category 3).
Implementations§
Source§impl MlDsa65
impl MlDsa65
Sourcepub fn from_seed(seed: &[u8; 32]) -> (VerifyingKey, SigningKey)
pub fn from_seed(seed: &[u8; 32]) -> (VerifyingKey, SigningKey)
Derives a (VerifyingKey, SigningKey) keypair deterministically from a 32-byte
FIPS 204 seed xi (recommended format in RFC 9881).
Note: returning SigningKey by value in safe Rust can leave an unzeroized copy in
the callee’s return staging slot; FIPS/zeroization-critical callers should prefer
Self::keygen_into directly into caller-owned storage.
Sourcepub fn keygen_into<R: CryptoRng + ?Sized>(
rng: &mut R,
vk_out: &mut VerifyingKey,
sk_out: &mut SigningKey,
) -> Result<()>
pub fn keygen_into<R: CryptoRng + ?Sized>( rng: &mut R, vk_out: &mut VerifyingKey, sk_out: &mut SigningKey, ) -> Result<()>
Generates a fresh key pair directly into caller-owned storage and volatile-zeroizes
stack temporaries (FIPS 204, Algorithm 1).
Sourcepub fn sign_deterministic(
sk: &SigningKey,
msg: &[u8],
ctx: &[u8],
) -> Result<Signature>
pub fn sign_deterministic( sk: &SigningKey, msg: &[u8], ctx: &[u8], ) -> Result<Signature>
Signs msg with context ctx in deterministic mode (rnd = [0; 32]).
Sourcepub fn sign_mu<R: CryptoRng + ?Sized>(
sk: &SigningKey,
mu: &[u8; 64],
rng: &mut R,
) -> Result<Signature>
pub fn sign_mu<R: CryptoRng + ?Sized>( sk: &SigningKey, mu: &[u8; 64], rng: &mut R, ) -> Result<Signature>
Signs a precomputed 64-byte External-mu mu in hedged mode.
Sourcepub fn sign_mu_deterministic(
sk: &SigningKey,
mu: &[u8; 64],
) -> Result<Signature>
pub fn sign_mu_deterministic( sk: &SigningKey, mu: &[u8; 64], ) -> Result<Signature>
Signs a precomputed 64-byte External-mu mu in deterministic mode (rnd = [0; 32]).
Trait Implementations§
Source§impl Signature for MlDsa65
impl Signature for MlDsa65
Source§fn keygen<R: CryptoRng + ?Sized>(
rng: &mut R,
) -> Result<(Self::VerifyingKey, Self::SigningKey)>
fn keygen<R: CryptoRng + ?Sized>( rng: &mut R, ) -> Result<(Self::VerifyingKey, Self::SigningKey)>
Generates a fresh key pair by value; FIPS/zeroization-critical callers should prefer
Self::keygen_into to avoid safe-Rust return-slot staging copies.