You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Completes Phase 13b (Retry + address validation, RFC 9000 SS8/SS8.1/SS17.2.5):
- encode_retry_packet (retry.v): builds a complete Retry packet, reusing
compute_retry_integrity_tag directly (already side-agnostic -- no new
crypto needed for the tag itself). Round-trips through the already-
existing, independently-written client-role verify_retry_integrity_tag/
parse_retry_packet -- proving the exact code that will receive this in
production actually accepts it, not just that it looks well-formed.
- generate_retry_token/validate_retry_token/validate_retry_token_for_attempt
(retry_token.v, new): AEAD-sealed (AES-128-GCM) address-validation tokens.
AEAD authentication alone satisfies RFC 9000 SS8.1.4's "difficult to
guess" and integrity requirements -- no separate random component needed
beyond the nonce GCM itself requires. validate_retry_token_for_attempt
adds the two context-dependent checks SS8.1.4 calls for: bound client
address must match, and a short expiry window. NEW_TOKEN-frame issuance
(SS8.1.3, tokens reusable across future connections) is out of scope --
v1 only issues tokens via Retry. Full single-use replay tracking beyond
the expiry window is deferred to 13d (needs a real listening socket to
own a consumed-token cache's lifetime); the short window satisfies
SS8.1.4's "prevented OR limited" replay requirement in the interim.
- AntiAmplificationLimiter (anti_amplification.v, new): RFC 9000 SS8.1's 3x
pre-validation send limit, deliberately mirroring flow_control.v's
FlowControlWindow shape. Standalone and tested; not yet wired into any
datagram-processing loop, since that loop doesn't exist until 13d.
Found and flagged (not fixed here, out of scope): while choosing a CSPRNG
for the token nonce, discovered conn.v's dial() uses V's general-purpose
`rand` module (wyrand-backed, not cryptographically secure) for
original_dcid/scid/client_random -- all security-relevant values that
should use crypto.rand instead (identical API, OS-backed, already used
elsewhere in this codebase). Real gap in already-merged Phase 9 code
(PR #28129), flagged as a separate follow-up task.
Full net.quic suite 57/57, ./vnew missdoc clean, ./vnew fmt -w applied.
// note_sent records `n` more bytes as sent to this address, failing if that
71
+
// would exceed the current limit -- callers must check available_to_send()
72
+
// (or catch this error) BEFORE actually sending, never discover the
73
+
// violation only after the fact, the same convention
74
+
// FlowControlWindow.consume() already establishes for the analogous
75
+
// send-side check elsewhere in this module.
76
+
pub fn (mut l AntiAmplificationLimiter) note_sent(n u64) ! {
77
+
if!l.validated && l.sent + n > l.received *3 {
78
+
returnerror('quic: anti-amplification limit exceeded: attempted to send ${n} bytes, only ${l.available_to_send()} available (received ${l.received}, already sent ${l.sent})')
0 commit comments