<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.25 (Ruby 3.1.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-denis-dprive-dnscrypt-00" category="info" submissionType="independent" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <front>
    <title abbrev="DNSCrypt">The DNSCrypt protocol</title>
    <seriesInfo name="Internet-Draft" value="draft-denis-dprive-dnscrypt-00"/>
    <author fullname="Frank Denis">
      <organization>Individual Contributor</organization>
      <address>
        <email>fde@00f.net</email>
      </address>
    </author>
    <date year="2023" month="March" day="09"/>
    <keyword>dns</keyword>
    <keyword>encryption</keyword>
    <keyword>privacy</keyword>
    <abstract>
      <t>The DNSCrypt protocol is designed to encrypt and authenticate DNS traffic between clients and resolvers. This document specifies the protocol and its implementation.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-denis-dprive-dnscrypt/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/DNSCrypt/dnscrypt-protocol"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>The document defines a specific protocol, DNSCrypt, that encrypts and authenticates DNS <xref target="RFC1035"/> queries and responses, improving confidentiality, integrity, and resistance to attacks affecting the original DNS protocol.</t>
      <t>The protocol is designed to be lightweight, extensible, and simple to implement securely on top of an existing DNS client, server or proxy.</t>
      <t>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.</t>
      <t>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.</t>
      <t>DNSCrypt packets can securely be proxied without having to be decrypted, allowing client IP addresses to be hidden from resolvers ("Anonymized DNSCrypt").</t>
      <t>A recursive DNS server can accept DNSCrypt queries on the same IP address and port as regular DNS. Similarly, DNSCrypt and DoH can also share the same IP address and TCP port.</t>
      <t>Finally, DNSCrypt addresses two security issues inherent to regular DNS over UDP: amplification and fragment attacks.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <t>Definitions for client queries:</t>
      <ul spacing="normal">
        <li>
          <tt>&lt;dnscrypt-query&gt;</tt>:  <tt>&lt;client-magic&gt;</tt> <tt>&lt;client-pk&gt;</tt> <tt>&lt;client-nonce&gt;</tt> <tt>&lt;encrypted-query&gt;</tt></li>
        <li>
          <tt>&lt;client-magic&gt;</tt>: a 8 byte identifier for the resolver certificate
chosen by the client.</li>
        <li>
          <tt>&lt;client-pk&gt;</tt>: the client's public key, whose length depends on the encryption algorithm defined in the chosen certificate.</li>
        <li>
          <tt>&lt;client-sk&gt;</tt>: the client's secret key.</li>
        <li>
          <tt>&lt;resolver-pk&gt;</tt>: the resolver's public key.</li>
        <li>
          <tt>&lt;client-nonce&gt;</tt>: a unique query identifier for a given (<tt>&lt;client-sk&gt;</tt>, <tt>&lt;resolver-pk&gt;</tt>) tuple. The same query sent twice for the same (<tt>&lt;client-sk&gt;</tt>, <tt>&lt;resolver-pk&gt;</tt>) tuple must use two distinct <tt>&lt;client-nonce&gt;</tt> values. The length of <tt>&lt;client-nonce&gt;</tt> depends on the chosen encryption algorithm.</li>
        <li>
          <tt>AE</tt>: the authenticated encryption function.</li>
        <li>
          <tt>&lt;encrypted-query&gt;</tt>: <tt>AE(&lt;shared-key&gt; &lt;client-nonce&gt; &lt;client-nonce-pad&gt;, &lt;client-query&gt; &lt;client-query-pad&gt;)</tt></li>
        <li>
          <tt>&lt;shared-key&gt;</tt>: the shared key derived from <tt>&lt;resolver-pk&gt;</tt> and <tt>&lt;client-sk&gt;</tt>, using the key exchange algorithm defined in the chosen certificate.
-<tt>&lt;client-query&gt;</tt>: the unencrypted client query. The query is not modified; in particular, the query flags are not altered and the query length must be kept in queries prepared to be sent over TCP.</li>
        <li>
          <tt>&lt;client-nonce-pad&gt;</tt>: <tt>&lt;client-nonce&gt;</tt> length is half the nonce length required by the encryption algorithm. In client queries, the other half, <tt>&lt;client-nonce-pad&gt;</tt> is filled with NUL bytes.</li>
        <li>
          <tt>&lt;client-query-pad&gt;</tt>: the variable-length padding.</li>
      </ul>
      <t>Definitions for server responses:</t>
      <ul spacing="normal">
        <li>
          <tt>&lt;dnscrypt-response&gt;</tt>: <tt>&lt;resolver-magic&gt;</tt> <tt>&lt;nonce&gt;</tt> <tt>&lt;encrypted-response&gt;</tt></li>
        <li>
          <tt>&lt;resolver-magic&gt;</tt>: the <tt>0x72 0x36 0x66 0x6e 0x76 0x57 0x6a 0x38</tt> byte sequence</li>
        <li>
          <tt>&lt;nonce&gt;</tt>: <tt>&lt;client-nonce&gt;</tt> <tt>&lt;resolver-nonce&gt;</tt></li>
        <li>
          <tt>&lt;client-nonce&gt;</tt>: the nonce sent by the client in the related query.</li>
        <li>
          <tt>&lt;client-pk&gt;</tt>: the client's public key.</li>
        <li>
          <tt>&lt;resolver-sk&gt;</tt>: the resolver's secret key.</li>
        <li>
          <tt>&lt;resolver-nonce&gt;</tt>: a unique response identifier for a given <tt>(&lt;client-pk&gt;, &lt;resolver-sk&gt;)</tt> tuple. The length of <tt>&lt;resolver-nonce&gt;</tt> depends on the chosen encryption algorithm.</li>
        <li>
          <tt>DE</tt>: the authenticated decryption function.</li>
        <li>
          <tt>&lt;encrypted-response&gt;</tt>: <tt>DE(&lt;shared-key&gt;, &lt;nonce&gt;, &lt;resolver-response&gt; &lt;resolver-response-pad&gt;)</tt></li>
        <li>
          <tt>&lt;shared-key&gt;</tt>: the shared key derived from <tt>&lt;resolver-sk&gt;</tt> and <tt>&lt;client-pk&gt;</tt>, using the key exchange algorithm defined in the chosen certificate.</li>
        <li>
          <tt>&lt;resolver-response&gt;</tt>: the unencrypted resolver response. The response is not modified; in particular, the query flags are not altered and the response length must be kept in responses prepared to be sent over TCP.</li>
        <li>
          <tt>&lt;resolver-response-pad&gt;</tt>: the variable-length padding.</li>
      </ul>
    </section>
    <section anchor="protocol-overview">
      <name>Protocol overview</name>
      <t>The protocol operates as follows:</t>
      <ol spacing="normal" type="1"><li>The DNSCrypt client sends a DNS query to a DNSCrypt server to retrieve the server's public keys.</li>
        <li>The client generates its own key pair.</li>
        <li>The client encrypts unmodified DNS queries using a server's public key, padding them as necessary, and concatenates them to a nonce and a copy of the client's public key. The resulting output is sent using standard DNS transport mechanisms.</li>
        <li>Encrypted queries are decrypted by the server using the attached client public key and the server's own secret key. The output is a regular DNS packet that doesn't require any special processing.</li>
        <li>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.</li>
        <li>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.</li>
      </ol>
    </section>
    <section anchor="key-management">
      <name>Key management</name>
      <t>Both the client and the resolver initially generate a short-term key pair for each supported encryption system.</t>
      <t>The client generates a key pair for each resolver it communicates with, and the resolver generates a key pair for each client it communicates with. The resolver also generates a public key for each supported encryption system.</t>
    </section>
    <section anchor="session-establishment">
      <name>Session Establishment</name>
      <t>From a client perspective, a DNSCrypt session begins with the client sending a non-authenticated DNS query to a DNSCrypt-enabled resolver. This DNS query encodes the certificate versions supported by the client, as well as a public identifier of the provider requested by the client.</t>
      <t>The resolver responds with a public set of signed certificates that must be verified by the client using a previously distributed public key, known as the provider public key. Each certificate includes a validity period, a serial number, a version that defines a key exchange mechanism, an authenticated encryption algorithm and its parameters, as well as a short-term public key, known as the resolver public key.</t>
      <t>A resolver can support multiple algorithms and advertise multiple resolver public keys simultaneously. The client picks the one with the highest serial number among the currently valid ones that match a supported protocol version.</t>
      <t>Each certificate includes a magic number that the client must prefix its queries with, in order for the resolver to know what certificate was chosen by the client to construct a given query.</t>
      <t>The encryption algorithm, resolver public key, and client magic number from the chosen certificate are then used by the client to send encrypted queries. These queries include the client public key.</t>
      <t>Using this client public key, and knowing which certificate was chosen by the client as well as the relevant secret key, the resolver verifies and decrypts the query and encrypts the response using the same parameters.</t>
    </section>
    <section anchor="transport">
      <name>Transport</name>
      <t>The DNSCrypt protocol can use the UDP and TCP transport protocols.
DNSCrypt Clients and resolvers should support the protocol over UDP and must support it over TCP.</t>
      <t>The default port for this protocol should be 443, both for TCP and UDP.</t>
    </section>
    <section anchor="padding-for-client-queries-over-udp">
      <name>Padding for client queries over UDP</name>
      <t>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.</t>
      <t><tt>&lt;client-query&gt;</tt> <tt>&lt;client-query-pad&gt;</tt> must be at least <tt>&lt;min-query-len&gt;</tt> bytes. If the length of the client query is less than <tt>&lt;min-query-len&gt;</tt>, the padding length must be adjusted in order to satisfy this requirement.</t>
      <t><tt>&lt;min-query-len&gt;</tt> is a variable length, initially set to 256 bytes, and must be a multiple of 64 bytes.</t>
    </section>
    <section anchor="client-queries-over-udp">
      <name>Client queries over UDP</name>
      <t>Client queries sent using UDP must be padded as described in section 3.</t>
      <t>A UDP packet can contain a single query, whose entire content is the <tt>&lt;dnscrypt-query&gt;</tt> construction documented in section 2.</t>
      <t>UDP packets using the DNSCrypt protocol can be fragmented into multiple IP packets and can use a single source port.</t>
      <t>After having received a query, the resolver can either ignore the query or reply with a DNSCrypt-encapsulated response.</t>
      <t>The client must verify and decrypt the response using the resolver's public key, the shared secret and the received nonce. If the response cannot be verified, the response must be discarded.</t>
      <t>If the response has the TC flag set, the client must:</t>
      <ol spacing="normal" type="1"><li>send the query again using TCP</li>
        <li>set the new minimum query length as:</li>
      </ol>
      <t><tt>&lt;min-query-len&gt; ::= min(&lt;min-query-len&gt; + 64, &lt;max-query-len&gt;)</tt></t>
      <t><tt>&lt;min-query-len&gt;</tt> must be capped so that the full length of a DNSCrypt packet doesn't exceed the maximum size required by the transport layer.</t>
      <t>The client may decrease <tt>&lt;min-query-len&gt;</tt>, but the length must remain a multiple of 64 bytes.</t>
    </section>
    <section anchor="padding-for-client-queries-over-tcp">
      <name>Padding for client queries over TCP</name>
      <t>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.</t>
      <t>The length of <tt>&lt;client-query-pad&gt;</tt> is randomly chosen between 1 and 256 bytes (including the leading 0x80), but the total length of <tt>&lt;client-query&gt;</tt> <tt>&lt;client-query-pad&gt;</tt> must be a multiple of 64 bytes.</t>
      <t>For example, an originally unpadded 56-bytes DNS query can be padded as:</t>
      <t><tt>&lt;56-bytes-query&gt; 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00</tt></t>
      <t>or</t>
      <t><tt>&lt;56-bytes-query&gt; 0x80 (0x00 * 71)</tt></t>
      <t>or</t>
      <t><tt>&lt;56-bytes-query&gt; 0x80 (0x00 * 135)</tt></t>
      <t>or</t>
      <t><tt>&lt;56-bytes-query&gt; 0x80 (0x00 * 199)</tt></t>
    </section>
    <section anchor="client-queries-over-tcp">
      <name>Client queries over TCP</name>
      <t>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.</t>
      <t>Cleartext DNS query payloads are not prefixed by their length, even when sent over TCP.</t>
      <t>Unlike UDP queries, a query sent over TCP can be shorter than the response.</t>
      <t>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.</t>
    </section>
    <section anchor="authenticated-encryption-and-key-exchange-algorithm">
      <name>Authenticated encryption and key exchange algorithm</name>
      <t>The <tt>Box-XChaChaPoly</tt> construction, and the way to use it described in this section, must be referenced in certificates as version <tt>2</tt> of the public-key authenticated encryption system.</t>
      <t>The construction, originally implemented in the libsodium cryptographic library and exposed under the name "crypto_box_curve25519xchacha20poly1305", uses the Curve25119 elliptic curve in Montgomery form and the <tt>hchacha20</tt> hash function for key exchange, the <tt>XChaCha20</tt> stream cipher, and <tt>Poly1305</tt> for message authentication.</t>
      <t>The public and secret keys are 32 bytes long in storage. The MAC is 16 bytes long, and is prepended to the ciphertext.</t>
      <t>When using <tt>Box-XChaChaPoly</tt>, this construction requires a 24 bytes nonce, that must not be reused for a given shared secret.</t>
      <t>With a 24 bytes nonce, a question sent by a DNSCrypt client must be encrypted using the shared secret, and a nonce constructed as follows: 12 bytes chosen by the client followed by 12 NUL (<tt>0x00</tt>) bytes.</t>
      <t>A response to this question must be encrypted using the shared secret, and a nonce constructed as follows: the bytes originally chosen by the client, followed by bytes chosen by the resolver.</t>
      <t>The resolver's half of the nonce should be randomly chosen.</t>
      <t>The client's half of the nonce can include a timestamp in addition to a counter or to random bytes, so that when a response is received, the client can use this timestamp to immediately discard responses to queries that have been sent too long ago, or dated in the future.</t>
    </section>
    <section anchor="certificates">
      <name>Certificates</name>
      <t>The client begins a DNSCrypt session by sending a regular unencrypted TXT DNS query to the resolver IP address, on the DNSCrypt port, first over UDP, then, in case of failure, timeout or truncation, over TCP.</t>
      <t>Resolvers are not required to serve certificates both on UDP and TCP.</t>
      <t>The name in the question (<tt>&lt;provider name</tt>) must follow this scheme:</t>
      <t><tt>&lt;protocol-major-version&gt; . dnscrypt-cert . &lt;zone&gt;</tt></t>
      <t>A major protocol version has only one certificate format.</t>
      <t>A DNSCrypt client implementing the second version of the protocol must send a query with the TXT type and a name of the form:</t>
      <t><tt>2.dnscrypt-cert.example.com</tt></t>
      <t>The zone must be a valid DNS name, but may not be registered in the DNS hierarchy.</t>
      <t>A single provider name can be shared by multiple resolvers operated by the same entity, and a resolver can respond to multiple provider
names, especially to support multiple protocol versions simultaneously.</t>
      <t>In order to use a DNSCrypt-enabled resolver, a client must know the following information:</t>
      <ul spacing="normal">
        <li>The resolver IP address and port</li>
        <li>The provider name</li>
        <li>The provider public key</li>
      </ul>
      <t>The provider public key is a long-term key whose sole purpose is to verify the certificates. It is never used to encrypt or verify DNS queries. A unique provider public key can be used to sign multiple certificates.</t>
      <t>For example, an organization operating multiple resolvers can use a unique provider name and provider public key across all resolvers,
and just provide a list of IP addresses and ports. Each resolver may have its unique set of certificates that can be signed with the
same key.</t>
      <t>Certificates should be signed on dedicated hardware and not on the resolvers. Resolvers must serve the certificates, provided that they
have already been signed.</t>
      <t>A successful response to certificate request contains one or more <tt>TXT</tt> records, each record containing a certificate encoded as follows:</t>
      <ul spacing="normal">
        <li>
          <tt>&lt;cert&gt;</tt>: <tt>&lt;cert-magic&gt; &lt;es-version&gt; &lt;protocol-minor-version&gt; &lt;signature&gt; &lt;resolver-pk&gt; &lt;client-magic&gt; &lt;serial&gt; &lt;ts-start&gt; &lt;ts-end&gt; &lt;extensions&gt;</tt></li>
        <li>
          <tt>&lt;cert-magic&gt;</tt>: <tt>0x44 0x4e 0x53 0x43</tt></li>
        <li>
          <tt>&lt;es-version&gt;</tt>: the cryptographic construction to use with this certificate.</li>
      </ul>
      <t>For <tt>Box-XChaChaPoly</tt>, <tt>&lt;es-version&gt;</tt> must be <tt>0x00 0x02</tt>.</t>
      <ul spacing="normal">
        <li>
          <tt>&lt;protocol-minor-version&gt;</tt>: <tt>0x00 0x00</tt></li>
        <li>
          <tt>&lt;signature&gt;</tt>: a 64-byte signature of <tt>(&lt;resolver-pk&gt; &lt;client-magic&gt; &lt;serial&gt; &lt;ts-start&gt; &lt;ts-end&gt; &lt;extensions&gt;)</tt> using the Ed25519 algorithm and the provider secret key. Ed25519 must be used in this version of the protocol.</li>
        <li>
          <tt>&lt;resolver-pk&gt;</tt>: the resolver short-term public key, which is 32 bytes when
using X25519.</li>
        <li>
          <tt>&lt;client-magic&gt;</tt>: the first 8 bytes of a client query that was built using the information from this certificate. It may be a truncated public key. Two valid certificates cannot share the same <tt>&lt;client-magic&gt;</tt>.</li>
        <li>
          <tt>&lt;client-magic&gt;</tt> must not start with <tt>0x00 0x00 0x00 0x00 0x00 0x00 0x00</tt>
(seven all-zero bytes) in order to avoid a confusion with the QUIC protocol.</li>
        <li>
          <tt>&lt;serial&gt;</tt>: a 4 byte serial number in big-endian format. If more than one certificates are valid, the client must prefer the certificate
with a higher serial number.</li>
        <li>
          <tt>&lt;ts-start&gt;</tt>: the date the certificate is valid from, as a big-endian
4-byte unsigned Unix timestamp.</li>
        <li>
          <tt>&lt;ts-end&gt;</tt>: the date the certificate is valid until (inclusive), as a
big-endian 4-byte unsigned Unix timestamp.</li>
        <li>
          <tt>&lt;extensions&gt;</tt>: empty in the current protocol version, but may contain additional data in future revisions, including minor versions. The computation and the verification of the signature must include the extensions. An implementation not supporting these extensions must ignore them.</li>
      </ul>
      <t>Certificates made of these information, without extensions, are 116 bytes long. With the addition of the cert-magic, es-version and
protocol-minor-version, the record is 124 bytes long.</t>
      <t>After having received a set of certificates, the client checks their validity based on the current date, filters out the ones designed for encryption systems that are not supported by the client, and chooses the certificate with the higher serial number.</t>
      <t>DNSCrypt queries sent by the client must use the <tt>&lt;client-magic&gt;</tt> header of the chosen certificate, as well as the specified encryption
system and public key.</t>
      <t>The client must check for new certificates every hour, and switch to a new certificate if:</t>
      <ul spacing="normal">
        <li>the current certificate is not present or not valid any more</li>
      </ul>
      <t>or</t>
      <ul spacing="normal">
        <li>a certificate with a higher serial number than the current one is available.</li>
      </ul>
    </section>
    <section anchor="security-considerations">
      <name>Security considerations</name>
      <t>DNSCrypt does not protect against attacks on DNS infrastructure.</t>
    </section>
    <section anchor="operational-considerations">
      <name>Operational considerations</name>
      <t>Special attention should be paid to the uniqueness of the generated secret keys.</t>
      <t>Client public keys can be used by resolvers to authenticate clients, link queries to customer accounts, and unlock business-specific
features such as redirecting specific domain names to a sinkhole.</t>
      <t>Resolvers accessible from any client IP address can also opt for only responding to a set of whitelisted public keys.</t>
      <t>Resolvers accepting queries from any client must accept any client public key. In particular, an anonymous client can generate a new key pair for every session, or even for every query.</t>
      <t>his mitigates the ability for a resolver to group queries by client public keys, and discover the set of IP addresses a user might have been operating.</t>
      <t>Resolvers must rotate the short-term key pair every 24 hours at most, and must throw away the previous secret key.</t>
      <t>After a key rotation, a resolver must still accept all the previous keys that haven't expired.</t>
      <t>Provider public keys may be published as a DNSSEC-signed TXT records, in the same zone as the provider name.</t>
      <t>For example, a query for the TXT type on the name <tt>"2.pubkey.example.com"</tt> may return a signed record containing a hexadecimal-encoded provider public key for the provider name <tt>"2.dnscrypt-cert.example.com"</tt>.</t>
      <t>As a client is likely to reuse the same key pair many times, servers are encouraged to cache shared keys instead of performing the X25519 operation for each query. This makes the computational overhead of DNSCrypt negligible compared to plain DNS.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="appendix-1-the-box-xchachapoly-algorithm">
      <name>Appendix 1: The Box-XChaChaPoly algorithm</name>
      <t>The <tt>Box-XChaChaPoly</tt> algorithm combines the <tt>X25519</tt> <xref target="RFC7748"/> key exchange mechanism with a variant of the ChaCha20-Poly1305 constrution defined in <xref target="RFC8439"/>.</t>
      <section anchor="hchacha20">
        <name>HChaCha20</name>
        <t><tt>HChaCha20</tt> is an intermediary step based on the construction and security proof used to create XSalsa20, an extended-nonce Salsa20 variant.</t>
        <t><tt>HChaCha20</tt> is initialized the same way as the <tt>ChaCha20</tt> cipher defined in <xref target="RFC8439"/>, except
that <tt>HChaCha20</tt> uses a 128-bit nonce and has no counter. Instead, the block counter is replaced by the first 32 bits of the nonce.</t>
        <t>Consider the two figures below, where each non-whitespace character
represents one nibble of information about the ChaCha states (all
numbers little-endian):</t>
        <artwork><![CDATA[
                  cccccccc  cccccccc  cccccccc  cccccccc
                  kkkkkkkk  kkkkkkkk  kkkkkkkk  kkkkkkkk
                  kkkkkkkk  kkkkkkkk  kkkkkkkk  kkkkkkkk
                  bbbbbbbb  nnnnnnnn  nnnnnnnn  nnnnnnnn

           ChaCha20 State: c=constant k=key b=blockcount n=nonce


                  cccccccc  cccccccc  cccccccc  cccccccc
                  kkkkkkkk  kkkkkkkk  kkkkkkkk  kkkkkkkk
                  kkkkkkkk  kkkkkkkk  kkkkkkkk  kkkkkkkk
                  nnnnnnnn  nnnnnnnn  nnnnnnnn  nnnnnnnn

                 HChaCha20 State: c=constant k=key n=nonce
]]></artwork>
        <t>After initialization, proceed through the ChaCha rounds as usual.</t>
        <t>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.</t>
      </section>
      <section anchor="test-vector-for-the-hchacha20-block-function">
        <name>Test Vector for the HChaCha20 Block Function</name>
        <artwork><![CDATA[
   o  Key = 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10:11:12:13:
      14:15:16:17:18:19:1a:1b:1c:1d:1e:1f.  The key is a sequence of
      octets with no particular structure before we copy it into the
      HChaCha state.

   o  Nonce = (00:00:00:09:00:00:00:4a:00:00:00:00:31:41:59:27)

   After setting up the HChaCha state, it looks like this:

                    61707865 3320646e 79622d32 6b206574
                    03020100 07060504 0b0a0908 0f0e0d0c
                    13121110 17161514 1b1a1918 1f1e1d1c
                    09000000 4a000000 00000000 27594131

                     ChaCha state with the key setup.

   After running 20 rounds (10 column rounds interleaved with 10
   "diagonal rounds"), the HChaCha state looks like this:

                    423b4182 fe7bb227 50420ed3 737d878a
                    0aa76448 7954cdf3 846acd37 7b3c58ad
                    77e35583 83e77c12 e0076a2d bc6cd0e5
                    d5e4f9a0 53a8748a 13c42ec1 dcecd326

                       HChaCha state after 20 rounds

   HChaCha20 will then return only the first and last rows, in little
   endian, resulting in the following 256-bit key:

                    82413b42 27b27bfe d30e4250 8a877d73
                    a0f9e4d5 8a74a853 c12ec413 26d3ecdc

                        Resultant HChaCha20 subkey
]]></artwork>
      </section>
      <section anchor="chacha20djb">
        <name>ChaCha20_DJB</name>
        <t>ChaCha20 was originally designed to have a 8 byte nonce.</t>
        <t>For the needs of TLS, <xref target="RFC8439"/> changed this to set <tt>N_MIN</tt> and <tt>N_MAX</tt> to <tt>12</tt>, at the expense of a smaller internal counter.</t>
        <t>DNSCrypt uses ChaCha20 as originally specified, with <tt>N_MIN = N_MAX = 8</tt>.</t>
        <t>We refer to this variant as <tt>ChaCha20_DJB</tt>.</t>
        <t>Common implementations may just refer to it as <tt>ChaCha20</tt> and the IETF version as <tt>ChaCha20-IETF</tt>.</t>
        <t>The internal counter in <tt>ChaCha20_DJB</tt> is 4 bytes larger than <tt>ChaCha20</tt>. There are no other differences between <tt>ChaCha20_DJB</tt> and <tt>ChaCha20</tt>.</t>
      </section>
      <section anchor="xchacha20djb">
        <name>XChaCha20_DJB</name>
        <t>XChaCha20_DJB can be constructed from ChaCha20 implementation and HChaCha20.</t>
        <t>All one needs to do is:</t>
        <ol spacing="normal" type="1"><li>Pass the key and the first 16 bytes of the 24-byte nonce to <tt>HChaCha20</tt> to obtain the subkey.</li>
          <li>Use the subkey and remaining 8 byte nonce with <tt>ChaCha20_DJB</tt>.</li>
        </ol>
      </section>
      <section anchor="xchacha20djb-poly1305">
        <name>XChaCha20_DJB-Poly1305</name>
        <t>XChaCha20 is a stream cipher and offers no integrity guarantees without being combined with a MAC algorithm (e.g. Poly1305).</t>
        <t><tt>XChaCha20_DJB-Poly1305</tt> adds an authentication tag to ciphertext encrypted with <tt>XChaCha20_DJB</tt>.</t>
        <t>The Poly1305 key is computed as in <xref target="RFC8439"/>, by encrypting an empty block.</t>
        <t>Finally, the output of the Poly1305 function is prepended to the ciphertext:</t>
        <ul spacing="normal">
          <li>
            <tt>&lt;k&gt;</tt>: encryption key</li>
          <li>
            <tt>&lt;m&gt;</tt>: message to encrypt</li>
          <li>
            <tt>XChaCha20_DJB-Poly1305(&lt;k&gt;, &lt;m&gt;)</tt>: <tt>Poly1305(XChaCha20_DJB(&lt;k&gt;, &lt;m&gt;)) || XChaCha20_DJB(&lt;k&gt;, &lt;m&gt;)</tt></li>
        </ul>
      </section>
      <section anchor="the-box-xchachapoly-algorithm">
        <name>The Box-XChaChaPoly algorithm</name>
        <t>The Box-XChaChaPoly algorithm combines the key exchange mechanism X25519 defined <xref target="RFC7748"/> with the <tt>XChaCha20_DJB-Poly1305</tt> authenticated encryption algorithm.</t>
        <ul spacing="normal">
          <li>
            <tt>&lt;k&gt;</tt>: encryption key</li>
          <li>
            <tt>&lt;m&gt;</tt>: message to encrypt</li>
          <li>
            <tt>&lt;pk&gt;</tt>: recipent's public key</li>
          <li>
            <tt>&lt;sk&gt;</tt>: sender's secret key</li>
          <li>
            <tt>sk</tt>: <tt>HChaCha20(X25519(&lt;pk&gt;, &lt;sk&gt;))</tt></li>
          <li>
            <tt>Box-XChaChaPoly(pk, sk, m)</tt>: <tt>XChaCha20_DJB-Poly1305(&lt;sk&gt;, &lt;m&gt;)</tt></li>
        </ul>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC1035" target="https://www.rfc-editor.org/info/rfc1035" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml">
        <front>
          <title>Domain names - implementation and specification</title>
          <author fullname="P. Mockapetris" initials="P." surname="Mockapetris"/>
          <date month="November" year="1987"/>
          <abstract>
            <t>This RFC is the revised specification of the protocol and format used in the implementation of the Domain Name System.  It obsoletes RFC-883.  This memo documents the details of the domain name client - server communication.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="13"/>
        <seriesInfo name="RFC" value="1035"/>
        <seriesInfo name="DOI" value="10.17487/RFC1035"/>
      </reference>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized.  This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC7748" target="https://www.rfc-editor.org/info/rfc7748" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml">
        <front>
          <title>Elliptic Curves for Security</title>
          <author fullname="A. Langley" initials="A." surname="Langley"/>
          <author fullname="M. Hamburg" initials="M." surname="Hamburg"/>
          <author fullname="S. Turner" initials="S." surname="Turner"/>
          <date month="January" year="2016"/>
          <abstract>
            <t>This memo specifies two elliptic curves over prime fields that offer a high level of practical security in cryptographic applications, including Transport Layer Security (TLS).  These curves are intended to operate at the ~128-bit and ~224-bit security level, respectively, and are generated deterministically based on a list of required properties.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7748"/>
        <seriesInfo name="DOI" value="10.17487/RFC7748"/>
      </reference>
      <reference anchor="RFC8439" target="https://www.rfc-editor.org/info/rfc8439" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8439.xml">
        <front>
          <title>ChaCha20 and Poly1305 for IETF Protocols</title>
          <author fullname="Y. Nir" initials="Y." surname="Nir"/>
          <author fullname="A. Langley" initials="A." surname="Langley"/>
          <date month="June" year="2018"/>
          <abstract>
            <t>This document defines the ChaCha20 stream cipher as well as the use of the Poly1305 authenticator, both as stand-alone algorithms and as a "combined mode", or Authenticated Encryption with Associated Data (AEAD) algorithm.</t>
            <t>RFC 7539, the predecessor of this document, was meant to serve as a stable reference and an implementation guide. It was a product of the Crypto Forum Research Group (CFRG). This document merges the errata filed against RFC 7539 and adds a little text to the Security Considerations section.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8439"/>
        <seriesInfo name="DOI" value="10.17487/RFC8439"/>
      </reference>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA9U86XLbSHr/+RQd7Y+VNqQWIClRYjyuaGQ7o2R87Njema1U
atgEmiRGIMDFIYmzO/sseZY8Wb6jTxC0vclUpaKSZRLo4+vvvoDRaDRosiZX
c3HyYaPEizfvb6v9rhG7qmzKpMxPBnK5rNQD3Df3TgaJbNS6rPZzkRWrcjDI
dtVcNFVbN+Mouo7Gg7RMCrmFRdNKrppRqoqsHqW7KntQo7SoE1xmFEWDul1u
s7rOyqLZ7xQul6qdgj9FM7hX+8eySucDMRIwB/9TBc2E4fgNl5PJ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