Padding strategy for DNSCrypt #2139
Replies: 4 comments 1 reply
-
As documented in the the relevant specification, response can be sent over UDP only if its size is less or equal to the question size. This prevents amplification attacks.
The padding of responses use a pseudorandom function to be deterministic for a given nonce. The same question asked multiple times by a genuine client may return responses whose size differs to mitigate correlation, but replay attacks won't allow statistical analysis. |
Beta Was this translation helpful? Give feedback.
-
@jedisct1 Thanks for your detailed explanation. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I feel that I find the reason why Lines 283 to 285 in dc2fff0 dnscrypt-proxy/dnscrypt-proxy/common.go Line 37 in dc2fff0 Accordingly, in my understanding, Additionally, according to the Cloudflare experiments, the default 1252 bytes UDP packet is probably not suitable for 1280 MTU IPv6 network, e.g. AS6830, AS20825, AS31334, and AS29562. Combined with DNS XL, DNS 2XL, and DNS Flag Day 2020 from APNIC labs, the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Initially, I found that the "dnscrypt-proxy" consistently sends 1252 bytes UDP packet to the IPv6 DNSCrypt server, e.g. adguard-dns-ipv6. The 1252 bytes, I guess, is based on an MTU of 1280, which is required by the IPv6 specification, minus 20 bytes for the IPv4 header and 8 bytes for the UDP header. However, the size of IPv6 header is 40 bytes, and hence, 1232 bytes UDP packet should be sent on the IPv6 network link.
Furthermore, I am curious about whether DNSCrypt is designed for traffic analysis resistance. The fixed-length or maximal-length padding that DNSCrypt seems to use are not recommended by RFC 8467.
Beta Was this translation helpful? Give feedback.
All reactions