Skip to content

Commit 51f0e52

Browse files
committed
Clarity that client magic must not start with 7 zero bytes
1 parent 719f119 commit 51f0e52

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ANONYMIZED-DNSCRYPT.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ port number is in an allowed range. If this is not the case, the relay
8888
must immediately respond to clients with an empty packet.
8989
- validate that <dnscrypt-query> doesn't start with <anon-magic>.
9090
- validate that <dnscrypt-query> cannot be confused with the QUIC
91-
protocol. In particular, it shouldn't start with 0x00000001. If this
92-
is the case, the relay must immediately respond with an empty packet.
91+
protocol. In particular, it shouldn't start with 0x00 0x00 0x00 0x00
92+
0x00 0x00 0x00 0x00 (seven all-zero bytes). If this is the case, the
93+
relay must immediately respond with an empty packet.
9394
- otherwise, forward <dnscrypt-query> unmodified to the server.
9495

9596
Once a response from the server has been received, the relay:

DNSCRYPT-V2-PROTOCOL.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ using X25519.
364364
using the information from this certificate. It may be a truncated
365365
public key. Two valid certificates cannot share the same <client-magic>.
366366

367+
<client-magic> must not start with 0x00 0x00 0x00 0x00 0x00 0x00 0x00
368+
(seven all-zero bytes) in order to avoid a confusion with the QUIC protocol.
369+
367370
<serial> ::= a 4 byte serial number in big-endian format. If more than
368371
one certificates are valid, the client must prefer the certificate
369372
with a higher serial number.
@@ -450,7 +453,6 @@ DNSCrypt negligible compared to plain DNS.
450453

451454
Known open source implementations of the DNSCrypt version 2 protocol are:
452455

453-
- dnscrypt-wrapper - server-side implementation in C
454456
- Encrypted DNS Server - server-side implementation in Rust
455457
- PowerDNS dnsdist - a DNS loadbalancer that provides server-side DNSCrypt
456458
- unbound - a validating, caching resolver that provides server-side DNSCrypt

0 commit comments

Comments
 (0)