pub struct KeyChallenge {
pub nonce: [u8; 32],
pub signature: Signature,
pub expires_at: u64,
}Expand description
Challenge for proving possession of multiple ML-DSA private keys
This challenge is sent by the server immediately after QUIC connection establishment. The client must respond by proving possession of one or more ML-DSA private keys.
§Security Considerations
- Nonce: Must be cryptographically random and unique per challenge
- Server Key: Binds the signature to this specific server
- Expiration: Prevents replay attacks and limits challenge lifetime
- Key Encoding: ML-DSA public keys should use the standard encoding
§Wire Size
Approximate serialized size: ~80 bytes
- nonce: 32 bytes
- server_public_key: ~1312 bytes (ML-DSA-44)
- expires_at: 8 bytes
- overhead: ~8 bytes (postcard encoding)
Fields§
§nonce: [u8; 32]Cryptographically random nonce that must be included in signatures
This 32-byte nonce provides replay protection by ensuring each challenge is unique. Clients must include this exact nonce when constructing their signature data.
signature: SignatureServer’s ML-DSA-44 public key that must be included in signatures
Including the server’s public key in the signature data prevents signature replay attacks across different servers. This should be the same ML-DSA-44 key used in the server’s TLS certificate.
expires_at: u64Unix timestamp when this challenge expires
Challenges have a limited lifetime (typically 30-60 seconds) to prevent replay attacks. Clients must respond before this timestamp or the challenge will be rejected.
Trait Implementations§
Source§impl Clone for KeyChallenge
impl Clone for KeyChallenge
Source§fn clone(&self) -> KeyChallenge
fn clone(&self) -> KeyChallenge
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more