Expand description
Hybrid Ed25519 + ML-DSA-65 signatures for HIDE.
A signature is the concatenation of both halves and verifies only if both halves verify. Accepting either alone would silently reduce the scheme to the weaker of the two, which is the whole reason for pairing them: Ed25519 falls to a quantum adversary, and ML-DSA is young enough that a classical break cannot be ruled out.
Both halves are derived from one 32-byte seed through domain-separated HKDF, so an identity is a single thing to back up. The seed is also separate from the encryption key: compromise of one must not imply the other.
No primitive is implemented here. This crate composes reviewed crates and owns only the combination.
Structs§
- Challenge
- A verifier’s demand: prove you hold the key, to me, now.
- Signing
Identity - A signing identity, intentionally not
Debug,CloneorSerialize. - Spent
Nonces - The nonces already spent. Kept by the verifier, because a prover has no incentive to remember. Entries are dropped once no live challenge could still carry them, so this does not grow without bound.
- Verifying
Identity - The public half of an identity: shareable, and safe to print.
Enums§
- Challenge
Error - Why an answer was not accepted. A caller should log this but tell the prover only that authentication failed.
- Sign
Error - An error that carries no key material and no signed plaintext.
Constants§
- NONCE_
LENGTH - Long enough that guessing or colliding is not a strategy.
- RESERVED_
CONTEXT_ PREFIX - Contexts starting with these bytes belong to the specification (§8.5): identity-log entries, MLS bindings, container signatures and the rest. A general-purpose signing API that let a caller choose one would sign protocol objects on that caller’s behalf.
- SEED_
LENGTH - The seed an identity is stored and backed up as.
- SIGNATURE_
LENGTH - A hybrid signature: the Ed25519 half followed by the ML-DSA-65 half.
- VERIFYING_
KEY_ LENGTH - A hybrid verifying key: the Ed25519 half followed by the ML-DSA-65 half.
Functions§
- is_
reserved_ context - Whether
contextis reserved for the specification and must be refused by any API through which a third party chooses what gets signed.