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
Copy file name to clipboardExpand all lines: draft-denis-dprive-dnscrypt.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ The protocol is designed to be lightweight, extensible, and simple to implement
40
40
41
41
DNS packets don't need to be parsed nor rewritten. DNSCrypt simply wraps them in a secure, encrypted container. Encrypted packets are then exchanged the same way as regular packets, using the standard DNS transport mechanisms. Queries and responses are sent over UDP, falling back to TCP for large responses only if necessary.
42
42
43
-
DNSCrypt is stateless. Every query can be processed independently from other queries. There are no session identifiers. Clients can replace their keys whenever they want, without extra interactions with servers.
43
+
DNSCrypt is stateless. Every query can be processed independently from other queries. There are no session identifiers. In order to better defend against fingerprinting, clients can replace their keys whenever they want, without extra interactions with servers.
44
44
45
45
DNSCrypt packets can securely be proxied without having to be decrypted, allowing client IP addresses to be hidden from resolvers ("Anonymized DNSCrypt").
46
46
@@ -49,7 +49,7 @@ A recursive DNS server can accept DNSCrypt queries on the same IP address and po
49
49
Finally, DNSCrypt addresses two security issues inherent to regular DNS over UDP: amplification and fragment attacks.
50
50
51
51
52
-
# Conventions and Definitions
52
+
# Conventions And Definitions
53
53
54
54
{::boilerplate bcp14-tagged}
55
55
@@ -85,7 +85,7 @@ Definitions for server responses:
85
85
- `<resolver-response-pad>`: the variable-length padding.
86
86
87
87
88
-
# Protocol overview
88
+
# Protocol Overview
89
89
90
90
The protocol operates as follows:
91
91
@@ -96,7 +96,7 @@ The protocol operates as follows:
96
96
5. To send an encrypted response, the server adds padding to the unmodified response, encrypts the result using the client's public key and the client's nonce, and truncates the response if necessary. The resulting packet, truncated or not, is sent to the client using standard DNS mechanisms.
97
97
6. The client authenticates and decrypts the response using its secret key, the server's public key, the attached nonce, and its own nonce. If the response was truncated, the client may adjust internal parameters and retry over TCP. If not, the output is a regular DNS response that can be directly forwarded to applications and stub resolvers.
98
98
99
-
# Key management
99
+
# Key Management
100
100
101
101
Both the client and the resolver initially generate a short-term key pair for each supported encryption system.
102
102
@@ -125,15 +125,15 @@ DNSCrypt Clients and resolvers should support the protocol over UDP and must sup
125
125
126
126
The default port for this protocol should be 443, both for TCP and UDP.
127
127
128
-
# Padding for client queries over UDP
128
+
# Padding For Client Queries Over UDP
129
129
130
130
Prior to encryption, queries are padded using the ISO/IEC 7816-4 format. The padding starts with a byte valued 0x80 followed by a variable number of NUL bytes.
131
131
132
132
`<client-query>``<client-query-pad>`must be at least `<min-query-len>` bytes. If the length of the client query is less than `<min-query-len>`, the padding length must be adjusted in order to satisfy this requirement.
133
133
134
134
`<min-query-len>`is a variable length, initially set to 256 bytes, and must be a multiple of 64 bytes.
135
135
136
-
# Client queries over UDP
136
+
# Client Queries Over UDP
137
137
138
138
Client queries sent using UDP must be padded as described in section 3.
139
139
@@ -156,7 +156,7 @@ If the response has the TC flag set, the client must:
156
156
157
157
The client may decrease `<min-query-len>`, but the length must remain a multiple of 64 bytes.
158
158
159
-
# Padding for client queries over TCP
159
+
# Padding For Client Queries Over TCP
160
160
161
161
Prior to encryption, queries are padded using the ISO/IEC 7816-4 format. The padding starts with a byte valued 0x80 followed by a
162
162
variable number of NUL bytes.
@@ -180,7 +180,7 @@ or
180
180
`<56-bytes-query> 0x80 (0x00 * 199)`
181
181
182
182
183
-
# Client queries over TCP
183
+
# Client Queries Over TCP
184
184
185
185
Encrypted client queries over TCP only differ from queries sent over UDP by the padding length computation and by the fact that they are prefixed with their length, encoded as two big-endian bytes.
186
186
@@ -191,7 +191,7 @@ Unlike UDP queries, a query sent over TCP can be shorter than the response.
191
191
After having received a response from the resolver, the client and the resolver must close the TCP connection. Multiple transactions over the same TCP connections are not allowed by this revision of the protocol.
192
192
193
193
194
-
# Authenticated encryption and key exchange algorithm
194
+
# Authenticated Encryption And Key Exchange Algorithm
195
195
196
196
The `Box-XChaChaPoly` construction, and the way to use it described in this section, must be referenced in certificates as version `2` of the public-key authenticated encryption system.
197
197
@@ -295,12 +295,12 @@ Multiple implementations of the protocol described in this document have been de
295
295
A comprehensive list of known implementations can be found at [](https://dnscrypt.info/implementations).
296
296
297
297
298
-
# Security considerations
298
+
# Security Considerations
299
299
300
300
DNSCrypt does not protect against attacks on DNS infrastructure.
301
301
302
302
303
-
# Operational considerations
303
+
# Operational Considerations
304
304
305
305
Special attention should be paid to the uniqueness of the generated secret keys.
306
306
@@ -329,7 +329,7 @@ As a client is likely to reuse the same key pair many times, servers are encoura
329
329
This document has no IANA actions.
330
330
331
331
332
-
# Appendix 1: The Box-XChaChaPoly algorithm
332
+
# Appendix 1: The Box-XChaChaPoly Algorithm
333
333
334
334
The `Box-XChaChaPoly` algorithm combines the `X25519` {{!RFC7748}} key exchange mechanism with a variant of the ChaCha20-Poly1305 constrution defined in {{!RFC8439}}.
335
335
@@ -366,7 +366,7 @@ After initialization, proceed through the ChaCha rounds as usual.
366
366
367
367
Once the 20 ChaCha rounds have been completed, the first 128 bits and last 128 bits of the ChaCha state (both little-endian) are concatenated, and this 256-bit subkey is returned.
368
368
369
-
## Test Vector for the HChaCha20 Block Function
369
+
## Test Vector For The HChaCha20 Block Function
370
370
371
371
~~~
372
372
o Key = 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10:11:12:13:
@@ -444,7 +444,7 @@ Finally, the output of the Poly1305 function is prepended to the ciphertext:
The Box-XChaChaPoly algorithm combines the key exchange mechanism X25519 defined {{!RFC7748}} with the `XChaCha20_DJB-Poly1305` authenticated encryption algorithm.
0 commit comments