pub struct KeyProof {
pub public_key: VerifyingKey,
pub signature: Signature,
}Expand description
Cryptographic proof of ML-DSA private key possession
Each proof consists of a public key and a signature that demonstrates the client possesses the corresponding private key. The signature is computed over challenge-specific data to prevent replay attacks.
§Verification Process
The server verifies each proof by:
- Decoding the ML-DSA public key from
public_key - Reconstructing signature data:
nonce || server_public_key - Verifying the signature using the public key and signature data
- Adding successfully verified keys to the connection’s verified set
§Key Encoding
ML-DSA public keys must be encoded using the standard ML-DSA encoding:
- ML-DSA-44: 1312 bytes
- ML-DSA-65: 1952 bytes
- ML-DSA-87: 2592 bytes
This implementation uses ML-DSA-65 (security level 3, ~192-bit security).
Fields§
§public_key: VerifyingKeyEncoded ML-DSA public key being proven
This should be the result of calling verifying_key.encode() on
an ML-DSA verifying key. The encoding includes all necessary
information to reconstruct the public key for verification.
signature: SignatureML-DSA signature over (nonce || server_public_key)
This signature proves possession of the private key corresponding
to public_key. It must be computed over the exact concatenation
of the challenge nonce and server public key.
Signature sizes:
- ML-DSA-44: ~2420 bytes
- ML-DSA-65: ~3309 bytes
- ML-DSA-87: ~4627 bytes