idnits 2.17.1 draft-vcelak-nsec5-05.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 17 instances of too long lines in the document, the longest one being 37 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 (July 03, 2017) is 2489 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 1084, but no explicit reference was found in the text == Unused Reference: 'RFC5114' is defined on line 1132, but no explicit reference was found in the text == Unused Reference: 'RFC6234' is defined on line 1141, but no explicit reference was found in the text == Unused Reference: 'RFC7748' is defined on line 1150, 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: January 04, 2018 Boston University 6 D. Papadopoulos 7 University of Maryland 8 S. Huque 9 Salesforce 10 D. Lawrence 11 Akamai Technologies 12 July 03, 2017 14 NSEC5, DNSSEC Authenticated Denial of Existence 15 draft-vcelak-nsec5-05 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 http://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 January 04, 2018. 58 Copyright Notice 60 Copyright (c) 2017 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 (http://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 . . . . . . . . . . . . . . . 17 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 . . . . . . . . . . . . 20 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 . . . . . . . . . . . . . . . . . . . . . . . . . 23 126 18.1. Normative References . . . . . . . . . . . . . . . . . . 23 127 18.2. Informative References . . . . . . . . . . . . . . . . . 25 128 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 26 129 A.1. Name Error Example . . . . . . . . . . . . . . . . . . . 27 130 A.2. No Data Example . . . . . . . . . . . . . . . . . . . . . 28 131 A.3. Delegation to an Unsigned Zone in an Opt-Out span Example 29 132 A.4. Wildcard Example . . . . . . . . . . . . . . . . . . . . 31 133 A.5. Wildcard No Data Example . . . . . . . . . . . . . . . . 32 134 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 33 136 1. Introduction 138 1.1. Rationale 140 NSEC5 provides an alternative mechanism for authenticated denial of 141 existence for the DNS Security Extensions (DNSSEC). NSEC5 has two 142 key security properties. First, NSEC5 protects the integrity of the 143 zone contents even if an adversary compromises one of the 144 authoritative servers for the zone. Second, NSEC5 prevents offline 145 zone enumeration, where an adversary makes a small number of online 146 DNS queries and then processes them offline in order to learn all of 147 the names in a zone. Zone enumeration can be used to identify 148 routers, servers or other "things" that could then be targeted in 149 more complex attacks. An enumerated zone can also be a source of 150 probable email addresses for spam, or as a "key for multiple WHOIS 151 queries to reveal registrant data that many registries may have legal 152 obligations to protect" [RFC5155]. 154 All other DNSSEC mechanisms for authenticated denial of existence 155 either fail to preserve integrity against a compromised server, or 156 fail to prevent offline zone enumeration. 158 When offline signing with NSEC is used [RFC4034], an NSEC chain of 159 all existing domain names in the zone is constructed and signed 160 offline. The chain is made of resource records (RRs), where each RR 161 represents two consecutive domain names in canonical order present in 162 the zone. The authoritative server proves the non-existence of a 163 name by presenting a signed NSEC RR which covers the name. Because 164 the authoritative server does not need not to know the private zone- 165 signing key, the integrity of the zone is protected even if the 166 server is compromised. However, the NSEC chain allows for easy zone 167 enumeration: N queries to the server suffice to learn all N names in 168 the zone (see e.g., [nmap-nsec-enum], [nsec3map], and [ldns-walk]). 170 When offline signing with NSEC3 is used [RFC5155], the original names 171 in the NSEC chain are replaced by their cryptographic hashes. 172 Offline signing ensures that NSEC3 preserves integrity even if an 173 authoritative server is compromised. However, offline zone 174 enumeration is still possible with NSEC3 (see e.g., [nsec3walker], 175 [nsec3gpu]), and is part of standard network reconnaissance tools 176 (e.g., [nmap-nsec3-enum], [nsec3map]). 178 When online signing is used, the authoritative server holds the 179 private zone-signing key and uses this key to synthesize NSEC or 180 NSEC3 responses on the fly (e.g. NSEC3 White Lies (NSEC3-WL) or 181 Minimally-Covering NSEC, both described in [RFC7129]). Because the 182 synthesized response only contains information about the queried name 183 (but not about any other name in the zone), offline zone enumeration 184 is not possible. However, because the authoritative server holds the 185 private zone-signing key, integrity is lost if the authoritative 186 server is compromised. 188 +----------+-------------+---------------+----------------+---------+ 189 | Scheme | Integrity | Integrity vs | Prevents | Online | 190 | | vs network | compromised | offline zone | crypto? | 191 | | attacks? | auth. server? | enumeration? | | 192 +----------+-------------+---------------+----------------+---------+ 193 | Unsigned | NO | NO | YES | NO | 194 | NSEC | YES | YES | NO | NO | 195 | NSEC3 | YES | YES | NO | NO | 196 | NSEC3-WL | YES | NO | YES | YES | 197 | NSEC5 | YES | YES | YES | YES | 198 +----------+-------------+---------------+----------------+---------+ 200 NSEC5 prevents offline zone enumeration and also protects integrity 201 even if a zone's authoritative server is compromised. To do this, 202 NSEC5 replaces the unkeyed cryptographic hash function used in NSEC3 203 with a verifiable random function (VRF) [MRV99]. A VRF is the 204 public-key version of a keyed cryptographic hash. Only the holder of 205 the private VRF key can compute the hash, but anyone with public VRF 206 key can verify the correctness of the hash. 208 The public VRF key is distributed in an NSEC5KEY RR, similar to a 209 DNSKEY RR, and is used to verify NSEC5 hash values. The private VRF 210 key is present on all authoritative servers for the zone, and is used 211 to compute hash values. For every query that elicits a negative 212 response, the authoritative server hashes the query on the fly using 213 the private VRF key, and also returns the corresponding precomputed 214 NSEC5 record(s). In contrast to the online signing approach 215 [RFC7129], the private key that is present on all authoritative 216 servers for NSEC5 cannot be used to modify the zone contents. 218 Like online signing approaches, NSEC5 requires the authoritative 219 server to perform online public key cryptographic operations for 220 every query eliciting a denying response. This is necessary; [nsec5] 221 proved that online cryptography is required to prevent offline zone 222 enumeration while still protecting the integrity of zone contents 223 against network attacks. 225 NSEC5 is not intended to replace NSEC or NSEC3. It is an alternative 226 mechanism for authenticated denial of existence. This document 227 specifies NSEC5 based on the FIPS 186-3 P-256 elliptic curve and on 228 the Ed25519 elliptic curve. A formal cryptographic proof of security 229 for elliptic curve (EC) NSEC5 is in [nsec5ecc]. 231 1.2. Requirements 233 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 234 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 235 document are to be interpreted as described in [RFC2119]. 237 1.3. Terminology 239 The reader is assumed to be familiar with the basic DNS and DNSSEC 240 concepts described in [RFC1034], [RFC1035], [RFC4033], [RFC4034], and 241 [RFC4035]; subsequent RFCs that update them in [RFC2136], [RFC2181], 242 [RFC2308], [RFC5155], and [RFC7129]; and DNS terms in [RFC7719]. 244 The reader should also be familiar with verifiable random functions 245 (VRFs) as defined in [I-D.goldbe-vrf]. 247 The following terminology is used through this document: 249 Base32hex: The "Base 32 Encoding with Extended Hex Alphabet" as 250 specified in [RFC4648]. The padding characters ("=") are not used 251 in the NSEC5 specification. 253 Base64: The "Base 64 Encoding" as specified in [RFC4648]. 255 QNAME: The domain name being queried (query name). 257 Private NSEC5 key: The private key for the verifiable random 258 function (VRF). 260 Public NSEC5 key: The public key for the VRF. 262 NSEC5 proof: A VRF proof. The holder of the private NSEC5 key 263 (e.g., authoritative server) can compute the NSEC5 proof for an 264 input domain name. Anyone who knows the public VRF key can verify 265 that the NSEC5 proof corresponds to the input domain name. 267 NSEC5 hash: A cryptographic digest of an NSEC5 proof. If the NSEC5 268 proof is known, anyone can compute its corresponding NSEC5 hash. 270 NSEC5 algorithm: A triple of VRF algorithms that compute an NSEC5 271 proof (VRF_prove), verify an NSEC5 proof (VRF_verify), and process 272 an NSEC5 proof to obtain its NSEC5 hash (VRF_proof2hash). 274 2. Backward Compatibility 276 The specification describes a protocol change that is not backward 277 compatible with [RFC4035] and [RFC5155]. An NSEC5-unaware resolver 278 will fail to validate responses introduced by this document. 280 To prevent NSEC5-unaware resolvers from attempting to validate the 281 responses, new DNSSEC algorithms identifiers are introduced in 282 Section 16 which alias existing algorithm numbers. The zones signed 283 according to this specification MUST use only these algorithm 284 identifiers, thus NSEC5-unaware resolvers will treat the zone as 285 insecure. 287 3. How NSEC5 Works 289 With NSEC5, the original domain name is hashed using a VRF 290 [I-D.goldbe-vrf] using the following steps: 292 1. The domain name is processed using a VRF keyed with the private 293 NSEC5 key to obtain the NSEC5 proof. Anyone who knows the public 294 NSEC5 key, normally acquired via an NSEC5KEY RR, can verify that 295 a given NSEC5 proof corresponds to a given domain name. 297 2. The NSEC5 proof is then processed using a publicly-computable VRF 298 proof2hash function to obtain the NSEC5 hash. The NSEC5 hash can 299 be computed by anyone who knows the input NSEC5 proof. 301 The NSEC5 hash determines the position of a domain name in an NSEC5 302 chain. 304 To sign a zone, the private NSEC5 key is used to compute the NSEC5 305 hashes for each name in the zone. These NSEC5 hashes are sorted in 306 canonical order [RFC4034], and each consecutive pair forms an NSEC5 307 RR. Each NSEC5 RR is signed offline using the private zone-signing 308 key. The resulting signed chain of NSEC5 RRs is provided to all 309 authoritative servers for the zone, along with the private NSEC5 key. 311 To prove non-existence of a particular domain name in response to a 312 query, the server uses the private NSEC5 key to compute the NSEC5 313 proof and NSEC5 hash corresponding to the queried name. The server 314 then identifies the NSEC5 RR that covers the NSEC5 hash, and responds 315 with this NSEC5 RR and its corresponding RRSIG signature RRset, as 316 well as a synthesized NSEC5PROOF RR that contains the NSEC5 proof 317 corresponding to the queried name. 319 To validate the response, the client verifies the following items: 321 o The client uses the public NSEC5 key, normally acquired from the 322 NSEC5KEY RR, to verify that the NSEC5 proof in the NSEC5PROOF RR 323 corresponds to the queried name. 325 o The client uses the VRF proof2hash function to compute the NSEC5 326 hash from the NSEC5 proof in the NSEC5PROOF RR. The client 327 verifies that the NSEC5 hash is covered by the NSEC5 RR. 329 o The client verifies that the NSEC5 RR is validly signed by the 330 RRSIG RRset. 332 4. NSEC5 Algorithms 334 The algorithms used for NSEC5 authenticated denial are independent of 335 the algorithms used for DNSSEC signing. An NSEC5 algorithm defines 336 how the NSEC5 proof and the NSEC5 hash are computed and validated. 338 The NSEC5 proof corresponding to a name is computed using 339 ECVRF_prove(), as specified in [I-D.goldbe-vrf]. The input to 340 ECVRF_prove() is a public NSEC5 key followed by a private NSEC5 key 341 followed by an RR owner name in [RFC4034] canonical wire format. The 342 output NSEC5 proof is an octet string. 344 An NSEC5 hash corresponding to a name is computed from its NSEC5 345 proof using ECVRF_proof2hash(), as specified in [I-D.goldbe-vrf]. 346 The input to VRF_proof2hash() is an NSEC5 proof as an octet string. 347 The output NSEC5 hash is either an octet string, or INVALID. 349 An NSEC5 proof for a name is verified using ECVRF_verify(), as 350 specified in [I-D.goldbe-vrf]. The input is the NSEC5 public key, 351 followed by an NSEC5 proof as an octet string, followed by an RR 352 owner name in [RFC4034] canonical wire format. The output is either 353 VALID or INVALID. 355 This document defines the EC-P256-SHA256 NSEC5 algorithm as follows: 357 o The VRF is the EC-VRF algorithm using the EC-VRF-P256-SHA256 358 ciphersuite specified in [I-D.goldbe-vrf]. 360 o The public key format to be used in the NSEC5KEY RR is defined in 361 Section 4 of [RFC6605] and thus is the same as the format used to 362 store ECDSA public keys in DNSKEY RRs. 363 [NOTE: This specification does not compress the elliptic curve 364 point used for the public key! But we do compress curve points in 365 every other place we use them with the P256 ECVRF. We could save 366 31 octets in the NSEC5KEY record by encoding the public key with 367 point compression!] 369 This document defines the EC-ED25519-SHA256 NSEC5 algorithm as 370 follows: 372 o The VRF is the EC-VRF algorithm using the EC-VRF-ED25519-SHA256 373 ciphersuite specified in [I-D.goldbe-vrf]. 375 o The public key format to be used in the NSEC5KEY RR is defined in 376 Section 3 of [RFC8080] and thus is the same as the format used to 377 store Ed25519 public keys in DNSKEY RRs. 379 5. The NSEC5KEY Resource Record 381 The NSEC5KEY RR stores a public NSEC5 key. The key allows clients to 382 validate an NSEC5 proof sent by a server. 384 5.1. NSEC5KEY RDATA Wire Format 386 The RDATA for the NSEC5KEY RR is as shown below: 388 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 389 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 390 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 391 | Algorithm | Public Key / 392 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 394 Algorithm is a single octet identifying the NSEC5 algorithm. 396 Public Key is a variable-sized field holding public key material for 397 NSEC5 proof verification. 399 5.2. NSEC5KEY RDATA Presentation Format 401 The presentation format of the NSEC5KEY RDATA is as follows: 403 The Algorithm field is represented as an unsigned decimal integer. 405 The Public Key field is represented in Base64 encoding. Whitespace 406 is allowed within the Base64 text. 408 6. The NSEC5 Resource Record 410 The NSEC5 RR provides authenticated denial of existence for an RRset 411 or domain name. One NSEC5 RR represents one piece of an NSEC5 chain, 412 proving existence of the owner name and non-existence of other domain 413 names in the part of the hashed domain space that is covered until 414 the next owner name hashed in the RDATA. 416 6.1. NSEC5 RDATA Wire Format 418 The RDATA for the NSEC5 RR is as shown below: 420 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 421 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 the NSEC5 536 RRs matching or covering each such name. These records together 537 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 The QNAME does not fall into a delegation. 565 The QNAME does not fall into a DNAME redirection. 567 Validator checks: 569 Closest encloser is in the zone. 571 The NSEC5 RR matching the closest encloser has its Wildcard flag 572 cleared. 574 The NSEC5 RR matching the closest encloser does not have NS 575 without SOA in the Type Bit Map. 577 The NSEC5 RR matching the closest encloser does not have DNAME in 578 the Type Bit Map. 580 Next closer name is not in the zone. 582 8.2. No Data Responses 584 The processing of a No Data response for DS QTYPE differs if the Opt- 585 Out is in effect. For DS QTYPE queries, the validator has two 586 possible checking paths. The correct path can be simply decided by 587 inspecting if the NSEC5 RR in the response matches the QNAME. 589 Note that the Opt-Out is valid only for DS QTYPE queries. 591 8.2.1. No Data Response, Opt-Out Not In Effect 593 Facts to prove: 595 Existence of an RRset explicitly matching the QNAME. 597 Non-existence of QTYPE RRset matching the QNAME. 599 Non-existence of CNAME RRset matching the QNAME. 601 Authoritative server proofs: 603 NSEC5PROOF for the QNAME and matching NSEC5 RR. 605 Validator checks: 607 QNAME is in the zone. 609 NSEC5 RR matching the QNAME does not have QTYPE in Type Bit Map. 611 NSEC5 RR matching the QNAME does not have CNAME in Type Bit Map. 613 8.2.2. No Data Response, Opt-Out In Effect 615 Facts to prove: 617 The delegation is not covered by the NSEC5 chain. 619 Authoritative server proofs: 621 NSEC5PROOF for closest provable encloser and matching NSEC5 RR. 623 Validator checks: 625 Closest provable encloser is in zone. 627 Closest provable encloser covers (not matches) the QNAME. 629 NSEC5 RR matching the closest provable encloser has Opt-Out flag 630 set. 632 8.3. Wildcard Responses 634 Facts to prove: 636 A signed positive response to the QNAME demonstrating the 637 existence of the wildcard (label count in RRSIG is less than in 638 QNAME), and also providing closest encloser name. 640 Non-existence of the domain name matching the QNAME. 642 Authoritative server proofs: 644 A signed positive response for the wildcard expansion of the 645 QNAME. 647 NSEC5PROOF for next closer name and covering NSEC5 RR. 649 Validator checks: 651 Next closer name is not in the zone. 653 8.4. Wildcard No Data Responses 655 Facts to prove: 657 The existence of the wildcard at the closest encloser to the 658 QNAME. 660 Non-existence of both the QTYPE and of the CNAME type that matches 661 QNAME via wildcard expansion. 663 Authoritative server proofs: 665 NSEC5PROOF for source of synthesis (i.e., wildcard at closest 666 encloser) and matching NSEC5 RR. 668 NSEC5PROOF for next closer name and covering NSEC5 RR. 670 Validator checks: 672 Closest encloser to the QNAME exists. 674 NSEC5 RR matching the wildcard label prepended to the closest 675 encloser, and which does not have the bits corresponding to the 676 QTYPE and CNAME types set it the type bitmap. 678 9. Authoritative Server Considerations 680 9.1. Zone Signing 682 Zones using NSEC5 MUST satisfy the same properties as described in 683 Section 7.1 of [RFC5155], with NSEC3 replaced by NSEC5. In addition, 684 the following conditions MUST be satisfied as well: 686 o If the original owner name has a wildcard label immediately 687 descending from the original owner name, the corresponding NSEC5 688 RR MUST have the Wildcard flag set in the Flags field. Otherwise, 689 the flag MUST be cleared. 691 o The zone apex MUST include an NSEC5KEY RRset containing a NSEC5 692 public key allowing verification of the current NSEC5 chain. 694 The following steps describe one possible method to properly add 695 required NSEC5 related records into a zone. This is not the only 696 such existing method. 698 1. Select an algorithm for NSEC5. Generate the public and private 699 NSEC5 keys. 701 2. Add an NSEC5KEY RR into the zone apex containing the public NSEC5 702 key. 704 3. For each unique original domain name in the zone and each empty 705 non-terminal, add an NSEC5 RR. If Opt-Out is used, owner names 706 of unsigned delegations MAY be excluded. 708 A. The owner name of the NSEC5 RR is the NSEC5 hash of the 709 original owner name encoded in Base32hex without padding, 710 prepended as a single label to the zone name. 712 B. Set the Key Tag field to be the key tag corresponding to the 713 public NSEC5 key. 715 C. Clear the Flags field. If Opt-Out is being used, set the Opt- 716 Out flag. If there is a wildcard label directly descending from 717 the original domain name, set the Wildcard flag. Note that the 718 wildcard can be an empty non-terminal (i.e., the wildcard 719 synthesis does not take effect and therefore the flag is not to 720 be set). 722 D. Set the Next Length field to a value determined by the used 723 NSEC5 algorithm. Leave the Next Hashed Owner Name field blank. 725 E. Set the Type Bit Maps field based on the RRsets present at the 726 original owner name. 728 4. Sort the set of NSEC5 RRs into canonical order. 730 5. For each NSEC5 RR, set the Next Hashed Owner Name field by using 731 the owner name of the next NSEC5 RR in the canonical order. If 732 the updated NSEC5 is the last NSEC5 RR in the chain, the owner 733 name of the first NSEC5 RR in the chain is used instead. 735 The NSEC5KEY and NSEC5 RRs MUST have the same class as the zone SOA 736 RR. Also the NSEC5 RRs SHOULD have the same TTL value as the SOA 737 minimum TTL field. 739 Notice that a use of Opt-Out is not indicated in the zone. This does 740 not affect the ability of a server to prove insecure delegations. 741 The Opt-Out MAY be part of the zone-signing tool configuration. 743 9.1.1. Precomputing Closest Provable Encloser Proofs 745 Per Section 8, the worst-case scenario when answering a negative 746 query with NSEC5 requires authoritative server to respond with two 747 NSEC5PROOF RRs and two NSEC5 RRs. One pair of NSEC5PROOF and NSEC5 748 RRs corresponds to the closest provable encloser, and the other pair 749 corresponds to the next closer name. The NSEC5PROOF corresponding to 750 the next closer name MUST be computed on the fly by the authoritative 751 server when responding to the query. However, the NSEC5PROOF 752 corresponding to the closest provable encloser MAY be precomputed and 753 stored as part of zone signing. 755 Precomputing NSEC5PROOF RRs can halve the number of online 756 cryptographic computations required when responding to a negative 757 query. NSEC5PROOF RRs MAY be precomputed as part of zone signing as 758 follows: For each NSEC5 RR, compute an NSEC5PROOF RR corresponding to 759 the original owner name of the NSEC5 RR. The content of the 760 precomputed NSEC5PROOF record MUST be the same as if the record was 761 computed on the fly when serving the zone. NSEC5PROOF records are 762 not part of the zone and SHOULD be stored separately from the zone 763 file. 765 9.2. Zone Serving 767 This specification modifies DNSSEC-enabled DNS responses generated by 768 authoritative servers. In particular, it replaces use of NSEC or 769 NSEC3 RRs in such responses with NSEC5 RRs and adds NSEC5PROOF RRs. 771 According to the type of a response, an authoritative server MUST 772 include NSEC5 RRs in the response, as defined in Section 8. For each 773 NSEC5 RR in the response, a corresponding RRSIG RRset and an 774 NSEC5PROOF MUST be added as well. The NSEC5PROOF RR has its owner 775 name set to the domain name required according to the description in 776 Section 8. The class and TTL of the NSEC5PROOF RR MUST be the same 777 as the class and TTL value of the corresponding NSEC5 RR. The RDATA 778 payload of the NSEC5PROOF is set according to the description in 779 Section 7.1. 781 Notice that the NSEC5PROOF owner name can be a wildcard (e.g., source 782 of synthesis proof in wildcard No Data responses). The name also 783 always matches the domain name required for the proof while the NSEC5 784 RR may only cover (not match) the name in the proof (e.g., closest 785 encloser in Name Error responses). 787 If NSEC5 is used, an answering server MUST use exactly one NSEC5 788 chain for one signed zone. 790 NSEC5 MUST NOT be used in parallel with NSEC, NSEC3, or any other 791 authenticated denial of existence mechanism that allows for 792 enumeration of zone contents, as this would defeat a principal 793 security goal of NSEC5. 795 Similarly to NSEC3, the owner names of NSEC5 RRs are not represented 796 in the NSEC5 chain and therefore NSEC5 records deny their own 797 existence. The desired behavior caused by this paradox is the same 798 as described in Section 7.2.8 of [RFC5155]. 800 9.3. NSEC5KEY Rollover Mechanism 801 Replacement of the NSEC5 key implies generating a new NSEC5 chain. 802 The NSEC5KEY rollover mechanism is similar to "Pre-Publish Zone 803 Signing Key Rollover" as specified in [RFC6781]. The NSEC5KEY 804 rollover MUST be performed as a sequence of the following steps: 806 1. A new public NSEC5 key is added into the NSEC5KEY RRset in the 807 zone apex. 809 2. The old NSEC5 chain is replaced by a new NSEC5 chain constructed 810 using the new key. This replacement MUST happen as a single 811 atomic operation; the server MUST NOT be responding with RRs from 812 both the new and old chain at the same time. 814 3. The old public key is removed from the NSEC5KEY RRset in the zone 815 apex. 817 The minimum delay between steps 1 and 2 MUST be the time it takes for 818 the data to propagate to the authoritative servers, plus the TTL 819 value of the old NSEC5KEY RRset. 821 The minimum delay between steps 2 and 3 MUST be the time it takes for 822 the data to propagate to the authoritative servers, plus the maximum 823 zone TTL value of any of the data in the previous version of the 824 zone. 826 9.4. Secondary Servers 828 This document does not define mechanism to distribute private NSEC5 829 keys. See Section 15.2 for security considerations for private NSEC5 830 keys. 832 9.5. Zones Using Unknown NSEC5 Algorithms 834 Zones that are signed with an unknown NSEC5 algorithm or with an 835 unavailable private NSEC5 key cannot be effectively served. Such 836 zones SHOULD be rejected when loading and servers SHOULD respond with 837 RCODE=2 (Server failure) when handling queries that would fall under 838 such zones. 840 9.6. Dynamic Updates 842 A zone signed using NSEC5 MAY accept dynamic updates [RFC2136]. The 843 changes to the zone MUST be performed in a way that ensures that the 844 zone satisfies the properties specified in Section 9.1 at any time. 845 The process described in [RFC5155] Section 7.5 describes how to 846 handle the issues surrounding the handling of empty non-terminals as 847 well as Opt-Out. 849 It is RECOMMENDED that the server rejects all updates containing 850 changes to the NSEC5 chain and its related RRSIG RRs, and performs 851 itself any required alternations of the NSEC5 chain induced by the 852 update. Alternatively, the server MUST verify that all the 853 properties are satisfied prior to performing the update atomically. 855 10. Resolver Considerations 857 The same considerations as described in Section 9 of [RFC5155] for 858 NSEC3 apply to NSEC5. In addition, as NSEC5 RRs can be validated 859 only with appropriate NSEC5PROOF RRs, the NSEC5PROOF RRs MUST be all 860 together cached and included in responses with NSEC5 RRs. 862 11. Validator Considerations 864 11.1. Validating Responses 866 The validator MUST ignore NSEC5 RRs with Flags field values other 867 than the ones defined in Section 6.2. 869 The validator MAY treat responses as bogus if the response contains 870 NSEC5 RRs that refer to a different NSEC5KEY. 872 According to a type of a response, the validator MUST verify all 873 conditions defined in Section 8. Prior to making decision based on 874 the content of NSEC5 RRs in a response, the NSEC5 RRs MUST be 875 validated. 877 To validate a denial of existence, public NSEC5 keys for the zone are 878 required in addition to DNSSEC public keys. Similarly to DNSKEY RRs, 879 the NSEC5KEY RRs are present at the zone apex. 881 The NSEC5 RR is validated as follows: 883 1. Select a correct public NSEC5 key to validate the NSEC5 proof. 884 The Key Tag value of the NSEC5PROOF RR must match with the key 885 tag value computed from the NSEC5KEY RDATA. 887 2. Validate the NSEC5 proof present in the NSEC5PROOF Owner Name 888 Hash field using the public NSEC5 key. If there are multiple 889 NSEC5KEY RRs matching the key tag, at least one of the keys must 890 validate the NSEC5 proof. 892 3. Compute the NSEC5 hash value from the NSEC5 proof and check if 893 the response contains NSEC5 RR matching or covering the computed 894 NSEC5 hash. The TTL values of the NSEC5 and NSEC5PROOF RRs must 895 be the same. 897 4. Validate the signature on the NSEC5 RR. 899 If the NSEC5 RR fails to validate, it MUST be ignored. If some of 900 the conditions required for an NSEC5 proof are not satisfied, the 901 response MUST be treated as bogus. 903 Notice that determining the closest encloser and next closer name in 904 NSEC5 is easier than in NSEC3. NSEC5 and NSEC5PROOF RRs are always 905 present in pairs in responses and the original owner name of the 906 NSEC5 RR matches the owner name of the NSEC5PROOF RR. 908 11.2. Validating Referrals to Unsigned Subzones 910 The same considerations as defined in Section 8.9 of [RFC5155] for 911 NSEC3 apply to NSEC5. 913 11.3. Responses With Unknown NSEC5 Algorithms 915 A validator MUST ignore NSEC5KEY RRs with unknown NSEC5 algorithms. 916 The practical result of this is that zones signed with unknown 917 algorithms will be considered bogus. 919 12. Special Considerations 921 12.1. Transition Mechanism 923 [TODO: The following information will be covered.] 925 o Transition to NSEC5 from NSEC/NSEC3 927 o Transition from NSEC5 to NSEC/NSEC3 929 o Transition to new NSEC5 algorithms 931 12.2. Private NSEC5 keys 933 This document does not define a format to store private NSEC5 keys. 934 Use of a standardized and adopted format is RECOMMENDED. 936 The private NSEC5 key MAY be shared between multiple zones, however a 937 separate key is RECOMMENDED for each zone. 939 12.3. Domain Name Length Restrictions 941 NSEC5 creates additional restrictions on domain name lengths. In 942 particular, zones with names that, when converted into hashed owner 943 names, exceed the 255 octet length limit imposed by [RFC1035] cannot 944 use this specification. 946 The actual maximum length of a domain name depends on the length of 947 the zone name and the NSEC5 algorithm used. 949 All NSEC5 algorithms defined in this document use 256-bit NSEC5 hash 950 values. Such a value can be encoded in 52 characters in Base32hex 951 without padding. When constructing the NSEC5 RR owner name, the 952 encoded hash is prepended to the name of the zone as a single label 953 which includes the length field of a single octet. The maximum 954 length of the zone name in wire format using the 256-bit hash is 955 therefore 202 octets (255 - 53). 957 13. Implementation Status 959 NSEC5 has been implemented for the Knot DNS authoritative server 960 (version 1.6.4) and the Unbound recursive server (version 1.5.9). 961 The implementations did not introduce additional library 962 dependencies; all cryptographic primitives are already present in 963 OpenSSL v1.0.2j, which is used by both implementations. The 964 implementations support the full spectrum of negative responses, 965 (i.e., NXDOMAIN, NODATA, Wildcard, Wildcard NODATA, and unsigned 966 delegation) using the EC-P256-SHA256 algorithm. The code is 967 deliberately modular, so that the EC-ED25519-SHA256 algorithm could 968 be implemented by using the Ed25519 elliptic curve [RFC8080] as a 969 drop-in replacement for the P256 elliptic curve. The authoritative 970 server implements the optimization from Section 9.1.1 to precompute 971 the NSEC5PROOF RRs matching each NSEC5 record. 973 14. Performance Considerations 975 The performance of NSEC5 has been evaluated in [nsec5ecc]. 977 15. Security Considerations 979 15.1. Zone Enumeration Attacks 981 NSEC5 is robust to zone enumeration via offline dictionary attacks by 982 any attacker that does not know the private NSEC5 key. Without the 983 private NSEC5 key, that attacker cannot compute the NSEC5 proof that 984 corresponds to a given domain name. The only way it can learn the 985 NSEC5 proof value for a domain name is by querying the authoritative 986 server for that name. Without the NSEC5 proof value, the attacker 987 cannot learn the NSEC5 hash value. Thus, even an attacker that 988 collects the entire chain of NSEC5 RR for a zone cannot use offline 989 attacks to "reverse" that NSEC5 hash values in these NSEC5 RR and 990 thus learn which names are present in the zone. A formal 991 cryptographic proof of this property is in [nsec5] and [nsec5ecc]. 993 15.2. Compromise of the Private NSEC5 Key 995 NSEC5 requires authoritative servers to hold the private NSEC5 key, 996 but not the private zone-signing keys or the private key-signing keys 997 for the zone. 999 The private NSEC5 key cannot be used to modify zone contents, because 1000 zone contents are signed using the private zone-signing key. As 1001 such, a compromise of the private NSEC5 key does not compromise the 1002 integrity of the zone. An adversary that learns the private NSEC5 1003 key can, however, perform offline zone-enumeration attacks. For this 1004 reason, the private NSEC5 key need only be as secure as the DNSSEC 1005 records whose privacy (against zone enumeration) is being protected 1006 by NSEC5. A formal cryptographic proof of this property is in 1007 [nsec5] and [nsec5ecc]. 1009 To preserve this property of NSEC5, the private NSEC5 key MUST be 1010 different from the private zone-signing keys or key-signing keys for 1011 the zone. 1013 15.3. Key Length Considerations 1015 The NSEC5 key must be long enough to withstand attacks for as long as 1016 the privacy of the zone contents is important. Even if the NSEC5 key 1017 is rolled frequently, its length cannot be too short, because zone 1018 privacy may be important for a period of time longer than the 1019 lifetime of the key. For example, an attacker might collect the 1020 entire chain of NSEC5 RR for the zone over one short period, and 1021 then, later (even after the NSEC5 key expires) perform an offline 1022 dictionary attack that attempts to reverse the NSEC5 hash values 1023 present in the NSEC5 RRs. This is in contrast to zone-signing and 1024 key-signing keys used in DNSSEC; these keys, which ensure the 1025 authenticity and integrity of the zone contents, need to remain 1026 secure only during their lifetime. 1028 15.4. NSEC5 Hash Collisions 1030 If the NSEC5 hash of a QNAME collides with the NSEC5 hash of the 1031 owner name of an NSEC5 RR, it will be impossible to prove the non- 1032 existence of the colliding QNAME. However, the NSEC5 VRFs ensure 1033 that obtaining such a collision is as difficult as obtaining a 1034 collision in the SHA-256 hash function, requiring approximately 2^128 1035 effort. Note that DNSSEC already relies on the assumption that a 1036 cryptographic hash function is collision-resistant, since these hash 1037 functions are used for generating and validating signatures and DS 1038 RRs. See also the discussion on key lengths in [nsec5]. 1040 16. IANA Considerations 1042 This document updates the IANA registry "Domain Name System (DNS) 1043 Parameters" in subregistry "Resource Record (RR) TYPEs", by defining 1044 the following new RR types: 1046 NSEC5KEY value TBD. 1048 NSEC5 value TBD. 1050 NSEC5PROOF value TBD. 1052 This document creates a new IANA registry for NSEC5 algorithms. This 1053 registry is named "DNSSEC NSEC5 Algorithms". The initial content of 1054 the registry is: 1056 0 is Reserved. 1058 1 is EC-P256-SHA256. 1060 2 is EC-ED25519-SHA256. 1062 3-255 is Available for assignment. 1064 This document updates the IANA registry "DNS Security Algorithm 1065 Numbers" by defining following aliases: 1067 TBD is NSEC5-ECDSAP256SHA256 alias for ECDSAP256SHA256 (13). 1069 TBD is NSEC5-ED25519, alias for ED25519 (15). 1071 17. Contributors 1073 This document would not be possible without help of Moni Naor 1074 (Weizmann Institute), Sachin Vasant (Cisco Systems), Leonid Reyzin 1075 (Boston University), and Asaf Ziv (Weizmann Institute) who 1076 contributed to the design of NSEC5. Ondrej Sury (CZ.NIC Labs), and 1077 Duane Wessels (Verisign Labs) provided advice on the implementation 1078 of NSEC5, and assisted with evaluating its performance. 1080 18. References 1082 18.1. Normative References 1084 [FIPS-186-3] 1085 National Institute for Standards and Technology, "Digital 1086 Signature Standard (DSS)", FIPS PUB 186-3, June 2009. 1088 [I-D.goldbe-vrf] 1089 Goldberg, S., Papadopoulos, D., and J. Vcelak, "Verifiable 1090 Random Functions (VRFs)", draft-goldbe-vrf-01 (work in 1091 progress), June 2017. 1093 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1094 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1095 . 1097 [RFC1035] Mockapetris, P., "Domain names - implementation and 1098 specification", STD 13, RFC 1035, November 1987. 1100 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1101 Requirement Levels", BCP 14, RFC 2119, March 1997. 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", RFC 1118 4033, March 2005. 1120 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 1121 Rose, "Resource Records for the DNS Security Extensions", 1122 RFC 4034, March 2005. 1124 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 1125 Rose, "Protocol Modifications for the DNS Security 1126 Extensions", RFC 4035, March 2005. 1128 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 1129 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 1130 . 1132 [RFC5114] Lepinski, M. and S. Kent, "Additional Diffie-Hellman 1133 Groups for Use with IETF Standards", RFC 5114, DOI 1134 10.17487/RFC5114, January 2008, 1135 . 1137 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 1138 Security (DNSSEC) Hashed Authenticated Denial of 1139 Existence", RFC 5155, March 2008. 1141 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 1142 (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487 1143 /RFC6234, May 2011, 1144 . 1146 [RFC6605] Hoffman, P. and W. Wijngaards, "Elliptic Curve Digital 1147 Signature Algorithm (DSA) for DNSSEC", RFC 6605, April 1148 2012. 1150 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1151 for Security", RFC 7748, DOI 10.17487/RFC7748, January 1152 2016, . 1154 [RFC8080] Sury, O. and R. Edmonds, "Edwards-Curve Digital Security 1155 Algorithm (EdDSA) for DNSSEC", RFC 8080, DOI 10.17487/ 1156 RFC8080, February 2017, 1157 . 1159 18.2. Informative References 1161 [I-D.gieben-nsec4] 1162 Gieben, R. and M. Mekking, "DNS Security (DNSSEC) 1163 Authenticated Denial of Existence", draft-gieben-nsec4-01 1164 (work in progress), July 2012. 1166 [MRV99] Michali, S., Rabin, M., and S. Vadhan, "Verifiable Random 1167 Functions", in FOCS, 1999. 1169 [RFC6781] Kolkman, O., Mekking, W., and R. Gieben, "DNSSEC 1170 Operational Practices, Version 2", RFC 6781, DOI 10.17487/ 1171 RFC6781, December 2012, 1172 . 1174 [RFC7129] Gieben, R. and W. Mekking, "Authenticated Denial of 1175 Existence in the DNS", RFC 7129, DOI 10.17487/RFC7129, 1176 February 2014, . 1178 [RFC7719] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1179 Terminology", RFC 7719, DOI 10.17487/RFC7719, December 1180 2015, . 1182 [ldns-walk] 1183 NLNetLabs, "ldns", 2015, 1184 . 1186 [nmap-nsec-enum] 1187 Bond, J., "nmap: dns-nsec-enum", 2011, . 1190 [nmap-nsec3-enum] 1191 Nikolic, A. and J. Bond, "nmap: dns-nsec3-enum", 2011, 1192 . 1194 [nsec3gpu] 1195 Wander, M., Schwittmann, L., Boelmann, C., and T. Weis, 1196 "GPU-Based NSEC3 Hash Breaking", in IEEE Symp. Network 1197 Computing and Applications (NCA), 2014. 1199 [nsec3map] 1200 anonion0, "nsec3map with John the Ripper plugin", 2015, 1201 . 1203 [nsec3walker] 1204 Bernstein, D., "Nsec3 walker", 2011, 1205 . 1207 [nsec5] Goldberg, S., Naor, M., Papadopoulos, D., Reyzin, L., 1208 Vasant, S., and A. Ziv, "NSEC5: Provably Preventing DNSSEC 1209 Zone Enumeration", in NDSS'15, July 2014, . 1212 [nsec5ecc] 1213 Papadopoulos, D., Wessels, D., Huque, S., Vcelak, J., 1214 Naor, M., Reyzin, L., and S. Goldberg, "Can NSEC5 be 1215 Practical for DNSSEC Deployments?", in ePrint Cryptology 1216 Archive 2017/099, February 2017, . 1219 Appendix A. Examples 1221 We use small DNS zone to illustrate how denying responses are handled 1222 with NSEC5. For brevity, the class is not shown (defaults to IN) and 1223 the SOA record is shortened, resulting in the following zone file: 1225 example.org. SOA ( ... ) 1226 example.org. NS a.example.org 1228 a.example.org. A 192.0.2.1 1230 c.example.org. A 192.0.2.2 1231 c.example.org. TXT "c record" 1233 d.example.org. NS ns1.d.example.org 1234 ns1.d.example.org. A 192.0.2.4 1236 g.example.org. A 192.0.2.1 1237 g.example.org. TXT "g record" 1239 *.a.example.org. TXT "wildcard record" 1241 Notice the delegation to an unsigned zone d.example.org served by 1242 ns1.d.example.org. (Note: if the d.example.org zone was signed, then 1243 the example.org zone have a DS record for d.example.org.) 1245 Next we present example responses. All cryptographic values are 1246 shortened as indicated by "..." and ADDITIONAL sections have been 1247 removed. 1249 A.1. Name Error Example 1251 Consider a query for a type A record for a.b.c.example.org. 1253 The server must prove the following facts: 1255 o Existence of closest encloser c.example.org. 1257 o Non-existence of wildcard at closest encloser *.c.example.org. 1259 o Non-existence of next closer b.c.example.org. 1261 To do this, the server returns: 1263 ;; ->>HEADER<<- opcode: QUERY; status: NXDOMAIN; id: 5937 1265 ;; QUESTION SECTION: 1266 ;; a.b.c.example.org. IN A 1268 ;; AUTHORITY SECTION: 1269 example.org. 3600 IN SOA a.example.org. hostmaster.example.org. ( 1270 2010111214 21600 3600 604800 86400 ) 1272 example.org. 3600 IN RRSIG SOA 16 2 3600 ( 1273 20170412024301 20170313024301 5137 example.org. rT231b1rH... ) 1275 This is an NSEC5PROOF RR for c.example.com. It's RDATA is the NSEC5 1276 proof corresponding to c.example.com. (NSEC5 proofs are randomized 1277 values, because NSEC5 proof values are computed uses the EC-VRF from 1278 [I-D.goldbe-vrf].) Per Section 9.1.1, this NSEC5PROOF RR may be 1279 precomputed. 1281 c.example.org. 86400 IN NSEC5PROOF 48566 Amgn22zUiZ9JVyaT... 1283 This is a signed NSEC5 RR "matching" c.example.org, which proves the 1284 existence of closest encloser c.example.org. The NSEC5 RR has its 1285 owner name equal to the NSEC5 hash of c.example.org, which is O4K89V. 1286 (NSEC5 hash values are deterministic given the public NSEC5 key.) 1287 The NSEC5 RR also has its Wildcard flag cleared (see the "0" after 1288 the key ID 48566). This proves the non-existence of the wildcard at 1289 the closest encloser *.c.example.com. NSEC5 RRs are precomputed. 1291 o4k89v.example.org. 86400 IN NSEC5 48566 0 0O49PI A TXT RRSIG 1292 o4k89v.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1293 20170412024301 20170313024301 5137 example.org. zDNTSMQNlz... ) 1295 This is an NSEC5PROOF RR for b.c.example.org. It's RDATA is the 1296 NSEC5 proof corresponding to b.c.example.com. This NSEC5PROOF RR 1297 must be computed on-the-fly. 1299 b.c.example.org. 86400 IN NSEC5PROOF 48566 AuvvJqbUcEs8sCpY... 1301 This is a signed NSEC5 RR "covering" b.c.example.org, which proves 1302 the non-existence of the next closer name b.c.example.org The NSEC5 1303 hash of b.c.example.org, which is AO5OF, sorts in canonical order 1304 between the "covering" NSEC5 RR's Owner Name (which is 0O49PI) and 1305 Next Hashed Owner Name (which is BAPROH). 1307 0o49pi.example.org. 86400 IN NSEC5 48566 0 BAPROH ( 1308 NS SOA RRSIG DNSKEY NSEC5KEY ) 1310 0o49pi.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1311 20170412024301 20170313024301 5137 example.org. 4HT1uj1YlMzO) 1313 [TODO: Add discussion of CNAME and DNAME to the example?] 1315 A.2. No Data Example 1317 Consider a query for a type MX record for c.example.org. 1319 The server must prove the following facts: 1321 o Existence of c.example.org. for any type other than MX or CNAME 1323 To do this, the server returns: 1325 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 38781 1327 ;; QUESTION SECTION: 1328 ;; c.example.org. IN MX 1330 ;; AUTHORITY SECTION: 1331 example.org. 3600 IN SOA a.example.org. hostmaster.example.org. ( 1332 2010111214 21600 3600 604800 86400 ) 1334 example.org. 3600 IN RRSIG SOA 16 2 3600 20170412024301 20170313024301 5137 example.org. /rT231b1rH/p 1336 This is an NSEC5PROOF RR for c.example.com. Its RDATA corresponds to 1337 the NSEC5 proof for c.example.com. which is a randomized value. Per 1338 Section 9.1.1, this NSEC5PROOF RR may be precomputed. 1340 c.example.org. 86400 IN NSEC5PROOF 48566 Amgn22zUiZ9JVyaT 1342 This is a signed NSEC5 RR "matching" c.example.org. with CNAME and MX 1343 Type Bits cleared and its TXT Type Bit set. This NSEC5 RR has its 1344 owner name equal to the NSEC5 hash of c.example.org. This proves the 1345 existence of c.example.org. for a type other than MX and CNAME. 1346 NSEC5 RR are precomputed. 1348 o4k89v.example.org. 86400 IN NSEC5 48566 0 0O49PI A TXT RRSIG 1350 o4k89v.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1351 20170412024301 20170313024301 5137 example.org. zDNTSMQNlz/J) 1353 A.3. Delegation to an Unsigned Zone in an Opt-Out span Example 1355 Consider a query for a type A record for foo.d.example.org. 1357 Here, d.example.org is a delegation to an unsigned zone, which sits 1358 within an Opt-Out span. 1360 The server must prove the following facts: 1362 o Non-existence of signature on next closer name d.example.org. 1364 o Opt-out bit is set in NSEC5 record covering next closer name 1365 d.example.org. 1367 o Existence of closest provable encloser example.org 1369 To do this, the server returns: 1371 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 45866 1373 ;; QUESTION SECTION: 1374 ;; foo.d.example.org. IN A 1376 ;; AUTHORITY SECTION: 1377 d.example.org. 3600 IN NS ns1.d.example.org. 1379 This is an NSEC5PROOF RR for d.example.org. It's RDATA is the NSEC5 1380 proof corresponding to d.example.org. This NSEC5PROOF RR is computed 1381 on the fly. 1383 d.example.org. 86400 IN NSEC5PROOF 48566 A9FpmeH79q7g6VNW 1385 This is a signed NSEC5 RR "covering" d.example.org with its Opt-out 1386 bit set (see the "1" after the key ID 48566). The NSEC5 hash of 1387 d.example.org (which is BLE8LR) sorts in canonical order between the 1388 "covering" NSEC5 RR's Owner Name (BAPROH) and Next Hashed Owner Name 1389 (JQBMG4). This proves that no signed RR exists for d.example.org, 1390 but that the zone might contain a unsigned RR for a name whose NSEC5 1391 hash sorts in canonical order between BAPROH and JQBMG4. 1393 baproh.example.org. 86400 IN NSEC5 48566 1 JQBMG4 A TXT RRSIG 1395 baproh.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1396 20170412024301 20170313024301 5137 example.org. fjTcoRKgdML1) 1398 This is an NSEC5PROOF RR for example.com. It's RDATA is the NSEC5 1399 proof corresponding to example.com. Per Section 9.1.1, this 1400 NSEC5PROOF RR may be precomputed. 1402 example.org. 86400 IN NSEC5PROOF 48566 AjwsPCJZ8zH/D0Tr 1404 This is a signed NSEC5 RR "matching" example.org which proves the 1405 existence of a signed RRs for example.org. This NSEC5 RR has its 1406 owner name equal to the NSEC5 hash of example.org which is 0O49PI. 1407 NSEC5 RR are precomputed. 1409 0o49pi.example.org. 86400 IN NSEC5 48566 0 BAPROH ( 1410 NS SOA RRSIG DNSKEY NSEC5KEY) 1412 0o49pi.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1413 20170412034216 20170313034216 5137 example.org. 4HT1uj1YlMzO) 1415 A.4. Wildcard Example 1417 Consider a query for a type TXT record for foo.a.example.org. 1419 The server must prove the following facts: 1421 o Existence of the TXT record for the wildcard *.a.example.org 1423 o Non-existence of the next closer name foo.a.example.org. 1425 To do this, the server returns: 1427 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 53731 1429 ;; QUESTION SECTION: 1430 ;; foo.a.example.org. IN TXT 1432 This is a signed TXT record for the wildcard at a.example.org (number 1433 of labels is set to 3 in the RRSIG record). 1435 ;; ANSWER SECTION: 1436 foo.a.example.org. 3600 IN TXT "wildcard record" 1438 foo.a.example.org. 3600 IN RRSIG TXT 16 3 3600 ( 1439 20170412024301 20170313024301 5137 example.org. aeaLgZ8sk+98) 1441 ;; AUTHORITY SECTION: 1442 example.org. 3600 IN NS a.example.org. 1444 example.org. 3600 IN RRSIG NS 16 2 3600 ( 1445 20170412024301 20170313024301 5137 example.org. 8zuN0h2x5WyF) 1447 This is an NSEC5PROOF RR for foo.a.example.org. This NSEC5PROOF RR 1448 must be computed on-the-fly. 1450 foo.a.example.org. 86400 IN NSEC5PROOF 48566 AjqF5FGGVso40Lda 1452 This is a signed NSEC5 RR "covering" foo.a.example.org. The NSEC5 1453 hash of foo.a.example.org is FORDMO and sorts in canonical order 1454 between the NSEC5 RR's Owner Name (which is BAPROH) and Next Hashed 1455 Owner Name (which is JQBMG4). This proves the non-existence of the 1456 next closer name foo.a.example.com. NSEC5 RRs are precomputed. 1458 baproh.example.org. 86400 IN NSEC5 48566 1 JQBMG4 A TXT RRSIG 1459 baproh.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1460 20170412024301 20170313024301 5137 example.org. fjTcoRKgdML1 1462 A.5. Wildcard No Data Example 1464 Consider a query for a type MX record for foo.a.example.org. 1466 The server must prove the following facts: 1468 o Existence of wildcard at closest encloser *.a.example.org. for any 1469 type other than MX or CNAME. 1471 o Non-existence of the next closer name foo.a.example.org. 1473 To do this, the server returns: 1475 ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 17332 1477 ;; QUESTION SECTION: 1478 ;; foo.a.example.org. IN MX 1480 ;; AUTHORITY SECTION: 1481 example.org. 3600 IN SOA a.example.org. hostmaster.example.org. ( 1482 2010111214 21600 3600 604800 86400 ) 1484 example.org. 3600 IN RRSIG SOA 16 2 3600 ( 1485 20170412024301 20170313024301 5137 example.org. /rT231b1rH/p ) 1487 This is an NSEC5PROOF RR for *.a.example.com, with RDATA equal to the 1488 NSEC5 proof for *.a.example.com. Per Section 9.1.1, this NSEC5PROOF 1489 RR may be precomputed. 1491 *.a.example.org. 86400 IN NSEC5PROOF 48566 Aq38RWWPhbs/vtih 1493 This is a signed NSEC5 RR "matching" *.a.example.org with its CNAME 1494 and MX Type Bits cleared and its TXT Type Bit set. This NSEC5 RR has 1495 its owner name equal to the NSEC5 hash of *.a.example.org. NSEC5 RRs 1496 are precomputed. 1498 mpu6c4.example.org. 86400 IN NSEC5 48566 0 O4K89V TXT RRSIG 1500 mpu6c4.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1501 20170412024301 20170313024301 5137 example.org. m3I75ttcWwVC ) 1503 This is an NSEC5PROOF RR for foo.a.example.com. This NSEC5PROOF RR 1504 must be computed on-the-fly. 1506 foo.a.example.org. 86400 IN NSEC5PROOF 48566 AjqF5FGGVso40Lda 1508 This is a signed NSEC5 RR "covering" foo.a.example.org. The NSEC5 1509 hash of foo.a.example.org is FORDMO, and sorts in canonical order 1510 between this covering NSEC5 RR's Owner Name (which is BAPROH) and 1511 Next Hashed Owner Name (which is JQBMG4). This proves the existence 1512 of the wildcard at closest encloser *.a.example.org. for any type 1513 other than MX or CNAME. NSEC5 RRs are precomputed. 1515 baproh.example.org. 86400 IN NSEC5 48566 1 JQBMG4 A TXT RRSIG 1517 baproh.example.org. 86400 IN RRSIG NSEC5 16 3 86400 ( 1518 20170412024301 20170313024301 5137 example.org. fjTcoRKgdML1 ) 1520 Appendix B. Change Log 1522 Note to RFC Editor: if this document does not obsolete an existing 1523 RFC, please remove this appendix before publication as an RFC. 1525 pre 00 - initial version of the document submitted to mailing list 1526 only 1528 00 - fix NSEC5KEY rollover mechanism, clarify NSEC5PROOF RDATA, 1529 clarify inputs and outputs for NSEC5 proof and NSEC5 hash 1530 computation. 1532 01 - Add Performance Considerations section. 1534 02 - Add elliptic curve based VRF. Add measurement of response 1535 sizes based on empirical data. 1537 03 - Mention precomputed NSEC5PROOF Values in Performance 1538 Considerations section. 1540 04 - Edit Rationale, How NSEC5 Works, and Security Consideration 1541 sections for clarity. Edit Zone Signing section, adding 1542 precomputation of NSEC5PROOFs. Remove RSA-based NSEC5 1543 specification. Rewrite Performance Considerations and 1544 Implementation Status sections. 1546 05 - Remove appendix specifying VRFs and add reference to 1547 [I-D.goldbe-vrf]. Add Appendix A. 1549 Authors' Addresses 1551 Jan Vcelak 1552 CZ.NIC 1553 Milesovska 1136/5 1554 Praha 130 00 1555 CZ 1557 EMail: jan.vcelak@nic.cz 1559 Sharon Goldberg 1560 Boston University 1561 111 Cummington St, MCS135 1562 Boston, MA 02215 1563 USA 1565 EMail: goldbe@cs.bu.edu 1567 Dimitrios Papadopoulos 1568 University of Maryland 1569 8223 Paint Branch Dr 1570 College Park, MD 20740 1571 USA 1573 EMail: dipapado@umd.edu 1575 Shumon Huque 1576 Salesforce 1577 2550 Wasser Terr 1578 Herndon, VA 20171 1579 USA 1581 EMail: shuque@gmail.com 1583 David C Lawrence 1584 Akamai Technologies 1585 150 Broadway 1586 Boston, MA 02142-1054 1587 USA 1589 EMail: tale@akamai.com