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
{{ message }}
Repository navigation
Commit 654c1ad
Browse filesBrowse the repository at this point in the historyBrowse files
Require PQ-capable clients retrieving certificates over UDP to pad
their queries for the complete rollover certificate set.
Clients cannot know whether a rotation is in progress, and padding
only for the steady-state set would temporarily downgrade them to
classical certificates during every rotation.
Recommend trying the rollover-sized UDP query first because fragmented
UDP works on most paths, with TCP fallback after failure, timeout,
or a truncated response.
Copy file name to clipboardExpand all lines: draft-denis-dprive-dnscrypt.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -457,7 +457,7 @@ To initiate a DNSCrypt session, a client transmits an ordinary unencrypted `TXT`
457
457
458
458
A client MAY use UDP or TCP according to local policy.
459
459
460
-
A common strategy is to try UDP first and retry over TCP after failure, timeout, or truncation.
460
+
Clients SHOULD try UDP first and retry over TCP after failure, timeout, or truncation. A PQ-capable client uses the rollover-sized padding target defined in Certificate Retrieval Amplification; although this can cause IP fragmentation, fragmented UDP works on most paths. A client on a path already known to block fragmented UDP MAY use TCP immediately.
461
461
462
462
A resolver MUST serve certificates over both UDP and TCP; the UDP response MAY be truncated, with the TC flag set, to direct the client to TCP. Deployed clients begin certificate retrieval over UDP and only retry over TCP after a truncated response.
463
463
@@ -982,7 +982,7 @@ For compatibility with deployed DNSCrypt v2 clients and resolvers, a resolver MA
982
982
983
983
A resolver MUST NOT add PQ certificates or other large certificate records to a UDP certificate response unless the complete response is no larger than the request that triggered it.
984
984
985
-
A client that wants a PQ certificate over UDP therefore pads its certificate query to at least the size of the expected response, exactly as a query that carries a ciphertext is already large enough to cover its response.
985
+
A client retrieving PQ certificates over UDP therefore MUST pad its certificate query to at least the size of the expected response, exactly as a query that carries a ciphertext is already large enough to cover its response.
986
986
987
987
The advertised EDNS(0) {{!RFC6891}} UDP payload size is a fragmentation-avoidance hint and MUST NOT be used as the amplification limit, because a spoofed query can advertise an arbitrarily large buffer while remaining small.
988
988
@@ -995,7 +995,7 @@ For relay-compatible PQ deployments, resolvers SHOULD use the following certific
995
995
996
996
Resolvers SHOULD NOT exceed the rollover certificate set over UDP, and SHOULD keep certificate responses below 4096 octets.
997
997
998
-
A client cannot tell from outside whether a rotation is in progress, so a client that wants PQ certificates over UDP across rotations SHOULD pad its certificate query to cover the rollover set rather than only the steady-state set; otherwise it silently drops to the classical certificate for the duration of every rollover window.
998
+
A client cannot tell from outside whether a rotation is in progress. A client retrieving PQ certificates over UDP therefore MUST pad its certificate query to cover the rollover set rather than only the steady-state set; otherwise it silently drops to the classical certificate for the duration of every rollover window. This padding exceeds common fragmentation-avoidance targets, but clients SHOULD try UDP first because fragmented UDP works on most paths, and retry over TCP only after timeout or truncation.
999
999
1000
1000
If the certificate response containing the PQ set would be larger than the request, the resolver MUST NOT return that oversized PQ response over UDP; it SHOULD instead return the classical certificate response with the TC flag set, so a classical-only client can proceed while a PQ-capable client learns that more certificates may be available.
1001
1001
@@ -1217,13 +1217,15 @@ If the client connects to the relay over TCP, the relay still forwards the inner
1217
1217
1218
1218
Certificate retrieval through a relay is different: the relay forwards the certificate query to the resolver over UDP and forwards a matching certificate response back to the client, and it applies the same response-size check, dropping any response larger than the query it relayed.
1219
1219
1220
-
A client that wants a PQ certificate over UDP through a relay therefore pads its certificate query to at least the size of the expected certificate response, as described in Certificate Retrieval Amplification, so the response passes both the resolver's and the relay's anti-amplification check.
1220
+
A client retrieving a PQ certificate over UDP through a relay therefore MUST pad its certificate query to at least the size of the expected certificate response, as described in Certificate Retrieval Amplification, so the response passes both the resolver's and the relay's anti-amplification check.
1221
1221
1222
1222
A client that does not, or cannot, pad far enough receives only the certificates that fit within the inner UDP query size, typically a classical certificate with the TC flag set; if even that response is larger than the inner query, the relay drops it.
1223
1223
1224
1224
Retrying over TCP to an Anonymized DNSCrypt relay does not make the relay use TCP upstream: relays still forward the inner certificate query to the resolver over UDP.
1225
1225
1226
-
Therefore, a client that retrieves certificates through a relay MUST make the inner certificate query large enough for the expected UDP certificate response, or retrieve certificates directly from the resolver over TCP before using the relay for encrypted queries.
1226
+
Nevertheless, carrying a rollover-sized inner certificate query over the client-to-relay TCP connection avoids IP fragmentation on that leg while giving the relay a large enough request to forward upstream and a sufficient anti-amplification budget for the response. The inner query remains EDNS(0)-padded to the expected UDP response size; only its transport to the relay changes.
1227
+
1228
+
Therefore, after a rollover-sized UDP attempt times out or returns a truncated certificate response, a client retrieving certificates through a relay SHOULD retry over TCP to the relay with an inner query large enough for the expected UDP certificate response. Alternatively, it can retrieve certificates directly from the resolver over TCP before using the relay for encrypted queries, with the associated privacy tradeoff.
0 commit comments