Skip to main content

Crate hide_sign

Crate hide_sign 

Source
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.
SigningIdentity
A signing identity, intentionally not Debug, Clone or Serialize.
SpentNonces
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.
VerifyingIdentity
The public half of an identity: shareable, and safe to print.

Enums§

ChallengeError
Why an answer was not accepted. A caller should log this but tell the prover only that authentication failed.
SignError
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 context is reserved for the specification and must be refused by any API through which a third party chooses what gets signed.