idnits 2.17.00 (12 Aug 2021) /tmp/idnits49523/draft-vcelak-nsec5-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 15 instances of too long lines in the document, the longest one being 34 characters in excess of 72. -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 2, 2018) is 1599 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'FIPS-186-3' is defined on line 1081, but no explicit reference was found in the text == Unused Reference: 'RFC5114' is defined on line 1135, but no explicit reference was found in the text == Unused Reference: 'RFC6234' is defined on line 1145, but no explicit reference was found in the text == Unused Reference: 'RFC7748' is defined on line 1155, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS-186-3' ** Downref: Normative reference to an Informational RFC: RFC 5114 ** Downref: Normative reference to an Informational RFC: RFC 6234 ** Downref: Normative reference to an Informational RFC: RFC 7748 -- Obsolete informational reference (is this intentional?): RFC 7719 (Obsoleted by RFC 8499) Summary: 4 errors (**), 0 flaws (~~), 5 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Vcelak 3 Internet-Draft CZ.NIC 4 Intended status: Standards Track S. Goldberg 5 Expires: July 6, 2018 Boston University 6 D. Papadopoulos 7 HKUST 8 S. Huque 9 Salesforce 10 D. Lawrence 11 Akamai Technologies 12 January 2, 2018 14 NSEC5, DNSSEC Authenticated Denial of Existence 15 draft-vcelak-nsec5-06 17 Abstract 19 The Domain Name System Security Extensions (DNSSEC) introduced two 20 resource records (RR) for authenticated denial of existence: the NSEC 21 RR and the NSEC3 RR. This document introduces NSEC5 as an 22 alternative mechanism for DNSSEC authenticated denial of existence. 23 NSEC5 uses verifiable random functions (VRFs) to prevent offline 24 enumeration of zone contents. NSEC5 also protects the integrity of 25 the zone contents even if an adversary compromises one of the 26 authoritative servers for the zone. Integrity is preserved because 27 NSEC5 does not require private zone-signing keys to be present on all 28 authoritative servers for the zone, in contrast to DNSSEC online 29 signing schemes like NSEC3 White Lies. 31 Ed note 33 Text inside square brackets ([]) is additional background 34 information, answers to frequently asked questions, general musings, 35 etc. They will be removed before publication. This document is 36 being collaborated on in GitHub at . The most recent version of the document, open issues, 38 etc should all be available here. The authors gratefully accept pull 39 requests. 41 Status of This Memo 43 This Internet-Draft is submitted in full conformance with the 44 provisions of BCP 78 and BCP 79. 46 Internet-Drafts are working documents of the Internet Engineering 47 Task Force (IETF). Note that other groups may also distribute 48 working documents as Internet-Drafts. The list of current Internet- 49 Drafts is at https://datatracker.ietf.org/drafts/current/. 51 Internet-Drafts are draft documents valid for a maximum of six months 52 and may be updated, replaced, or obsoleted by other documents at any 53 time. It is inappropriate to use Internet-Drafts as reference 54 material or to cite them other than as "work in progress." 56 This Internet-Draft will expire on July 6, 2018. 58 Copyright Notice 60 Copyright (c) 2018 IETF Trust and the persons identified as the 61 document authors. All rights reserved. 63 This document is subject to BCP 78 and the IETF Trust's Legal 64 Provisions Relating to IETF Documents 65 (https://trustee.ietf.org/license-info) in effect on the date of 66 publication of this document. Please review these documents 67 carefully, as they describe your rights and restrictions with respect 68 to this document. Code Components extracted from this document must 69 include Simplified BSD License text as described in Section 4.e of 70 the Trust Legal Provisions and are provided without warranty as 71 described in the Simplified BSD License. 73 Table of Contents 75 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 76 1.1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . 3 77 1.2. Requirements . . . . . . . . . . . . . . . . . . . . . . 5 78 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 79 2. Backward Compatibility . . . . . . . . . . . . . . . . . . . 6 80 3. How NSEC5 Works . . . . . . . . . . . . . . . . . . . . . . . 7 81 4. NSEC5 Algorithms . . . . . . . . . . . . . . . . . . . . . . 8 82 5. The NSEC5KEY Resource Record . . . . . . . . . . . . . . . . 9 83 5.1. NSEC5KEY RDATA Wire Format . . . . . . . . . . . . . . . 9 84 5.2. NSEC5KEY RDATA Presentation Format . . . . . . . . . . . 9 85 6. The NSEC5 Resource Record . . . . . . . . . . . . . . . . . . 9 86 6.1. NSEC5 RDATA Wire Format . . . . . . . . . . . . . . . . . 9 87 6.2. NSEC5 Flags Field . . . . . . . . . . . . . . . . . . . . 10 88 6.3. NSEC5 RDATA Presentation Format . . . . . . . . . . . . . 11 89 7. The NSEC5PROOF Resource Record . . . . . . . . . . . . . . . 11 90 7.1. NSEC5PROOF RDATA Wire Format . . . . . . . . . . . . . . 11 91 7.2. NSEC5PROOF RDATA Presentation Format . . . . . . . . . . 12 92 8. Types of Authenticated Denial of Existence with NSEC5 . . . . 12 93 8.1. Name Error Responses . . . . . . . . . . . . . . . . . . 12 94 8.2. No Data Responses . . . . . . . . . . . . . . . . . . . . 13 95 8.2.1. No Data Response, Opt-Out Not In Effect . . . . . . . 13 96 8.2.2. No Data Response, Opt-Out In Effect . . . . . . . . . 14 97 8.3. Wildcard Responses . . . . . . . . . . . . . . . . . . . 14 98 8.4. Wildcard No Data Responses . . . . . . . . . . . . . . . 14 99 9. Authoritative Server Considerations . . . . . . . . . . . . . 15 100 9.1. Zone Signing . . . . . . . . . . . . . . . . . . . . . . 15 101 9.1.1. Precomputing Closest Provable Encloser Proofs . . . . 16 102 9.2. Zone Serving . . . . . . . . . . . . . . . . . . . . . . 17 103 9.3. NSEC5KEY Rollover Mechanism . . . . . . . . . . . . . . . 18 104 9.4. Secondary Servers . . . . . . . . . . . . . . . . . . . . 18 105 9.5. Zones Using Unknown NSEC5 Algorithms . . . . . . . . . . 18 106 9.6. Dynamic Updates . . . . . . . . . . . . . . . . . . . . . 18 107 10. Resolver Considerations . . . . . . . . . . . . . . . . . . . 19 108 11. Validator Considerations . . . . . . . . . . . . . . . . . . 19 109 11.1. Validating Responses . . . . . . . . . . . . . . . . . . 19 110 11.2. Validating Referrals to Unsigned Subzones . . . . . . . 20 111 11.3. Responses With Unknown NSEC5 Algorithms . . . . . . . . 20 112 12. Special Considerations . . . . . . . . . . . . . . . . . . . 20 113 12.1. Transition Mechanism . . . . . . . . . . . . . . . . . . 20 114 12.2. Private NSEC5 keys . . . . . . . . . . . . . . . . . . . 20 115 12.3. Domain Name Length Restrictions . . . . . . . . . . . . 21 116 13. Implementation Status . . . . . . . . . . . . . . . . . . . . 21 117 14. Performance Considerations . . . . . . . . . . . . . . . . . 21 118 15. Security Considerations . . . . . . . . . . . . . . . . . . . 21 119 15.1. Zone Enumeration Attacks . . . . . . . . . . . . . . . . 21 120 15.2. Compromise of the Private NSEC5 Key . . . . . . . . . . 22 121 15.3. Key Length Considerations . . . . . . . . . . . . . . . 22 122 15.4. NSEC5 Hash Collisions . . . . . . . . . . . . . . . . . 22 123 16. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 124 17. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 23 125 18. References . . . . . . . . . . . . . . . . . . . . . . . . . 24 126 18.1. Normative References . . . . . . . . . . . . . . . . . . 24 127 18.2. Informative References . . . . . . . . . . . . . . . . . 25 128 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 27 129 A.1. Name Error Example . . . . . . . . . . . . . . . . . . . 27 130 A.2. No Data Example . . . . . . . . . . . . . . . . . . . . . 29 131 A.3. Delegation to an Unsigned Zone in an Opt-Out span Example 30 132 A.4. Wildcard Example . . . . . . . . . . . . . . . . . . . . 31 133 A.5. Wildcard No Data Example . . . . . . . . . . . . . . . . 32 134 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 33 135 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34 137 1. Introduction 139 1.1. Rationale 141 NSEC5 provides an alternative mechanism for authenticated denial of 142 existence for the DNS Security Extensions (DNSSEC). NSEC5 has two 143 key security properties. First, NSEC5 protects the integrity of the 144 zone contents even if an adversary compromises one of the 145 authoritative servers for the zone. Second, NSEC5 prevents offline 146 zone enumeration, where an adversary makes a small number of online 147 DNS queries and then processes them offline in order to learn all of 148 the names in a zone. Zone enumeration can be used to identify 149 routers, servers or other "things" that could then be targeted in 150 more complex attacks. An enumerated zone can also be a source of 151 probable email addresses for spam, or as a "key for multiple WHOIS 152 queries to reveal registrant data that many registries may have legal 153 obligations to protect" [RFC5155]. 155 All other DNSSEC mechanisms for authenticated denial of existence 156 either fail to preserve integrity against a compromised server, or 157 fail to prevent offline zone enumeration. 159 When offline signing with NSEC is used [RFC4034], an NSEC chain of 160 all existing domain names in the zone is constructed and signed 161 offline. The chain is made of resource records (RRs), where each RR 162 represents two consecutive domain names in canonical order present in 163 the zone. The authoritative server proves the non-existence of a 164 name by presenting a signed NSEC RR which covers the name. Because 165 the authoritative server does not need not to know the private zone- 166 signing key, the integrity of the zone is protected even if the 167 server is compromised. However, the NSEC chain allows for easy zone 168 enumeration: N queries to the server suffice to learn all N names in 169 the zone (see e.g., [nmap-nsec-enum], [nsec3map], and [ldns-walk]). 171 When offline signing with NSEC3 is used [RFC5155], the original names 172 in the NSEC chain are replaced by their cryptographic hashes. 173 Offline signing ensures that NSEC3 preserves integrity even if an 174 authoritative server is compromised. However, offline zone 175 enumeration is still possible with NSEC3 (see e.g., [nsec3walker], 176 [nsec3gpu]), and is part of standard network reconnaissance tools 177 (e.g., [nmap-nsec3-enum], [nsec3map]). 179 When online signing is used, the authoritative server holds the 180 private zone-signing key and uses this key to synthesize NSEC or 181 NSEC3 responses on the fly (e.g. NSEC3 White Lies (NSEC3-WL) or 182 Minimally-Covering NSEC, both described in [RFC7129]). Because the 183 synthesized response only contains information about the queried name 184 (but not about any other name in the zone), offline zone enumeration 185 is not possible. However, because the authoritative server holds the 186 private zone-signing key, integrity is lost if the authoritative 187 server is compromised. 189 +----------+-------------+---------------+----------------+---------+ 190 | Scheme | Integrity | Integrity vs | Prevents | Online | 191 | | vs network | compromised | offline zone | crypto? | 192 | | attacks? | auth. server? | enumeration? | | 193 +----------+-------------+---------------+----------------+---------+ 194 | Unsigned | NO | NO | YES | NO | 195 | NSEC | YES | YES | NO | NO | 196 | NSEC3 | YES | YES | NO | NO | 197 | NSEC3-WL | YES | NO | YES | YES | 198 | NSEC5 | YES | YES | YES | YES | 199 +----------+-------------+---------------+----------------+---------+ 201 NSEC5 prevents offline zone enumeration and also protects integrity 202 even if a zone's authoritative server is compromised. To do this, 203 NSEC5 replaces the unkeyed cryptographic hash function used in NSEC3 204 with a verifiable random function (VRF) [I-D.goldbe-vrf] [MRV99]. A 205 VRF is the public-key version of a keyed cryptographic hash. Only 206 the holder of the private VRF key can compute the hash, but anyone 207 with public VRF key can verify the correctness of the hash. 209 The public VRF key is distributed in an NSEC5KEY RR, similar to a 210 DNSKEY RR, and is used to verify NSEC5 hash values. The private VRF 211 key is present on all authoritative servers for the zone, and is used 212 to compute hash values. For every query that elicits a negative 213 response, the authoritative server hashes the query on the fly using 214 the private VRF key, and also returns the corresponding precomputed 215 NSEC5 record(s). In contrast to the online signing approach 216 [RFC7129], the private key that is present on all authoritative 217 servers for NSEC5 cannot be used to modify the zone contents. 219 Like online signing approaches, NSEC5 requires the authoritative 220 server to perform online public key cryptographic operations for 221 every query eliciting a denying response. This is necessary; [nsec5] 222 proved that online cryptography is required to prevent offline zone 223 enumeration while still protecting the integrity of zone contents 224 against network attacks. 226 NSEC5 is not intended to replace NSEC or NSEC3. It is an alternative 227 mechanism for authenticated denial of existence. This document 228 specifies NSEC5 based on the VRFs in [I-D.goldbe-vrf] over the FIPS 229 186-3 P-256 elliptic curve and over the the Ed25519 elliptic curve. 230 A formal cryptographic proof of security for NSEC5 is in [nsec5ecc]. 232 1.2. Requirements 234 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 235 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 236 document are to be interpreted as described in [RFC2119]. 238 1.3. Terminology 240 The reader is assumed to be familiar with the basic DNS and DNSSEC 241 concepts described in [RFC1034], [RFC1035], [RFC4033], [RFC4034], and 242 [RFC4035]; subsequent RFCs that update them in [RFC2136], [RFC2181], 243 [RFC2308], [RFC5155], and [RFC7129]; and DNS terms in [RFC7719]. 245 The reader should also be familiar with verifiable random functions 246 (VRFs) as defined in [I-D.goldbe-vrf]. 248 The following terminology is used through this document: 250 Base32hex: The "Base 32 Encoding with Extended Hex Alphabet" as 251 specified in [RFC4648]. The padding characters ("=") are not used 252 in the NSEC5 specification. 254 Base64: The "Base 64 Encoding" as specified in [RFC4648]. 256 QNAME: The domain name being queried (query name). 258 Private NSEC5 key: The private key for the verifiable random 259 function (VRF). 261 Public NSEC5 key: The public key for the VRF. 263 NSEC5 proof: A VRF proof. The holder of the private NSEC5 key 264 (e.g., authoritative server) can compute the NSEC5 proof for an 265 input domain name. Anyone who knows the public VRF key can verify 266 that the NSEC5 proof corresponds to the input domain name. 268 NSEC5 hash: A cryptographic digest of an NSEC5 proof. If the NSEC5 269 proof is known, anyone can compute its corresponding NSEC5 hash. 271 NSEC5 algorithm: A triple of VRF algorithms that compute an NSEC5 272 proof (VRF_prove), verify an NSEC5 proof (VRF_verify), and process 273 an NSEC5 proof to obtain its NSEC5 hash (VRF_proof2hash). 275 2. Backward Compatibility 277 The specification describes a protocol change that is not backward 278 compatible with [RFC4035] and [RFC5155]. An NSEC5-unaware resolver 279 will fail to validate responses introduced by this document. 281 To prevent NSEC5-unaware resolvers from attempting to validate the 282 responses, new DNSSEC algorithms identifiers are introduced in 283 Section 16 which alias existing algorithm numbers. The zones signed 284 according to this specification MUST use only these algorithm 285 identifiers, thus NSEC5-unaware resolvers will treat the zone as 286 insecure. 288 3. How NSEC5 Works 290 With NSEC5, the original domain name is hashed using a VRF 291 [I-D.goldbe-vrf] using the following steps: 293 1. The domain name is processed using a VRF keyed with the private 294 NSEC5 key to obtain the NSEC5 proof. Anyone who knows the public 295 NSEC5 key, normally acquired via an NSEC5KEY RR, can verify that 296 a given NSEC5 proof corresponds to a given domain name. 298 2. The NSEC5 proof is then processed using a publicly-computable VRF 299 proof2hash function to obtain the NSEC5 hash. The NSEC5 hash can 300 be computed by anyone who knows the input NSEC5 proof. 302 The NSEC5 hash determines the position of a domain name in an NSEC5 303 chain. 305 To sign a zone, the private NSEC5 key is used to compute the NSEC5 306 hashes for each name in the zone. These NSEC5 hashes are sorted in 307 canonical order [RFC4034], and each consecutive pair forms an NSEC5 308 RR. Each NSEC5 RR is signed offline using the private zone-signing 309 key. The resulting signed chain of NSEC5 RRs is provided to all 310 authoritative servers for the zone, along with the private NSEC5 key. 312 To prove non-existence of a particular domain name in response to a 313 query, the server uses the private NSEC5 key to compute the NSEC5 314 proof and NSEC5 hash corresponding to the queried name. The server 315 then identifies the NSEC5 RR that covers the NSEC5 hash, and responds 316 with this NSEC5 RR and its corresponding RRSIG signature RRset, as 317 well as a synthesized NSEC5PROOF RR that contains the NSEC5 proof 318 corresponding to the queried name. 320 To validate the response, the client verifies the following items: 322 o The client uses the public NSEC5 key, normally acquired from the 323 NSEC5KEY RR, to verify that the NSEC5 proof in the NSEC5PROOF RR 324 corresponds to the queried name. 326 o The client uses the VRF proof2hash function to compute the NSEC5 327 hash from the NSEC5 proof in the NSEC5PROOF RR. The client 328 verifies that the NSEC5 hash is covered by the NSEC5 RR. 330 o The client verifies that the NSEC5 RR is validly signed by the 331 RRSIG RRset. 333 4. NSEC5 Algorithms 335 The algorithms used for NSEC5 authenticated denial are independent of 336 the algorithms used for DNSSEC signing. An NSEC5 algorithm defines 337 how the NSEC5 proof and the NSEC5 hash are computed and validated. 339 The NSEC5 proof corresponding to a name is computed using 340 ECVRF_prove(), as specified in [I-D.goldbe-vrf]. The input to 341 ECVRF_prove() is a public NSEC5 key followed by a private NSEC5 key 342 followed by an RR owner name in [RFC4034] canonical wire format. The 343 output NSEC5 proof is an octet string. 345 An NSEC5 hash corresponding to a name is computed from its NSEC5 346 proof using ECVRF_proof2hash(), as specified in [I-D.goldbe-vrf]. 347 The input to VRF_proof2hash() is an NSEC5 proof as an octet string. 348 The output NSEC5 hash is either an octet string, or INVALID. 350 An NSEC5 proof for a name is verified using ECVRF_verify(), as 351 specified in [I-D.goldbe-vrf]. The input is the NSEC5 public key, 352 followed by an NSEC5 proof as an octet string, followed by an RR 353 owner name in [RFC4034] canonical wire format. The output is either 354 VALID or INVALID. 356 This document defines the EC-P256-SHA256 NSEC5 algorithm as follows: 358 o The VRF is the EC-VRF algorithm using the EC-VRF-P256-SHA256 359 ciphersuite specified in [I-D.goldbe-vrf]. 361 o The public key format to be used in the NSEC5KEY RR is defined in 362 Section 4 of [RFC6605] and thus is the same as the format used to 363 store ECDSA public keys in DNSKEY RRs. 364 [NOTE: This specification does not compress the elliptic curve 365 point used for the public key, but we do compress curve points in 366 every other place we use them. The NSEC5KEY record can be shrunk 367 by 31 additional octets by encoding the public key with point 368 compression.] 370 This document defines the EC-ED25519-SHA256 NSEC5 algorithm as 371 follows: 373 o The VRF is the EC-VRF algorithm using the EC-VRF-ED25519-SHA256 374 ciphersuite specified in [I-D.goldbe-vrf]. 376 o The public key format to be used in the NSEC5KEY RR is defined in 377 Section 3 of [RFC8080] and thus is the same as the format used to 378 store Ed25519 public keys in DNSKEY RRs. 380 5. The NSEC5KEY Resource Record 382 The NSEC5KEY RR stores a public NSEC5 key. The key allows clients to 383 validate an NSEC5 proof sent by a server. 385 5.1. NSEC5KEY RDATA Wire Format 387 The RDATA for the NSEC5KEY RR is as shown below: 389 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 390 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 391 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 392 | Algorithm | Public Key / 393 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 395 Algorithm is a single octet identifying the NSEC5 algorithm. 397 Public Key is a variable-sized field holding public key material for 398 NSEC5 proof verification. 400 5.2. NSEC5KEY RDATA Presentation Format 402 The presentation format of the NSEC5KEY RDATA is as follows: 404 The Algorithm field is represented as an unsigned decimal integer. 406 The Public Key field is represented in Base64 encoding. Whitespace 407 is allowed within the Base64 text. 409 6. The NSEC5 Resource Record 411 The NSEC5 RR provides authenticated denial of existence for an RRset 412 or domain name. One NSEC5 RR represents one piece of an NSEC5 chain, 413 proving existence of the owner name and non-existence of other domain 414 names in the part of the hashed domain space that is covered until 415 the next owner name hashed in the RDATA. 417 6.1. NSEC5 RDATA Wire Format 419 The RDATA for the NSEC5 RR is as shown below: 421 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 422 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 423 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 424 | Key Tag | Flags | Next Length | 425 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 426 | Next Hashed Owner Name / 427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 428 / Type Bit Maps / 429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 431 The Key Tag field contains the key tag value of the NSEC5KEY RR that 432 validates the NSEC5 RR, in network byte order. The value is computed 433 from the NSEC5KEY RDATA using the same algorithm used to compute key 434 tag values for DNSKEY RRs. This algorithm is defined in [RFC4034]. 436 The Flags field is a single octet. The meaning of individual bits of 437 the field is defined in Section 6.2. 439 The Next Length field is an unsigned single octet specifying the 440 length of the Next Hashed Owner Name field in octets. 442 The Next Hashed Owner Name field is a sequence of binary octets. It 443 contains an NSEC5 hash of the next domain name in the NSEC5 chain. 445 Type Bit Maps is a variable-sized field encoding RR types present at 446 the original owner name matching the NSEC5 RR. The format of the 447 field is equivalent to the format used in the NSEC3 RR, described in 448 [RFC5155]. 450 6.2. NSEC5 Flags Field 452 The following one-bit NSEC5 flags are defined: 454 0 1 2 3 4 5 6 7 455 +-+-+-+-+-+-+-+-+ 456 | |W|O| 457 +-+-+-+-+-+-+-+-+ 459 O - Opt-Out flag 461 W - Wildcard flag 463 All the other flags are reserved for future use and MUST be zero. 465 The Opt-Out flag has the same semantics as in NSEC3. The definition 466 and considerations in [RFC5155] are valid, except that NSEC3 is 467 replaced by NSEC5. 469 The Wildcard flag indicates that a wildcard synthesis is possible at 470 the original domain name level (i.e., there is a wildcard node 471 immediately descending from the immediate ancestor of the original 472 domain name). The purpose of the Wildcard flag is to reduce the 473 maximum number of RRs required for an authenticated denial of 474 existence proof from (at most) three to (at most) two, as originally 475 described in [I-D.gieben-nsec4] Section 7.2.1. 477 6.3. NSEC5 RDATA Presentation Format 479 The presentation format of the NSEC5 RDATA is as follows: 481 The Key Tag field is represented as an unsigned decimal integer. 483 The Flags field is represented as an unsigned decimal integer. 485 The Next Length field is not represented. 487 The Next Hashed Owner Name field is represented as a sequence of 488 case-insensitive Base32hex digits without any whitespace and without 489 padding. 491 The Type Bit Maps representation is equivalent to the representation 492 used in NSEC3 RR, described in [RFC5155]. 494 7. The NSEC5PROOF Resource Record 496 The NSEC5PROOF record is not to be included in the zone file. The 497 NSEC5PROOF record contains the NSEC5 proof, proving the position of 498 the owner name in an NSEC5 chain. 500 7.1. NSEC5PROOF RDATA Wire Format 502 The RDATA for the NSEC5PROOF RR is shown below: 504 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 505 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 506 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 507 | Key Tag | Owner Name Hash / 508 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 510 Key Tag field contains the key tag value of the NSEC5KEY RR that 511 validates the NSEC5PROOF RR, in network byte order. 513 Owner Name Hash is a variable-sized sequence of binary octets 514 encoding the NSEC5 proof of the owner name of the RR. 516 7.2. NSEC5PROOF RDATA Presentation Format 518 The presentation format of the NSEC5PROOF RDATA is as follows: 520 The Key Tag field is represented as an unsigned decimal integer. 522 The Owner Name Hash is represented in Base64 encoding. Whitespace is 523 allowed within the Base64 text. 525 8. Types of Authenticated Denial of Existence with NSEC5 527 This section summarizes all possible types of authenticated denial of 528 existence. For each type the following lists are included: 530 1. Facts to prove: the minimum amount of information that an 531 authoritative server must provide to a client to assure the 532 client that the response content is valid. 534 2. Authoritative server proofs: the names for which the NSEC5PROOF 535 RRs are synthesized and added into the response along with the 536 NSEC5 RRs matching or covering each such name. These records 537 together prove the listed facts. 539 3. Validator checks: the individual checks that a validating server 540 is required to perform on a response. The response content is 541 considered valid only if all of the checks pass. 543 If NSEC5 is said to match a domain name, the owner name of the NSEC5 544 RR has to be equivalent to an NSEC5 hash of that domain name. If an 545 NSEC5 RR is said to cover a domain name, the NSEC5 hash of the domain 546 name must sort in canonical order between that NSEC5 RR's Owner Name 547 and Next Hashed Owner Name. 549 8.1. Name Error Responses 551 Facts to prove: 553 Non-existence of the domain name that explictly matches the QNAME. 555 Non-existence of the wildcard that matches the QNAME. 557 Authoritative server proofs: 559 NSEC5PROOF for closest encloser and matching NSEC5 RR. 561 NSEC5PROOF for next closer name and covering NSEC5 RR. 563 Validator checks: 565 Closest encloser is in the zone. 567 The NSEC5 RR matching the closest encloser has its Wildcard flag 568 cleared. 570 The NSEC5 RR matching the closest encloser does not have NS 571 without SOA in the Type Bit Map. 573 The NSEC5 RR matching the closest encloser does not have DNAME in 574 the Type Bit Map. 576 Next closer name is not in the zone. 578 8.2. No Data Responses 580 The processing of a No Data response for DS QTYPE differs if the Opt- 581 Out is in effect. For DS QTYPE queries, the validator has two 582 possible checking paths. The correct path can be simply decided by 583 inspecting if the NSEC5 RR in the response matches the QNAME. 585 Note that the Opt-Out is valid only for DS QTYPE queries. 587 8.2.1. No Data Response, Opt-Out Not In Effect 589 Facts to prove: 591 Existence of an RRset explicitly matching the QNAME. 593 Non-existence of QTYPE RRset matching the QNAME. 595 Non-existence of CNAME RRset matching the QNAME. 597 Authoritative server proofs: 599 NSEC5PROOF for the QNAME and matching NSEC5 RR. 601 Validator checks: 603 QNAME is in the zone. 605 NSEC5 RR matching the QNAME does not have QTYPE in Type Bit Map. 607 NSEC5 RR matching the QNAME does not have CNAME in Type Bit Map. 609 8.2.2. No Data Response, Opt-Out In Effect 611 Facts to prove: 613 The delegation is not covered by the NSEC5 chain. 615 Authoritative server proofs: 617 NSEC5PROOF for closest provable encloser and matching NSEC5 RR. 619 Validator checks: 621 Closest provable encloser is in zone. 623 Closest provable encloser covers (not matches) the QNAME. 625 NSEC5 RR matching the closest provable encloser has Opt-Out flag 626 set. 628 8.3. Wildcard Responses 630 Facts to prove: 632 A signed positive response to the QNAME demonstrating the 633 existence of the wildcard (label count in RRSIG is less than in 634 QNAME), and also providing closest encloser name. 636 Non-existence of the domain name matching the QNAME. 638 Authoritative server proofs: 640 A signed positive response for the wildcard expansion of the 641 QNAME. 643 NSEC5PROOF for next closer name and covering NSEC5 RR. 645 Validator checks: 647 Next closer name is not in the zone. 649 8.4. Wildcard No Data Responses 651 Facts to prove: 653 The existence of the wildcard at the closest encloser to the 654 QNAME. 656 Non-existence of both the QTYPE and of the CNAME type that matches 657 QNAME via wildcard expansion. 659 Authoritative server proofs: 661 NSEC5PROOF for source of synthesis (i.e., wildcard at closest 662 encloser) and matching NSEC5 RR. 664 NSEC5PROOF for next closer name and covering NSEC5 RR. 666 Validator checks: 668 Closest encloser to the QNAME exists. 670 NSEC5 RR matching the wildcard label prepended to the closest 671 encloser, and which does not have the bits corresponding to the 672 QTYPE and CNAME types set it the type bitmap. 674 9. Authoritative Server Considerations 676 9.1. Zone Signing 678 Zones using NSEC5 MUST satisfy the same properties as described in 679 Section 7.1 of [RFC5155], with NSEC3 replaced by NSEC5. In addition, 680 the following conditions MUST be satisfied as well: 682 o If the original owner name has a wildcard label immediately 683 descending from the original owner name, the corresponding NSEC5 684 RR MUST have the Wildcard flag set in the Flags field. Otherwise, 685 the flag MUST be cleared. 687 o The zone apex MUST include an NSEC5KEY RRset containing a NSEC5 688 public key allowing verification of the current NSEC5 chain. 690 The following steps describe one possible method to properly add 691 required NSEC5 related records into a zone. This is not the only 692 such existing method. 694 1. Select an algorithm for NSEC5 and generate the public and private 695 NSEC5 keys. 697 2. Add an NSEC5KEY RR into the zone apex containing the public NSEC5 698 key. 700 3. For each unique original domain name in the zone and each empty 701 non-terminal, add an NSEC5 RR. If Opt-Out is used, owner names 702 of unsigned delegations MAY be excluded. 704 A. The owner name of the NSEC5 RR is the NSEC5 hash of the 705 original owner name encoded in Base32hex without padding, 706 prepended as a single label to the zone name. 708 B. Set the Key Tag field to be the key tag corresponding to the 709 public NSEC5 key. 711 C. Clear the Flags field. If Opt-Out is being used, set the 712 Opt-Out flag. If there is a wildcard label directly descending 713 from the original domain name, set the Wildcard flag. Note that 714 the wildcard can be an empty non-terminal (i.e., the wildcard 715 synthesis does not take effect and therefore the flag is not to 716 be set). 718 D. Set the Next Length field to a value determined by the used 719 NSEC5 algorithm. Leave the Next Hashed Owner Name field blank. 721 E. Set the Type Bit Maps field based on the RRsets present at 722 the original owner name. 724 4. Sort the set of NSEC5 RRs into canonical order. 726 5. For each NSEC5 RR, set the Next Hashed Owner Name field by using 727 the owner name of the next NSEC5 RR in the canonical order. If 728 the updated NSEC5 is the last NSEC5 RR in the chain, the owner 729 name of the first NSEC5 RR in the chain is used instead. 731 The NSEC5KEY and NSEC5 RRs MUST have the same class as the zone SOA 732 RR. Also the NSEC5 RRs SHOULD have the same TTL value as the SOA 733 minimum TTL field. 735 Notice that a use of Opt-Out is not indicated in the zone. This does 736 not affect the ability of a server to prove insecure delegations. 737 The Opt-Out MAY be part of the zone-signing tool configuration. 739 9.1.1. Precomputing Closest Provable Encloser Proofs 741 Per Section 8, the worst-case scenario when answering a negative 742 query with NSEC5 requires the authoritative server to respond with 743 two NSEC5PROOF RRs and two NSEC5 RRs. One pair of NSEC5PROOF and 744 NSEC5 RRs corresponds to the closest provable encloser, and the other 745 pair corresponds to the next closer name. The NSEC5PROOF 746 corresponding to the next closer name MUST be computed on the fly by 747 the authoritative server when responding to the query. However, the 748 NSEC5PROOF corresponding to the closest provable encloser MAY be 749 precomputed and stored as part of zone signing. 751 Precomputing NSEC5PROOF RRs can halve the number of online 752 cryptographic computations required when responding to a negative 753 query. NSEC5PROOF RRs MAY be precomputed as part of zone signing as 754 follows: For each NSEC5 RR, compute an NSEC5PROOF RR corresponding to 755 the original owner name of the NSEC5 RR. The content of the 756 precomputed NSEC5PROOF record MUST be the same as if the record was 757 computed on the fly when serving the zone. NSEC5PROOF records are 758 not part of the zone and SHOULD be stored separately from the zone 759 file. 761 9.2. Zone Serving 763 This specification modifies DNSSEC-enabled DNS responses generated by 764 authoritative servers. In particular, it replaces use of NSEC or 765 NSEC3 RRs in such responses with NSEC5 RRs and adds NSEC5PROOF RRs. 767 According to the type of a response, an authoritative server MUST 768 include NSEC5 RRs in the response, as defined in Section 8. For each 769 NSEC5 RR in the response, a corresponding RRSIG RRset and an 770 NSEC5PROOF MUST be added as well. The NSEC5PROOF RR has its owner 771 name set to the domain name required according to the description in 772 Section 8. The class and TTL of the NSEC5PROOF RR MUST be the same 773 as the class and TTL value of the corresponding NSEC5 RR. The RDATA 774 payload of the NSEC5PROOF is set according to the description in 775 Section 7.1. 777 Notice that the NSEC5PROOF owner name can be a wildcard (e.g., source 778 of synthesis proof in wildcard No Data responses). The name also 779 always matches the domain name required for the proof while the NSEC5 780 RR may only cover (not match) the name in the proof (e.g., closest 781 encloser in Name Error responses). 783 If NSEC5 is used, an answering server MUST use exactly one NSEC5 784 chain for one signed zone. 786 NSEC5 MUST NOT be used in parallel with NSEC, NSEC3, or any other 787 authenticated denial of existence mechanism that allows for 788 enumeration of zone contents, as this would defeat a principal 789 security goal of NSEC5. 791 Similarly to NSEC3, the owner names of NSEC5 RRs are not represented 792 in the NSEC5 chain and therefore NSEC5 records deny their own 793 existence. The desired behavior caused by this paradox is the same 794 as described in Section 7.2.8 of [RFC5155]. 796 9.3. NSEC5KEY Rollover Mechanism 798 Replacement of the NSEC5 key implies generating a new NSEC5 chain. 799 The NSEC5KEY rollover mechanism is similar to "Pre-Publish Zone 800 Signing Key Rollover" as specified in [RFC6781]. The NSEC5KEY 801 rollover MUST be performed as a sequence of the following steps: 803 1. A new public NSEC5 key is added into the NSEC5KEY RRset in the 804 zone apex. 806 2. The old NSEC5 chain is replaced by a new NSEC5 chain constructed 807 using the new key. This replacement MUST happen as a single 808 atomic operation; the server MUST NOT be responding with RRs from 809 both the new and old chain at the same time. 811 3. The old public key is removed from the NSEC5KEY RRset in the zone 812 apex. 814 The minimum delay between steps 1 and 2 MUST be the time it takes for 815 the data to propagate to the authoritative servers, plus the TTL 816 value of the old NSEC5KEY RRset. 818 The minimum delay between steps 2 and 3 MUST be the time it takes for 819 the data to propagate to the authoritative servers, plus the maximum 820 zone TTL value of any of the data in the previous version of the 821 zone. 823 9.4. Secondary Servers 825 This document does not define mechanism to distribute private NSEC5 826 keys. See Section 15.2 for security considerations for private NSEC5 827 keys. 829 9.5. Zones Using Unknown NSEC5 Algorithms 831 Zones that are signed with an unknown NSEC5 algorithm or with an 832 unavailable private NSEC5 key cannot be effectively served. Such 833 zones SHOULD be rejected when loading and servers SHOULD respond with 834 RCODE=2 (Server failure) when handling queries that would fall under 835 such zones. 837 9.6. Dynamic Updates 839 A zone signed using NSEC5 MAY accept dynamic updates [RFC2136]. The 840 changes to the zone MUST be performed in a way that ensures that the 841 zone satisfies the properties specified in Section 9.1 at any time. 842 The process described in [RFC5155] Section 7.5 describes how to 843 handle the issues surrounding the handling of empty non-terminals as 844 well as Opt-Out. 846 It is RECOMMENDED that the server rejects all updates containing 847 changes to the NSEC5 chain and its related RRSIG RRs, and performs 848 itself any required alternations of the NSEC5 chain induced by the 849 update. Alternatively, the server MUST verify that all the 850 properties are satisfied prior to performing the update atomically. 852 10. Resolver Considerations 854 The same considerations as described in Section 9 of [RFC5155] for 855 NSEC3 apply to NSEC5. In addition, as NSEC5 RRs can be validated 856 only with appropriate NSEC5PROOF RRs, the NSEC5PROOF RRs MUST be all 857 together cached and included in responses with NSEC5 RRs. 859 11. Validator Considerations 861 11.1. Validating Responses 863 The validator MUST ignore NSEC5 RRs with Flags field values other 864 than the ones defined in Section 6.2. 866 The validator MAY treat responses as bogus if the response contains 867 NSEC5 RRs that refer to a different NSEC5KEY. 869 According to a type of a response, the validator MUST verify all 870 conditions defined in Section 8. Prior to making decision based on 871 the content of NSEC5 RRs in a response, the NSEC5 RRs MUST be 872 validated. 874 To validate a denial of existence, public NSEC5 keys for the zone are 875 required in addition to DNSSEC public keys. Similarly to DNSKEY RRs, 876 the NSEC5KEY RRs are present at the zone apex. 878 The NSEC5 RR is validated as follows: 880 1. Select a correct public NSEC5 key to validate the NSEC5 proof. 881 The Key Tag value of the NSEC5PROOF RR must match with the key 882 tag value computed from the NSEC5KEY RDATA. 884 2. Validate the NSEC5 proof present in the NSEC5PROOF Owner Name 885 Hash field using the public NSEC5 key. If there are multiple 886 NSEC5KEY RRs matching the key tag, at least one of the keys must 887 validate the NSEC5 proof. 889 3. Compute the NSEC5 hash value from the NSEC5 proof and check if 890 the response contains NSEC5 RR matching or covering the computed 891 NSEC5 hash. The TTL values of the NSEC5 and NSEC5PROOF RRs must 892 be the same. 894 4. Validate the signature on the NSEC5 RR. 896 If the NSEC5 RR fails to validate, it MUST be ignored. If some of 897 the conditions required for an NSEC5 proof are not satisfied, the 898 response MUST be treated as bogus. 900 Notice that determining the closest encloser and next closer name in 901 NSEC5 is easier than in NSEC3. NSEC5 and NSEC5PROOF RRs are always 902 present in pairs in responses and the original owner name of the 903 NSEC5 RR matches the owner name of the NSEC5PROOF RR. 905 11.2. Validating Referrals to Unsigned Subzones 907 The same considerations as defined in Section 8.9 of [RFC5155] for 908 NSEC3 apply to NSEC5. 910 11.3. Responses With Unknown NSEC5 Algorithms 912 A validator MUST ignore NSEC5KEY RRs with unknown NSEC5 algorithms. 913 The practical result of this is that zones signed with unknown 914 algorithms will be considered bogus. 916 12. Special Considerations 918 12.1. Transition Mechanism 920 [TODO: The following information will be covered.] 922 o Transition to NSEC5 from NSEC/NSEC3 924 o Transition from NSEC5 to NSEC/NSEC3 926 o Transition to new NSEC5 algorithms 928 12.2. Private NSEC5 keys 930 This document does not define a format to store private NSEC5 keys. 931 Use of a standardized and adopted format is RECOMMENDED. 933 The private NSEC5 key MAY be shared between multiple zones, however a 934 separate key is RECOMMENDED for each zone. 936 12.3. Domain Name Length Restrictions 938 NSEC5 creates additional restrictions on domain name lengths. In 939 particular, zones with names that, when converted into hashed owner 940 names, exceed the 255 octet length limit imposed by [RFC1035] cannot 941 use this specification. 943 The actual maximum length of a domain name depends on the length of 944 the zone name and the NSEC5 algorithm used. 946 All NSEC5 algorithms defined in this document use 256-bit NSEC5 hash 947 values. Such a value can be encoded in 52 characters in Base32hex 948 without padding. When constructing the NSEC5 RR owner name, the 949 encoded hash is prepended to the name of the zone as a single label 950 which includes the length field of a single octet. The maximum 951 length of the zone name in wire format using the 256-bit hash is 952 therefore 202 octets (255 - 53). 954 13. Implementation Status 956 NSEC5 has been implemented for the Knot DNS authoritative server 957 (version 1.6.4) and the Unbound recursive server (version 1.5.9). 958 The implementations did not introduce additional library 959 dependencies; all cryptographic primitives are already present in 960 OpenSSL v1.0.2j, which is used by both implementations. The 961 implementations support the full spectrum of negative responses, 962 (i.e., NXDOMAIN, NODATA, Wildcard, Wildcard NODATA, and unsigned 963 delegation) using the EC-P256-SHA256 algorithm. The code is 964 deliberately modular, so that the EC-ED25519-SHA256 algorithm could 965 be implemented by using the Ed25519 elliptic curve [RFC8080] as a 966 drop-in replacement for the P256 elliptic curve. The authoritative 967 server implements the optimization from Section 9.1.1 to precompute 968 the NSEC5PROOF RRs matching each NSEC5 record. 970 14. Performance Considerations 972 The performance of NSEC5 has been evaluated in [nsec5ecc]. 974 15. Security Considerations 976 15.1. Zone Enumeration Attacks 978 NSEC5 is robust to zone enumeration via offline dictionary attacks by 979 any attacker that does not know the private NSEC5 key. Without the 980 private NSEC5 key, that attacker cannot compute the NSEC5 proof that 981 corresponds to a given domain name. The only way it can learn the 982 NSEC5 proof value for a domain name is by querying the authoritative 983 server for that name. Without the NSEC5 proof value, the attacker 984 cannot learn the NSEC5 hash value. Thus, even an attacker that 985 collects the entire chain of NSEC5 RR for a zone cannot use offline 986 attacks to "reverse" that NSEC5 hash values in these NSEC5 RR and 987 thus learn which names are present in the zone. A formal 988 cryptographic proof of this property is in [nsec5] and [nsec5ecc]. 990 15.2. Compromise of the Private NSEC5 Key 992 NSEC5 requires authoritative servers to hold the private NSEC5 key, 993 but not the private zone-signing keys or the private key-signing keys 994 for the zone. 996 The private NSEC5 key cannot be used to modify zone contents, because 997 zone contents are signed using the private zone-signing key. As 998 such, a compromise of the private NSEC5 key does not compromise the 999 integrity of the zone. An adversary that learns the private NSEC5 1000 key can, however, perform offline zone-enumeration attacks. For this 1001 reason, the private NSEC5 key need only be as secure as the DNSSEC 1002 records whose privacy (against zone enumeration) is being protected 1003 by NSEC5. A formal cryptographic proof of this property is in 1004 [nsec5] and [nsec5ecc]. 1006 To preserve this property of NSEC5, the private NSEC5 key MUST be 1007 different from the private zone-signing keys or key-signing keys for 1008 the zone. 1010 15.3. Key Length Considerations 1012 The NSEC5 key must be long enough to withstand attacks for as long as 1013 the privacy of the zone contents is important. Even if the NSEC5 key 1014 is rolled frequently, its length cannot be too short, because zone 1015 privacy may be important for a period of time longer than the 1016 lifetime of the key. For example, an attacker might collect the 1017 entire chain of NSEC5 RR for the zone over one short period, and 1018 then, later (even after the NSEC5 key expires) perform an offline 1019 dictionary attack that attempts to reverse the NSEC5 hash values 1020 present in the NSEC5 RRs. This is in contrast to zone-signing and 1021 key-signing keys used in DNSSEC; these keys, which ensure the 1022 authenticity and integrity of the zone contents, need to remain 1023 secure only during their lifetime. 1025 15.4. NSEC5 Hash Collisions 1027 If the NSEC5 hash of a QNAME collides with the NSEC5 hash of the 1028 owner name of an NSEC5 RR, it will be impossible to prove the non- 1029 existence of the colliding QNAME. However, the NSEC5 VRFs ensure 1030 that obtaining such a collision is as difficult as obtaining a 1031 collision in the SHA-256 hash function, requiring approximately 2^128 1032 effort. Note that DNSSEC already relies on the assumption that a 1033 cryptographic hash function is collision-resistant, since these hash 1034 functions are used for generating and validating signatures and DS 1035 RRs. See also the discussion on key lengths in [nsec5]. 1037 16. IANA Considerations 1039 This document updates the IANA registry "Domain Name System (DNS) 1040 Parameters" in subregistry "Resource Record (RR) TYPEs", by defining 1041 the following new RR types: 1043 NSEC5KEY value TBD. 1045 NSEC5 value TBD. 1047 NSEC5PROOF value TBD. 1049 This document creates a new IANA registry for NSEC5 algorithms. This 1050 registry is named "DNSSEC NSEC5 Algorithms". The initial content of 1051 the registry is: 1053 0 is Reserved. 1055 1 is EC-P256-SHA256. 1057 2 is EC-ED25519-SHA256. 1059 3-255 is Available for assignment. 1061 This document updates the IANA registry "DNS Security Algorithm 1062 Numbers" by defining following aliases: 1064 TBD is NSEC5-ECDSAP256SHA256 alias for ECDSAP256SHA256 (13). 1066 TBD is NSEC5-ED25519, alias for ED25519 (15). 1068 17. Contributors 1070 This document would not be possible without help of Moni Naor 1071 (Weizmann Institute), Sachin Vasant (Cisco Systems), Leonid Reyzin 1072 (Boston University), and Asaf Ziv (Weizmann Institute) who 1073 contributed to the design of NSEC5. Ondrej Sury (CZ.NIC Labs), and 1074 Duane Wessels (Verisign Labs) provided advice on the implementation 1075 of NSEC5, and assisted with evaluating its performance. 1077 18. References 1079 18.1. Normative References 1081 [FIPS-186-3] 1082 National Institute for Standards and Technology, "Digital 1083 Signature Standard (DSS)", FIPS PUB 186-3, June 2009. 1085 [I-D.goldbe-vrf] 1086 Goldberg, S., Papadopoulos, D., and J. Vcelak, "Verifiable 1087 Random Functions (VRFs)", draft-goldbe-vrf-01 (work in 1088 progress), June 2017. 1090 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1091 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1092 . 1094 [RFC1035] Mockapetris, P., "Domain names - implementation and 1095 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1096 November 1987, . 1098 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1099 Requirement Levels", BCP 14, RFC 2119, 1100 DOI 10.17487/RFC2119, March 1997, 1101 . 1103 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 1104 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 1105 RFC 2136, DOI 10.17487/RFC2136, April 1997, 1106 . 1108 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 1109 Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, 1110 . 1112 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 1113 NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, 1114 . 1116 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 1117 Rose, "DNS Security Introduction and Requirements", 1118 RFC 4033, DOI 10.17487/RFC4033, March 2005, 1119 . 1121 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 1122 Rose, "Resource Records for the DNS Security Extensions", 1123 RFC 4034, DOI 10.17487/RFC4034, March 2005, 1124 . 1126 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 1127 Rose, "Protocol Modifications for the DNS Security 1128 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 1129 . 1131 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 1132 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 1133 . 1135 [RFC5114] Lepinski, M. and S. Kent, "Additional Diffie-Hellman 1136 Groups for Use with IETF Standards", RFC 5114, 1137 DOI 10.17487/RFC5114, January 2008, 1138 . 1140 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 1141 Security (DNSSEC) Hashed Authenticated Denial of 1142 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, 1143 . 1145 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 1146 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 1147 DOI 10.17487/RFC6234, May 2011, 1148 . 1150 [RFC6605] Hoffman, P. and W. Wijngaards, "Elliptic Curve Digital 1151 Signature Algorithm (DSA) for DNSSEC", RFC 6605, 1152 DOI 10.17487/RFC6605, April 2012, 1153 . 1155 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1156 for Security", RFC 7748, DOI 10.17487/RFC7748, January 1157 2016, . 1159 [RFC8080] Sury, O. and R. Edmonds, "Edwards-Curve Digital Security 1160 Algorithm (EdDSA) for DNSSEC", RFC 8080, 1161 DOI 10.17487/RFC8080, February 2017, 1162 . 1164 18.2. Informative References 1166 [I-D.gieben-nsec4] 1167 Gieben, R. and M. Mekking, "DNS Security (DNSSEC) 1168 Authenticated Denial of Existence", draft-gieben-nsec4-01 1169 (work in progress), July 2012. 1171 [ldns-walk] 1172 NLNetLabs, "ldns", 2015, 1173 . 1175 [MRV99] Michali, S., Rabin, M., and S. Vadhan, "Verifiable Random 1176 Functions", in FOCS, 1999. 1178 [nmap-nsec-enum] 1179 Bond, J., "nmap: dns-nsec-enum", 2011, 1180 . 1182 [nmap-nsec3-enum] 1183 Nikolic, A. and J. Bond, "nmap: dns-nsec3-enum", 2011, 1184 . 1186 [nsec3gpu] 1187 Wander, M., Schwittmann, L., Boelmann, C., and T. Weis, 1188 "GPU-Based NSEC3 Hash Breaking", in IEEE Symp. Network 1189 Computing and Applications (NCA), 2014. 1191 [nsec3map] 1192 anonion0, "nsec3map with John the Ripper plugin", 2015, 1193 . 1195 [nsec3walker] 1196 Bernstein, D., "Nsec3 walker", 2011, 1197 . 1199 [nsec5] Goldberg, S., Naor, M., Papadopoulos, D., Reyzin, L., 1200 Vasant, S., and A. Ziv, "NSEC5: Provably Preventing DNSSEC 1201 Zone Enumeration", in NDSS'15, July 2014, 1202 . 1204 [nsec5ecc] 1205 Papadopoulos, D., Wessels, D., Huque, S., Vcelak, J., 1206 Naor, M., Reyzin, L., and S. Goldberg, "Can NSEC5 be 1207 Practical for DNSSEC Deployments?", in ePrint Cryptology 1208 Archive 2017/099, February 2017, 1209 . 1211 [RFC6781] Kolkman, O., Mekking, W., and R. Gieben, "DNSSEC 1212 Operational Practices, Version 2", RFC 6781, 1213 DOI 10.17487/RFC6781, December 2012, 1214 . 1216 [RFC7129] Gieben, R. and W. Mekking, "Authenticated Denial of 1217 Existence in the DNS", RFC 7129, DOI 10.17487/RFC7129, 1218 February 2014, . 1220 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1221 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 1222 2015, . 1224 Appendix A. Examples 1226 We use a small DNS zone to illustrate how negative responses are 1227 handled with NSEC5. For brevity, the class is not shown (defaults to 1228 IN) and the SOA record is shortened, resulting in the following zone 1229 file: 1231 example.org. SOA ( ... ) 1232 example.org. NS a.example.org 1234 a.example.org. A 192.0.2.1 1236 c.example.org. A 192.0.2.2 1237 c.example.org. TXT "c record" 1239 d.example.org. NS ns1.d.example.org 1241 ns1.d.example.org. A 192.0.2.4 1243 g.example.org. A 192.0.2.1 1244 g.example.org. TXT "g record" 1246 *.a.example.org. TXT "wildcard record" 1248 Notice the delegation to an unsigned zone d.example.org served by 1249 ns1.d.example.org. (Note: if the d.example.org zone was signed, then 1250 the example.org zone have a DS record for d.example.org.) 1252 Next we present example responses. All cryptographic values are 1253 shortened as indicated by "..." and ADDITIONAL sections have been 1254 removed. 1256 A.1. Name Error Example 1258 Consider a query for a type A record for a.b.c.example.org. 1260 The server must prove the following facts: 1262 o Existence of closest encloser c.example.org. 1264 o Non-existence of wildcard at closest encloser *.c.example.org. 1266 o Non-existence of next closer b.c.example.org. 1268 To do this, the server returns: 1270 ;; ->>HEADER<<- opcode: QUERY; status: NXDOMAIN; id: 5937 1272 ;; QUESTION SECTION: 1273 ;; a.b.c.example.org. IN A 1275 ;; AUTHORITY SECTION: 1276 example.org. 3600 IN SOA a.example.org. hostmaster.example.org. ( 1277 2010111214 21600 3600 604800 86400 ) 1279 example.org. 3600 IN RRSIG SOA 16 2 3600 ( 1280 20170412024301 20170313024301 5137 example.org. rT231b1rH... ) 1282 This is an NSEC5PROOF RR for c.example.com. It's RDATA is the NSEC5 1283 proof corresponding to c.example.com. (NSEC5 proofs are randomized 1284 values, because NSEC5 proof values are computed uses the EC-VRF from 1285 [I-D.goldbe-vrf].) Per Section 9.1.1, this NSEC5PROOF RR may be 1286 precomputed. 1288 c.example.org. 86400 IN NSEC5PROOF 48566 Amgn22zUiZ9JVyaT... 1290 This is a signed NSEC5 RR "matching" c.example.org, which proves the 1291 existence of closest encloser c.example.org. The NSEC5 RR has its 1292 owner name equal to the NSEC5 hash of c.example.org, which is O4K89V. 1293 (NSEC5 hash values are deterministic given the public NSEC5 key.) 1294 The NSEC5 RR also has its Wildcard flag cleared (see the "0" after 1295 the key ID 48566). This proves the non-existence of the wildcard at 1296 the closest encloser *.c.example.com. NSEC5 RRs are precomputed. 1298 o4k89v.example.org. 86400 IN NSEC5 48566 0 0O49PI A TXT RRSIG 1299 o4k89v.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1300 20170412024301 20170313024301 5137 example.org. zDNTSMQNlz... ) 1302 This is an NSEC5PROOF RR for b.c.example.org. It's RDATA is the 1303 NSEC5 proof corresponding to b.c.example.com. This NSEC5PROOF RR 1304 must be computed on the fly. 1306 b.c.example.org. 86400 IN NSEC5PROOF 48566 AuvvJqbUcEs8sCpY... 1308 This is a signed NSEC5 RR "covering" b.c.example.org, which proves 1309 the non-existence of the next closer name b.c.example.org The NSEC5 1310 hash of b.c.example.org, which is AO5OF, sorts in canonical order 1311 between the "covering" NSEC5 RR's Owner Name (which is 0O49PI) and 1312 Next Hashed Owner Name (which is BAPROH). 1314 0o49pi.example.org. 86400 IN NSEC5 48566 0 BAPROH ( 1315 NS SOA RRSIG DNSKEY NSEC5KEY ) 1317 0o49pi.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1318 20170412024301 20170313024301 5137 example.org. 4HT1uj1YlMzO) 1320 [TODO: Add discussion of CNAME and DNAME to the example?] 1322 A.2. No Data Example 1324 Consider a query for a type MX record for c.example.org. 1326 The server must prove the following facts: 1328 o Existence of c.example.org. for any type other than MX or CNAME 1330 To do this, the server returns: 1332 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 38781 1334 ;; QUESTION SECTION: 1335 ;; c.example.org. IN MX 1337 ;; AUTHORITY SECTION: 1338 example.org. 3600 IN SOA a.example.org. hostmaster.example.org. ( 1339 2010111214 21600 3600 604800 86400 ) 1341 example.org. 3600 IN RRSIG SOA 16 2 3600 20170412024301 20170313024301 5137 example.org. /rT231b1rH/p 1343 This is an NSEC5PROOF RR for c.example.com. Its RDATA corresponds to 1344 the NSEC5 proof for c.example.com. which is a randomized value. Per 1345 Section 9.1.1, this NSEC5PROOF RR may be precomputed. 1347 c.example.org. 86400 IN NSEC5PROOF 48566 Amgn22zUiZ9JVyaT 1349 This is a signed NSEC5 RR "matching" c.example.org. with CNAME and MX 1350 Type Bits cleared and its TXT Type Bit set. This NSEC5 RR has its 1351 owner name equal to the NSEC5 hash of c.example.org. This proves the 1352 existence of c.example.org. for a type other than MX and CNAME. 1353 NSEC5 RR are precomputed. 1355 o4k89v.example.org. 86400 IN NSEC5 48566 0 0O49PI A TXT RRSIG 1357 o4k89v.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1358 20170412024301 20170313024301 5137 example.org. zDNTSMQNlz/J) 1360 A.3. Delegation to an Unsigned Zone in an Opt-Out span Example 1362 Consider a query for a type A record for foo.d.example.org. 1364 Here, d.example.org is a delegation to an unsigned zone, which lies 1365 within an Opt-Out span. 1367 The server must prove the following facts: 1369 o Non-existence of signature on next closer name d.example.org. 1371 o Opt-out bit is set in NSEC5 record covering next closer name 1372 d.example.org. 1374 o Existence of closest provable encloser example.org 1376 To do this, the server returns: 1378 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 45866 1380 ;; QUESTION SECTION: 1381 ;; foo.d.example.org. IN A 1383 ;; AUTHORITY SECTION: 1384 d.example.org. 3600 IN NS ns1.d.example.org. 1386 This is an NSEC5PROOF RR for d.example.org. Its RDATA is the NSEC5 1387 proof corresponding to d.example.org. This NSEC5PROOF RR is computed 1388 on the fly. 1390 d.example.org. 86400 IN NSEC5PROOF 48566 A9FpmeH79q7g6VNW 1392 This is a signed NSEC5 RR "covering" d.example.org with its Opt-out 1393 bit set (see the "1" after the key ID 48566). The NSEC5 hash of 1394 d.example.org (which is BLE8LR) sorts in canonical order between the 1395 "covering" NSEC5 RR's Owner Name (BAPROH) and Next Hashed Owner Name 1396 (JQBMG4). This proves that no signed RR exists for d.example.org, 1397 but that the zone might contain a unsigned RR for a name whose NSEC5 1398 hash sorts in canonical order between BAPROH and JQBMG4. 1400 baproh.example.org. 86400 IN NSEC5 48566 1 JQBMG4 A TXT RRSIG 1402 baproh.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1403 20170412024301 20170313024301 5137 example.org. fjTcoRKgdML1) 1405 This is an NSEC5PROOF RR for example.com. It's RDATA is the NSEC5 1406 proof corresponding to example.com. Per Section 9.1.1, this 1407 NSEC5PROOF RR may be precomputed. 1409 example.org. 86400 IN NSEC5PROOF 48566 AjwsPCJZ8zH/D0Tr 1411 This is a signed NSEC5 RR "matching" example.org which proves the 1412 existence of a signed RRs for example.org. This NSEC5 RR has its 1413 owner name equal to the NSEC5 hash of example.org which is 0O49PI. 1414 NSEC5 RR are precomputed. 1416 0o49pi.example.org. 86400 IN NSEC5 48566 0 BAPROH ( 1417 NS SOA RRSIG DNSKEY NSEC5KEY) 1419 0o49pi.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1420 20170412034216 20170313034216 5137 example.org. 4HT1uj1YlMzO) 1422 A.4. Wildcard Example 1424 Consider a query for a type TXT record for foo.a.example.org. 1426 The server must prove the following facts: 1428 o Existence of the TXT record for the wildcard *.a.example.org 1430 o Non-existence of the next closer name foo.a.example.org. 1432 To do this, the server returns: 1434 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 53731 1436 ;; QUESTION SECTION: 1437 ;; foo.a.example.org. IN TXT 1439 This is a signed TXT record for the wildcard at a.example.org (number 1440 of labels is set to 3 in the RRSIG record). 1442 ;; ANSWER SECTION: 1443 foo.a.example.org. 3600 IN TXT "wildcard record" 1445 foo.a.example.org. 3600 IN RRSIG TXT 16 3 3600 ( 1446 20170412024301 20170313024301 5137 example.org. aeaLgZ8sk+98) 1448 ;; AUTHORITY SECTION: 1449 example.org. 3600 IN NS a.example.org. 1451 example.org. 3600 IN RRSIG NS 16 2 3600 ( 1452 20170412024301 20170313024301 5137 example.org. 8zuN0h2x5WyF) 1454 This is an NSEC5PROOF RR for foo.a.example.org. This NSEC5PROOF RR 1455 must be computed on-the-fly. 1457 foo.a.example.org. 86400 IN NSEC5PROOF 48566 AjqF5FGGVso40Lda 1459 This is a signed NSEC5 RR "covering" foo.a.example.org. The NSEC5 1460 hash of foo.a.example.org is FORDMO and sorts in canonical order 1461 between the NSEC5 RR's Owner Name (which is BAPROH) and Next Hashed 1462 Owner Name (which is JQBMG4). This proves the non-existence of the 1463 next closer name foo.a.example.com. NSEC5 RRs are precomputed. 1465 baproh.example.org. 86400 IN NSEC5 48566 1 JQBMG4 A TXT RRSIG 1466 baproh.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1467 20170412024301 20170313024301 5137 example.org. fjTcoRKgdML1 1469 A.5. Wildcard No Data Example 1471 Consider a query for a type MX record for foo.a.example.org. 1473 The server must prove the following facts: 1475 o Existence of wildcard at closest encloser *.a.example.org. for any 1476 type other than MX or CNAME. 1478 o Non-existence of the next closer name foo.a.example.org. 1480 To do this, the server returns: 1482 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 17332 1484 ;; QUESTION SECTION: 1485 ;; foo.a.example.org. IN MX 1487 ;; AUTHORITY SECTION: 1488 example.org. 3600 IN SOA a.example.org. hostmaster.example.org. ( 1489 2010111214 21600 3600 604800 86400 ) 1491 example.org. 3600 IN RRSIG SOA 16 2 3600 ( 1492 20170412024301 20170313024301 5137 example.org. /rT231b1rH/p ) 1494 This is an NSEC5PROOF RR for *.a.example.com, with RDATA equal to the 1495 NSEC5 proof for *.a.example.com. Per Section 9.1.1, this NSEC5PROOF 1496 RR may be precomputed. 1498 *.a.example.org. 86400 IN NSEC5PROOF 48566 Aq38RWWPhbs/vtih 1500 This is a signed NSEC5 RR "matching" *.a.example.org with its CNAME 1501 and MX Type Bits cleared and its TXT Type Bit set. This NSEC5 RR has 1502 its owner name equal to the NSEC5 hash of *.a.example.org. NSEC5 RRs 1503 are precomputed. 1505 mpu6c4.example.org. 86400 IN NSEC5 48566 0 O4K89V TXT RRSIG 1507 mpu6c4.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1508 20170412024301 20170313024301 5137 example.org. m3I75ttcWwVC ) 1510 This is an NSEC5PROOF RR for foo.a.example.com. This NSEC5PROOF RR 1511 must be computed on-the-fly. 1513 foo.a.example.org. 86400 IN NSEC5PROOF 48566 AjqF5FGGVso40Lda 1515 This is a signed NSEC5 RR "covering" foo.a.example.org. The NSEC5 1516 hash of foo.a.example.org is FORDMO, and sorts in canonical order 1517 between this covering NSEC5 RR's Owner Name (which is BAPROH) and 1518 Next Hashed Owner Name (which is JQBMG4). This proves the existence 1519 of the wildcard at closest encloser *.a.example.org. for any type 1520 other than MX or CNAME. NSEC5 RRs are precomputed. 1522 baproh.example.org. 86400 IN NSEC5 48566 1 JQBMG4 A TXT RRSIG 1524 baproh.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1525 20170412024301 20170313024301 5137 example.org. fjTcoRKgdML1 ) 1527 Appendix B. Change Log 1529 Note to RFC Editor: if this document does not obsolete an existing 1530 RFC, please remove this appendix before publication as an RFC. 1532 pre 00 - initial version of the document submitted to mailing list 1533 only 1535 00 - fix NSEC5KEY rollover mechanism, clarify NSEC5PROOF RDATA, 1536 clarify inputs and outputs for NSEC5 proof and NSEC5 hash 1537 computation. 1539 01 - Add Performance Considerations section. 1541 02 - Add elliptic curve based VRF. Add measurement of response 1542 sizes based on empirical data. 1544 03 - Mention precomputed NSEC5PROOF Values in Performance 1545 Considerations section. 1547 04 - Edit Rationale, How NSEC5 Works, and Security Consideration 1548 sections for clarity. Edit Zone Signing section, adding 1549 precomputation of NSEC5PROOFs. Remove RSA-based NSEC5 1550 specification. Rewrite Performance Considerations and 1551 Implementation Status sections. 1553 05 - Remove appendix specifying VRFs and add reference to 1554 [I-D.goldbe-vrf]. Add Appendix A. 1556 06 - Editorial changes. Minor updates to Section 8.1. 1558 Authors' Addresses 1560 Jan Vcelak 1561 CZ.NIC 1562 Milesovska 1136/5 1563 Praha 130 00 1564 CZ 1566 EMail: jan.vcelak@nic.cz 1568 Sharon Goldberg 1569 Boston University 1570 111 Cummington St, MCS135 1571 Boston, MA 02215 1572 USA 1574 EMail: goldbe@cs.bu.edu 1576 Dimitrios Papadopoulos 1577 HKUST 1578 Clearwater Bay 1579 Hong Kong 1581 EMail: dipapado@ust.hk 1583 Shumon Huque 1584 Salesforce 1585 2550 Wasser Terr 1586 Herndon, VA 20171 1587 USA 1589 EMail: shuque@gmail.com 1590 David C Lawrence 1591 Akamai Technologies 1592 150 Broadway 1593 Boston, MA 02142-1054 1594 USA 1596 EMail: tale@akamai.com