idnits 2.17.1 draft-ietf-dnsop-dns-zone-digest-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 14 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 9, 2020) is 1508 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) ** Downref: Normative reference to an Informational RFC: RFC 6234 -- Obsolete informational reference (is this intentional?): RFC 2065 (Obsoleted by RFC 2535) -- Obsolete informational reference (is this intentional?): RFC 2535 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) -- Obsolete informational reference (is this intentional?): RFC 2845 (Obsoleted by RFC 8945) -- Obsolete informational reference (is this intentional?): RFC 5751 (Obsoleted by RFC 8551) -- Obsolete informational reference (is this intentional?): RFC 7706 (Obsoleted by RFC 8806) -- Obsolete informational reference (is this intentional?): RFC 8499 (Obsoleted by RFC 9499) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force D. Wessels 3 Internet-Draft P. Barber 4 Intended status: Standards Track M. Weinberg 5 Expires: September 10, 2020 Verisign 6 W. Kumari 7 Google 8 W. Hardaker 9 USC/ISI 10 March 9, 2020 12 Message Digest for DNS Zones 13 draft-ietf-dnsop-dns-zone-digest-05 15 Abstract 17 This document describes a protocol and new DNS Resource Record that 18 can be used to provide a cryptographic message digest over DNS zone 19 data. The ZONEMD Resource Record conveys the digest data in the zone 20 itself. When a zone publisher includes an ZONEMD record, recipients 21 can verify the zone contents for accuracy and completeness. This 22 provides assurance that received zone data matches published data, 23 regardless of how the zone data has been transmitted and received. 25 ZONEMD is not designed to replace DNSSEC. Whereas DNSSEC protects 26 individual RRSets (DNS data with fine granularity), ZONEMD protects a 27 zone's data as a whole, whether consumed by authoritative name 28 servers, recursive name servers, or any other applications. 30 As specified at this time, ZONEMD is not designed for use in large, 31 dynamic zones due to the time and resources required for digest 32 calculation. The ZONEMD record described in this document is 33 designed so that new digest schemes may be developed in the future to 34 support large, dynamic zones. 36 Status of This Memo 38 This Internet-Draft is submitted in full conformance with the 39 provisions of BCP 78 and BCP 79. 41 Internet-Drafts are working documents of the Internet Engineering 42 Task Force (IETF). Note that other groups may also distribute 43 working documents as Internet-Drafts. The list of current Internet- 44 Drafts is at https://datatracker.ietf.org/drafts/current/. 46 Internet-Drafts are draft documents valid for a maximum of six months 47 and may be updated, replaced, or obsoleted by other documents at any 48 time. It is inappropriate to use Internet-Drafts as reference 49 material or to cite them other than as "work in progress." 51 This Internet-Draft will expire on September 10, 2020. 53 Copyright Notice 55 Copyright (c) 2020 IETF Trust and the persons identified as the 56 document authors. All rights reserved. 58 This document is subject to BCP 78 and the IETF Trust's Legal 59 Provisions Relating to IETF Documents 60 (https://trustee.ietf.org/license-info) in effect on the date of 61 publication of this document. Please review these documents 62 carefully, as they describe your rights and restrictions with respect 63 to this document. Code Components extracted from this document must 64 include Simplified BSD License text as described in Section 4.e of 65 the Trust Legal Provisions and are provided without warranty as 66 described in the Simplified BSD License. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 71 1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 4 72 1.2. Design Overview . . . . . . . . . . . . . . . . . . . . . 6 73 1.3. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . 6 74 1.3.1. Root Zone . . . . . . . . . . . . . . . . . . . . . . 6 75 1.3.2. Providers, Secondaries, and Anycast . . . . . . . . . 6 76 1.3.3. Response Policy Zones . . . . . . . . . . . . . . . . 7 77 1.3.4. Centralized Zone Data Service . . . . . . . . . . . . 7 78 1.3.5. General Purpose Comparison Check . . . . . . . . . . 7 79 1.4. Requirements Language . . . . . . . . . . . . . . . . . . 7 80 2. The ZONEMD Resource Record . . . . . . . . . . . . . . . . . 7 81 2.1. Non-apex ZONEMD Records . . . . . . . . . . . . . . . . . 8 82 2.2. ZONEMD RDATA Wire Format . . . . . . . . . . . . . . . . 8 83 2.2.1. The Serial Field . . . . . . . . . . . . . . . . . . 8 84 2.2.2. The Scheme Field . . . . . . . . . . . . . . . . . . 9 85 2.2.3. The Hash Algorithm Field . . . . . . . . . . . . . . 9 86 2.2.4. The Digest Field . . . . . . . . . . . . . . . . . . 9 87 2.3. ZONEMD Presentation Format . . . . . . . . . . . . . . . 9 88 2.4. ZONEMD Example . . . . . . . . . . . . . . . . . . . . . 10 89 3. Calculating the Digest . . . . . . . . . . . . . . . . . . . 10 90 3.1. Add ZONEMD Placeholder . . . . . . . . . . . . . . . . . 10 91 3.2. Optionally Sign the Zone . . . . . . . . . . . . . . . . 10 92 3.3. Canonical Format and Ordering . . . . . . . . . . . . . . 10 93 3.3.1. Order of RRSets Having the Same Owner Name . . . . . 11 94 3.4. Inclusion/Exclusion Rules . . . . . . . . . . . . . . . . 11 95 3.5. Scheme-Specific Processing . . . . . . . . . . . . . . . 11 96 3.5.1. The SIMPLE Scheme . . . . . . . . . . . . . . . . . . 12 97 3.6. Update ZONEMD RR . . . . . . . . . . . . . . . . . . . . 12 98 4. Verifying Zone Digest . . . . . . . . . . . . . . . . . . . . 12 99 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 100 5.1. ZONEMD RRtype . . . . . . . . . . . . . . . . . . . . . . 14 101 5.2. ZONEMD Scheme . . . . . . . . . . . . . . . . . . . . . . 14 102 5.3. ZONEMD Hash Algorithm . . . . . . . . . . . . . . . . . . 14 103 6. Security Considerations . . . . . . . . . . . . . . . . . . . 15 104 6.1. Attacks Against the Zone Digest . . . . . . . . . . . . . 15 105 6.2. Attacks Utilizing ZONEMD Queries . . . . . . . . . . . . 15 106 6.3. Resilience and Fragility . . . . . . . . . . . . . . . . 16 107 7. Performance Considerations . . . . . . . . . . . . . . . . . 16 108 7.1. SIMPLE SHA384 . . . . . . . . . . . . . . . . . . . . . . 16 109 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 17 110 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 111 10. Implementation Status . . . . . . . . . . . . . . . . . . . . 17 112 10.1. Authors' Implementation . . . . . . . . . . . . . . . . 17 113 10.2. Shane Kerr's Implementation . . . . . . . . . . . . . . 18 114 11. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 18 115 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 116 12.1. Normative References . . . . . . . . . . . . . . . . . . 23 117 12.2. Informative References . . . . . . . . . . . . . . . . . 23 118 Appendix A. Example Zones With Digests . . . . . . . . . . . . . 25 119 A.1. Simple EXAMPLE Zone . . . . . . . . . . . . . . . . . . . 26 120 A.2. Complex EXAMPLE Zone . . . . . . . . . . . . . . . . . . 26 121 A.3. EXAMPLE Zone with multiple digests . . . . . . . . . . . 27 122 A.4. The URI.ARPA Zone . . . . . . . . . . . . . . . . . . . . 28 123 A.5. The ROOT-SERVERS.NET Zone . . . . . . . . . . . . . . . . 31 124 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 126 1. Introduction 128 In the DNS, a zone is the collection of authoritative resource 129 records (RRs) sharing a common origin ([RFC8499]). Zones are often 130 stored as files on disk in the so-called master file format 131 [RFC1034]. Zones are generally distributed among name servers using 132 the AXFR [RFC5936], and IXFR [RFC1995] protocols. Zone files can 133 also be distributed outside of the DNS, with such protocols as FTP, 134 HTTP, rsync, and even via email. Currently there is no standard way 135 to verify the authenticity of a stand-alone zone. 137 This document introduces a new RR type that serves as a cryptographic 138 message digest of the data in a zone. It allows a receiver of the 139 zone to verify the zone's authenticity, especially when used in 140 combination with DNSSEC. This technique makes the digest a part of 141 the zone itself, allowing verification the zone as a whole, no matter 142 how it is transmitted. Furthermore, the digest is based on the wire 143 format of zone data. Thus, it is independent of presentation format, 144 such as changes in whitespace, capitalization, and comments. 146 DNSSEC provides three strong security guarantees relevant to this 147 protocol: 149 1. whether or not to expect DNSSEC records in the zone, 151 2. whether or not to expect a ZONEMD record in a signed zone, and 153 3. whether or not the ZONEMD record has been altered since it was 154 signed. 156 This specification is OPTIONAL to implement by both publishers and 157 consumers of zone data. 159 1.1. Motivation 161 The motivation for this protocol enhancement is the desire for the 162 ability to verify the authenticity of a stand-alone zone, regardless 163 of how it is transmitted. A consumer of zone data should be able to 164 verify that the data is as-published by the zone operator. 166 One approach to preventing data tampering and corruption is to secure 167 the distribution channel. The DNS has a number of features that can 168 already be used for channel security. Perhaps the most widely used 169 is DNS transaction signatures (TSIG [RFC2845]). TSIG uses shared 170 secret keys and a message digest to protect individual query and 171 response messages. It is generally used to authenticate and validate 172 UPDATE [RFC2136], AXFR [RFC5936], and IXFR [RFC1995] messages. 174 DNS Request and Transaction Signatures (SIG(0) [RFC2931]) is another 175 protocol extension designed to authenticate individual DNS 176 transactions. Whereas SIG records were originally designed to cover 177 specific RR types, SIG(0) is used to sign an entire DNS message. 178 Unlike TSIG, SIG(0) uses public key cryptography rather than shared 179 secrets. 181 The Transport Layer Security protocol suite is also designed to 182 provide channel security. One can easily imagine the distribution of 183 zones over HTTPS-enabled web servers, as well as DNS-over-HTTPS 184 [dns-over-https], and perhaps even a future version of DNS-over-TLS 185 ([RFC7858]). 187 Unfortunately, the protections provided by these channel security 188 techniques are (in practice) ephemeral and are not retained after the 189 data transfer is complete. They can ensure that the client receives 190 the data from the expected server, and that the data sent by the 191 server is not modified during transmission. However, they do not 192 guarantee that the server transmits the data as originally published, 193 and do not provide any methods to verify data that is read after 194 transmission is complete. For example, a name server loading saved 195 zone data upon restart cannot guarantee that the on-disk data has not 196 been modified. For these reasons, it is preferable to secure the 197 data itself. 199 Why not simply rely on DNSSEC, which provides certain data security 200 guarantees? Certainly for zones that are signed, a recipient could 201 validate all of the signed RRSets. Additionally, denial-of-existence 202 records can prove that RRSets have not been added or removed. 203 However, not all RRSets in a zone are signed. The design of DNSSEC 204 stipulates that delegations (non-apex NS records) are not signed, and 205 neither are any glue records. ZONEMD protects the integrity of 206 delegation, glue, and other records that are not otherwise covered by 207 DNSSEC. Furthermore, zones that employ NSEC3 with opt-out are 208 susceptible to the removal or addition of names between the signed 209 nodes. Whereas DNSSEC is primarily designed to protect consumers of 210 DNS response messages, this protocol is designed to protect consumers 211 of zones. 213 There are existing tools and protocols that provide data security, 214 such as OpenPGP [RFC4880] and S/MIME [RFC5751]. In fact, the 215 internic.net site publishes PGP signatures along side the root zone 216 and other files available there. However, this is a detached 217 signature with no strong association to the corresponding zone file 218 other than its timestamp. Non-detached signatures are, of course, 219 possible, but these necessarily change the format of the file being 220 distributed. That is, a zone signed with OpenPGP or S/MIME no longer 221 looks like a DNS zone and could not directly be loaded into a name 222 server. Once loaded the signature data is lost, so it does not 223 survive further propagation. 225 It seems the desire for data security in DNS zones was envisioned as 226 far back as 1997. [RFC2065] is an obsoleted specification of the 227 first generation DNSSEC Security Extensions. It describes a zone 228 transfer signature, aka AXFR SIG, which is similar to the technique 229 proposed by this document. That is, it proposes ordering all 230 (signed) RRSets in a zone, hashing their contents, and then signing 231 the zone hash. The AXFR SIG is described only for use during zone 232 transfers. It did not postulate the need to validate zone data 233 distributed outside of the DNS. Furthermore, its successor, 234 [RFC2535], omits the AXFR SIG, while at the same time introducing an 235 IXFR SIG. 237 1.2. Design Overview 239 This document introduces a new Resource Record type designed to 240 convey a message digest of the content of a zone. The digest is 241 calculated at the time of zone publication. Ideally the zone is 242 signed with DNSSEC to guarantee that any modifications of the digest 243 can be detected. The procedures for digest calculation and DNSSEC 244 signing are similar. Both require data to be processed in a well- 245 defined order and format. In some cases it may be possible to 246 perform DNSSEC signing and digest calculation in parallel. 248 The zone digest is designed to be used on zones that are relatively 249 stable and have infrequent updates. As currently specified, the 250 digest is re-calculated over the entire zone content each time. This 251 specification does not provide an efficient mechanism for incremental 252 updates of zone data. It is, however, extensible so that future 253 schemes to support incremental zone digest algorithms (e.g. using 254 Merkle trees) can be accommodated. 256 It is expected that verification of a zone digest would be 257 implemented in name server software. That is, a name server can 258 verify the zone data it was given and refuse to serve a zone which 259 fails verification. For signed zones, the name server needs a trust 260 anchor to perform DNSSEC validation. For signed non-root zones, the 261 name server may need to send queries to validate a chain-of-trust. 262 Digest verification could also be performed externally. 264 1.3. Use Cases 266 1.3.1. Root Zone 268 The root zone [InterNIC] is one of the most widely distributed DNS 269 zone on the Internet, served by more than 1000 separate instances 270 [RootServers] at the time of this writing. Additionally, many 271 organizations configure their own name servers to serve the root zone 272 locally. Reasons for doing so include privacy and reduced access 273 time. [RFC7706] describes one, but not the only, way to do this. As 274 the root zone spreads beyond its traditional deployment boundaries, 275 the need for verification of the completeness of the zone contents 276 becomes increasingly important. 278 1.3.2. Providers, Secondaries, and Anycast 280 Since its very early days, the developers of the DNS recognized the 281 importance of secondary name servers and service diversity. However, 282 they may not have anticipated the complexity of modern DNS service 283 provisioning which can include multiple third-party providers and 284 hundreds of anycast instances. Instead of a simple primary-to- 285 secondary zone distribution system, today it is possible to have 286 multiple levels, multiple parties, and multiple protocols involved in 287 the distribution of zone data. This complexity introduces new places 288 for problems to arise. The zone digest protects the integrity of 289 data that flows through such systems. 291 1.3.3. Response Policy Zones 293 DNS Response Policy Zones is "a method of expressing DNS response 294 policy information inside specially constructed DNS zones..." [RPZ]. 295 A number of companies provide RPZ feeds, which can be consumed by 296 name server and firewall products. Since these are zones, AXFR is 297 often, but not necessarily used for transmission. While RPZ zones 298 can certainly be signed with DNSSEC, the data is not queried 299 directly, and would not be subject to DNSSEC validation. 301 1.3.4. Centralized Zone Data Service 303 ICANN operates the Centralized Zone Data Service [CZDS], which is a 304 repository of top-level domain zone files. Users request access to 305 the system, and to individual zones, and are then able to download 306 zone data for certain uses. Adding a zone digest to these would 307 provide CZDS users with assurances that the data has not been 308 modified. Note that ZONEMD could be added to CZDS zone data 309 independently of the zone served by production name servers. 311 1.3.5. General Purpose Comparison Check 313 Since the zone digest calculation does not depend on presentation 314 format, it could be used to compare multiple copies of a zone 315 received from different sources, or copies generated by different 316 processes. 318 1.4. Requirements Language 320 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 321 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 322 "OPTIONAL" in this document are to be interpreted as described in BCP 323 14 [RFC2119] [RFC8174] when, and only when, they appear in all 324 capitals, as shown here. 326 2. The ZONEMD Resource Record 328 This section describes the ZONEMD Resource Record, including its 329 fields, wire format, and presentation format. The Type value for the 330 ZONEMD RR is 63. The ZONEMD RR is class independent. The RDATA of 331 the resource record consists of four fields: Serial, Scheme, Hash 332 Algorithm, and Digest. 334 A zone MAY contain multiple ZONEMD RRs to support algorithm agility 335 [RFC7696] and rollovers. Each ZONEMD RR must specify a unique Scheme 336 and Hash Algorithm tuple. It is recommended that a zone include only 337 one ZONEMD RR, unless the zone publisher is in the process of 338 transitioning to a new Scheme or Hash Algorithm. 340 2.1. Non-apex ZONEMD Records 342 This specification utilizes ZONEMD RRs located at the zone apex. 343 Non-apex ZONEMD RRs are not forbidden, but have no meaning in this 344 specification. Non-apex ZONEMD RRs MUST NOT be used for 345 verification. 347 During digest calculation, non-apex ZONEMD RRs are treated like any 348 other RRs. They are digested as-is and the RR is not replaced by a 349 placeholder RR. 351 Unless explicitly stated otherwise, "ZONEMD" always refers to apex 352 records throughout this document. 354 2.2. ZONEMD RDATA Wire Format 356 The ZONEMD RDATA wire format is encoded as follows: 358 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 359 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 360 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 361 | Serial | 362 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 363 | Scheme |Hash Algorithm | | 364 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 365 | Digest | 366 / / 367 / / 368 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 370 2.2.1. The Serial Field 372 The Serial field is a 32-bit unsigned integer in network order. It 373 is equal to the serial number from the zone's SOA record ([RFC1035] 374 section 3.3.13) for which the zone digest was generated. 376 The zone's serial number is included here in order to make DNS 377 response messages of type ZONEMD meaningful. Without the serial 378 number, a stand-alone ZONEMD digest has no association to any 379 particular instance of a zone. 381 2.2.2. The Scheme Field 383 The Scheme field is an 8-bit unsigned integer that identifies the 384 methods by which data is collated and presented as input to the 385 hashing function. 387 At the time of this writing, SIMPLE, with value 1, is the only 388 standardized Scheme defined for ZONEMD records. The Scheme registry 389 is further described in Section 5. 391 Scheme values 240-254 are allocated for Private Use as described in 392 [RFC8126]. 394 2.2.3. The Hash Algorithm Field 396 The Hash Algorithm field is an 8-bit unsigned integer that identifies 397 the cryptographic hash algorithm used to construct the digest. 399 At the time of this writing, SHA384, with value 1, is the only 400 standardized Hash Algorithm defined for ZONEMD records. The Hash 401 Algorithm registry is further described in Section 5. 403 Hash Algorithm values 240-254 are allocated for Private Use as 404 described in [RFC8126]. 406 2.2.4. The Digest Field 408 The Digest field is a variable-length sequence of octets containing 409 the output of the hash algorithm. The Digest field must not be 410 empty. Section 3 describes how to calculate the digest for a zone. 411 Section 4 describes how to use the digest to verify the contents of a 412 zone. 414 2.3. ZONEMD Presentation Format 416 The presentation format of the RDATA portion is as follows: 418 The Serial field is represented as an unsigned decimal integer. 420 The Scheme field is represented as an unsigned decimal integer. 422 The Hash Algorithm field is represented as an unsigned decimal 423 integer. 425 The Digest is represented as a sequence of case-insensitive 426 hexadecimal digits. Whitespace is allowed within the hexadecimal 427 text. 429 2.4. ZONEMD Example 431 The following example shows a ZONEMD RR. 433 example.com. 86400 IN ZONEMD 2018031500 1 1 ( 434 FEBE3D4CE2EC2FFA4BA99D46CD69D6D29711E55217057BEE 435 7EB1A7B641A47BA7FED2DD5B97AE499FAFA4F22C6BD647DE ) 437 3. Calculating the Digest 439 3.1. Add ZONEMD Placeholder 441 In preparation for calculating the zone digest, any existing ZONEMD 442 records (and covering RRSIGs) at the zone apex are first deleted. 444 Prior to calculation of the digest, and prior to signing with DNSSEC, 445 one or more placeholder ZONEMD records are added to the zone apex. 446 This serves two purposes: (1) it allows the digest to cover the 447 Serial, Scheme, and Hash Algorithm fields, and (2) ensures that 448 appropriate denial-of-existence (NSEC, NSEC3) records are created if 449 the zone is signed with DNSSEC. When multiple ZONEMD RRs are 450 published in the zone, e.g., during an algorithm rollover, each must 451 specify a unique Scheme and Hash Algorithm tuple. 453 It is recommended that the TTL of the ZONEMD record match the TTL of 454 the SOA. 456 In the placeholder record, the Serial field is set to the current SOA 457 Serial. The Scheme field is set to the value for the chosen 458 collation scheme. The Hash Algorithm field is set to the value for 459 the chosen hash algorithm. The Digest field is set to all zeroes and 460 of length appropriate for the chosen hash algorithm. 462 3.2. Optionally Sign the Zone 464 Following addition of placeholder records, the zone may be signed 465 with DNSSEC. Note that when the digest calculation is complete, and 466 the ZONEMD record is updated, the signature(s) for the ZONEMD RRSet 467 MUST be recalculated and updated as well. Therefore, the signer is 468 not required to calculate a signature over the placeholder record at 469 this step in the process, but it is harmless to do so. 471 3.3. Canonical Format and Ordering 473 Calculation of a zone digest REQUIRES RRs to be processed in a 474 consistent format and ordering. Correct ordering depends on (1) 475 ordering of owner names, (2) ordering of RRSets with the same owner 476 name, and (3) ordering of RRs within an RRSet. 478 This specification adopts DNSSEC's canonical ordering for names 479 (Section 6.1 of [RFC4034]), and canonical ordering for RRs within an 480 RRSet (Section 6.3 of [RFC4034]). It also adopts DNSSEC's canonical 481 RR form (Section 6.2 of [RFC4034]). However, since DNSSEC does not 482 define a canonical ordering for RRSets having the same owner name, 483 that ordering is defined here. 485 This specification adopts DNSSEC's canonical on-the-wire RR format 486 (without name compression) as specified in [RFC4034]: 488 RR(i) = owner | type | class | TTL | RDATA length | RDATA 490 where "|" denotes concatenation. 492 3.3.1. Order of RRSets Having the Same Owner Name 494 For the purposes of calculating the zone digest, RRSets having the 495 same owner name MUST be numerically ordered, in ascending order, by 496 their numeric RR TYPE. 498 3.4. Inclusion/Exclusion Rules 500 When iterating over records in the zone, the following inclusion/ 501 exclusion rules apply: 503 o All records in the zone, including glue records, MUST be included. 505 o Occluded data ([RFC5936] Section 3.5) MUST be included. 507 o Only one instance of duplicate RRs with equal owner, class, type 508 and RDATA SHALL be included ([RFC4034] Section 6.3). 510 o The placeholder ZONEMD RR(s) MUST be included. 512 o If the zone is signed, DNSSEC RRs MUST be included, except: 514 o The RRSIG covering ZONEMD MUST NOT be included because the RRSIG 515 will be updated after all digests have been calculated. 517 3.5. Scheme-Specific Processing 519 At this time, only the SIMPLE collation scheme is defined. 520 Additional schemes may be defined in future updates to this document. 522 3.5.1. The SIMPLE Scheme 524 For the SIMPLE scheme, the digest is calculated over the zone as a 525 whole. This means that a change to a single RR in the zone requires 526 iterating over all RRs in the zone to recalculate the digest. SIMPLE 527 is a good choice for zones that are small and/or stable, but probably 528 not good for zones that are large and/or dynamic. 530 A zone digest using the SIMPLE scheme is calculated by concatenating 531 the canonical form of all RRs in the zone, in the order described in 532 Section 3.3, subject to the inclusion/exclusion rules described in 533 Section 3.4, and then applying the SHA-384 algorithm: 535 digest = hash( RR(1) | RR(2) | RR(3) | ... ) 537 where "|" denotes concatenation. 539 3.6. Update ZONEMD RR 541 Once a zone digest has been calculated, the published ZONEMD record 542 is finalised by inserting the digest into the placeholder ZONEMD. 543 Repeat for each digest if multiple digests are to be published. 545 If the zone is signed with DNSSEC, the RRSIG record(s) covering the 546 ZONEMD RRSet MUST then be added or updated. Because the ZONEMD 547 placeholder was added prior to signing, the zone will already have 548 the appropriate denial-of-existence (NSEC, NSEC3) records. 550 Some DNSSEC implementations (especially "online signing") might be 551 designed such that the SOA serial number is updated whenever a new 552 signature is made. To preserve the calculated digest, generation of 553 an ZONEMD signature must not also result in a change to the SOA 554 serial number. The ZONEMD RR and the matching SOA MUST be published 555 at the same time. 557 4. Verifying Zone Digest 559 The recipient of a zone that has a ZONEMD RR can verify the zone by 560 calculating the digest as follows. If multiple ZONEMD RRs are 561 present in the zone, e.g., during an algorithm rollover, a match 562 using any one of the recipient's supported Schemes and Hash 563 Algorithms is sufficient to verify the zone. 565 1. The verifier MUST first determine whether or not to expect 566 DNSSEC records in the zone. This can be done by examining 567 locally configured trust anchors, or querying for (and 568 validating) DS RRs in the parent zone. For zones that are 569 provably insecure, or if DNSSEC validation can not be performed, 570 digest validation continues at step 4 below. 572 2. For zones that are provably secure, the existence of the apex 573 ZONEMD record MUST be verified. If the ZONEMD record provably 574 does not exist, digest verification cannot be done. If the 575 ZONEMD record does provably exist, but is not found in the zone, 576 digest verification MUST NOT be considered successful. 578 3. For zones that are provably secure, the SOA and ZONEMD RRSets 579 MUST have valid signatures, chaining up to a trust anchor. If 580 DNSSEC validation of the SOA or ZONEMD records fails, digest 581 verification MUST NOT be considered successful. 583 4. If the ZONEMD RRSet contains more than one RR with the same 584 Scheme and Hash Algorithm, digest verification MUST NOT be 585 considered successful. 587 5. The SOA Serial field MUST exactly match the ZONEMD Serial field. 588 If the fields to not match, digest verification MUST NOT be 589 considered successful. 591 6. The ZONEMD Hash Algorithm field MUST be checked. If the 592 verifier does not support the given Hash Algorithm, it SHOULD 593 report that the zone digest could not be verified due to an 594 unsupported algorithm. 596 7. The received Digest value is copied to a temporary location. 597 Repeat for each ZONEMD RR present. 599 8. The ZONEMD RR's Digest field MUST be set to all zeroes. Repeat 600 for each RR present in the apex ZONEMD RRSet, even for 601 unsupported Scheme and Hash Algorithm values. 603 9. The zone digest is computed over the zone data as described in 604 Section 3.5. 606 10. The calculated digest is compared to the received digest stored 607 in the temporary location. If the two digest values match, 608 verification is considered successful. Otherwise, verification 609 MUST NOT be considered successful. 611 11. The ZONEMD RR's RDATA is reset to the received Digest stored in 612 the temporary location. Thus, any downstream clients can 613 similarly verify the zone. 615 Note that when multiple ZONEMD RRs are present in the zone, the 616 Digest field of each MUST be zeroed in step 8 above, even for 617 unsupported Scheme and Hash Algorithm values. 619 5. IANA Considerations 621 5.1. ZONEMD RRtype 623 This document defines a new DNS RR type, ZONEMD, whose value 63 has 624 been allocated by IANA from the "Resource Record (RR) TYPEs" 625 subregistry of the "Domain Name System (DNS) Parameters" registry: 627 Type: ZONEMD 629 Value: 63 631 Meaning: Message Digest Over Zone Data 633 Reference: This document 635 5.2. ZONEMD Scheme 637 This document asks IANA to create a new "ZONEMD Scheme" registry with 638 initial contents as follows: 640 +---------+--------------------+----------+-----------+-------------+ 641 | Value | Description | Mnemonic | Status | Reference | 642 +---------+--------------------+----------+-----------+-------------+ 643 | 0 | Reserved | RESERVED | N/A | N/A | 644 | 1 | Simple ZONEMD | SIMPLE | Mandatory | This | 645 | | collation | | | document | 646 | 240-254 | Private Use | N/A | N/A | [RFC8126] | 647 +---------+--------------------+----------+-----------+-------------+ 649 Table 1: ZONEMD Scheme Registry 651 The IANA policy for assigning new values to the ZONEMD Scheme 652 registry shall be Specification Required, as described in [RFC8126]. 654 5.3. ZONEMD Hash Algorithm 656 This document asks IANA to create a new "ZONEMD Hash Algorithm" 657 registry with initial contents as follows: 659 +---------+----------------------+----------+-----------+-----------+ 660 | Value | Description | Mnemonic | Status | Reference | 661 +---------+----------------------+----------+-----------+-----------+ 662 | 0 | Reserved | RESERVED | N/A | N/A | 663 | 1 | The SHA-384 hash | SHA384 | Mandatory | [RFC6234] | 664 | | algorithm | | | | 665 | 240-254 | Private Use | N/A | N/A | [RFC8126] | 666 +---------+----------------------+----------+-----------+-----------+ 668 Table 2: ZONEMD Hash Algorithm Registry 670 The IANA policy for assigning new values to the ZONEMD Hash Algorithm 671 registry shall be Specification Required, as described in [RFC8126]. 673 6. Security Considerations 675 6.1. Attacks Against the Zone Digest 677 The zone digest allows the receiver to verify that the zone contents 678 haven't been modified since the zone was generated/published. 679 Verification is strongest when the zone is also signed with DNSSEC. 680 An attacker, whose goal is to modify zone content before it is used 681 by the victim, may consider a number of different approaches. 683 The attacker might perform a downgrade attack to an unsigned zone. 684 This is why Section 4 talks about determining whether or not to 685 expect DNSSEC signatures for the zone in step 1. 687 The attacker might perform a downgrade attack by removing one or more 688 ZONEMD records. Such a removal is detectable only with DNSSEC 689 validation and is why Section 4 talks about checking denial-of- 690 existence proofs in step 2 and signature validation in step 3. 692 The attacker might alter the Scheme, Hash Algorithm, or Digest fields 693 of the ZONEMD record. Such modifications are detectable only with 694 DNSSEC validation. 696 6.2. Attacks Utilizing ZONEMD Queries 698 Nothing in this specification prevents clients from making, and 699 servers from responding to, ZONEMD queries. Servers SHOULD NOT 700 calculate zone digests dynamically (for each query) as this can be 701 used as a CPU resource exhaustion attack. 703 One might consider how well ZONEMD responses could be used in a 704 distributed denial-of-service amplification attack. The ZONEMD RR is 705 moderately sized, much like the DS RR. A single ZONEMD RR 706 contributes approximately 40 to 65 octets to a DNS response, for 707 currently defined digest types. Certainly other RR types result in 708 larger amplification effects (i.e., DNSKEY). 710 6.3. Resilience and Fragility 712 ZONEMD can be used to detect incomplete or corrupted zone data prior 713 to its use, thereby increasing resilience, but also introducing some 714 fragility. Publishers and consumers of zones containing ZONEMD 715 records should be aware of these tradeoffs. While the intention is 716 to secure the zone data, misconfigurations or implementation bugs are 717 generally indistinguishable from intentional tampering, and could 718 lead to service failures when verification is performed 719 automatically. 721 Zone publishers may want to deploy ZONEMD gradually, perhaps by 722 utilizing one of the private use hash algorithms listed in 723 Section 5.3. Similarly, recipients may want to initially configure 724 verification failures only as a warning, and later as an error after 725 gaining experience and confidence with the feature. 727 7. Performance Considerations 729 This section is provided to make zone publishers aware of the 730 performance requirements and implications of including ZONEMD RRs in 731 a zone. 733 7.1. SIMPLE SHA384 735 As mentioned previously, the SIMPLE scheme may not be appropriate for 736 use in zones that are either large or highly dynamic. Zone 737 publishers should carefully consider the use of ZONEMD in such zones, 738 since it might cause consumers of zone data (e.g., secondary name 739 servers) to expend resources on digest calculation. Furthermore, for 740 such use cases, it is recommended that ZONEMD only be used when 741 digest calculation time is significantly less than propagation times 742 and update intervals. 744 The authors' implementation (Section 10.1) includes an option to 745 record and report CPU usage of its operation. The software was used 746 to generate digests for more than 800 TLD zones available from 747 [CZDS]. The table below summarizes the the results for the SIMPLE 748 scheme and SHA384 hash algorithm grouped by zone size. The Rate 749 column is the mean amount of time per RR to calculate the digest, 750 running on commodity hardware at the time of this writing. 752 +---------------------+----------------+ 753 | Zone Size (RRs) | Rate (msec/RR) | 754 +---------------------+----------------+ 755 | 10 - 99 | 0.00683 | 756 | 100 - 999 | 0.00551 | 757 | 1000 - 9999 | 0.00505 | 758 | 10000 - 99999 | 0.00602 | 759 | 100000 - 999999 | 0.00845 | 760 | 1000000 - 9999999 | 0.0108 | 761 | 10000000 - 99999999 | 0.0148 | 762 +---------------------+----------------+ 764 For example, based on the above table, it takes approximately 0.13 765 seconds to calculate a SIMPLE SHA384 digest for a zone with 22,000 766 RRs, and about 2.5 seconds for a zone with 300,000 RRs. 768 These benchmarks attempt to emulate a worst-case scenario and take 769 into account the time required to canonicalize the zone for 770 processing. Each of the 800+ zones were measured three times, and 771 then averaged, with a different random sorting of the input data 772 prior to each measurement. 774 8. Privacy Considerations 776 This specification has no impact on user privacy. 778 9. Acknowledgments 780 The authors wish to thank David Blacka, Scott Hollenbeck, and Rick 781 Wilhelm for providing feedback on early drafts of this document. 782 Additionally, they thank Joe Abley, Mark Andrews, Ralph Dolmans, 783 Richard Gibson, Olafur Gudmundsson, Bob Harold, Paul Hoffman, Evan 784 Hunt, Shumon Huque, Tatuya Jinmei, Mike St. Johns, Burt Kaliski, 785 Shane Kerr, Matt Larson, John Levine, Ed Lewis, Matt Pounsett, Mukund 786 Sivaraman, Petr Spacek, Ondrej Sury, Willem Toorop, Florian Weimer, 787 Tim Wicinksi, Wouter Wijngarrds, Paul Wouters, and other members of 788 the dnsop working group for their input. 790 10. Implementation Status 792 10.1. Authors' Implementation 794 The authors have an open source implementation in C, using the ldns 795 library [ldns-zone-digest]. This implementation is able to perform 796 the following functions: 798 o Read an input zone and output a zone with the ZONEMD placeholder. 800 o Compute zone digest over signed zone and update the ZONEMD record. 802 o Re-compute DNSSEC signature over the ZONEMD record. 804 o Verify the zone digest from an input zone. 806 This implementation does not: 808 o Perform DNSSEC validation of the ZONEMD record during 809 verification. 811 10.2. Shane Kerr's Implementation 813 Shane Kerr wrote an implementation of this specification during the 814 IETF 102 hackathon [ZoneDigestHackathon]. This implementation is in 815 Python and is able to perform the following functions: 817 o Read an input zone and output a zone with ZONEMD record. 819 o Verify the zone digest from an input zone. 821 o Output the ZONEMD record in its defined presentation format. 823 This implementation does not: 825 o Re-compute DNSSEC signature over the ZONEMD record. 827 o Perform DNSSEC validation of the ZONEMD record. 829 11. Change Log 831 RFC Editor: Please remove this section. 833 This section lists substantial changes to the document as it is being 834 worked on. 836 From -00 to -01: 838 o Removed requirement to sort by RR CLASS. 840 o Added Kumari and Hardaker as coauthors. 842 o Added Change Log section. 844 o Minor clarifications and grammatical edits. 846 From -01 to -02: 848 o Emphasize desire for data security over channel security. 850 o Expanded motivation into its own subsection. 852 o Removed discussion topic whether or not to include serial in 853 ZONEMD. 855 o Clarified that a zone's NS records always sort before the SOA 856 record. 858 o Clarified that all records in the zone must are digested, except 859 as specified in the exclusion rules. 861 o Added for discussion out-of-zone and occluded records. 863 o Clarified that update of ZONEMD signature must not cause a serial 864 number change. 866 o Added persons to acknowledgments. 868 From -02 to -03: 870 o Added recommendation to set ZONEMD TTL to SOA TTL. 872 o Clarified that digest input uses uncompressed names. 874 o Updated Implementations section. 876 o Changed intended status from Standards Track to Experimental and 877 added Scope of Experiment section. 879 o Updated Motivation, Introduction, and Design Overview sections in 880 response to working group discussion. 882 o Gave ZONEMD digest types their own status, separate from DS digest 883 types. Request IANA to create a registry. 885 o Added Reserved field for future work supporting dynamic updates. 887 o Be more rigorous about having just ONE ZONEMD record in the zone. 889 o Expanded use cases. 891 From -03 to -04: 893 o Added an appendix with example zones and digests. 895 o Clarified that only apex ZONEMD RRs shall be processed. 897 From -04 to -05: 899 o Made SHA384 the only supported ZONEMD digest type. 901 o Disassociated ZONEMD digest types from DS digest types. 903 o Updates to Introduction based on list feedback. 905 o Changed "zone file" to "zone" everywhere. 907 o Restored text about why ZONEMD has a Serial field. 909 o Clarified ordering of RRSets having same owner to be numerically 910 ascending. 912 o Clarified that all duplicate RRs (not just SOA) must be suppressed 913 in digest calculation. 915 o Clarified that the Reserved field must be set to zero and checked 916 for zero in verification. 918 o Clarified that occluded data must be included. 920 o Clarified procedure for verification, using temporary location for 921 received digest. 923 o Explained why Reserved field is 8-bits. 925 o IANA Considerations section now more specific. 927 o Added complex zone to examples. 929 o 931 From -05 to -06: 933 o RR type code 63 was assigned to ZONEMD by IANA. 935 From -06 to -07: 937 o Fixed mistakes in ZONEMD examples. 939 o Added private use Digest Type values 240-254. 941 o Clarified that Digest field must not be empty. 943 From -07 to draft-ietf-dnsop-dns-zone-digest-00: 945 o Adopted by dnsop. 947 o Clarified further that non-apex ZONEMD RRs have no meaning. 949 o Changed "provably [un]signed" to "provably [in]secure". 951 o Allow multiple ZONEMD RRs to support algorithm agility/rollovers. 953 o Describe verification when there are multiple ZONEMD RRs. 955 From -00 to -01: 957 o Simplified requirements around verifying multiple digests. Any 958 one match is sufficient. 960 o Updated implementation notes. 962 o Both implementations produce expected results on examples given in 963 this document. 965 From -01 to -02: 967 o Changed the name of the Reserved field to Parameter. 969 o Changed the name of Digest Type 1 from SHA384 to SHA384-STABLE. 971 o The meaning of the Parameter field now depends on Digest Type. 973 o No longer require Parameter field to be zero in verification. 975 o Updated a rule from earlier versions that said multiple ZONEMD RRs 976 were not allowed. 978 From -02 to -03: 980 o Changed the name of Digest Type 1 from SHA384-STABLE to 981 SHA384-SIMPLE. 983 o Changed document status from Experimental to Standards Track. 985 o Removed Scope of Experimentation section. 987 From -03 to -04: 989 o Addressing WGLC feedback. 991 o Changed from "Digest Type + Paramter" to "Scheme + Hash 992 Algorithm". This should make it more obvious how ZONEMD can be 993 expanded in the future with new schemes and hash algorithms, while 994 sacrificing some of the flexibility that the Parameter was 995 intended to provide. 997 o Note: old RDATA fields: Serial, Digest Type, Parameter, Digest. 999 o Note: new RDATA fields: Serial, Scheme, Hash Algorithm, Digest. 1001 o Add new IANA requirement for a Scheme registry. 1003 o Rearranged some sections and separated scheme-specific aspects 1004 from general aspects of digest calculation. 1006 o When discussing multiple ZONEMD RRs, allow for Scheme, as well as 1007 Hash Algorithm, transition. 1009 o Added Performance Considerations section with some benchmarks. 1011 o Further clarifications about non-apex ZONEMD RRs. 1013 o Clarified inclusion rule for duplicate RRs. 1015 o Removed or lowercased some inappropriately used RFC 2119 key 1016 words. 1018 o Clarified that all ZONEMD RRs, even for unsupported hash 1019 algorithms, must be zeroized during digest calculation. 1021 o Added Resilience and Fragility to security considerations. 1023 o Updated examples since changes in this version result in different 1024 hash values. 1026 From -04 to -05: 1028 o Clarifications about non-apex and multiple ZONEMD RRs. 1030 o Clarifications about benchmark results. 1032 o Don't compute ZONEMD on-the-fly. 1034 o Specifciation Required for updates to ZONEMD protocol registries. 1036 o Other rewording based on WGLC feedback. 1038 o Updated RFC numbers for some references. 1040 o Use documentation IP addresses instead of loopback. 1042 o Updated examples in the appendix. 1044 12. References 1046 12.1. Normative References 1048 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1049 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 1050 . 1052 [RFC1035] Mockapetris, P., "Domain names - implementation and 1053 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 1054 November 1987, . 1056 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1057 Requirement Levels", BCP 14, RFC 2119, 1058 DOI 10.17487/RFC2119, March 1997, 1059 . 1061 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. 1062 Rose, "Resource Records for the DNS Security Extensions", 1063 RFC 4034, DOI 10.17487/RFC4034, March 2005, 1064 . 1066 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 1067 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 1068 DOI 10.17487/RFC6234, May 2011, 1069 . 1071 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1072 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1073 May 2017, . 1075 12.2. Informative References 1077 [CZDS] Internet Corporation for Assigned Names and Numbers, 1078 "Centralized Zone Data Service", October 2018, 1079 . 1081 [dns-over-https] 1082 Hoffman, P. and P. McManus, "DNS Queries over HTTPS 1083 (DoH)", draft-ietf-doh-dns-over-https-12 (work in 1084 progress), June 2018, . 1087 [InterNIC] 1088 ICANN, "InterNIC FTP site", May 2018, 1089 . 1091 [ldns-zone-digest] 1092 Verisign, "Implementation of Message Digests for DNS Zones 1093 using the ldns library", July 2018, 1094 . 1096 [RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, 1097 DOI 10.17487/RFC1995, August 1996, 1098 . 1100 [RFC2065] Eastlake 3rd, D. and C. Kaufman, "Domain Name System 1101 Security Extensions", RFC 2065, DOI 10.17487/RFC2065, 1102 January 1997, . 1104 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 1105 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 1106 RFC 2136, DOI 10.17487/RFC2136, April 1997, 1107 . 1109 [RFC2535] Eastlake 3rd, D., "Domain Name System Security 1110 Extensions", RFC 2535, DOI 10.17487/RFC2535, March 1999, 1111 . 1113 [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 1114 Wellington, "Secret Key Transaction Authentication for DNS 1115 (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, 1116 . 1118 [RFC2931] Eastlake 3rd, D., "DNS Request and Transaction Signatures 1119 ( SIG(0)s )", RFC 2931, DOI 10.17487/RFC2931, September 1120 2000, . 1122 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. 1123 Thayer, "OpenPGP Message Format", RFC 4880, 1124 DOI 10.17487/RFC4880, November 2007, 1125 . 1127 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 1128 Mail Extensions (S/MIME) Version 3.2 Message 1129 Specification", RFC 5751, DOI 10.17487/RFC5751, January 1130 2010, . 1132 [RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol 1133 (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010, 1134 . 1136 [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm 1137 Agility and Selecting Mandatory-to-Implement Algorithms", 1138 BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, 1139 . 1141 [RFC7706] Kumari, W. and P. Hoffman, "Decreasing Access Time to Root 1142 Servers by Running One on Loopback", RFC 7706, 1143 DOI 10.17487/RFC7706, November 2015, 1144 . 1146 [RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., 1147 and P. Hoffman, "Specification for DNS over Transport 1148 Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 1149 2016, . 1151 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1152 Writing an IANA Considerations Section in RFCs", BCP 26, 1153 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1154 . 1156 [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS 1157 Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, 1158 January 2019, . 1160 [RootServers] 1161 Root Server Operators, "Root Server Technical Operations", 1162 July 2018, . 1164 [RPZ] Vixie, P. and V. Schryver, "DNS Response Policy Zones 1165 (RPZ)", draft-vixie-dnsop-dns-rpz-00 (work in progress), 1166 June 2018, . 1169 [ZoneDigestHackathon] 1170 Kerr, S., "Prototype implementation of ZONEMD for the IETF 1171 102 hackathon in Python", July 2018, 1172 . 1174 Appendix A. Example Zones With Digests 1176 This appendix contains example zones with accurate ZONEMD records. 1177 These can be used to verify an implementation of the zone digest 1178 protocol. 1180 A.1. Simple EXAMPLE Zone 1182 Here, the EXAMPLE zone contains an SOA record, NS and glue records, 1183 and a ZONEMD record. 1185 example. 86400 IN SOA ns1 admin 2018031900 ( 1186 1800 900 604800 86400 ) 1187 86400 IN NS ns1 1188 86400 IN NS ns2 1189 86400 IN ZONEMD 2018031900 1 1 ( 1190 e12a0dd55a1dd1b8 1191 e29ec9b1d42d71ec 1192 09329da5f162f327 1193 e1eb4803947995ec 1194 f7c65aa566cf6cfd 1195 36a0caf8bdb03ac4 ) 1196 ns1 3600 IN A 203.0.113.63 1197 ns2 3600 IN AAAA 2001:db8::63 1199 A.2. Complex EXAMPLE Zone 1201 Here, the EXAMPLE zone contains duplicate RRs, and an occluded RR, 1202 and one out-of-zone RR. 1204 example. 86400 IN SOA ns1 admin 2018031900 ( 1205 1800 900 604800 86400 ) 1206 86400 IN NS ns1 1207 86400 IN NS ns2 1208 86400 IN ZONEMD 2018031900 1 1 ( 1209 626637812169d7ab 1210 fcb24f13cb704f13 1211 b8a131fee1c3bc73 1212 29144fa5ec2608a4 1213 1b596d41ff8c8310 1214 b2897e73f6e521fc ) 1215 ns1 3600 IN A 203.0.113.63 1216 ns2 3600 IN AAAA 2001:db8::63 1217 occluded.sub 7200 IN TXT "I'm occluded but must be digested" 1218 sub 7200 IN NS ns1 1219 duplicate 300 IN TXT "I must be digested just once" 1220 duplicate 300 IN TXT "I must be digested just once" 1221 foo.test. 555 IN TXT "out-of-zone data must be excluded" 1222 non-apex 900 IN ZONEMD 2018031900 1 1 ( 1223 616c6c6f77656420 1224 6275742069676e6f 1225 7265642e20616c6c 1226 6f77656420627574 1227 2069676e6f726564 1228 2e20616c6c6f7765 ) 1230 A.3. EXAMPLE Zone with multiple digests 1232 Here, the EXAMPLE zone contains multiple ZONEMD records. Since only 1233 one Hash Algorithm is defined at this time (SHA384), this example 1234 utilizes additional ZONEMD records with Hash Algorithm values in the 1235 private range (240-254). These additional private-range digests are 1236 not verifiable, but note that their other fields (Serial, Scheme, 1237 Hash Algorithm) are included in the calculation of all ZONEMD 1238 digests. 1240 example. 86400 IN SOA ns1 admin 2018031900 ( 1241 1800 900 604800 86400 ) 1242 example. 86400 IN NS ns1.example. 1243 example. 86400 IN NS ns2.example. 1244 example. 86400 IN ZONEMD 2018031900 1 1 ( 1245 366d22ea3bd8df44 1246 0fa44b6213359d9b 1247 1f73bb9d8dd67a1b 1248 4c0bdf6f0b3657c5 1249 0316f770fbb03057 1250 0c06adb87c121431 ) 1251 example. 86400 IN ZONEMD 2018031900 1 240 ( 1252 e2d523f654b9422a 1253 96c5a8f44607bbee ) 1254 example. 86400 IN ZONEMD 2018031900 1 241 ( 1255 5732dd91240611f8 1256 314adb6b4769bdd2 ) 1257 example. 86400 IN ZONEMD 2018031900 1 242 ( 1258 7c32e06779315c7d 1259 81ba8c72f5cf9116 1260 496b6395 ) 1261 example. 86400 IN ZONEMD 2018031900 1 243 ( 1262 183770af4a629f80 1263 2e674e305b8d0d11 1264 3dfe0837 ) 1265 example. 86400 IN ZONEMD 2018031900 1 244 ( 1266 e1846540e33a9e41 1267 89792d18d5d131f6 1268 05fc283e ) 1269 example. 86400 IN ZONEMD 2018031900 240 1 ( 1270 e1846540e33a9e41 1271 89792d18d5d131f6 1272 05fc283e ) 1273 ns1.example. 3600 IN A 203.0.113.63 1274 ns2.example. 86400 IN TXT "This example has multiple digests" 1275 ns2.example. 3600 IN AAAA 2001:db8::63 1277 A.4. The URI.ARPA Zone 1279 The URI.ARPA zone retrieved 2018-10-21. Note this sample zone has 1280 (expired) signatures, but no signature for the ZONEMD RR. 1282 ; <<>> DiG 9.9.4 <<>> @lax.xfr.dns.icann.org uri.arpa axfr 1283 ; (2 servers found) 1284 ;; global options: +cmd 1285 uri.arpa. 3600 IN SOA sns.dns.icann.org. ( 1286 noc.dns.icann.org. 2018100702 10800 3600 1209600 3600 ) 1287 uri.arpa. 3600 IN RRSIG NSEC 8 2 3600 ( 1288 20181028142623 20181007205525 47155 uri.arpa. 1289 eEC4w/oXLR1Epwgv4MBiDtSBsXhqrJVvJWUpbX8XpetAvD35bxwNCUTi 1290 /pAJVUXefegWeiriD2rkTgCBCMmn7YQIm3gdR+HjY/+o3BXNQnz97f+e 1291 HAE9EDDzoNVfL1PyV/2fde9tDeUuAGVVwmD399NGq9jWYMRpyri2kysr q/g= ) 1292 uri.arpa. 86400 IN RRSIG NS 8 2 86400 ( 1293 20181028172020 20181007175821 47155 uri.arpa. 1294 ATyV2A2A8ZoggC+68u4GuP5MOUuR+2rr3eWOkEU55zAHld/7FiBxl4ln 1295 4byJYy7NudUwlMOEXajqFZE7DVl8PpcvrP3HeeGaVzKqaWj+aus0jbKF 1296 Bsvs2b1qDZemBfkz/IfAhUTJKnto0vSUicJKfItu0GjyYNJCz2CqEuGD Wxc= ) 1297 uri.arpa. 600 IN RRSIG MX 8 2 600 ( 1298 20181028170556 20181007175821 47155 uri.arpa. 1299 e7/r3KXDohX1lyVavetFFObp8fB8aXT76HnN9KCQDxSnSghNM83UQV0t 1300 lTtD8JVeN1mCvcNFZpagwIgB7XhTtm6Beur/m5ES+4uSnVeS6Q66HBZK 1301 A3mR95IpevuVIZvvJ+GcCAQpBo6KRODYvJ/c/ZG6sfYWkZ7qg/Em5/+3 4UI= ) 1302 uri.arpa. 3600 IN RRSIG DNSKEY 8 2 3600 ( 1303 20181028152832 20181007175821 15796 uri.arpa. 1304 nzpbnh0OqsgBBP8St28pLvPEQ3wZAUdEBuUwil+rtjjWlYYiqjPxZ286 1305 XF4Rq1usfV5x71jZz5IqswOaQgia91ylodFpLuXD6FTGs2nXGhNKkg1V 1306 chHgtwj70mXU72GefVgo8TxrFYzxuEFP5ZTP92t97FVWVVyyFd86sbbR 1307 6DZj3uA2wEvqBVLECgJLrMQ9Yy7MueJl3UA4h4E6zO2JY9Yp0W9woq0B 1308 dqkkwYTwzogyYffPmGAJG91RJ2h6cHtFjEZe2MnaY2glqniZ0WT9vXXd 1309 uFPm0KD9U77Ac+ZtctAF9tsZwSdAoL365E2L1usZbA+K0BnPPqGFJRJk 1310 5R0A1w== ) 1311 uri.arpa. 3600 IN RRSIG DNSKEY 8 2 3600 ( 1312 20181028152832 20181007175821 55480 uri.arpa. 1313 lWtQV/5szQjkXmbcD47/+rOW8kJPksRFHlzxxmzt906+DBYyfrH6uq5X 1314 nHvrUlQO6M12uhqDeL+bDFVgqSpNy+42/OaZvaK3J8EzPZVBHPJykKMV 1315 63T83aAiJrAyHzOaEdmzLCpalqcEE2ImzlLHSafManRfJL8Yuv+JDZFj 1316 2WDWfEcUuwkmIZWX11zxp+DxwzyUlRl7x4+ok5iKZWIg5UnBAf6B8T75 1317 WnXzlhCw3F2pXI0a5LYg71L3Tp/xhjN6Yy9jGlIRf5BjB59X2zra3a2R 1318 PkI09SSnuEwHyF1mDaV5BmQrLGRnCjvwXA7ho2m+vv4SP5dUdXf+GTeA 1319 1HeBfw== ) 1320 uri.arpa. 3600 IN RRSIG SOA 8 2 3600 ( 1321 20181029114753 20181008222815 47155 uri.arpa. 1322 qn8yBNoHDjGdT79U2Wu9IIahoS0YPOgYP8lG+qwPcrZ1BwGiHywuoUa2 1323 Mx6BWZlg+HDyaxj2iOmox+IIqoUHhXUbO7IUkJFlgrOKCgAR2twDHrXu 1324 9BUQHy9SoV16wYm3kBTEPyxW5FFm8vcdnKAF7sxSY8BbaYNpRIEjDx4A JUc= ) 1325 uri.arpa. 3600 IN NSEC ftp.uri.arpa. NS SOA ( 1326 MX RRSIG NSEC DNSKEY ) 1327 uri.arpa. 86400 IN NS a.iana-servers.net. 1328 uri.arpa. 86400 IN NS b.iana-servers.net. 1329 uri.arpa. 86400 IN NS c.iana-servers.net. 1330 uri.arpa. 86400 IN NS ns2.lacnic.net. 1331 uri.arpa. 86400 IN NS sec3.apnic.net. 1332 uri.arpa. 600 IN MX 10 pechora.icann.org. 1333 uri.arpa. 3600 IN DNSKEY 256 3 8 ( 1334 AwEAAcBi7tSart2J599zbYWspMNGN70IBWb4ziqyQYH9MTB/VCz6WyUK 1335 uXunwiJJbbQ3bcLqTLWEw134B6cTMHrZpjTAb5WAwg4XcWUu8mdcPTiL 1336 Bl6qVRlRD0WiFCTzuYUfkwsh1Rbr7rvrxSQhF5rh71zSpwV5jjjp65Wx 1337 SdJjlH0B ) 1338 uri.arpa. 3600 IN DNSKEY 257 3 8 ( 1339 AwEAAbNVv6ulgRdO31MtAehz7j3ALRjwZglWesnzvllQl/+hBRZr9QoY 1340 cO2I+DkO4Q1NKxox4DUIxj8SxPO3GwDuOFR9q2/CFi2O0mZjafbdYtWc 1341 3zSdBbi3q0cwCIx7GuG9eqlL+pg7mdk9dgdNZfHwB0LnqTD8ebLPsrO/ 1342 Id7kBaiqYOfMlZnh2fp+2h6OOJZHtY0DK1UlssyB5PKsE0tVzo5s6zo9 1343 iXKe5u+8WTMaGDY49vG80JPAKE7ezMiH/NZcUMiE0PRZ8D3foq2dYuS5 1344 ym+vA83Z7v8A+Rwh4UGnjxKB8zmr803V0ASAmHz/gwH5Vb0nH+LObwFt 1345 l3wpbp+Wpm8= ) 1346 uri.arpa. 3600 IN DNSKEY 257 3 8 ( 1347 AwEAAbwnFTakCvaUKsXji4mgmxZUJi1IygbnGahbkmFEa0L16J+TchKR 1348 wcgzVfsxUGa2MmeA4hgkAooC3uy+tTmoMsgy8uq/JAj24DjiHzd46LfD 1349 FK/qMidVqFpYSHeq2Vv5ojkuIsx4oe4KsafGWYNOczKZgH5loGjN2aJG 1350 mrIm++XCphOskgCsQYl65MIzuXffzJyxlAuts+ecAIiVeqRaqQfr8LRU 1351 7wIsLxinXirprtQrbor+EtvlHp9qXE6ARTZDzf4jvsNpKvLFZtmxzFf3 1352 e/UJz5eHjpwDSiZL7xE8aE1o1nGfPtJx9ZnB3bapltaJ5wY+5XOCKgY0 1353 xmJVvNQlwdE= ) 1354 ftp.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 ( 1355 20181028080856 20181007175821 47155 uri.arpa. 1356 HClGAqPxzkYkAT7Q/QNtQeB6YrkP6EPOef+9Qo5/2zngwAewXEAQiyF9 1357 jD1USJiroM11QqBS3v3aIdW/LXORs4Ez3hLcKNO1cKHsOuWAqzmE+BPP 1358 Arfh8N95jqh/q6vpaB9UtMkQ53tM2fYU1GszOLN0knxbHgDHAh2axMGH lqM= ) 1359 ftp.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 ( 1360 20181028103644 20181007205525 47155 uri.arpa. 1361 WoLi+vZzkxaoLr2IGZnwkRvcDf6KxiWQd1WZP/U+AWnV+7MiqsWPZaf0 1362 9toRErerGoFOiOASNxZjBGJrRgjmavOM9U+LZSconP9zrNFd4dIu6kp5 1363 YxlQJ0uHOvx1ZHFCj6lAt1ACUIw04ZhMydTmi27c8MzEOMepvn7iH7r7 k7k= ) 1364 ftp.uri.arpa. 3600 IN NSEC http.uri.arpa. NAPTR ( 1365 RRSIG NSEC ) 1366 ftp.uri.arpa. 604800 IN NAPTR 0 0 "" "" ( 1367 "!^ftp://([^:/?#]*).*$!\\1!i" . ) 1368 http.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 ( 1369 20181029010647 20181007175821 47155 uri.arpa. 1370 U03NntQ73LHWpfLmUK8nMsqkwVsOGW2KdsyuHYAjqQSZvKbtmbv7HBmE 1371 H1+Ii3Z+wtfdMZBy5aC/6sHdx69BfZJs16xumycMlAy6325DKTQbIMN+ 1372 ift9GrKBC7cgCd2msF/uzSrYxxg4MJQzBPvlkwXnY3b7eJSlIXisBIn7 3b8= ) 1373 http.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 ( 1374 20181029011815 20181007205525 47155 uri.arpa. 1375 T7mRrdag+WSmG+n22mtBSQ/0Y3v+rdDnfQV90LN5Fq32N5K2iYFajF7F 1376 Tp56oOznytfcL4fHrqOE0wRc9NWOCCUec9C7Wa1gJQcllEvgoAM+L6f0 1377 RsEjWq6+9jvlLKMXQv0xQuMX17338uoD/xiAFQSnDbiQKxwWMqVAimv5 7Zs= ) 1378 http.uri.arpa. 3600 IN NSEC mailto.uri.arpa. NAPTR ( 1379 RRSIG NSEC ) 1380 http.uri.arpa. 604800 IN NAPTR 0 0 "" "" ( 1381 "!^http://([^:/?#]*).*$!\\1!i" . ) 1382 mailto.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 ( 1383 20181028110727 20181007175821 47155 uri.arpa. 1385 GvxzVL85rEukwGqtuLxek9ipwjBMfTOFIEyJ7afC8HxVMs6mfFa/nEM/ 1386 IdFvvFg+lcYoJSQYuSAVYFl3xPbgrxVSLK125QutCFMdC/YjuZEnq5cl 1387 fQciMRD7R3+znZfm8d8u/snLV9w4D+lTBZrJJUBe1Efc8vum5vvV7819 ZoY= ) 1388 mailto.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 ( 1389 20181028141825 20181007205525 47155 uri.arpa. 1390 MaADUgc3fc5v++M0YmqjGk3jBdfIA5RuP62hUSlPsFZO4k37erjIGCfF 1391 j+g84yc+QgbSde0PQHszl9fE/+SU5ZXiS9YdcbzSZxp2erFpZOTchrpg 1392 916T4vx6i59scodjb0l6bDyZ+mtIPrc1w6b4hUyOUTsDQoAJYxdfEuMg Vy4= ) 1393 mailto.uri.arpa. 3600 IN NSEC urn.uri.arpa. NAPTR ( 1394 RRSIG NSEC ) 1395 mailto.uri.arpa. 604800 IN NAPTR 0 0 "" "" ( 1396 "!^mailto:(.*)@(.*)$!\\2!i" . ) 1397 urn.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 ( 1398 20181028123243 20181007175821 47155 uri.arpa. 1399 Hgsw4Deops1O8uWyELGe6hpR/OEqCnTHvahlwiQkHhO5CSEQrbhmFAWe 1400 UOkmGAdTEYrSz+skLRQuITRMwzyFf4oUkZihGyhZyzHbcxWfuDc/Pd/9 1401 DSl56gdeBwy1evn5wBTms8yWQVkNtphbJH395gRqZuaJs3LD/qTyJ5Dp LvA= ) 1402 urn.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 ( 1403 20181029071816 20181007205525 47155 uri.arpa. 1404 ALIZD0vBqAQQt40GQ0Efaj8OCyE9xSRJRdyvyn/H/wZVXFRFKrQYrLAS 1405 D/K7q6CMTOxTRCu2J8yes63WJiaJEdnh+dscXzZkmOg4n5PsgZbkvUSW 1406 BiGtxvz5jNncM0xVbkjbtByrvJQAO1cU1mnlDKe1FmVB1uLpVdA9Ib4J hMU= ) 1407 urn.uri.arpa. 3600 IN NSEC uri.arpa. NAPTR RRSIG ( 1408 NSEC ) 1409 urn.uri.arpa. 604800 IN NAPTR 0 0 "" "" ( 1410 "/urn:([^:]+)/\\1/i" . ) 1411 uri.arpa. 3600 IN SOA sns.dns.icann.org. ( 1412 noc.dns.icann.org. 2018100702 10800 3600 1209600 3600 ) 1413 ;; Query time: 66 msec 1414 ;; SERVER: 192.0.32.132#53(192.0.32.132) 1415 ;; WHEN: Sun Oct 21 20:39:28 UTC 2018 1416 ;; XFR size: 34 records (messages 1, bytes 3941) 1417 uri.arpa. 3600 IN ZONEMD 2018100702 1 1 ( 1418 cc4a0b6556272fc739b8ff74b80b4a43ac9575d91445ecc0dc22f5 1419 09fa27c62448a7100660bbdb4c90667424b734956b ) 1421 A.5. The ROOT-SERVERS.NET Zone 1423 The ROOT-SERVERS.NET zone retreived 2018-10-21. 1425 root-servers.net. 3600000 IN SOA a.root-servers.net. ( 1426 nstld.verisign-grs.com. 2018091100 14400 7200 1209600 3600000 ) 1427 root-servers.net. 3600000 IN NS a.root-servers.net. 1428 root-servers.net. 3600000 IN NS b.root-servers.net. 1429 root-servers.net. 3600000 IN NS c.root-servers.net. 1430 root-servers.net. 3600000 IN NS d.root-servers.net. 1431 root-servers.net. 3600000 IN NS e.root-servers.net. 1432 root-servers.net. 3600000 IN NS f.root-servers.net. 1433 root-servers.net. 3600000 IN NS g.root-servers.net. 1434 root-servers.net. 3600000 IN NS h.root-servers.net. 1435 root-servers.net. 3600000 IN NS i.root-servers.net. 1436 root-servers.net. 3600000 IN NS j.root-servers.net. 1437 root-servers.net. 3600000 IN NS k.root-servers.net. 1438 root-servers.net. 3600000 IN NS l.root-servers.net. 1439 root-servers.net. 3600000 IN NS m.root-servers.net. 1440 a.root-servers.net. 3600000 IN AAAA 2001:503:ba3e::2:30 1441 a.root-servers.net. 3600000 IN A 198.41.0.4 1442 b.root-servers.net. 3600000 IN MX 20 mail.isi.edu. 1443 b.root-servers.net. 3600000 IN AAAA 2001:500:200::b 1444 b.root-servers.net. 3600000 IN A 199.9.14.201 1445 c.root-servers.net. 3600000 IN AAAA 2001:500:2::c 1446 c.root-servers.net. 3600000 IN A 192.33.4.12 1447 d.root-servers.net. 3600000 IN AAAA 2001:500:2d::d 1448 d.root-servers.net. 3600000 IN A 199.7.91.13 1449 e.root-servers.net. 3600000 IN AAAA 2001:500:a8::e 1450 e.root-servers.net. 3600000 IN A 192.203.230.10 1451 f.root-servers.net. 3600000 IN AAAA 2001:500:2f::f 1452 f.root-servers.net. 3600000 IN A 192.5.5.241 1453 g.root-servers.net. 3600000 IN AAAA 2001:500:12::d0d 1454 g.root-servers.net. 3600000 IN A 192.112.36.4 1455 h.root-servers.net. 3600000 IN AAAA 2001:500:1::53 1456 h.root-servers.net. 3600000 IN A 198.97.190.53 1457 i.root-servers.net. 3600000 IN MX 10 mx.i.root-servers.org. 1458 i.root-servers.net. 3600000 IN AAAA 2001:7fe::53 1459 i.root-servers.net. 3600000 IN A 192.36.148.17 1460 j.root-servers.net. 3600000 IN AAAA 2001:503:c27::2:30 1461 j.root-servers.net. 3600000 IN A 192.58.128.30 1462 k.root-servers.net. 3600000 IN AAAA 2001:7fd::1 1463 k.root-servers.net. 3600000 IN A 193.0.14.129 1464 l.root-servers.net. 3600000 IN AAAA 2001:500:9f::42 1465 l.root-servers.net. 3600000 IN A 199.7.83.42 1466 m.root-servers.net. 3600000 IN AAAA 2001:dc3::35 1467 m.root-servers.net. 3600000 IN A 202.12.27.33 1468 root-servers.net. 3600000 IN SOA a.root-servers.net. ( 1469 nstld.verisign-grs.com. 2018091100 14400 7200 1209600 3600000 ) 1470 root-servers.net. 3600000 IN ZONEMD 2018091100 1 1 ( 1471 4fb752b314e4dccb845832b611590b669a80daebb736d4bd22aa76ec06 1472 6737c79185c1f7dfd49ec91d9523e6240ea2c4 ) 1474 Authors' Addresses 1476 Duane Wessels 1477 Verisign 1478 12061 Bluemont Way 1479 Reston, VA 20190 1481 Phone: +1 703 948-3200 1482 Email: dwessels@verisign.com 1483 URI: http://verisign.com 1485 Piet Barber 1486 Verisign 1487 12061 Bluemont Way 1488 Reston, VA 20190 1490 Phone: +1 703 948-3200 1491 Email: pbarber@verisign.com 1492 URI: http://verisign.com 1494 Matt Weinberg 1495 Verisign 1496 12061 Bluemont Way 1497 Reston, VA 20190 1499 Phone: +1 703 948-3200 1500 Email: mweinberg@verisign.com 1501 URI: http://verisign.com 1503 Warren Kumari 1504 Google 1505 1600 Amphitheatre Parkway 1506 Mountain View, CA 94043 1508 Email: warren@kumari.net 1510 Wes Hardaker 1511 USC/ISI 1512 P.O. Box 382 1513 Davis, CA 95617 1515 Email: ietf@hardakers.net