Crate qs_crypto

Crate qs_crypto 

Source
Expand description

Quantum-Sign cryptographic module boundary. Provides deterministic randomness interfaces and (eventually) signature/KEM glue.

Re-exports§

pub use public::kid_from_spki_der;
pub use public::spki_der_canonical;
pub use public::spki_mldsa_paramset;
pub use public::spki_subject_key_bytes;

Modules§

mldsa87
FIPS 204 ML-DSA-87 canonical lengths (bytes).
public
Utilities for canonical SPKI handling and key identifiers.

Structs§

HmacSha512Drbg
HMAC-DRBG (SHA-512) wrapper implementing DeterministicRng.
Keypair
Simple keypair container.

Enums§

CryptoError
Cryptographic operation errors.
DigestAlg
Supported artifact digest algorithms.
DrbgError
Errors surfaced by deterministic random bit generators inside the crypto module.

Constants§

MLDSA87_PUBLIC_KEY_LEN
Length in bytes of an ML-DSA-87 verifying key.
MLDSA87_SECRET_KEY_LEN
Length in bytes of an ML-DSA-87 signing key.
MLDSA87_SIGNATURE_LEN
Length in bytes of an ML-DSA-87 signature.
TRANSCRIPT_DIGEST_LEN
Length of the transcript digest (SHA-256 output).

Traits§

DeterministicRng
Trait implemented by deterministic random bit generators used by Quantum-Sign.

Functions§

is_level5_sig_alg
Return true when the supplied signature algorithm identifier satisfies Level-5 policy.
keypair_mldsa87
Generate an ML-DSA-87 keypair using the provided DRBG.
kid_from_public_key
Compute the canonical key identifier for an ML-DSA-87 verifying key.
public_key_to_spki
Convert a raw ML-DSA-87 public key into canonical SPKI DER bytes.
random_bytes
Utility for generating a fixed number of bytes using a fresh OS-seeded DRBG.
sign_mldsa87
Produce an ML-DSA-87 signature over message (usually a digest) with explicit context.
transcript_digest
Compute the policy-bound transcript digest consumed by ML-DSA signatures.
verify_mldsa87
Verify an ML-DSA-87 signature over message.
verify_mldsa87_spki
Verify an ML-DSA-87 signature against an SPKI-encoded public key.