https://lsd.gnunet.org/lsd0001/ Internet-Draft The GNU Name System January 2022 Schanzenbach, et al. Expires 4 August 2022 [Page] Workgroup: Independent Stream Internet-Draft: draft-schanzen-gns-06 Published: 31 January 2022 Intended Status: Informational Expires: 4 August 2022 Authors: M. Schanzenbach GNUnet e.V. C. Grothoff Berner Fachhochschule B. Fix GNUnet e.V. The GNU Name System Abstract This document contains the GNU Name System (GNS) technical specification. GNS is a decentralized and censorship-resistant name system that provides a privacy-enhancing alternative to the Domain Name System (DNS).P This document defines the normative wire format of resource records, resolution processes, cryptographic routines and security considerations for use by implementers. It is published here to inform readers about the function of GNS, guide future GNS implementations, and ensure interoperability among implementations including with the pre-existing GNUnet implementation.P This specification was developed outside the IETF and does not have IETF consensus. It is published here to guide implementation of GNS and to ensure interoperability among implementations.P Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.P Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.P Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."P This Internet-Draft will expire on 4 August 2022.P Copyright Notice Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.P This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. P ^ Table of Contents * 1. Introduction + 1.1. Requirements Notation * 2. Terminology * 3. Overview * 4. Zones + 4.1. Zone Top-Level Domain + 4.2. Zone Revocation * 5. Resource Records + 5.1. Zone Delegation Records o 5.1.1. PKEY o 5.1.2. EDKEY o 5.1.3. GNS2DNS + 5.2. Auxiliary Records o 5.2.1. LEHO o 5.2.2. NICK o 5.2.3. BOX o 5.2.4. GTS * 6. Record Storage + 6.1. The Storage Key + 6.2. The Records Block (RRBLOCK) * 7. Name Resolution + 7.1. Root Zone + 7.2. Recursion + 7.3. Record Processing o 7.3.1. Zone Delegation Records o 7.3.2. GNS2DNS o 7.3.3. CNAME o 7.3.4. BOX o 7.3.5. GTS o 7.3.6. NICK * 8. Internationalization and Character Encoding * 9. Security and Privacy Considerations + 9.1. Cryptography + 9.2. Abuse Mitigation + 9.3. Zone Management + 9.4. Impact of DHTs as Underlying Storage + 9.5. Revocations + 9.6. Label Guessing * 10. GANA Considerations * 11. IANA Considerations * 12. Implementation and Deployment Status * 13. Test Vectors * 14. Normative References * 15. Informative References * Authors' Addresses 1. Introduction The Domain Name System (DNS) [RFC1035] is a unique distributed database and a vital service for most Internet applications. While DNS is distributed, in practice it relies on centralized, trusted registrars to provide globally unique names. As the awareness of the central role DNS plays on the Internet rises, various institutions are using their power (including legal means) to engage in attacks on the DNS, thus threatening the global availability and integrity of information on the Internet.P DNS was not designed with security as a goal. This makes it very vulnerable, especially to attackers that have the technical capabilities of an entire nation state at their disposal. While a wider discussion of this issue is out of scope for this document, analyses and investigations can be found in recent academic research works including [SecureNS].P This specification describes a censorship-resistant, privacy-preserving and decentralized name system: The GNU Name System (GNS) [GNS]. It is designed to provide a secure, privacy-enhancing alternative to DNS, especially when censorship or manipulation is encountered. In particular, it directly addresses concerns in DNS with respect to "Query Privacy", the "Single Hierarchy with a Centrally Controlled Root" and "Distribution and Management of Root Servers" as raised in [RFC8324]. GNS can bind names to any kind of cryptographically secured token, enabling it to double in some respects as even as an alternative to some of today's Public Key Infrastructures, in particular X.509 for the Web.P The design of GNS incorporates the capability to integrate and coexist with DNS. GNS is based on the principle of a petname system and builds on ideas from the Simple Distributed Security Infrastructure [SDSI], addressing a central issue with the decentralized mapping of secure identifiers to memorable names: namely the impossibility of providing a global, secure and memorable mapping without a trusted authority. GNS uses the transitivity in the SDSI design to replace the trusted root with secure delegation of authority thus making petnames useful to other users while operating under a very strong adversary model.P This is an important distinguishing factor from the Domain Name System where root zone governance is centralized at the Internet Corporation for Assigned Names and Numbers (ICANN). In DNS terminology, GNS roughly follows the idea of a hyperlocal root zone deployment, with the difference that it is not expected that all deployments use the same local root zone.P This document defines the normative wire format of resource records, resolution processes, cryptographic routines and security considerations for use by implementers.P This specification was developed outside the IETF and does not have IETF consensus. It is published here to guide implementation of GNS and to ensure interoperability among implementations.P 1.1. Requirements Notation The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.P 2. Terminology Label A GNS label is a label as defined in [RFC8499]. Within this document, labels are always assumed to be strings of UTF-8 characters [RFC8499] with a maximum length of 63 bytes. When hashed, labels MUST be canonicalized using Normalization Form C (NFC) [Unicode-UAX15].P Name A name in GNS is a domain name as defined in [RFC8499] as an ordered list of labels. The labels in a name are separated using the character "." (dot). Names, like labels, are encoded in UTF-8.P Top-Level Domain The rightmost label in a GNS name is a GNS Top-Level Domain (TLD). Unlike DNS Top-Level Domains (defined in [RFC8499]), GNS does not expect all users to use the same global root zone. Instead, with the exception of Zone Top-Level Domains (see below), GNS TLDs are typically part of the configuration of the local resolver (see Section 7.1), and may thus not be globally unique.P Zone A GNS zone contains authoritative information (resource records). A zone is uniquely identified by its zone key. Unlike DNS zones, a GNS zone does not need to have a SOA record at its apex.P Zone Type The type of a GNS zone determines the cipher system and binary encoding format of the zone key, blinded zone keys, and signatures.P Zone Key The zone key uniquely identifies a zone. The zone key is usually a public key of an asymmetric key pair.P Blinded Zone Key A blinded zone key is derived from the zone key and a label. The zone key and the blinded zone key are unlinkable without knowing the label.P Zone Owner The owner of a GNS zone is the holder of the secret (typically a private key) that (together with a label and a value to sign) allows the creation of zone signatures that can be validated against the respective blinded zone key.P Zone Top-Level Domain A GNS Zone Top-Level Domain (zTLD) is a GNS label used as the rightmost label in a GNS name which encodes a zone type and zone key of a zone. Due to the statistical uniqueness of zone keys, zTLDs are also globally unique. A zTLD label can only be distinguished from ordinary TLD labels by attempting to decode the label to a zone type and zone key.P Resource Record A GNS resource record is the information associated with a label in a GNS zone. A GNS resource record contains information as defined by its resource record type.P 3. Overview In GNS, any user may create and manage one or more cryptographically secured zones (Section 4). Zones are uniquely identified by a zone key. Zone contents are signed using blinded private keys and encrypted using derived secret keys. The zone type determines the respective set of cryptographic operations and the wire formats for encrypted data, public keys and signatures.P A zone can be populated with mappings from labels to resource records by its owner (Section 5). A label can be mapped to a delegation record which results in the corresponding subdomain being delegated to another zone. Circular delegations are explicitly allowed, including delegating a subdomain to its immediate parent zone. In order to support (legacy) applications as well as to facilitate the use of petnames, GNS defines auxiliary record types in addition to supporting traditional DNS records.P Zone contents are encrypted and signed before being published in a distributed key-value storage (Section 6). In this process, unique zone identification is hidden from the network through the use of key blinding. Key blinding allows the creation of signatures for zone contents using a blinded public/private key pair. This blinding is realized using a deterministic key derivation from the original zone key and corresponding private key using record label values as blinding factors. Specifically, the zone owner can derive blinded private keys for each record set published under a label, and a resolver can derive the corresponding blinded public keys. It is expected that GNS implementations use distributed or decentralized storages such as distributed hash tables (DHT) in order to facilitate availability within a network without the need for dedicated infrastructure. Specification of such a distributed or decentralized storage is out of scope of this document, but possible existing implementations include those based on [RFC7363], [Kademlia] or [R5N] .P Names in GNS are domain names as defined in [RFC8499]. Starting from a configurable root zone, names are resolved by following zone delegations. For each label in a name, the recursive GNS resolver fetches the respective record from the storage layer (Section 7). Without knowledge of the label values and the zone keys, the different derived keys are unlinkable both to the original zone key and to each other. This prevents zone enumeration (except via impractical online brute force attacks) and requires knowledge of both the zone key and the label to confirm affiliation of a query or the corresponding encrypted record set with a specific zone. At the same time, the blinded zone key provides resolvers with the ability to verify the integrity of the published information without disclosing the originating zone.P In the remainder of this document, the "implementer" refers to the developer building a GNS implementation including, for example, zone management tools and name resolution components. An "application" refers to a component which uses a GNS implementation to resolve records from the network and (usually) processes its contents.P 4. Zones A zone in GNS is uniquely identified by its zone type and zone key. It can be represented by a Zone Top-Level Domain (zTLD) string.P Each zone type (ztype) is assigned a unique 32-bit number when it is registered in the GNUnet Assigned Numbers Authority [GANA]. The ztype determines which cryptosystem is used for the asymmetric and symmetric key operations of the zone. The ztype number always corresponds to a resource record type number identifying a delegation into a zone of this type. To ensure that there are no conflicts with DNS record types, ztypes are always assigned numeric values above 65535.P For any zone, let d be the private key and zk the public zone key. The specific wire format used depends on the ztype. The creation of zone keys for the default ztypes are specified in Section 5.1. New ztypes may be specified in the future, for example if the cryptographic mechanisms used in this document are broken. Any ztype MUST define the following set of cryptographic functions:P KeyGen() -> d, zk is a function to generate a fresh private key d and the corresponding public zone key zk.P ZKDF-Private(d,label) -> d' is a zone key derivation function which blinds a private key d using label, resulting in another private key which can be used to create cryptographic signatures. We note that GNS only requires a signature to be created directly with d to sign a revocation message for the zone key zk.P ZKDF-Public(zk,label) -> zk' is a zone key derivation function which blinds a zone key zk using a label. zk and zk' must be unlinkable. Furthermore, blinding zk with different values for the label must result in unlinkable zk' values.P S-Encrypt(zk,label,nonce,expiration,message) -> ciphertext is a symmetric encryption function which encrypts the record data based on key material derived from the zone key, a label, a nonce and an expiration. In order to leverage performance-enhancing caching features of certain underlying storages, in particular DHTs, a deterministic encryption scheme is recommended.P S-Decrypt(zk,label,nonce,expiration,ciphertext) -> message is a symmetric decryption function which decrypts the encrypted record data based on key material derived from the zone key, a label, a nonce and an expiration.P Sign(d,message) -> signature, Sign(d',message) -> signature is a function to sign a message (typically encrypted record data) using the (blinded) private key d (d'), yielding an unforgable cryptographic signature.P Verify(zk,message,signature) -> boolean, Verify (zk',message,signature) -> boolean is a function to verify the signature was created by the private key d (or derived key d') corresponding to the zone key zk (or derived zone key zk') where d,zk := Keygen(). If deriviations were used, they must have used the same label. The function returns a boolean value of "TRUE" if the signature is valid, and otherwise "FALSE".P 4.1. Zone Top-Level Domain 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | ZONE TYPE | ZONE KEY / +-----+-----+-----+-----+ / / / / / Figure 1 The decoded binary representation of the zTLDP The zTLD is the Zone Top-Level Domain. It is a string which encodes the zone type and zone key into a domain name. The zTLD is used as a globally unique reference to a specific namespace in the process of name resolution. To encode the zone key, a zone key label zkl is derived from a concatenation of the zone type and zone key (see Figure 1) using the Crockford Base32 encoding [CrockfordB32]. In order to further increase tolerance for failures in character recognition, the letter "U" MUST be decoded to the same Base32 value as the letter "V". The encoding and decoding symbols for Crockford Base32 including this modification are defined in Figure 2. The functions for encoding and decoding based on this table are called GNSCrockfordEncode and GNSCrockfordDecode, respectively.P Symbol Decode Encode Value Symbol Symbol 0 0 O o 0 1 1 I i L l 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 A a A 11 B b B 12 C c C 13 D d D 14 E e E 15 F f F 16 G g G 17 H h H 18 J j J 19 K k K 20 M m M 21 N n N 22 P p P 23 Q q Q 24 R r R 25 S s S 26 T t T 27 V v V U 28 W w W 29 X x X 30 Y y Y 31 Z z Z Figure 2 The Base32-Crockford Alphabet Including the Additional U Encode Symbol.P For the string representation of a zTLD we define:P zkl := GNSCrockfordEncode(ztype|zkey) ztype|zkey := GNSCrockfordDecode(zkl) P If zkl is less than 63 characters, it can directly be used as a zTLD. If zkl is longer than 63 characters, the zTLD is constructed by dividing zkl into smaller labels separated by the label separator ".". Here, the most significant bytes of the "ztype|zkey" concatenation must be contained in the rightmost label of the resulting string and the least significant bytes in the leftmost label of the resulting string. This allows the resolver to determine the zone type and zkl length from the rightmost label. For example, assuming a zkl of 130 characters, the encoding would be:P zTLD := zkl[126..129].zkl[63..125].zkl[0..62] P 4.2. Zone Revocation Whenever a resolver encounters a new GNS zone, it MUST check against the local revocation list whether the respective zone key has been revoked. If the zone key was revoked, the resolution MUST fail with an empty result set.P In order to revoke a zone key, a signed revocation object MUST be published. This object MUST be signed using the private key. The revocation object is broadcast to the network. The specification of the broadcast mechanism is out of scope of this document. A possible broadcast mechanism for efficient flooding in a distributed network is implemented in [GNUnet]. Alternatively, revocation objects could also be distributed via a distributed ledger or a trusted central server. To prevent flooding attacks, the revocation message MUST contain a proof of work (PoW). The revocation message including the PoW MAY be calculated ahead of time to support timely revocation.P For all occurrences below, "Argon2id" is the Password-based Key Derivation Function as defined in [RFC9106]. For the PoW calculations the algorithm is instantiated with the following parameters:P S The salt. Fixed 16-byte string: "GnsRevocationPow".P t Number of iterations: 3P m Memory size in KiB: 1024P T Output length of hash in bytes: 64P p Parallelization parameter: 1P v Algorithm version: 0x13P y Algorithm type (Argon2id): 2P X UnusedP K UnusedP Figure 3 illustrates the wire format of the message string "P" on which the PoW is calculated.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | POW | +-----------------------------------------------+ | TIMESTAMP | +-----------------------------------------------+ | ZONE TYPE | ZONE KEY | +-----+-----+-----+-----+ | / / / / +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 3 The Wire Format of the PoW Message String.P POW A 64-bit solution to the PoW. In network byte order.P TIMESTAMP denotes the absolute 64-bit date when the revocation was computed. In microseconds since midnight (0 hour), January 1, 1970 in network byte order.P ZONE TYPE is the 32-bit zone type.P ZONE KEY is the 256-bit public key zk of the zone which is being revoked. The wire format of this value is defined by the ZONE TYPE.P Traditionally, PoW schemes require to find a POW such that at least D leading zeroes are found in the hash result. D is then referred to as the difficulty of the PoW. In order to reduce the variance in time it takes to calculate the PoW, we require that a number Z different PoWs must be found that on average have D leading zeroes.P The resulting proofs may then published and disseminated. The concrete dissemination and publication methods are out of scope of this document. Given an average difficulty of D, the proofs have an expiration time of EPOCH. With each additional bit difficulty, the lifetime of the proof is prolonged for another EPOCH. Consequently, by calculating a more difficult PoW, the lifetime of the proof can be increased on demand by the zone owner.P The parameters are defined as follows:P Z The number of PoWs required is fixed at 32.P D The difficulty is fixed at 22.P EPOCH A single epoch is fixed at 365 days.P The revocation message wire format is illustrated in Figure 4.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | TIMESTAMP | +-----+-----+-----+-----+-----+-----+-----+-----+ | TTL | +-----+-----+-----+-----+-----+-----+-----+-----+ | POW_0 | +-----+-----+-----+-----+-----+-----+-----+-----+ | ... | +-----+-----+-----+-----+-----+-----+-----+-----+ | POW_Z-1 | +-----------------------------------------------+ | ZONE TYPE | ZONE KEY | +-----+-----+-----+-----+ | / / / / +-----+-----+-----+-----+-----+-----+-----+-----+ | SIGNATURE | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 4 The Revocation Message Wire Format.P TIMESTAMP denotes the absolute 64-bit date when the revocation was computed. In microseconds since midnight (0 hour), January 1, 1970 in network byte order. This is the same value as the timestamp used in the individual PoW calculations.P TTL denotes the relative 64-bit time to live of the record in microseconds also in network byte order. This field is informational for a verifier. The verifier may discard revocation if the TTL indicates that it is already expired. However, the actual TTL of the revocation must be determined by examining the leading zeros in the proof of work calculation.P POW_i The values calculated as part of the PoW, in network byte order. Each POW_i MUST be unique in the set of POW values. To facilitate fast verification of uniqueness, the POW values must be given in strictly monotonically increasing order in the message.P ZONE TYPE The 32-bit zone type corresponding to the zone key.P ZONE KEY is the public key zk of the zone which is being revoked and the key to be used to verify SIGNATURE.P SIGNATURE A signature over a timestamp and the zone zk of the zone which is revoked and corresponds to the key used in the PoW. The signature is created using the Sign() function of the cryptosystem of the zone and the private key (see Section 4).P The signature over the public key covers a 32-bit pseudo header conceptually prefixed to the public key. The pseudo header includes the key length and signature purpose. The wire format is illustrated in Figure 5.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | SIZE (0x30) | PURPOSE (0x03) | +-----+-----+-----+-----+-----+-----+-----+-----+ | TIMESTAMP | +-----+-----+-----+-----+-----+-----+-----+-----+ | ZONE TYPE | ZONE KEY | +-----+-----+-----+-----+ | / / / / +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 5 The Wire Format of the Revocation Data for Signing.P SIZE A 32-bit value containing the length of the signed data in bytes in network byte order.P PURPOSE A 32-bit signature purpose flag. This field MUST be 3 (in network byte order).P ZONE TYPE The 32-bit zone type corresponding to the zone key.P ZONE KEY / TIMESTAMP Both values as defined in the revocation data object above.P In order to verify a revocation the following steps must be taken, in order:P 1. The signature MUST match the public key.P 2. The set of POW values MUST NOT contain duplicates.P 3. The average number of leading zeroes resulting from the provided POW values D' MUST be greater than and not equal to D.P 4. The validation period (TTL) of the revocation is calculated as (D'-D) * EPOCH * 1.1. The EPOCH is extended by 10% in order to deal with unsynchronized clocks. The TTL added on top of the TIMESTAMP yields the expiration date.P 5. The current time MUST be between TIMESTAMP and TIMESTAMP+TTL.P 5. Resource Records A GNS implementer MUST provide a mechanism to create and manage resource records for local zones. A local zone is established by selecting a zone type and creating a zone key pair. As records may be added to each created zone, a (local) persistence mechanism such as a database for resource records and zones must be provided. This local zone database is used by the name resolution logic and serves as a basis for publishing zones into the GNS storage (see Section 6).P A GNS resource record holds the data of a specific record in a zone. The resource record format is defined in Figure 6.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | EXPIRATION | +-----+-----+-----+-----+-----+-----+-----+-----+ | DATA SIZE | TYPE | +-----+-----+-----+-----+-----+-----+-----+-----+ | FLAGS | DATA / +-----+-----+-----+-----+ / / / / / Figure 6 The Resource Record Wire Format.P EXPIRATION denotes the absolute 64-bit expiration date of the record. In microseconds since midnight (0 hour), January 1, 1970 in network byte order.P DATA SIZE denotes the 32-bit size of the DATA field in bytes and in network byte order.P TYPE is the 32-bit resource record type. This type can be one of the GNS resource records as defined in Section 5 or a DNS record type as defined in [RFC1035] or any of the complementary standardized DNS resource record types. This value must be stored in network byte order. Note that values below 2^16 are reserved for allocation via IANA [RFC6895], while values above 2^16 are allocated by the GNUnet Assigned Numbers Authority [GANA].P FLAGS is a 32-bit resource record flags field (see below).P DATA the variable-length resource record data payload. The contents are defined by the respective type of the resource record.P Flags indicate metadata surrounding the resource record. A flag value of 0 indicates that all flags are unset. Applications creating resource records MUST set all bits which are not defined as a flag to 0. Additional flags may be defined in future protocol versions. If an application or implementation encounters a flag which it does not recognize, it MUST be ignored. Figure 7 illustrates the flag distribution in the 32-bit flag value of a resource record:P 0 1 2 3 4 5... +--------+--------+--------+--------+--------+---- |RESERVED|PRIVATE |SUPPL |EXPREL | SHADOW | ... +--------+--------+--------+--------+--------+---- Figure 7 The Resource Record Flag Wire Format.P SHADOW If this flag is set, this record should be ignored by resolvers unless all (other) records of the same record type have expired. Used to allow zone publishers to facilitate good performance when records change by allowing them to put future values of records into the storage. This way, future values can propagate and may be cached before the transition becomes active.P EXPREL The expiration time value of the record is a relative time (still in microseconds) and not an absolute time. This flag should never be encountered by a resolver for records obtained from the storage, but might be present when a resolver looks up private records of a zone hosted locally.P SUPPL This is a supplemental record. It is provided in addition to the other records. This flag indicates that this record is not explicitly managed alongside the other records under the respective name but may be useful for the application. This flag should only be encountered by a resolver for records obtained from the storage.P PRIVATE This is a private record of this peer and it should thus not be published. Thus, this flag should never be encountered by a resolver for records obtained from the storage. Private records should still be considered just like regular records when resolving labels in local zones.P 5.1. Zone Delegation Records This section defines the initial set of zone delegation record types. Any implementation MUST support all zone types defined here and MAY support any number of additional delegation records defined in the GNU Name System Record Types registry Section 10. Zone delegation records MUST NOT be stored and published under the empty label.P 5.1.1. PKEY In GNS, a delegation of a label to a zone of type "PKEY" is represented through a PKEY record. The PKEY number is a zone type and thus also implies the cryptosystem for the zone that is being delegated to. A PKEY resource record contains the public key of the zone to delegate to. A PKEY record MUST be the only record under a label. No other records are allowed. The PKEY DATA entry wire format can be found in Figure 8.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | PUBLIC KEY | | | | | | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 8 The PKEY Wire Format.P PUBLIC KEY A 256-bit ECDSA zone key.P For PKEY zones the zone key material is derived using the curve parameters of the twisted edwards representation of Curve25519 [ RFC7748] (a.k.a. edwards25519) with the ECDSA scheme [RFC6979]. Consequently, we use the following naming convention for our cryptographic primitives for PKEY zones:P d is a 256-bit ECDSA private key.P zk is the ECDSA public zone key corresponding to d.P p is the prime of edwards25519 as defined in [RFC7748], i.e. 2^255 - 19.P G is the group generator (X(P),Y(P)) of edwards25519 as defined in [RFC7748].P L is the order of the prime-order subgroup of edwards25519 in [ RFC7748].P KeyGen() The generation of the private scalar d and the curve point zk := d*G (where G is the group generator of the elliptic curve) as defined in Section 2.2. of [RFC6979] represents the KeyGen() function.P The zone type and zone key of a PKEY are 32 + 4 bytes in length. This means that a zTLD will always fit into a single label and does not need any further conversion.P Given a label, the output d' of the ZKDF-Private(d,label) function for zone key blinding is calculated as follows for PKEY zones:P zk := d * G PRK_h := HKDF-Extract ("key-derivation", zk) h := HKDF-Expand (PRK_h, label | "gns", 512 / 8) d' := (h * d) mod L P Equally, given a label, the output zk' of the ZKDF-Public(zk,label) function is calculated as follows for PKEY zones:P PRK_h := HKDF-Extract ("key-derivation", zk) h := HKDF-Expand (PRK_h, label | "gns", 512 / 8) zk' := (h mod L) * zk P The PKEY cryptosystem uses a hash-based key derivation function (HKDF) as defined in [RFC5869], using SHA-512 [RFC6234] for the extraction phase and SHA-256 [RFC6234] for the expansion phase. PRK_h is key material retrieved using an HKDF using the string "key-derivation" as salt and the zone key as initial keying material. h is the 512-bit HKDF expansion result and must be interpreted in network byte order. The expansion information input is a concatenation of the label and the string "gns". The label is a UTF-8 string under which the resource records are published. The multiplication of zk with h is a point multiplication, while the multiplication of d with h is a scalar multiplication.P The Sign() and Verify() functions for PKEY zones are implemented using 512-bit ECDSA deterministic signatures as specified in [RFC6979 ].P The S-Encrypt() and S-Decrypt() functions use AES in counter mode as defined in [MODES] (CTR-AES-256):P CIPHERTEXT := CTR-AES256(K, IV, DATA) DATA := CTR-AES256(K, IV, CIPHERTEXT) P The key K and counter IV are derived from the record label and the zone key zk as follows:P PRK_k := HKDF-Extract ("gns-aes-ctx-key", zk) PRK_n := HKDF-Extract ("gns-aes-ctx-iv", zk) K := HKDF-Expand (PRK_k, label, 256 / 8); NONCE := HKDF-Expand (PRK_n, label, 32 / 8) P HKDF is a hash-based key derivation function as defined in [RFC5869]. Specifically, SHA-512 [RFC6234] is used for the extraction phase and SHA-256 [RFC6234] for the expansion phase. The output keying material is 32 bytes (256 bits) for the symmetric key and 4 bytes (32 bits) for the nonce. The symmetric key K is a 256-bit AES [RFC3826] key.P The nonce is combined with a 64-bit initialization vector and a 32-bit block counter as defined in [RFC3686]. The block counter begins with the value of 1, and it is incremented to generate subsequent portions of the key stream. The block counter is a 32-bit integer value in network byte order. The initialization vector is the expiration time of the resource record block in network byte order. The resulting counter (IV) wire format can be found in Figure 9.P 0 8 16 24 32 +-----+-----+-----+-----+ | NONCE | +-----+-----+-----+-----+ | EXPIRATION | | | +-----+-----+-----+-----+ | BLOCK COUNTER | +-----+-----+-----+-----+ Figure 9 The Block Counter Wire Format.P 5.1.2. EDKEY In GNS, a delegation of a label to a zone of type "EDKEY" is represented through a EDKEY record. The EDKEY number is a zone type and thus also implies the cryptosystem for the zone that is being delegated to. An EDKEY resource record contains the public key of the zone to delegate to. A EDKEY record MUST be the only record under a label. No other records are allowed. The EDKEY DATA entry wire format is illustrated in Figure 10.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | PUBLIC KEY | | | | | | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 10 The EDKEY DATA Wire Format.P PUBLIC KEY A 256-bit EdDSA zone key.P For EDKEY zones the zone key material is derived using the curve parameters of the twisted edwards representation of Curve25519 [ RFC7748] (a.k.a. edwards25519) with the Ed25519-SHA-512 scheme [ ed25519]. Consequently, we use the following naming convention for our cryptographic primitives for EDKEY zones:P d is a 256-bit EdDSA private key.P a is is an integer derived from d using the SHA-512 hash function as defined in [ed25519].P zk is the EdDSA public key corresponding to d. It is defined as the curve point a*G where G is the group generator of the elliptic curve as defined in [ed25519].P p is the prime of edwards25519 as defined in [RFC7748], i.e. 2^255 - 19.P G is the group generator (X(P),Y(P)) of edwards25519 as defined in [RFC7748].P L is the order of the prime-order subgroup of edwards25519 in [ RFC7748].P KeyGen() The generation of the private key d and the associated public key zk := a*G where G is the group generator of the elliptic curve and a is an integer derived from d using the SHA-512 hash function as defined in Section 3.2. of [RFC8032] represents the KeyGen() function.P The zone type and zone key of an EDKEY are 32 + 4 bytes in length. This means that a zTLD will always fit into a single label and does not need any further conversion.P The "EDKEY" ZKDF instantiation is based on [Tor224]. Given a label, the output of the ZKDF-Private function for zone key blinding is calculated as follows for EDKEY zones:P zk := a * G PRK_h := HKDF-Extract ("key-derivation", zk) h := HKDF-Expand (PRK_h, label | "gns", 512 / 8) h[31] &= 7 a1 := a / 8 /* 8 is the cofactor of Curve25519 */ a2 := (h * a1) mod L a' = a2 * 8 /* 8 is the cofactor of Curve25519 */ P Equally, given a label, the output of the ZKDF-Public function is calculated as follows for PKEY zones:P PRK_h := HKDF-Extract ("key-derivation", zk) h := HKDF-Expand (PRK_h, label | "gns", 512 / 8) h[31] &= 7 // Implies h mod L == h zk' := h * zk P We note that implementers must employ a constant time scalar multiplication for the constructions above. Also, implementers must ensure that the private key a is an ed25519 private key and specifically that "a[0] & 7 == 0" holds.P The EDKEY cryptosystem uses a hash-based key derivation function (HKDF) as defined in [RFC5869], using SHA-512 [RFC6234] for the extraction phase and HMAC-SHA256 [RFC6234] for the expansion phase. PRK_h is key material retrieved using an HKDF using the string "key-derivation" as salt and the zone key as initial keying material. The blinding factor h is the 512-bit HKDF expansion result. The expansion information input is a concatenation of the label and the string "gns". The result of the HKDF must be clamped and interpreted in network byte order. a is the 256-bit integer corresponding to the 256-bit private key d. The label is a UTF-8 string under which the resource records are published. The multiplication of zk with h is a point multiplication, while the division and multiplication of a and a1 with the co-factor are integer operations.P Signatures for EDKEY zones using the derived private key a' are not compliant with [ed25519]. As the corresponding private key to the derived private scalar a' is not known, it is not possible to deterministically derive the signature part R according to [ed25519]. Instead, signatures MUST be generated as follows for any given message M: A nonce is calculated from the highest 32 bytes of the expansion of the private key d and the blinding factor h. The nonce is then hashed with the message M to r. This way, we include the full derivation path in the calculation of the R value of the signature, ensuring that it is never reused for two different derivation paths or messages.P dh := SHA-512 (d) nonce := SHA-256 (dh[32..63] | h) r := SHA-512 (nonce | M) R := r * G S := r + SHA-512(R | zk' | M) * a' mod L P A signature (R,S) is valid if the following holds:P S * G == R + SHA-512(R, zk', M) * zk' P The S-Encrypt() and S-Decrypt() functions use XSalsa20 as defined in [XSalsa20] (XSalsa20-Poly1305):P CIPHERTEXT := XSalsa20-Poly1305(K, IV, DATA) DATA := XSalsa20-Poly1305(K, IV, CIPHERTEXT) P The result of the XSalsa20-Poly1305 encryption function is the encrypted ciphertext concatenated with the 128-bit authentication tag. Accordingly, the length of encrypted data equals the length of the data plus the 16 bytes of the authentication tag.P The key K and counter IV are derived from the record label and the zone key zk as follows:P PRK_k := HKDF-Extract ("gns-aes-ctx-key", zk) PRK_n := HKDF-Extract ("gns-aes-ctx-iv", zk) K := HKDF-Expand (PRK_k, label, 256 / 8); NONCE := HKDF-Expand (PRK_n, label, 32 / 8) P HKDF is a hash-based key derivation function as defined in [RFC5869]. Specifically, SHA-512 [RFC6234] is used for the extraction phase and SHA-256 [RFC6234] for the expansion phase. The output keying material is 32 bytes (256 bits) for the symmetric key and 16 bytes (128 bits) for the NONCE. The symmetric key K is a 256-bit XSalsa20 [XSalsa20] key. No additional authenticated data (AAD) is used.P The nonce is combined with an 8 byte initialization vector. The initialization vector is the expiration time of the resource record block in network byte order. The resulting counter (IV) wire format is illustrated in Figure 11.P 0 8 16 24 32 +-----+-----+-----+-----+ | NONCE | | | | | | | +-----+-----+-----+-----+ | EXPIRATION | | | +-----+-----+-----+-----+ Figure 11 The Counter Block Initialization VectorP 5.1.3. GNS2DNS It is possible to delegate a label back into DNS through a GNS2DNS record. The resource record contains a DNS name for the resolver to continue with in DNS followed by a DNS server. Both names are in the format defined in [RFC1034] for DNS names. A GNS2DNS DATA entry is illustrated in Figure 12.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | DNS NAME | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ | DNS SERVER NAME | / / / / | | +-----------------------------------------------+ Figure 12 The GNS2DNS DATA Wire FormatP DNS NAME The name to continue with in DNS. The value is UTF-8 encoded and 0-terminated.P DNS SERVER NAME The DNS server to use. May be an IPv4 address in dotted-decimal form or an IPv6 address in colon-hexadecimal form or a DNS name. It may also be a relative GNS name ending with a "+" top-level domain. The implementation MUST check the string syntactically for a an IP address in the respective notation before checking for a relative GNS name. If all three checks fail, the name MUST be treated as a DNS name. The value is UTF-8 encoded and 0-terminated.P 5.2. Auxiliary Records This section defines the initial set of auxiliary GNS record types. Any implementation MUST be able to process the specified record types according to Section 7.3.P 5.2.1. LEHO Applications can use the GNS to lookup IPv4 or IPv6 addresses of internet services. However, sometimes connecting to such services does not only require the knowledge of an address and port, but also requires the canonical DNS name of the service to be transmitted over the transport protocol. In GNS, legacy host name records provide applications the DNS name that is required to establish a connection to such a service. The most common use case is HTTP virtual hosting, where a DNS name must be supplied in the HTTP "Host"-header. Using a GNS name for the "Host"-header may not work as it may not be globally unique. A LEHO resource record is expected to be found together in a single resource record with an IPv4 or IPv6 address. A LEHO DATA entry is illustrated in Figure 13.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | LEGACY HOSTNAME | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 13 The LEHO DATA Wire Format.P LEGACY HOSTNAME A UTF-8 string (which is not 0-terminated) representing the legacy hostname.P NOTE: If an application uses a LEHO value in an HTTP request header (e.g. "Host:" header) it must be converted to a punycode representation [RFC5891].P 5.2.2. NICK Nickname records can be used by zone administrators to publish an the label that a zone prefers to have used when it is referred to. This is a suggestion to other zones what label to use when creating a delegation record (Section 5.1) containing this zone key. This record SHOULD only be stored under the empty label "@" but MAY be returned with record sets under any label as a supplemental record. Section 7.3.6 details how a resolver must process supplemental and non-supplemental NICK records. A NICK DATA entry is illustrated in Figure 14.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | NICKNAME | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 14 The NICK DATA Wire Format.P NICKNAME A UTF-8 string (which is not 0-terminated) representing the preferred label of the zone. This string MUST NOT include a "." character.P 5.2.3. BOX In GNS, with the notable exception of zTLDs, every "." in a name delegates to another zone, and GNS lookups are expected to return all of the required useful information in one record set. This is incompatible with the special labels used by DNS for SRV and TLSA records. Thus, GNS defines the BOX record format to box up SRV and TLSA records and include them in the record set of the label they are associated with. For example, a TLSA record for "_https._tcp.example.org" will be stored in the record set of "example.org" as a BOX record with service (SVC) 443 (https) and protocol (PROTO) 6 (tcp) and record TYPE "TLSA". For reference, see also [RFC2782]. A BOX DATA entry is illustrated in Figure 15.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | PROTO | SVC | TYPE | +-----------+-----------------------------------+ | RECORD DATA | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 15 The BOX DATA Wire Format.P PROTO the 16-bit protocol number, e.g. 6 for tcp. In network byte order.P SVC the 16-bit service value of the boxed record, i.e. the port number. In network byte order.P TYPE is the 32-bit record type of the boxed record. In network byte order.P RECORD DATA is a variable length field containing the "DATA" format of TYPE as defined for the respective TYPE in DNS.P 5.2.4. GTS The GNUnet Tunnel Service record is used by applications to establish a tunnel between two peers in the peer-to-peer network (see [GNUnet] ). The GTS record serves as an example of how resolvers may automatically initiate tunnel establishment and provide IP address information in the resolution process as specified in Section 7.P A GTS DATA entry wire format is illustrated in Figure 16.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | HOSTING PEER PUBLIC KEY | | (256 bits) | | | | | +-----------+-----------------------------------+ | PROTO | SERVICE NAME | +-----------+ + / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 16 The GTS DATA Wire Format.P HOSTING PEER PUBLIC KEY is a 256-bit EdDSA public key identifying the peer hosting the service.P PROTO the 16-bit tunnel protocol number. In network byte order. The possible values are defined by the GNUnet Tunnel Service.P SERVICE NAME a shared secret used to identify the service at the hosting peer, used to derive the port number required to connect to the service. The service name MUST be a 0-terminated UTF-8 string.P 6. Record Storage Any API which allows storing a value under a key and retrieving a value from the key can be used by an implementation for record storage. We assume that an implementation realizes two procedures on top of a storage:P PUT(key,value) GET(key) -> value P There is no explicit delete function as the deletion of a non-expired record would require a revocation of the record. In GNS, zones can only be revoked as a whole. Records automatically expire and it is under the discretion of the storage as to when to delete the record. The GNS implementation MUST NOT publish expired resource records. Any GNS resolver MUST discard expired records returned from the storage.P Resource records are grouped by their respective labels, encrypted and published together in a single resource records block (RRBLOCK) in the storage under a key q: PUT(q, RRBLOCK). The key q is derived from the zone key and the respective label of the contained records. The required knowledge of both zone key and label in combination with the similarly derived symmetric secret keys and blinded zone keys ensure query privacy (see [RFC8324], Section 3.5). The storage key derivation and records block creation is specified in the following sections. A client implementation MUST enable the user the manage zones. The implementation MUST use the PUT storage procedure in order to update the zone contents accordingly.P 6.1. The Storage Key Given a label, the storage key q is derived as follows:P q := SHA-512 (HDKD-Public(zk, label)) P label is a UTF-8 string under which the resource records are published. P zk is the zone key.P q Is the 512-bit storage key under which the resource records block is published. It is the SHA-512 hash [RFC6234] over the derived zone key.P 6.2. The Records Block (RRBLOCK) GNS records are grouped by their labels and published as a single block in the storage. The grouped record sets MAY be paired with any number of supplemental records. Supplemental records must have the supplemental flag set (See Section 5). The contained resource records are encrypted using a symmetric encryption scheme. A GNS implementation must publish RRBLOCKs in accordance to the properties and recommendations of the underlying storage. This may include a periodic refresh publication. The GNS RRBLOCK wire format is illustrated in Figure 17.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | ZONE TYPE | ZONE KEY | +-----+-----+-----+-----+ (BLINDED) | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ | SIGNATURE | / / / / | | +-----+-----+-----+-----+-----+-----+-----+-----+ | SIZE | PURPOSE | +-----+-----+-----+-----+-----+-----+-----+-----+ | EXPIRATION | +-----+-----+-----+-----+-----+-----+-----+-----+ | BDATA / / / / | +-----+-----+-----+-----+-----+-----+-----+-----+ Figure 17 The RRBLOCK Wire Format.P ZONE TYPE is the 32-bit zone type.P ZONE KEY is the blinded zone key "ZKDF-Public(zk, label)" to be used to verify SIGNATURE.P SIGNATURE The signature is computed over the data following this field. The signature is created using the Sign() function of the cryptosystem of the zone and the derived private key "ZKDF-Private(d, label)" (see Section 4).P SIZE A 32-bit value containing the length of the signed data following the PUBLIC KEY field in network byte order. This value always includes the length of the fields SIZE (4), PURPOSE (4) and EXPIRATION (8) in addition to the length of the BDATA. While a 32-bit value is used, implementations MAY refuse to publish blocks beyond a certain size significantly below 4 GB. However, a minimum block size of 62 kilobytes MUST be supported.P PURPOSE A 32-bit signature purpose flag. For a RRBLOCK the value of this field MUST be 15. The value is encoded in network byte order. The value of this field corresponds to an entry in the GANA "GNUnet Signature Purpose" registry.P EXPIRATION Specifies when the RRBLOCK expires and the encrypted block SHOULD be removed from the storage and caches as it is likely stale. However, applications MAY continue to use non-expired individual records until they expire. The value MUST be set to the expiration time of the resource record contained within this block with the smallest expiration time. If a records block includes shadow records, then the maximum expiration time of all shadow records with matching type and the expiration times of the non-shadow records is considered. This is a 64-bit absolute date in microseconds since midnight (0 hour), January 1, 1970 in network byte order.P BDATA The encrypted RDATA with a total size of SIZE - 16.P A symmetric encryption scheme is used to encrypt the resource records set RDATA into the BDATA field of a GNS RRBLOCK. The wire format of the RDATA is illustrated in Figure 18.P 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ | RR COUNT | EXPIRA- / +-----+-----+-----+-----+-----+-----+-----+-----+ / -TION | DATA SIZE | +-----+-----+-----+-----+-----+-----+-----+-----+ | TYPE | FLAGS | +-----+-----+-----+-----+-----+-----+-----+-----+ | DATA / / / / | +-----+-----+-----+-----+-----+-----+-----+-----+ | EXPIRATION | +-----+-----+-----+-----+-----+-----+-----+-----+ | DATA SIZE | TYPE | +-----+-----+-----+-----+-----+-----+-----+-----+ | FLAGS | DATA / +-----+-----+-----+-----+ / / +-----------------------/ / | / +-----------------------+ / / PADDING / / / Figure 18 The RDATA Wire Format.P RR COUNT A 32-bit value containing the number of variable-length resource records which are following after this field in network byte order.P EXPIRATION, DATA SIZE, TYPE, FLAGS and DATA These fields were defined in the resource record format in Section 5. There MUST be a total of RR COUNT of these resource records present.P PADDING When publishing an RDATA block, the implementation MUST ensure that the size of the RDATA WITHOUT the RR COUNT field is a power of two using the padding field. The field MUST be set to zero and MUST be ignored on receipt. As a special exception, record sets with (only) a zone delegation record type are never padded. Note that a record set with a delegation record MUST NOT contain other records. If other records are encountered, the whole record block MUST be discarded.P 7. Name Resolution Names in GNS are resolved by recursively querying the record storage. Recursive in this context means that a resolver does not provide iterative results for a query. Instead, it MUST respond to a resolution request with either the requested resource record or an error message in case the resolution fails. In the following, we define how resolution is initiated and each iteration in the resolution is processed.P GNS resolution of a name must start in a given starting zone indicated using a zone key. Details on how the starting zone may be determined are discussed in Section 7.1.P When GNS name resolution is requested, a desired record type MAY be provided by the client. The GNS resolver will use the desired record type to guide processing, for example by providing conversion of GTS records to A or AAAA records. However, filtering of record sets according to the required record types MUST still be done by the client after the resource record set is retrieved.P 7.1. Root Zone The resolution of a GNS name must start in a given start zone indicated to the resolver using any zone key. The local resolver may have a local start zone configured/hard-coded which points to a local or remote start zone key. A resolver client may also determine the start zone from the suffix of the name given for resolution or using information retrieved out of band. The governance model of any zone is at the sole discretion of the zone owner. However, the choice of start zone(s) is at the sole discretion of the local system administrator or user. This property addresses the issue of a single hierarchy with a centrally controlled root and the related issue of distribution and management of root servers in DNS (see [RFC8324], Section 3.10 and 3.12).P In the following, we give examples how a local client resolver SHOULD discover the start zone. The process given is not exhaustive and clients MAY supplement it with other mechanisms or ignore it if the particular application requires a different process.P GNS clients MUST first try to interpret the top-level domain of a GNS name as a zone key representation (i.e. a zTLD). If the top-level domain is indicated to be a label representation of a zone key with a supported zone type value, the root zone of the resolution process is implicitly given by the suffix of the name:P Example name: www.example. => Root zone: zk of type ztype => Name to resolve from root zone: www.example P In GNS, users MAY own and manage their own zones. Each local zone SHOULD be associated with a single GNS label, but users MAY choose to use longer names consisting of multiple labels. If the name of a locally managed zone matches the suffix of the name to be resolved, resolution MUST start from the respective local zone:P Example name: www.example.org Local zones: fr = (d0,zk0) org = (d1,zk1) com = (d2,zk2) ... => Root zone: zk1 => Name to resolve from root zone: www.example P Finally, additional "suffix-to-zone" mappings MAY be configured. Suffix to zone key mappings MUST be configurable through a local configuration file or database by the user or system administrator. The suffix MAY consist of multiple GNS labels concatenated with a ".". If multiple suffixes match the name to resolve, the longest matching suffix MUST be used. The suffix length of two results MUST NOT be equal. This indicates a misconfiguration and the implementation MUST return an error. If both a locally managed zone and a configuration entry exist for the same suffix, the locally managed zone MUST have priority.P Example name: www.example.org Local suffix mappings: org = zk0 example.org = zk1 example.com = zk2 ... => Root zone: zk1 => Name to resolve from root zone: www P 7.2. Recursion In each step of the recursive name resolution, there is an authoritative zone zk and a name to resolve. The name may be empty. Initially, the authoritative zone is the start zone. If the name is empty, it is interpreted as the apex label "@".P From here, the following steps are recursively executed, in order:P 1. Extract the right-most label from the name to look up.P 2. Calculate q using the label and zk as defined in Section 6.1.P 3. Perform a storage query GET(q) to retrieve the RRBLOCK.P 4. Verify and process the RRBLOCK and decrypt the BDATA contained in it as defined by its zone type (see also Section 6.2).P Upon receiving the RRBLOCK from the storage, apart from verifying the provided signature, the resolver MUST check that the authoritative zone key was used to sign the record: The derived zone key zk' MUST match the public key provided in the RRBLOCK, otherwise the RRBLOCK MUST be ignored and the storage lookup GET(q) MUST continue.P 7.3. Record Processing Record processing occurs at the end of a single recursion. We assume that the RRBLOCK has been cryptographically verified and decrypted. At this point, we must first determine if we have received a valid record set in the context of the name we are trying to resolve:P * Case 1: If the remainder of the name to resolve is empty and the record set does not consist of a delegation, CNAME or DNS2GNS record, the record set is the result and the recursion is concluded.P * Case 2: If the name to be resolved is of the format "_SERVICE._PROTO" and the record set contains one or more matching BOX records, the records in the BOX records are the result and the recursion is concluded (Section 7.3.4).P * Case 3: If the remainder of the name to resolve is not empty and does not match the "_SERVICE._PROTO" syntax, then the current record set MUST consist of a single delegation record (Section 7.3.1), a single CNAME record (Section 7.3.3), or one or more GNS2DNS records (Section 7.3.2), which are processed as described in the respective sections below. The record set may include any number of supplemental records. Otherwise, resolution fails and the resolver MUST return an empty record set. Finally, after the recursion terminates, the client preferences for the record type MUST be considered and possible conversions such as defined in Section 7.3.5 MUST be performed.P 7.3.1. Zone Delegation Records When the resolver encounters a record of a supported zone delegation record type (such as PKEY or EDKEY) and the remainder of the name is not empty, resolution continues recursively with the remainder of the name in the GNS zone specified in the delegation record. Implementations MUST NOT allow multiple different zone type delegations under a single label. Implementations MAY support any subset of zone types. If an unsupported zone type is encountered, resolution fails and an error MUST be returned. The information that the zone type is unknown SHOULD be returned in the error description. The implementation MAY choose not to return the reason for the failure, merely impacting troubleshooting information for the user. Implementations MUST NOT process zone delegation for the empty apex label "@". Upon encountering a zone delegation record under this label, resolution fails and an error MUST be returned. The implementation MAY choose not to return the reason for the failure, merely impacting troubleshooting information for the user.P If the remainder of the name to resolve is empty and we have received a record set containing only a single delegation record, the recursion is continued with the record value as authoritative zone and the empty apex label "@" as remaining name, except in the case where the desired record type is equal to the zone type, in which case the delegation record is returned and the resolution is concluded without resolving the empty apex label.P 7.3.2. GNS2DNS When a resolver encounters one or more GNS2DNS records and the remaining name is empty and the desired record type is GNS2DNS, the GNS2DNS records are returned.P Otherwise, it is expected that the resolver first resolves the IP addresses of the specified DNS name servers. GNS2DNS records MAY contain numeric IPv4 or IPv6 addresses, allowing the resolver to skip this step. The DNS server names may themselves be names in GNS or DNS. If the DNS server name ends in ".+", the rest of the name is to be interpreted relative to the zone of the GNS2DNS record. If the DNS server name ends in a label representation of a zone key, the DNS server name is to be resolved against the GNS zone zk.P Multiple GNS2DNS records may be stored under the same label, in which case the resolver MUST try all of them. The resolver MAY try them in any order or even in parallel. If multiple GNS2DNS records are present, the DNS name MUST be identical for all of them, if not the resolution fails and an empty record set is returned as the record set is invalid.P Once the IP addresses of the DNS servers have been determined, the DNS name from the GNS2DNS record is appended to the remainder of the name to be resolved, and resolved by querying the DNS name server(s). As the DNS servers specified are possibly authoritative DNS servers, the GNS resolver MUST support recursive DNS resolution and MUST NOT delegate this to the authoritative DNS servers. The first successful recursive name resolution result is returned to the client. In addition, the resolver returns the queried DNS name as a supplemental LEHO record (Section 5.2.1) with a relative expiration time of one hour.P Once the transition from GNS into DNS is made through a GNS2DNS record, there is no "going back". The (possibly recursive) resolution of the DNS name MUST NOT delegate back into GNS and should only follow the DNS specifications. For example, names contained in CNAME records MUST NOT be interpreted as GNS names.P GNS resolvers MUST offer a configuration option to disable DNS processing to avoid information leakage and provide a consistent security profile for all name resolutions. Such resolvers would return an empty record set upon encountering a GNS2DNS record during the recursion. However, if GNS2DNS records are encountered in the record set for the apex and a GNS2DNS record is explicitly requested by the application, such records MUST still be returned, even if DNS support is disabled by the GNS resolver configuration.P 7.3.3. CNAME If a CNAME record is encountered, the canonical name is appended to the remaining name, except if the remaining name is empty and the desired record type is CNAME, in which case the resolution concludes with the CNAME record. If the canonical name ends in ".+", resolution continues in GNS with the new name in the current zone. Otherwise, the resulting name is resolved via the default operating system name resolution process. This may in turn again trigger a GNS resolution process depending on the system configuration.P The recursive DNS resolution process may yield a CNAME as well which in turn may either point into the DNS or GNS namespace (if it ends in a label representation of a zone key). In order to prevent infinite loops, the resolver MUST implement loop detections or limit the number of recursive resolution steps. If the last CNAME was a DNS name, the resolver returns the DNS name as a supplemental LEHO record (Section 5.2.1) with a relative expiration time of one hour.P 7.3.4. BOX When a BOX record is received, a GNS resolver must unbox it if the name to be resolved continues with "_SERVICE._PROTO". Otherwise, the BOX record is to be left untouched. This way, TLSA (and SRV) records do not require a separate network request, and TLSA records become inseparable from the corresponding address records.P 7.3.5. GTS At the end of the recursion, if the queried record type is either A or AAAA and the retrieved record set contains at least one GTS record, the resolver SHOULD open a tunnel and return the IPv4 or IPv6 tunnel address, respectively. If the implementation does not have the capacity to establish a GTS tunnel, for example because it is not connected to the GNUnet network, the record set MUST be returned as retrieved from the network.P 7.3.6. NICK NICK records are only relevant to the recursive resolver if the record set in question is the final result which is to be returned to the client. The encountered NICK records may either be supplemental (see Section 5) or non-supplemental. If the NICK record is supplemental, the resolver only returns the record set if one of the non-supplemental records matches the queried record type. It is possible that one record set contains both supplemental and non-supplemental NICK records.P The differentiation between a supplemental and non-supplemental NICK record allows the client to match the record to the authoritative zone. Consider the following example:P Query: alice.example (type=A) Result: A: 192.0.2.1 NICK: eve P In this example, the returned NICK record is non-supplemental. For the client, this means that the NICK belongs to the zone "alice.example" and is published under the empty label along with an A record. The NICK record should be interpreted as: The zone defined by "alice.example" wants to be referred to as "eve". In contrast, consider the following:P Query: alice.example (type=AAAA) Result: AAAA: 2001:DB8::1 NICK: john (Supplemental) P In this case, the NICK record is marked as supplemental. This means that the NICK record belongs to the zone "example" and is published under the label "alice" along with an A record. The NICK record should be interpreted as: The zone defined by "example" wants to be referred to as "john". This distinction is likely useful for other records published as supplemental.P 8. Internationalization and Character Encoding All labels in GNS are encoded in UTF-8 [RFC3629]. This does not include any DNS names found in DNS records, such as CNAME records, which are internationalized through the IDNA specifications [RFC5890] .P 9. Security and Privacy Considerations 9.1. Cryptography The security of cryptographic systems depends on both the strength of the cryptographic algorithms chosen and the strength of the keys used with those algorithms. The security also depends on the engineering of the protocol used by the system to ensure that there are no non-cryptographic ways to bypass the security of the overall system. This is why developers of applications managing GNS zones SHOULD select a default zone type considered secure at the time of releasing the software. For applications targeting end users that are not expected to understand cryptography, the application developer MUST NOT leave the zone type selection of new zones to end users.P This document concerns itself with the selection of cryptographic algorithms for use in GNS. The algorithms identified in this document are not known to be broken (in the cryptographic sense) at the current time, and cryptographic research so far leads us to believe that they are likely to remain secure into the foreseeable future. However, this isn't necessarily forever, and it is expected that new revisions of this document will be issued from time to time to reflect the current best practices in this area.P GNS PKEY zone keys use ECDSA over Curve25519. This is an unconventional choice, as ECDSA is usually used with other curves. However, traditional ECDSA curves are problematic for a range of reasons described in the Curve25519 and EdDSA papers. Using EdDSA directly is also not possible, as a hash function is used on the private key which destroys the linearity that the GNU Name System depends upon. We are not aware of anyone suggesting that using Curve25519 instead of another common curve of similar size would lower the security of ECDSA. GNS uses 256-bit curves because that way the encoded (public) keys fit into a single DNS label, which is good for usability.P In terms of crypto-agility, whenever the need for an updated cryptographic scheme arises to, for example, replace ECDSA over Curve25519 for PKEY records it may simply be introduced through a new record type. Such a new record type may then replace the delegation record type for future records. The old record type remains and zones can iteratively migrate to the updated zone keys.P In order to ensure ciphertext indistinguishability, care must be taken with respect to the initialization vector in the counter block. In our design, the IV is always the expiration time of the record block. For blocks with relative expiration times it is implicitly ensured that each time a block is published into the storage, its IV is unique as the expiration time is calculated dynamically and increases monotonically. The implementation MUST ensure that when relative expiration times are decreased that the expiration time of the next record block is always after the last published block. For blocks with absolute expiration times, the implementation MUST ensure that the expiration time is increased when the record data changes. For example, the expiration time may be increased by a single microsecond. In case of deletion of all resource records under a label, the implementation MUST keep track of the last absolute expiration time of the last published resource block. When new records are added under this label later, the implementation MUST ensure that the expiration times are after the last published block. Finally, in order to ensure monotonically increasing expiration times the implementation MUST keep a local record of the last time obtained from the system clock, so as to construct a monotonic clock in case the system clock jumps backwards.P 9.2. Abuse Mitigation GNS names are UTF-8 strings. Consequently, GNS faces similar issues with respect to name spoofing as DNS does for internationalized domain names. In DNS, attackers may register similar sounding or looking names (see above) in order to execute phishing attacks. GNS zone administrators must take into account this attack vector and incorporate rules in order to mitigate it.P Further, DNS can be used to combat illegal content on the internet by having the respective domains seized by authorities. However, the same mechanisms can also be abused in order to impose state censorship, which is one of the motivations behind GNS. Hence, such a seizure is, by design, difficult to impossible in GNS.P 9.3. Zone Management In GNS, zone administrators need to manage and protect their zone keys. Once a zone key is lost it cannot be recovered. Once it is compromised it cannot be revoked (unless a revocation message was pre-calculated and is still available). Zone administrators, and for GNS this includes end-users, are required to responsibly and diligently protect their cryptographic keys. GNS supports offline signing of records. It does not support separate zone signing and key-signing keys (as in [RFC6781]) in order to provide usable security.P Similarly, users are required to manage their local root zone. In order to ensure integrity and availability or names, users must ensure that their local root zone information is not compromised or outdated. It can be expected that the processing of zone revocations and an initial root zone is provided with a GNS client implementation ("drop shipping"). Extension and customization of the zone is at the full discretion of the user.P While implementations following this specification will be interoperable, if two implementations connect to different storages they are mutually unreachable. This may lead to a state where a record may exist in the global namespace for a particular name, but the implementation is not communicating with the storage and is hence unable to resolve it. This situation is similar to a split-horizon DNS configuration. Which storages are implemented usually depend on the application it is built for. The storage used will most likely depend on the specific application context using GNS resolution. For example, one application may be the resolution of hidden services within the Tor network. Implementations of "aggregated" storages are conceivable, but are expected to be the exception.P 9.4. Impact of DHTs as Underlying Storage This document does not specify the properties of the underlying storage which is required by any GNS implementation. For implementers using a DHT as underlying storage, it is important to note that the properties of the DHT are directly inherited by the GNS implementation. This includes both security as well as other non-functional properties such as scalability and performance. Implementers should take great care when selecting or implementing a DHT for use in a GNS implementation. DHTs with strong security and performance guarantees exist [R5N]. It should also be taken into consideration that GNS implementations which build upon different DHT overlays are unlikely to be interoperable with each other.P 9.5. Revocations Zone administrators are advised to pre-generate zone revocations and securely store the revocation information in case the zone key is lost, compromised or replaced in the future. Pre-calculated revocations may become invalid due to expirations or protocol changes such as epoch adjustments. Consequently, implementers and users must make precautions in order to manage revocations accordingly.P Revocation payloads do NOT include a 'new' key for key replacement. Inclusion of such a key would have two major disadvantages:P If revocation is used after a private key was compromised, allowing key replacement would be dangerous: if an adversary took over the private key, the adversary could then broadcast a revocation with a key replacement. For the replacement, the compromised owner would have no chance to issue even a revocation. Thus, allowing a revocation message to replace a private key makes dealing with key compromise situations worse.P Sometimes, key revocations are used with the objective of changing cryptosystems. Migration to another cryptosystem by replacing keys via a revocation message would only be secure as long as both cryptosystems are still secure against forgery. Such a planned, non-emergency migration to another cryptosystem should be done by running zones for both ciphersystems in parallel for a while. The migration would conclude by revoking the legacy zone key only once it is deemed no longer secure, and hopefully after most users have migrated to the replacement.P 9.6. Label Guessing Record blocks are published encrypted using keys derived from the zone key and record label. Zone administrators should carefully consider if the label and zone key may be public or if those should be used and considered as a shared secret. Unlike zone keys, labels can also be guessed by an attacker in the network observing queries and responses. Given a known and targeted zone key, the use of well known or easily guessable labels effectively result in general disclosure of the records to the public. If the labels and hence the records should be kept secret except to those knowing a secret label and the zone in which to look, the label must be chosen accordingly. It is recommended to then use a label with sufficient entropy as to prevent guessing attacks.P It should be noted that this attack on labels only applies if the zone key is somehow disclosed to the adversary. GNS itself does not disclose it during a lookup or when resource records are published as the zone keys are blinded beforehand.P 10. GANA Considerations GANA [GANA] is requested to create an "GNU Name System Record Types" registry. The registry shall record for each entry:P * Name: The name of the record type (case-insensitive ASCII string, restricted to alphanumeric characters. For zone delegation records, the assigned number represents the ztype value of the zone.P * Number: 32-bit, above 65535P * Comment: Optionally, a brief English text describing the purpose of the record type (in UTF-8)P * Contact: Optionally, the contact information of a person to contact for further information.P * References: Optionally, references describing the record type (such as an RFC)P The registration policy for this sub-registry is "First Come First Served". This policy is modeled on that described in [RFC8126], but describes the actions taken by GANA.P Adding records is possible after expert review, using a first-come-first-served policy for unique name allocation. Experts are responsible to ensure that the chosen "Name" is appropriate for the record type. The registry will assign a unique number for the entry.P The current contact(s) for expert review are reachable at gns-registry@gnunet.org.P Any request MUST contain a unique name and a point of contact. The contact information MAY be added to the registry given the consent of the requester. The request MAY optionally also contain relevant references as well as a descriptive comment as defined above.P GANA is requested to populate this registry as listed in Figure 19.P Number | Name | Contact | References | Comment -------+---------+---------+------------+------------------------- 65536 | PKEY | N/A | [This.I-D] | GNS zone delegation (PKEY) 65537 | NICK | N/A | [This.I-D] | GNS zone nickname 65538 | LEHO | N/A | [This.I-D] | GNS legacy hostname 65539 | GTS | N/A | [This.I-D] | GTS tunnel metadata 65540 | GNS2DNS | N/A | [This.I-D] | Delegation to DNS 65556 | EDKEY | N/A | [This.I-D] | GNS zone delegation (EDKEY) Figure 19 The GANA Resource Record Registry.P GANA is requested to amend the "GNUnet Signature Purpose" registry as illustrated in Figure 20.P Purpose | Name | References | Comment --------+-----------------+------------+-------------------------- 3 | GNS_REVOCATION | [This.I-D] | GNS zone key revocation 15 | GNS_RECORD_SIGN | [This.I-D] | GNS record set signature Figure 20 Requested Changes in the GANA GNUnet Signature Purpose Registry.P 11. IANA Considerations This document makes no requests for IANA action. This section may be removed on publication as an RFC.P 12. Implementation and Deployment Status There are two implementations conforming to this specification written in C and Go, respectively. The C implementation as part of GNUnet [GNUnetGNS] represents the original and reference implementation. The Go implementation [GoGNS] demonstrates how two implementations of GNS are interoperable given that they are built on top of the same underlying DHT storage.P Currently, the GNUnet peer-to-peer network [GNUnet] is an active deployment of GNS on top of its [R5N] DHT. The [GoGNS] implementation uses this deployment by building on top of the GNUnet DHT services available on any GNUnet peer. It shows how GNS implementations and client resolvers can attach to this existing deployment and participate in name resolution as well as zone publication.P 13. Test Vectors The following represents a test vector for a record set with a DNS record of type "A" as well as a GNS record of type "PKEY" under the label "test".P Zone private key (d, big-endian): 50d7b652a4efeadf f37396909785e595 2171a02178c8e7d4 50fa907925fafd98 Zone identifier (ztype|zkey): 00010000677c477d 2d93097c85b195c6 f96d84ff61f5982c 2c4fe02d5a11fedf b0c2901f Encoded zone identifier (zkl = zTLD): 000G0037FH3QTBCK15Y8BCCNRVWPV17ZC7TSGB1C9ZG2TPGHZVFV1GMG3W Label: test RRCOUNT: 2 Record #0 EXPIRATION: 14888744139323793 DATA_SIZE: 4 TYPE: 1 FLAGS: 0 DATA: 01020304 Record #1 EXPIRATION: 26147096139323793 DATA_SIZE: 36 TYPE: 65536 FLAGS: 2 DATA: 000100000e601be4 2eb57fb4697610cf 3a3b18347b65a33f 025b5b174abefb30 807bfecf RDATA: 000000020034e53b e193799100000004 0000000100000000 01020304005ce4a5 394ad99100000024 0001000000000002 000100000e601be4 2eb57fb4697610cf 3a3b18347b65a33f 025b5b174abefb30 807bfef00000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 Encryption NONCE|EXPIRATION|BLOCK COUNTER: 67ebda270034e53b e193799100000001 Encryption key (K): 551f157acf2bf1d4 a975036999ea7c82 86acb318f1493e63 b500603a9b02e3e4 BDATA: 00e4837eb5d04f92 903de4b5234e8cca c5736c9793379a59 c33375fc8951aca2 eb7aad067bf9af60 bf26758646a17f5e 5c3b6215f9407954 5b1c4d4f1b2ebb22 c2b4dad44126817b 6f001530d476401d d67ac0148554e806 353da9e4298079f3 e1b16942c48d90c4 360c61238c40d9d5 2911aea52cc0037a c7160bb3cf5b2f4a 722fd96b RRBLOCK: 000100008e16da87 203b5159c5538e9b 765742e968c54af9 afbc0890dc80205a d14c84e107b0c115 fc0089aa38b9c7ab 9cbe1d77040d282a 51a2ad493f61f349 5f02d8170fe473a5 5ec6bdf9a509ab17 01ffc37ea3bb4cac 4a672520986df96e 67cc1a7300000094 0000000f0034e53b e193799100e4837e b5d04f92903de4b5 234e8ccac5736c97 93379a59c33375fc 8951aca2eb7aad06 7bf9af60bf267586 46a17f5e5c3b6215 f94079545b1c4d4f 1b2ebb22c2b4dad4 4126817b6f001530 d476401dd67ac014 8554e806353da9e4 298079f3e1b16942 c48d90c4360c6123 8c40d9d52911aea5 2cc0037ac7160bb3 cf5b2f4a722fd96b P The following represents a test vector for a record set with a DNS record of type "A" as well as a GNS record of type "EDKEY" under the label "test".P Zone private key (d): 31a47c48b4e2a46e 402c0bd3954711c7 bb51a6f36c463a6f 99450ba0794cf651 Zone identifier (ztype|zkey): 00010014428b3fab 5a4c875d2910d67f 1cc43c2fcad040e8 40e22f7e3dcfa53c b964123d Encoded zone identifier (zkl = zTLD): 000G0522HCZTPPJCGXEJJ46PFWEC8F1FSB841T20W8QQWFEFMMYBJS0J7M Label: test RRCOUNT: 2 Record #0 EXPIRATION: 14888744139491809 DATA_SIZE: 4 TYPE: 1 FLAGS: 0 DATA: 01020304 Record #1 EXPIRATION: 26147096139491809 DATA_SIZE: 36 TYPE: 65556 FLAGS: 2 DATA: 000100144f8860bd c9c90388c485eed1 a2bac92ee825e448 e3fe411fc35ed61d 970d9c98 RDATA: 000000020034e53b e19609e100000004 0000000100000000 01020304005ce4a5 394d69e100000024 0001001400000002 000100144f8860bd c9c90388c485eed1 a2bac92ee825e448 e3fe411fc35ed61d 970d9c9800000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 Encryption NONCE|EXPIRATION: 6ce308199d2cad48 fd960ae3bf255899 0034e53be19609e1 Encryption key (K): 57fa0223a3533cdd 6392e1f72c3edab0 f684429ae0eb6134 7e90f617363c768d BDATA: 3fce073d7b8d092d f4444a938cf0641d f8dc1c505bda6c1a 6b7dfd0a31e9b150 2d180299d11f17cb 47a24464bb8c983c 5518e04a406f80eb 1f86b70dc7740669 bbb72d39b1da4570 26fadc370417919e 67cce8452985f504 e6a47f864ed3e7c8 88feda90a43da955 47d336fc70697a42 46e7e5dfc6957ece 20dd4c2041ad206f 3b5098414c3a6667 6dc0778078af272e 76522335 RRBLOCK: 000100142e74734d 1584d0f242d57eae 6462e297ffb8d8c7 35b0ebbc16f9adce 512ff443b0965dad a47c040b2ecca35f 3ad3e2b126b6f074 872cedf2a96c06a9 4cd3d71c44e625af a76ce81b7022fbd1 2fcc06c36ce81ea5 66d15065c9e0a9dc 4a0a400a000000a4 0000000f0034e53b e19609e13fce073d 7b8d092df4444a93 8cf0641df8dc1c50 5bda6c1a6b7dfd0a 31e9b1502d180299 d11f17cb47a24464 bb8c983c5518e04a 406f80eb1f86b70d c7740669bbb72d39 b1da457026fadc37 0417919e67cce845 2985f504e6a47f86 4ed3e7c888feda90 a43da95547d336fc 70697a4246e7e5df c6957ece20dd4c20 41ad206f3b509841 4c3a66676dc07780 78af272e76522335 P The following is an example revocation for a zone:P Zone private key (d, big-endian scalar): 6b1ee07223116bd7 dad0f22677c5dd33 823b204e5e845d19 7e64f1b66879ced0 Zone identifier (ztype|zkey): 00010000432ff523 fc9dd390ba829320 75ff7283df74cd96 204838dd0448b4f9 4a40f932 Encoded zone identifier (zkl = zTLD): 000G00235ZTJ7Z4XTE8BN0MK41TZYWM3VXTCV5H090WDT128PKWMMG7S68 Difficulty (5 base difficulty + 2 epochs): 7 Proof: 0005d657213d208c 0000395d1827c000 7fcb353aff966e2e 7fcb353aff96708a 7fcb353aff967108 7fcb353aff967152 7fcb353aff967164 7fcb353aff96718f 7fcb353aff967213 7fcb353aff9672d4 7fcb353aff9673ae 7fcb353aff9673b5 7fcb353aff967402 7fcb353aff96746e 7fcb353aff96750b 7fcb353aff967546 7fcb353aff96755f 7fcb353aff96762c 7fcb353aff967634 7fcb353aff967695 7fcb353aff9676a5 7fcb353aff9676cb 7fcb353aff9676eb 7fcb353aff9676f4 7fcb353aff96771d 7fcb353aff967755 7fcb353aff96777e 7fcb353aff9677b4 7fcb353aff9678a2 7fcb353aff967914 7fcb353aff967941 7fcb353aff967aa9 7fcb353aff967d04 7fcb353aff967d1b 00010000432ff523 fc9dd390ba829320 75ff7283df74cd96 204838dd0448b4f9 4a40f93200010000 075713bbc84bd10e e9efe31ab81893c1 c813e0a19761c070 fd52827e3929c9b5 0a6841a44c8b37de b9f76ffcb798c0d5 b9ae0482cdaa9095 2fb5aa5bc7a1c120 P 14. Normative References [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", STD 13 , RFC 1034, DOI 10.17487/RFC1034, November 1987, . [RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, . [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, DOI 10.17487/RFC2782, February 2000, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, < https://www.rfc-editor.org/info/rfc2119>. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003, . [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) Counter Mode With IPsec Encapsulating Security Payload (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, . [RFC3826] Blumenthal, U., Maino, F., and K. McCloghrie, "The Advanced Encryption Standard (AES) Cipher Algorithm in the SNMP User-based Security Model", RFC 3826, DOI 10.17487/RFC3826, June 2004, < https://www.rfc-editor.org/info/rfc3826>. [RFC5869] Krawczyk, H. and P. Eronen, "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)", RFC 5869, DOI 10.17487/RFC5869, May 2010, . [RFC5890] Klensin, J., "Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework", RFC 5890, DOI 10.17487/RFC5890, August 2010, . [RFC5891] Klensin, J., "Internationalized Domain Names in Applications (IDNA): Protocol", RFC 5891, DOI 10.17487/RFC5891, August 2010, < https://www.rfc-editor.org/info/rfc5891>. [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487/RFC6234, May 2011, . [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, April 2013, . [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2013, . [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves for Security", RFC 7748, DOI 10.17487/RFC7748, January 2016, . [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital Signature Algorithm (EdDSA)", RFC 8032, DOI 10.17487/RFC8032, January 2017, . [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, January 2019, . [RFC9106] Biryukov, A., Dinu, D., Khovratovich, D., and S. Josefsson, "Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications", RFC 9106, DOI 10.17487/RFC9106, September 2021, . [GANA] GNUnet e.V., "GNUnet Assigned Numbers Authority (GANA)", April 2020, . [MODES] Dworkin, M., "Recommendation for Block Cipher Modes of Operation: Methods and Techniques", December 2001, . [CrockfordB32] Douglas, D., "Base32", March 2019, . [XSalsa20] Bernstein, D., "Extending the Salsa20 nonce", 2011, . [Unicode-UAX15] Consortium, T. U., "Unicode Standard Annex #15: Unicode Normalization Forms, Revision 31", September 2009, . 15. Informative References [RFC6781] Kolkman, O., Mekking, W., and R. Gieben, "DNSSEC Operational Practices, Version 2", RFC 6781, DOI 10.17487/RFC6781, December 2012, . [RFC7363] Maenpaa, J. and G. Camarillo, "Self-Tuning Distributed Hash Table (DHT) for REsource LOcation And Discovery (RELOAD)", RFC 7363, DOI 10.17487/RFC7363, September 2014, . [RFC8324] Klensin, J., "DNS Privacy, Authorization, Special Uses, Encoding, Characters, Matching, and Root Structure: Time for Another Look?" , RFC 8324, DOI 10.17487/RFC8324, February 2018, . [Tor224] Goulet, D., Kadianakis, G., and N. Mathewson, "Next-Generation Hidden Services in Tor", November 2013, . [SDSI] Rivest, R. and B. Lampson, "SDSI - A Simple Distributed Security Infrastructure", April 1996, . [Kademlia] Maymounkov, P. and D. Mazieres, "Kademlia: A peer-to-peer information system based on the xor metric.", 2002, . [ed25519] Bernstein, D., Duif, N., Lange, T., Schwabe, P., and B. Yang, "High-Speed High-Security Signatures", 2011, . [GNS] Wachs, M., Schanzenbach, M., and C. Grothoff, "A Censorship-Resistant, Privacy-Enhancing and Fully Decentralized Name System", 2014, . [R5N] Evans, N. S. and C. Grothoff, "R5N: Randomized recursive routing for restricted-route networks", 2011, . [SecureNS] Grothoff, C., Wachs, M., Ermert, M., and J. Appelbaum, "Towards secure name resolution on the Internet", 2018, . [GNUnetGNS] GNUnet e.V., "The GNUnet GNS Implementation", . [GNUnet] GNUnet e.V., "The GNUnet Project", . [GoGNS] Fix, B., "The Go GNS Implementation", . Authors' Addresses Martin Schanzenbach GNUnet e.V. Boltzmannstrasse 3 85748 Garching Germany Email: schanzen@gnunet.org Christian Grothoff Berner Fachhochschule Hoeheweg 80 CH-2501 Biel/Bienne Switzerland Email: grothoff@gnunet.org Bernd Fix GNUnet e.V. Boltzmannstrasse 3 85748 Garching Germany Email: fix@gnunet.org