idnits 2.17.1 draft-ietf-dnsop-nsec3-guidance-10.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5155]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC5155, updated by this document, for RFC5378 checks: 2005-01-27) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (25 May 2022) is 701 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Hardaker 3 Internet-Draft USC/ISI 4 Updates: 5155 (if approved) V. Dukhovni 5 Intended status: Best Current Practice Bloomberg, L.P. 6 Expires: 26 November 2022 25 May 2022 8 Guidance for NSEC3 parameter settings 9 draft-ietf-dnsop-nsec3-guidance-10 11 Abstract 13 NSEC3 is a DNSSEC mechanism providing proof of non-existence by 14 asserting that there are no names that exist between two domain names 15 within a zone. Unlike its counterpart NSEC, NSEC3 avoids directly 16 disclosing the bounding domain name pairs. This document provides 17 guidance on setting NSEC3 parameters based on recent operational 18 deployment experience. This document updates [RFC5155] with guidance 19 about selecting NSEC3 iteration and salt parameters. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on 26 November 2022. 38 Copyright Notice 40 Copyright (c) 2022 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 45 license-info) in effect on the date of publication of this document. 46 Please review these documents carefully, as they describe your rights 47 and restrictions with respect to this document. Code Components 48 extracted from this document must include Revised BSD License text as 49 described in Section 4.e of the Trust Legal Provisions and are 50 provided without warranty as described in the Revised BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.1. Requirements Notation . . . . . . . . . . . . . . . . . . 3 56 2. NSEC3 Parameter Value Discussions . . . . . . . . . . . . . . 3 57 2.1. Algorithms . . . . . . . . . . . . . . . . . . . . . . . 3 58 2.2. Flags . . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 2.3. Iterations . . . . . . . . . . . . . . . . . . . . . . . 4 60 2.4. Salt . . . . . . . . . . . . . . . . . . . . . . . . . . 5 61 3. Recommendations for Deploying and Validating NSEC3 Records . 6 62 3.1. Best-practice for Zone Publishers . . . . . . . . . . . . 6 63 3.2. Recommendation for Validating Resolvers . . . . . . . . . 7 64 3.3. Recommendation for Primary / Secondary Relationships . . 8 65 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 66 5. Operational Considerations . . . . . . . . . . . . . . . . . 8 67 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 68 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 69 7.1. Normative References . . . . . . . . . . . . . . . . . . 9 70 7.2. Informative References . . . . . . . . . . . . . . . . . 9 71 Appendix A. Deployment measurements at time of publication . . . 10 72 Appendix B. Computational burdens of processing NSEC3 73 iterations . . . . . . . . . . . . . . . . . . . . . . . 10 74 Appendix C. Acknowledgments . . . . . . . . . . . . . . . . . . 10 75 Appendix D. GitHub Version of This Document . . . . . . . . . . 11 76 Appendix E. Implementation Notes . . . . . . . . . . . . . . . . 11 77 E.1. OpenDNSSEC . . . . . . . . . . . . . . . . . . . . . . . 11 78 E.2. PowerDNS . . . . . . . . . . . . . . . . . . . . . . . . 11 79 E.3. Knot DNS and Knot Resolver . . . . . . . . . . . . . . . 11 80 E.4. Google Public DNS Resolver . . . . . . . . . . . . . . . 12 81 E.5. Google Cloud DNS . . . . . . . . . . . . . . . . . . . . 12 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 84 1. Introduction 86 As with NSEC [RFC4035], NSEC3 [RFC5155] provides proof of non- 87 existence that consists of signed DNS records establishing the non- 88 existence of a given name or associated Resource Record Type (RRTYPE) 89 in a DNSSEC [RFC4035] signed zone. In the case of NSEC3, however, 90 the names of valid nodes in the zone are obfuscated through (possibly 91 multiple iterations of) hashing (currently only SHA-1 is in use on 92 the Internet). 94 NSEC3 also provides "opt-out support", allowing for blocks of 95 unsigned delegations to be covered by a single NSEC3 record. Use of 96 the opt-out feature allows large registries to only sign as many 97 NSEC3 records as there are signed DS or other RRsets in the zone; 98 with opt-out, unsigned delegations don't require additional NSEC3 99 records. This sacrifices the tamper-resistance proof of non- 100 existence offered by NSEC3 in order to reduce memory and CPU 101 overheads. 103 NSEC3 records have a number of tunable parameters that are specified 104 via an NSEC3PARAM record at the zone apex. These parameters are the 105 hash algorithm, processing flags, the number of hash iterations and 106 the salt. Each of these has security and operational considerations 107 that impact both zone owners and validating resolvers. This document 108 provides some best-practice recommendations for setting the NSEC3 109 parameters. 111 1.1. Requirements Notation 113 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 114 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 115 "OPTIONAL" in this document are to be interpreted as described in BCP 116 14 [RFC2119] [RFC8174] when, and only when, they appear in all 117 capitals, as shown here. 119 2. NSEC3 Parameter Value Discussions 121 The following sections describes the background of the parameters for 122 the NSEC3 and NSEC3PARAM resource record types. 124 2.1. Algorithms 126 The algorithm field is not discussed by this document. Readers are 127 encouraged to read [RFC8624] for guidance about DNSSEC algorithm 128 usage. 130 2.2. Flags 132 The NSEC3PARAM flags field currently contains only reserved and 133 unassigned flags. Individual NSEC3 records, however, contain the 134 "Opt-Out" flag [RFC5155], which specifies whether that NSEC3 record 135 provides proof of non-existence. In general, NSEC3 with the Opt-Out 136 flag enabled should only be used in large, highly dynamic zones with 137 a small percentage of signed delegations. Operationally, this allows 138 for fewer signature creations when new delegations are inserted into 139 a zone. This is typically only necessary for extremely large 140 registration points providing zone updates faster than real-time 141 signing allows or when using memory-constrained hardware. Operators 142 considering the use of NSEC3 are advised to fully test their zones 143 deployment architectures and authoritative servers under both regular 144 operational loads to determine the tradeoffs using NSEC3 instead of 145 NSEC. Smaller zones, or large but relatively static zones, are 146 encouraged to not use a the opt-opt flag and to take advantage of 147 DNSSEC's proof-of-non-existence support. 149 2.3. Iterations 151 NSEC3 records are created by first hashing the input domain and then 152 repeating that hashing using the same algorithm a number of times 153 based on the iteration parameter in the NSEC3PARM and NSEC3 records. 154 The first hash with NSEC3 is typically sufficient to discourage zone 155 enumeration performed by "zone walking" an unhashed NSEC chain. 157 Note that [RFC5155] describes the Iterations field to be "The 158 Iterations field defines the number of additional times the hash 159 function has been performed." This means that an NSEC3 record with 160 an Iterations field of 0 actually requires one hash iteration. 162 Only determined parties with significant resources are likely to try 163 and uncover hashed values, regardless of the number of additional 164 iterations performed. If an adversary really wants to expend 165 significant CPU resources to mount an offline dictionary attack on a 166 zone's NSEC3 chain, they'll likely be able to find most of the 167 "guessable" names despite any level of additional hashing iterations. 169 Most names published in the DNS are rarely secret or unpredictable. 170 They are published to be memorable, used and consumed by humans. 171 They are often recorded in many other network logs such as email 172 logs, certificate transparency logs, web page links, intrusion 173 detection systems, malware scanners, email archives, etc. Many times 174 a simple dictionary of commonly used domain names prefixes (www, 175 mail, imap, login, database, etc.) can be used to quickly reveal a 176 large number of labels within a zone. Because of this, there are 177 increasing performance costs yet diminishing returns associated with 178 applying additional hash iterations beyond the first. 180 Although Section 10.3 of [RFC5155] specifies upper bounds for the 181 number of hash iterations to use, there is no published guidance for 182 zone owners about good values to select. Recent academic studies 183 have shown that NSEC3 hashing provides only moderate protection 184 [GPUNSEC3][ZONEENUM]. 186 2.4. Salt 188 NSEC3 records provide an additional salt value, which can be combined 189 with an FQDN to influence the resulting hash, but properties of this 190 extra salt are complicated. 192 In cryptography, salts generally add a layer of protection against 193 offline, stored dictionary attacks by combining the value to be 194 hashed with a unique "salt" value. This prevents adversaries from 195 building up and remembering a single dictionary of values that can 196 translate a hash output back to the value that it derived from. 198 In the case of DNS, the situation is different because the hashed 199 names placed in NSEC3 records are always implicitly "salted" by 200 hashing the fully-qualified domain name from each zone. Thus, no 201 single pre-computed table works to speed up dictionary attacks 202 against multiple target zones. An attacker is always required to 203 compute a complete dictionary per zone, which is expensive in both 204 storage and CPU time. 206 To understand the role of the additional NSEC3 salt field, we have to 207 consider how a typical zone walking attack works. Typically, the 208 attack has two phases - online and offline. In the online phase, an 209 attacker "walks the zone" by enumerating (almost) all hashes listed 210 in NSEC3 records and storing them for the offline phase. Then, in 211 the offline cracking phase, the attacker attempts to crack the 212 underlying hash. In this phase, the additional salt value raises the 213 cost of the attack only if the salt value changes during the online 214 phase of the attack. In other words, an additional, constant salt 215 value does not change the cost of the attack. 217 Changing a zone's salt value requires the construction of a complete 218 new NSEC3 chain. This is true both when re-signing the entire zone 219 at once, and when incrementally signing it in the background where 220 the new salt is only activated once every name in the chain has been 221 completed. As a result, re-salting is a very complex operation, with 222 significant CPU time, memory, and bandwidth consumption. This makes 223 very frequent re-salting impractical, and renders the additional salt 224 field functionally useless. 226 3. Recommendations for Deploying and Validating NSEC3 Records 228 The following subsections describe recommendations for the different 229 operating realms within the DNS. 231 3.1. Best-practice for Zone Publishers 233 First, if the operational or security features of NSEC3 are not 234 needed, then NSEC SHOULD be used in preference to NSEC3. NSEC3 235 requires greater computational power (see Appendix B) for both 236 authoritative servers and validating clients. Specifically, there is 237 a nontrivial complexity in finding matching NSEC3 records to randomly 238 generated prefixes within a DNS zone. NSEC mitigates this concern. 239 If NSEC3 must be used, then an iterations count of 0 MUST be used to 240 alleviate computational burdens. Note that extra iteration counts 241 other than 0 increase the impact of CPU-exhausting DoS attacks, and 242 also increase the risk of interoperability problems. 244 Note that deploying NSEC with minimally covering NSEC records 245 [RFC4470] also incurs a cost, and zone owners should measure the 246 computational difference in deploying either RFC4470 or NSEC3. 248 In short, for all zones, the recommended NSEC3 parameters are as 249 shown below: 251 ; SHA-1, no extra iterations, empty salt: 252 ; 253 bcp.example. IN NSEC3PARAM 1 0 0 - 255 For small zones, the use of opt-out based NSEC3 records is NOT 256 RECOMMENDED. 258 For very large and sparsely signed zones, where the majority of the 259 records are insecure delegations, opt-out MAY be used. 261 Operators SHOULD NOT use a salt by indicating a zero-length salt 262 value instead (represented as a "-" in the presentation format). 264 If salts are used, note that since the NSEC3PARAM RR is not used by 265 validating resolvers (see [RFC5155] section 4), the iterations and 266 salt parameters can be changed without the need to wait for RRsets to 267 expire from caches. A complete new NSEC3 chain needs to be 268 constructed and the full zone needs to be re-signed. 270 3.2. Recommendation for Validating Resolvers 272 Because there has been a large growth of open (public) DNSSEC 273 validating resolvers that are subject to compute resource constraints 274 when handling requests from anonymous clients, this document 275 recommends that validating resolvers change their behavior with 276 respect to large iteration values. Specifically, validating resolver 277 operators and validating resolver software implementers are 278 encouraged to continue evaluating NSEC3 iteration count deployments 279 but lower their default acceptable limits over time. Similarly, 280 because treating a high iterations count as insecure leaves zones 281 subject to attack, validating resolver operators and validating 282 resolver software implementers are further encouraged to lower their 283 default and acceptable limit for returning SERVFAIL when processing 284 NSEC3 parameters containing large iteration count values. See 285 Appendix A for measurements taken near the time of publication of 286 this document and potential starting points. 288 Validating resolvers MAY return an insecure response to their clients 289 when processing NSEC3 records with iterations larger than 0. Note 290 also that a validating resolver returning an insecure response MUST 291 still validate the signature over the NSEC3 record to ensure the 292 iteration count was not altered since record publication (see 293 [RFC5155] section 10.3). 295 Validating resolvers MAY also return a SERVFAIL response when 296 processing NSEC3 records with iterations larger than 0. Validating 297 resolvers MAY choose to ignore authoritative server responses with 298 iteration counts greater than 0, which will likely result in 299 returning a SERVFAIL to the client when no acceptable responses are 300 received from authoritative servers. 302 Validating resolvers returning an insecure or SERVFAIL answer to 303 their client after receiving and validating an unsupported NSEC3 304 parameter from the authoritative server(s) SHOULD return an Extended 305 DNS Error (EDE) [RFC8914] EDNS0 option of value (RFC EDITOR: TBD). 306 Validating resolvers that choose to ignore a response with an 307 unsupported iteration count (and do not validate the signature) MUST 308 NOT return this EDE option. 310 Note that this specification updates [RFC5155] by significantly 311 decreasing the requirements originally specified in Section 10.3 of 312 [RFC5155]. See the Security Considerations for arguments on how to 313 handle responses with non-zero iteration count. 315 3.3. Recommendation for Primary / Secondary Relationships 317 Primary and secondary authoritative servers for a zone that are not 318 being run by the same operational staff and/or using the same 319 software and configuration must take into account the potential 320 differences in NSEC3 iteration support. 322 Operators of secondary services should advertise the parameter limits 323 that their servers support. Correspondingly, operators of primary 324 servers need to ensure that their secondaries support the NSEC3 325 parameters they expect to use in their zones. To ensure reliability, 326 after primaries change their iteration counts, they should query 327 their secondaries with known non-existent labels to verify the 328 secondary servers are responding as expected. 330 4. Security Considerations 332 This entire document discusses security considerations with various 333 parameters selections of NSEC3 and NSEC3PARAM fields. 335 The point where a validating resolver returns insecure vs the point 336 where it returns SERVFAIL must be considered carefully. 337 Specifically, when a validating resolver treats a zone as insecure 338 above a particular value (say 100) and returns SERVFAIL above a 339 higher point (say 500), it leaves the zone subject to attacker-in- 340 the-middle attacks as if it was unsigned between these values. Thus, 341 validating resolver operators and software implementers SHOULD set 342 the point above which a zone is treated as insecure for certain 343 values of NSEC3 iterations counts to the same as the point where a 344 validating resolver begins returning SERVFAIL. 346 5. Operational Considerations 348 This entire document discusses operational considerations with 349 various parameters selections of NSEC3 and NSEC3PARAM fields. 351 6. IANA Considerations 353 This document requests a new allocation in the First Come First 354 Served range of the "Extended DNS Error Codes" of the "Domain Name 355 System (DNS) Parameters" registration table with the following 356 characteristics: 358 * INFO-CODE: (RFC EDITOR: TBD) 360 * Purpose: Unsupported NSEC3 iterations value 362 * Reference: (RFC EDITOR: this document) 364 7. References 366 7.1. Normative References 368 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 369 Requirement Levels", BCP 14, RFC 2119, 370 DOI 10.17487/RFC2119, March 1997, 371 . 373 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 374 Rose, "Protocol Modifications for the DNS Security 375 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 376 . 378 [RFC4470] Weiler, S. and J. Ihren, "Minimally Covering NSEC Records 379 and DNSSEC On-line Signing", RFC 4470, 380 DOI 10.17487/RFC4470, April 2006, 381 . 383 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS 384 Security (DNSSEC) Hashed Authenticated Denial of 385 Existence", RFC 5155, DOI 10.17487/RFC5155, March 2008, 386 . 388 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 389 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 390 May 2017, . 392 [RFC8914] Kumari, W., Hunt, E., Arends, R., Hardaker, W., and D. 393 Lawrence, "Extended DNS Errors", RFC 8914, 394 DOI 10.17487/RFC8914, October 2020, 395 . 397 7.2. Informative References 399 [GPUNSEC3] Wander, M., Schwittmann, L., Boelmann, C., and T. Weis, 400 "GPU-Based NSEC3 Hash Breaking", DOI 10.1109/NCA.2014.27, 401 2014, . 403 [RFC8624] Wouters, P. and O. Sury, "Algorithm Implementation 404 Requirements and Usage Guidance for DNSSEC", RFC 8624, 405 DOI 10.17487/RFC8624, June 2019, 406 . 408 [ZONEENUM] Wang, Z., Xiao, L., and R. Wang, "An efficient DNSSEC zone 409 enumeration algorithm", n.d.. 411 Appendix A. Deployment measurements at time of publication 413 At the time of publication, setting an upper limit of 100 iterations 414 for treating a zone as insecure is interoperable without significant 415 problems, but at the same time still enables CPU-exhausting DoS 416 attacks. 418 At the time of publication, returning SERVFAIL beyond 500 iterations 419 appears to be interoperable without significant problems. 421 Appendix B. Computational burdens of processing NSEC3 iterations 423 The queries per second (QPS) of authoritative servers will decrease 424 due to computational overhead when processing DNS requests for zones 425 containing higher NSEC3 iteration counts. The table below shows the 426 drop in QPS for various iteration counts. 428 | Iterations | QPS [% of 0 iterations QPS] | 429 |------------+-----------------------------| 430 | 0 | 100 % | 431 | 10 | 89 % | 432 | 20 | 82 % | 433 | 50 | 64 % | 434 | 100 | 47 % | 435 | 150 | 38 % | 437 Appendix C. Acknowledgments 439 The authors would like to thank the dns-operations discussion 440 participants, which took place on mattermost hosted by DNS-OARC. 442 Additionally, the following people contributed text or review 443 comments to the draft: 445 * Vladimir Cunat 447 * Tony Finch 449 * Paul Hoffman 450 * Warren Kumari 452 * Alexander Mayrhofer 454 * Matthijs Mekking 456 * Florian Obser 458 * Petr Spacek 460 * Paul Vixie 462 * Tim Wicinski 464 Appendix D. GitHub Version of This Document 466 (RFCEditor: remove this section) 468 While this document is under development, it can be viewed, tracked, 469 issued, pushed with PRs, ... here: 471 https://github.com/hardaker/draft-hardaker-dnsop-nsec3-guidance 473 Appendix E. Implementation Notes 475 (RFCEditor: remove this section) 477 The following implementations have implemented the guidance in this 478 document. They have graciously provided notes about the details of 479 their implementation below. 481 E.1. OpenDNSSEC 483 The OpenDNSSEC configuration checking utility will alert the user 484 about nsec3 iteration values larger than 100. 486 E.2. PowerDNS 488 PowerDNS 4.5.2 changed the default value of nsec3-max-iterations to 489 150. 491 E.3. Knot DNS and Knot Resolver 493 Knot DNS 3.0.6 warns when signing with more than 20 NSEC3 iterations. 494 Knot Resolver 5.3.1 treats NSEC3 iterations above 150 as insecure. 496 E.4. Google Public DNS Resolver 498 Google Public DNS treats NSEC3 iterations above 100 as insecure since 499 September 2021. 501 E.5. Google Cloud DNS 503 Google Cloud DNS uses 1 iteration and 64-bits of fixed random salt 504 for all zones using NSEC3. These parameters cannot be adjusted by 505 users. 507 Authors' Addresses 509 Wes Hardaker 510 USC/ISI 511 Email: ietf@hardakers.net 513 Viktor Dukhovni 514 Bloomberg, L.P. 515 Email: ietf-dane@dukhovni.org