idnits 2.17.00 (12 Aug 2021) /tmp/idnits23770/draft-ietf-dnsext-dnssec-records-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The abstract seems to indicate that this document obsoletes RFC2535, but the header doesn't have an 'Obsoletes:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 492 has weird spacing: '...decimal integ...' == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- 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 (October 27, 2003) is 6780 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'DH' is mentioned on line 1119, but not defined == Missing Reference: 'DSA' is mentioned on line 1120, but not defined == Missing Reference: 'ECC' is mentioned on line 1121, but not defined == Unused Reference: 'RFC2671' is defined on line 1000, but no explicit reference was found in the text == Unused Reference: 'RFC3597' is defined on line 1012, but no explicit reference was found in the text == Unused Reference: 'RFC2930' is defined on line 1048, but no explicit reference was found in the text ** Obsolete normative reference: RFC 1521 (Obsoleted by RFC 2045, RFC 2046, RFC 2047, RFC 2048, RFC 2049) ** Obsolete normative reference: RFC 2671 (Obsoleted by RFC 6891) ** Obsolete normative reference: RFC 3445 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) == Outdated reference: draft-ietf-dnsext-delegation-signer has been published as RFC 3658 == Outdated reference: draft-ietf-dnsext-dnssec-intro has been published as RFC 4033 == Outdated reference: draft-ietf-dnsext-dnssec-protocol has been published as RFC 4035 == Outdated reference: draft-ietf-dnsext-keyrr-key-signing-flag has been published as RFC 3757 == Outdated reference: draft-ietf-dnsext-dnssec-2535typecode-change has been published as RFC 3755 -- Obsolete informational reference (is this intentional?): RFC 2535 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) Summary: 4 errors (**), 0 flaws (~~), 15 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DNS Extensions R. Arends 3 Internet-Draft Telematica Instituut 4 Expires: April 26, 2004 R. Austein 5 ISC 6 M. Larson 7 VeriSign 8 D. Massey 9 USC/ISI 10 S. Rose 11 NIST 12 October 27, 2003 14 Resource Records for the DNS Security Extensions 15 draft-ietf-dnsext-dnssec-records-05 17 Status of this Memo 19 This document is an Internet-Draft and is in full conformance with 20 all provisions of Section 10 of RFC2026. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that other 24 groups may also distribute working documents as Internet-Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at http:// 32 www.ietf.org/ietf/1id-abstracts.txt. 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 This Internet-Draft will expire on April 26, 2004. 39 Copyright Notice 41 Copyright (C) The Internet Society (2003). All Rights Reserved. 43 Abstract 45 This document is part of a family of documents that describes the DNS 46 Security Extensions (DNSSEC). The DNS Security Extensions are a 47 collection of resource records and protocol modifications that 48 provide source authentication for the DNS. This document defines the 49 public key (DNSKEY), delegation signer (DS), resource record digital 50 signature (RRSIG), and authenticated denial of existence (NSEC) 51 resource records. The purpose and format of each resource record is 52 described in detail, and an example of each resource record is given. 54 This document obsoletes RFC 2535 and incorporates changes from all 55 updates to RFC 2535. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 60 1.1 Background and Related Documents . . . . . . . . . . . . . . 4 61 1.2 Reserved Words . . . . . . . . . . . . . . . . . . . . . . . 4 62 1.3 Editors' Notes . . . . . . . . . . . . . . . . . . . . . . . 4 63 1.3.1 Open Technical Issues . . . . . . . . . . . . . . . . . . . 4 64 1.3.2 Technical Changes or Corrections . . . . . . . . . . . . . . 4 65 1.3.3 Typos and Minor Corrections . . . . . . . . . . . . . . . . 5 66 2. The DNSKEY Resource Record . . . . . . . . . . . . . . . . . 6 67 2.1 DNSKEY RDATA Wire Format . . . . . . . . . . . . . . . . . . 6 68 2.1.1 The Flags Field . . . . . . . . . . . . . . . . . . . . . . 6 69 2.1.2 The Protocol Field . . . . . . . . . . . . . . . . . . . . . 7 70 2.1.3 The Algorithm Field . . . . . . . . . . . . . . . . . . . . 7 71 2.1.4 The Public Key Field . . . . . . . . . . . . . . . . . . . . 7 72 2.1.5 Notes on DNSKEY RDATA Design . . . . . . . . . . . . . . . . 7 73 2.2 The DNSKEY RR Presentation Format . . . . . . . . . . . . . 7 74 2.3 DNSKEY RR Example . . . . . . . . . . . . . . . . . . . . . 8 75 3. The RRSIG Resource Record . . . . . . . . . . . . . . . . . 9 76 3.1 RRSIG RDATA Wire Format . . . . . . . . . . . . . . . . . . 9 77 3.1.1 The Type Covered Field . . . . . . . . . . . . . . . . . . . 10 78 3.1.2 The Algorithm Number Field . . . . . . . . . . . . . . . . . 10 79 3.1.3 The Labels Field . . . . . . . . . . . . . . . . . . . . . . 10 80 3.1.4 Original TTL Field . . . . . . . . . . . . . . . . . . . . . 11 81 3.1.5 Signature Expiration and Inception Fields . . . . . . . . . 11 82 3.1.6 The Key Tag Field . . . . . . . . . . . . . . . . . . . . . 11 83 3.1.7 The Signer's Name Field . . . . . . . . . . . . . . . . . . 11 84 3.1.8 The Signature Field . . . . . . . . . . . . . . . . . . . . 12 85 3.2 The RRSIG RR Presentation Format . . . . . . . . . . . . . . 12 86 3.3 RRSIG RR Example . . . . . . . . . . . . . . . . . . . . . . 13 87 4. The NSEC Resource Record . . . . . . . . . . . . . . . . . . 15 88 4.1 NSEC RDATA Wire Format . . . . . . . . . . . . . . . . . . . 15 89 4.1.1 The Next Domain Name Field . . . . . . . . . . . . . . . . . 15 90 4.1.2 The Type Bit Map Field . . . . . . . . . . . . . . . . . . . 16 91 4.1.3 Inclusion of Wildcard Names in NSEC RDATA . . . . . . . . . 16 92 4.2 The NSEC RR Presentation Format . . . . . . . . . . . . . . 16 93 4.3 NSEC RR Example . . . . . . . . . . . . . . . . . . . . . . 17 94 5. The DS Resource Record . . . . . . . . . . . . . . . . . . . 18 95 5.1 DS RDATA Wire Format . . . . . . . . . . . . . . . . . . . . 18 96 5.1.1 The Key Tag Field . . . . . . . . . . . . . . . . . . . . . 19 97 5.1.2 The Algorithm Field . . . . . . . . . . . . . . . . . . . . 19 98 5.1.3 The Digest Type Field . . . . . . . . . . . . . . . . . . . 19 99 5.1.4 The Digest Field . . . . . . . . . . . . . . . . . . . . . . 19 100 5.2 Processing of DS RRs When Validating Responses . . . . . . . 19 101 5.3 The DS RR Presentation Format . . . . . . . . . . . . . . . 20 102 5.4 DS RR Example . . . . . . . . . . . . . . . . . . . . . . . 20 103 6. Canonical Form and Order of Resource Records . . . . . . . . 21 104 6.1 Canonical DNS Name Order . . . . . . . . . . . . . . . . . . 21 105 6.2 Canonical RR Form . . . . . . . . . . . . . . . . . . . . . 21 106 6.3 Canonical RR Ordering Within An RRset . . . . . . . . . . . 22 107 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 23 108 8. Security Considerations . . . . . . . . . . . . . . . . . . 25 109 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 26 110 Normative References . . . . . . . . . . . . . . . . . . . . 27 111 Informative References . . . . . . . . . . . . . . . . . . . 29 112 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 29 113 A. DNSSEC Algorithm and Digest Types . . . . . . . . . . . . . 31 114 A.1 DNSSEC Algorithm Types . . . . . . . . . . . . . . . . . . . 31 115 A.1.1 Private Algorithm Types . . . . . . . . . . . . . . . . . . 31 116 A.2 DNSSEC Digest Types . . . . . . . . . . . . . . . . . . . . 32 117 B. Key Tag Calculation . . . . . . . . . . . . . . . . . . . . 33 118 B.1 Key Tag for Algorithm 1 (RSA/MD5) . . . . . . . . . . . . . 34 119 Intellectual Property and Copyright Statements . . . . . . . 35 121 1. Introduction 123 The DNS Security Extensions (DNSSEC) introduce four new DNS resource 124 record types: DNSKEY, RRSIG, NSEC, and DS. This document defines the 125 purpose of each resource record (RR), the RR's RDATA format, and its 126 ASCII representation. 128 1.1 Background and Related Documents 130 The reader is assumed to be familiar with the basic DNS concepts 131 described in RFC1034 [RFC1034], RFC1035 [RFC1035] and subsequent RFCs 132 that update them: RFC2136 [RFC2136], RFC2181 [RFC2181] and RFC2308 133 [RFC2308]. 135 This document is part of a family of documents that define the DNS 136 security extensions. The DNS security extensions (DNSSEC) are a 137 collection of resource records and DNS protocol modifications that 138 add source authentication and data integrity to the Domain Name 139 System (DNS). An introduction to DNSSEC and definition of common 140 terms can be found in [I-D.ietf-dnsext-dnssec-intro]. A description 141 of DNS protocol modifications can be found in 142 [I-D.ietf-dnsext-dnssec-protocol]. This document defines the DNSSEC 143 resource records. 145 1.2 Reserved Words 147 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 148 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 149 document are to be interpreted as described in RFC 2119 [RFC2119]. 151 1.3 Editors' Notes 153 1.3.1 Open Technical Issues 155 The cryptographic algorithm types (Appendix A) requires input from 156 the working group. The DSA algorithm was moved to OPTIONAL. This 157 had strong consensus in workshops and various discussions and a 158 separate Internet-Draft solely to move DSA from MANDATORY to OPTIONAL 159 seemed excessive. This draft solicits input on that proposed change. 161 1.3.2 Technical Changes or Corrections 163 Please report technical corrections to dnssec-editors@east.isi.edu. 164 To assist the editors, please indicate the text in error and point 165 out the RFC that defines the correct behavior. For a technical 166 change where no RFC that defines the correct behavior, or if there's 167 more than one applicable RFC and the definitions conflict, please 168 post the issue to namedroppers. 170 An example correction to dnssec-editors might be: Page X says 171 "DNSSEC RRs SHOULD be automatically returned in responses." This was 172 true in RFC 2535, but RFC 3225 (Section 3, 3rd paragraph) says the 173 DNSSEC RR types MUST NOT be included in responses unless the resolver 174 indicated support for DNSSEC. 176 1.3.3 Typos and Minor Corrections 178 Please report any typos corrections to dnssec-editors@east.isi.edu. 179 To assist the editors, please provide enough context for us to find 180 the incorrect text quickly. 182 An example message to dnssec-editors might be: page X says "the 183 DNSSEC standard has been in development for over 1 years". It 184 should read "over 10 years". 186 2. The DNSKEY Resource Record 188 DNSSEC uses public key cryptography to sign and authenticate DNS 189 resource record sets (RRsets). The public keys are stored in DNSKEY 190 resource records and are used in the DNSSEC authentication process 191 described in [I-D.ietf-dnsext-dnssec-protocol]. For example, a zone 192 signs its authoritative RRsets using a private key and stores the 193 corresponding public key in a DNSKEY RR. A resolver can then use 194 these signatures to authenticate RRsets from the zone. 196 The DNSKEY RR is not intended as a record for storing arbitrary 197 public keys, and MUST NOT be used to store certificates or public 198 keys that do not directly relate to the DNS infrastructure. 200 The Type value for the DNSKEY RR type is 48. 202 The DNSKEY RR is class independent. 204 The DNSKEY RR has no special TTL requirements. 206 2.1 DNSKEY RDATA Wire Format 208 The RDATA for a DNSKEY RR consists of a 2 octet Flags Field, a 1 209 octet Protocol Field, a 1 octet Algorithm Field, and the Public Key 210 Field. 212 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 213 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 214 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 215 | Flags | Protocol | Algorithm | 216 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 217 / / 218 / Public Key / 219 / / 220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 222 2.1.1 The Flags Field 224 Bit 7 of the Flags field is the Zone Key flag. If bit 7 has value 1, 225 then the DNSKEY record holds a DNS zone key and the DNSKEY RR's owner 226 name MUST be the name of a zone. If bit 7 has value 0, then the 227 DNSKEY record holds some other type of DNS public key, such as a 228 public key used by TKEY. 230 Bit 15 of the Flags field is the Secure Entry Point flag, described 231 in [I-D.ietf-dnsext-keyrr-key-signing-flag]. If bit 15 has value 1, 232 then the DNSKEY record holds a key intended for use as a secure entry 233 point. This flag is only intended to be to a hint to zone signing or 234 debugging software as to the intended use of this DNSKEY record; 235 security-aware resolvers MUST NOT alter their behavior during the 236 signature validation process in any way based on the setting of this 237 bit. 239 Bits 0-6 and 8-14 are reserved: these bits MUST have value 0 upon 240 creation of the DNSKEY RR, and MUST be ignored upon reception. 242 2.1.2 The Protocol Field 244 The Protocol Field MUST have value 3 and MUST be treated as invalid 245 during signature verification if found to be some value other than 3. 247 2.1.3 The Algorithm Field 249 The Algorithm field identifies the public key's cryptographic 250 algorithm and determines the format of the Public Key field. A list 251 of DNSSEC algorithm types can be found in Appendix A.1 253 2.1.4 The Public Key Field 255 The Public Key Field holds the public key material itself. 257 2.1.5 Notes on DNSKEY RDATA Design 259 Although the Protocol Field always has value 3, it is retained for 260 backward compatibility with early versions of the KEY record. 262 2.2 The DNSKEY RR Presentation Format 264 The presentation format of the RDATA portion is as follows: 266 The Flag field MUST be represented as an unsigned decimal integer 267 with a value of 0, 256, or 257. 269 The Protocol Field MUST be represented as an unsigned decimal integer 270 with a value of 3. 272 The Algorithm field MUST be represented either as an unsigned 273 decimal integer or as an algorithm mnemonic as specified in Appendix 274 A.1. 276 The Public Key field MUST be represented as a Base64 encoding of the 277 Public Key. Whitespace is allowed within the Base64 text. For a 278 definition of Base64 encoding, see [RFC1521] Section 5.2. 280 2.3 DNSKEY RR Example 282 The following DNSKEY RR stores a DNS zone key for example.com. 284 example.com. 86400 IN DNSKEY 256 3 5 ( AQPSKmynfzW4kyBv015MUG2DeIQ3 285 Cbl+BBZH4b/0PY1kxkmvHjcZc8no 286 kfzj31GajIQKY+5CptLr3buXA10h 287 WqTkF7H6RfoRqXQeogmMHfpftf6z 288 Mv1LyBUgia7za6ZEzOJBOztyvhjL 289 742iU/TpPSEDhm2SNKLijfUppn1U 290 aNvv4w== ) 292 The first four text fields specify the owner name, TTL, Class, and RR 293 type (DNSKEY). Value 256 indicates that the Zone Key bit (bit 7) in 294 the Flags field has value 1. Value 3 is the fixed Protocol value. 295 Value 5 indicates the public key algorithm. Appendix A.1 identifies 296 algorithm type 5 as RSA/SHA1 and indicates that the format of the 297 RSA/SHA1 public key field is defined in [RFC3110]. The remaining 298 text is a Base64 encoding of the public key. 300 3. The RRSIG Resource Record 302 DNSSEC uses public key cryptography to sign and authenticate DNS 303 resource record sets (RRsets). Digital signatures are stored in 304 RRSIG resource records and are used in the DNSSEC authentication 305 process described in [I-D.ietf-dnsext-dnssec-protocol]. A 306 security-aware resolver can use these RRSIG RRs to authenticate 307 RRsets from the zone. The RRSIG RR MUST only be used to carry 308 verification material (digital signatures) used to secure DNS 309 operations. 311 An RRSIG record contains the signature for an RRset with a particular 312 name, class, and type. The RRSIG RR specifies a validity interval 313 for the signature and uses the Algorithm, the Signer's Name, and the 314 Key Tag to identify the DNSKEY RR containing the public key that a 315 resolver can use to verify the signature. 317 The Type value for the RRSIG RR type is 46. 319 The RRSIG RR is class independent. 321 An RRSIG RR MUST have the same class as the RRset it covers. 323 The TTL value of an RRSIG RR SHOULD match the TTL value of the RRset 324 it covers. 326 3.1 RRSIG RDATA Wire Format 328 The RDATA for an RRSIG RR consists of a 2 octet Type Covered field, a 329 1 octet Algorithm field, a 1 octet Labels field, a 4 octet Original 330 TTL field, a 4 octet Signature Expiration field, a 4 octet Signature 331 Inception field, a 2 octet Key tag, the Signer's Name field, and the 332 Signature field. 334 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 335 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 336 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 337 | Type Covered | Algorithm | Labels | 338 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 339 | Original TTL | 340 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 341 | Signature Expiration | 342 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 343 | Signature Inception | 344 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 345 | Key Tag | / 346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name / 347 / / 348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 349 / / 350 / Signature / 351 / / 352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 354 3.1.1 The Type Covered Field 356 The Type Covered field identifies the type of the RRset which is 357 covered by this RRSIG record. 359 3.1.2 The Algorithm Number Field 361 The Algorithm Number field identifies the cryptographic algorithm 362 used to create the signature. A list of DNSSEC algorithm types can 363 be found in Appendix A.1 365 3.1.3 The Labels Field 367 The Labels field specifies the number of labels in the original RRSIG 368 RR owner name. The significance of this field is that from it a 369 verifier can determine if the answer was synthesized from a wildcard. 370 If so, it can be used to determine what owner name was used in 371 generating the signature. 373 To validate a signature, the validator needs the original owner name 374 that was used to create the signature. If the original owner name 375 contains a wildcard label ("*"), the owner name may have been 376 expanded by the server during the response process, in which case the 377 validator will need to reconstruct the original owner name in order 378 to validate the signature. [I-D.ietf-dnsext-dnssec-protocol] 379 describes how to use the Labels field to reconstruct the original 380 owner name. 382 The value of the Label field MUST NOT count either the null (root) 383 label that terminates the owner name or the wildcard label (if 384 present). The value of the Label field MUST be less than or equal to 385 the number of labels in the RRSIG owner name. For example, 386 "www.example.com." has a Label field value of 3, and "*.example.com." 387 has a Label field value of 2. Root (".") has a Label field value of 388 0. 390 Note that, although the wildcard label is not included in the count 391 stored in the Label field of the RRSIG RR, the wildcard label is part 392 of the RRset's owner name when generating or verifying the signature. 394 3.1.4 Original TTL Field 396 The Original TTL field specifies the TTL of the covered RRset as it 397 appears in the authoritative zone. 399 The Original TTL field is necessary because a caching resolver 400 decrements the TTL value of a cached RRset. In order to validate a 401 signature, a resolver requires the original TTL. 402 [I-D.ietf-dnsext-dnssec-protocol] describes how to use the Original 403 TTL field value to reconstruct the original TTL. 405 3.1.5 Signature Expiration and Inception Fields 407 The Signature Expiration and Inception fields specify a validity 408 period for the signature. The RRSIG record MUST NOT be used for 409 authentication prior to the inception date and MUST NOT be used for 410 authentication after the expiration date. 412 Signature Expiration and Inception field values are in POSIX.1 time 413 format: a 32-bit unsigned number of seconds elapsed since 1 January 414 1970 00:00:00 UTC, ignoring leap seconds, in network byte order. The 415 longest interval which can be expressed by this format without 416 wrapping is approximately 136 years. An RRSIG RR can have an 417 Expiration field value which is numerically smaller than the 418 Inception field value if the expiration field value is near the 419 32-bit wrap-around point or if the signature is long lived. Because 420 of this, all comparisons involving these fields MUST use "Serial 421 number arithmetic" as defined in [RFC1982]. As a direct consequence, 422 the values contained in these fields cannot refer to dates more than 423 68 years in either the past or the future. 425 3.1.6 The Key Tag Field 427 The Key Tag field contains the key tag value of the DNSKEY RR that 428 validates this signature. Appendix B explains how to calculate Key 429 Tag values. 431 3.1.7 The Signer's Name Field 433 The Signer's Name field value identifies the owner name of the DNSKEY 434 RR which a security-aware resolver should use to validate this 435 signature. The Signer's Name field MUST contain the name of the zone 436 of the covered RRset. A sender MUST NOT use DNS name compression on 437 the Signer's Name field when transmitting a RRSIG RR. A receiver 438 which receives an RRSIG RR containing a compressed Signer's Name 439 field SHOULD decompress the field value. 441 3.1.8 The Signature Field 443 The Signature field contains the cryptographic signature which covers 444 the RRSIG RDATA (excluding the Signature field) and the RRset 445 specified by the RRSIG owner name, RRSIG class, and RRSIG Type 446 Covered field. 448 3.1.8.1 Signature Calculation 450 A signature covers the RRSIG RDATA (excluding the Signature Field) 451 and covers the data RRset specified by the RRSIG owner name, RRSIG 452 class, and RRSIG Type Covered field. The RRset is in canonical form 453 (see Section 6) and the set RR(1),...RR(n) is signed as follows: 455 signature = sign(RRSIG_RDATA | RR(1) | RR(2)... ) where 457 "|" denotes concatenation; 459 RRSIG_RDATA is the wire format of the RRSIG RDATA fields 460 with the Signer's Name field in canonical form and 461 the Signature field excluded; 463 RR(i) = owner | class | type | TTL | RDATA length | RDATA; 465 "owner" is the fully qualified owner name of the RRset in 466 canonical form (for RRs with wildcard owner names, the 467 wildcard label is included in the owner name); 469 Each RR MUST have the same owner name as the RRSIG RR; 471 Each RR MUST have the same class as the RRSIG RR; 473 Each RR in the RRset MUST have the RR type listed in the 474 RRSIG RR's Type Covered field; 476 Each RR in the RRset MUST have the TTL listed in the 477 RRSIG Original TTL Field; 479 Any DNS names in the RDATA field of each RR MUST be in 480 canonical form; and 482 The RRset MUST be sorted in canonical order. 484 3.2 The RRSIG RR Presentation Format 486 The presentation format of the RDATA portion is as follows: 488 The Type Covered field value MUST be represented either as an 489 unsigned decimal integer or as the mnemonic for the covered RR type. 491 The Algorithm field value MUST be represented either as an unsigned 492 decimal integer or as an algorithm mnemonic as specified in Appendix 493 A.1. 495 The Labels field value MUST be represented as an unsigned decimal 496 integer. 498 The Original TTL field value MUST be represented as an unsigned 499 decimal integer. 501 The Signature Inception Time and Expiration Time field values MUST be 502 represented in the form YYYYMMDDHHmmSS in UTC, where: 504 YYYY is the year (0000-9999, but see Section 3.1.5); 506 MM is the month number (01-12); 508 DD is the day of the month (01-31); 510 HH is the hour in 24 hours notation (00-23); 512 mm is the minute (00-59); 514 SS is the second (00-59). 516 The Key Tag field MUST be represented as an unsigned decimal integer. 518 The Signer's Name field value MUST be represented as a domain name. 520 The Signature field is represented as a Base64 encoding of the 521 signature. Whitespace is allowed within the Base64 text. For a 522 definition of Base64 encoding see [RFC1521] Section 5.2. 524 3.3 RRSIG RR Example 526 The following an RRSIG RR stores the signature for the A RRset of 527 host.example.com: 529 host.example.com. 86400 IN RRSIG A 5 3 86400 20030322173103 ( 530 20030220173103 2642 example.com. 531 oJB1W6WNGv+ldvQ3WDG0MQkg5IEhjRip8WTr 532 PYGv07h108dUKGMeDPKijVCHX3DDKdfb+v6o 533 B9wfuh3DTJXUAfI/M0zmO/zz8bW0Rznl8O3t 534 GNazPwQKkRN20XPXV6nwwfoXmJQbsLNrLfkG 535 J5D6fwFm8nN+6pBzeDQfsS3Ap3o= ) 537 The first four fields specify the owner name, TTL, Class, and RR type 538 (RRSIG). The "A" represents the Type Covered field. The value 5 539 identifies the Algorithm used (RSA-SHA1) to create the signature. 540 The value 3 is the number of Labels in the original owner name. The 541 value 86400 in the RRSIG RDATA is the Original TTL for the covered A 542 RRset. 20030322173103 and 20030220173103 are the expiration and 543 inception dates, respectively. 2642 is the Key Tag, and example.com. 544 is the Signer's Name. The remaining text is a Base64 encoding of the 545 signature. 547 Note that combination of RRSIG RR owner name, class, and Type Covered 548 indicate that this RRSIG covers the "host.example.com" A RRset. The 549 Label value of 3 indicates that no wildcard expansion was used. The 550 Algorithm, Signer's Name, and Key Tag indicate this signature can be 551 authenticated using an example.com zone DNSKEY RR whose algorithm is 552 5 and key tag is 2642. 554 4. The NSEC Resource Record 556 The NSEC resource record lists two separate things: the owner name of 557 the next authoritative RRset in the canonical ordering of the zone, 558 and the set of RR types present at the NSEC RR's owner name. The 559 complete set of NSEC RRs in a zone both indicate which authoritative 560 RRsets exist in a zone and also form a chain of authoritative owner 561 names in the zone. This information is used to provide authenticated 562 denial of existence for DNS data, as described in 563 [I-D.ietf-dnsext-dnssec-protocol]. 565 The type value for the NSEC RR is 47. 567 The NSEC RR is class independent. 569 The NSEC RR has no special TTL requirements. 571 4.1 NSEC RDATA Wire Format 573 The RDATA of the NSEC RR is as shown below: 575 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 576 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 577 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 578 / Next Domain Name / 579 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 580 / Type Bit Map / 581 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 583 4.1.1 The Next Domain Name Field 585 The Next Domain Name field contains the owner name of the next 586 authoritative RRset in the canonical ordering of the zone; see 587 Section 6.1 for an explanation of canonical ordering. The value of 588 the Next Domain Name field in the last NSEC record in the zone is the 589 name of the zone apex (the owner name of the zone's SOA RR). 591 A sender MUST NOT use DNS name compression on the Next Domain Name 592 field when transmitting an NSEC RR. A receiver which receives an 593 NSEC RR containing a compressed Next Domain Name field SHOULD 594 decompress the field value. 596 Owner names of RRsets not authoritative for the given zone (such as 597 glue records) MUST NOT be listed in the Next Domain Name unless at 598 least one authoritative RRset exists at the same owner name. 600 4.1.2 The Type Bit Map Field 602 The Type Bit Map field identifies the RRset types which exist at the 603 NSEC RR's owner name. 605 Each bit in the Type Bit Map field corresponds to an RR type. Bit 1 606 corresponds to RR type 1 (A), bit 2 corresponds to RR type 2 (NS), 607 and so forth. If a bit is set to 1, it indicates that an RRset of 608 that type is present for the NSEC RR's owner name. If a bit is set to 609 0, it indicates that no RRset of that type present for the NSEC RR's 610 owner name. 612 A zone MUST NOT generate an NSEC RR for any domain name that only 613 holds glue records. 615 Bits representing pseudo-RR types MUST be set to 0, since they do not 616 appear in zone data. If encountered, they must be ignored upon 617 reading. 619 Trailing zero octets MUST be omitted. The length of the Type Bit Map 620 field varies, and is determined by the type code with the largest 621 numerical value among the set of RR types present at the NSEC RR's 622 owner name. Trailing zero octets not specified MUST be interpreted 623 as zero octets. 625 The above Type Bit Map format MUST NOT be used when an RR type code 626 with numerical value greater than 127 is present. 628 Bit 0 in the Type Bit Map field indicates the Type Bit Map format. A 629 value of 0 in bit 0 denotes the format described above, therefore bit 630 0 MUST have a value of 0. The format and meaning of a Type Bit Map 631 with a value of 1 in bit 0 is undefined. 633 4.1.3 Inclusion of Wildcard Names in NSEC RDATA 635 If a wildcard owner name appears in a zone, the wildcard label ("*") 636 is treated as a literal symbol and is treated the same as any other 637 owner name for purposes of generating NSEC RRs. Wildcard owner names 638 appear in the Next Domain Name field without any wildcard expansion. 639 [I-D.ietf-dnsext-dnssec-protocol] describes the impact of wildcards 640 on authenticated denial of existence. 642 4.2 The NSEC RR Presentation Format 644 The presentation format of the RDATA portion is as follows: 646 The Next Domain Name field is represented as a domain name. 648 The Type Bit Map field is represented either as a sequence of RR type 649 mnemonics or as a sequence of unsigned decimal integers denoting the 650 RR type codes. 652 4.3 NSEC RR Example 654 The following NSEC RR identifies the RRsets associated with 655 alfa.example.com. and identifies the next authoritative name after 656 alfa.example.com. 658 alfa.example.com. 86400 IN NSEC host.example.com. A MX RRSIG NSEC 660 The first four text fields specify the name, TTL, Class, and RR type 661 (NSEC). The entry host.example.com. is the next authoritative name 662 after alfa.example.com. in canonical order. The A, MX, RRSIG and NSEC 663 mnemonics indicate there are A, MX, RRSIG and NSEC RRsets associated 664 with the name alfa.example.com. 666 Assuming that the resolver can authenticate this NSEC record, it 667 could be used to prove that beta.example.com does not exist, or could 668 be used to prove there is no AAAA record associated with 669 alfa.example.com. Authenticated denial of existence is discussed in 670 [I-D.ietf-dnsext-dnssec-protocol]. 672 5. The DS Resource Record 674 The DS Resource Record refers to a DNSKEY RR and is used in the DNS 675 DNSKEY authentication process. A DS RR refers to a DNSKEY RR by 676 storing the key tag, algorithm number, and a digest of the DNSKEY RR. 677 Note that while the digest should be sufficient to identify the key, 678 storing the key tag and key algorithm helps make the identification 679 process more efficient. By authenticating the DS record, a resolver 680 can authenticate the DNSKEY RR to which the DS record points. The 681 key authentication process is described in 682 [I-D.ietf-dnsext-dnssec-protocol]. 684 The DS RR and its corresponding DNSKEY RR have the same owner name, 685 but they are stored in different locations. The DS RR appears only 686 on the upper (parental) side of a delegation, and is authoritative 687 data in the parent zone. For example, the DS RR for "example.com" is 688 stored in the "com" zone (the parent zone) rather than in the 689 "example.com" zone (the child zone). The corresponding DNSKEY RR is 690 stored in the "example.com" zone (the child zone). This simplifies 691 DNS zone management and zone signing, but introduces special response 692 processing requirements for the DS RR; these are described in 693 [I-D.ietf-dnsext-dnssec-protocol]. 695 The type number for the DS record is 43. 697 The DS resource record is class independent. 699 The DS RR has no special TTL requirements. 701 5.1 DS RDATA Wire Format 703 The RDATA for a DS RR consists of a 2 octet Key Tag field, a one 704 octet Algorithm field, a one octet Digest Type field, and a Digest 705 field. 707 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 708 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 709 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 710 | Key Tag | Algorithm | Digest Type | 711 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 712 / / 713 / Digest / 714 / / 715 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 717 5.1.1 The Key Tag Field 719 The Key Tag field lists the key tag of the DNSKEY RR referred to by 720 the DS record. 722 The Key Tag used by the DS RR is identical to the Key Tag used by 723 RRSIG RRs. Appendix B describes how to compute a Key Tag. 725 5.1.2 The Algorithm Field 727 The Algorithm field lists the algorithm number of the DNSKEY RR 728 referred to by the DS record. 730 The algorithm number used by the DS RR is identical to the algorithm 731 number used by RRSIG and DNSKEY RRs. Appendix A.1 lists the algorithm 732 number types. 734 5.1.3 The Digest Type Field 736 The DS RR refers to a DNSKEY RR by including a digest of that DNSKEY 737 RR. The Digest Type field identifies the algorithm used to construct 738 the digest. Appendix A.2 lists the possible digest algorithm types. 740 5.1.4 The Digest Field 742 The DS record refers to a DNSKEY RR by including a digest of that 743 DNSKEY RR. The Digest field holds the digest. 745 The digest is calculated by concatenating the canonical form of the 746 fully qualified owner name of the DNSKEY RR with the DNSKEY RDATA, 747 and then applying the digest algorithm. 749 digest = digest_algorithm( DNSKEY owner name | DNSKEY RDATA); 751 "|" denotes concatenation 753 DNSKEY RDATA = Flags | Protocol | Algorithm | Public Key. 755 The size of the digest may vary depending on the digest algorithm and 756 DNSKEY RR size. Currently, the only defined digest algorithm is 757 SHA-1, which produces a 20 octet digest. 759 5.2 Processing of DS RRs When Validating Responses 761 The DS RR links the authentication chain across zone boundaries, so 762 the DS RR requires extra care in processing. The DNSKEY RR referred 763 to in the DS RR MUST be a DNSSEC zone key. The DNSKEY RR Flags MUST 764 have Flags bit 7 set to value 1. If the key tag does not indicate a 765 DNSSEC zone key, the DS RR (and DNSKEY RR it references) MUST NOT be 766 used in the validation process. 768 5.3 The DS RR Presentation Format 770 The presentation format of the RDATA portion is as follows: 772 The Key Tag field MUST be represented as an unsigned decimal integer. 774 The Algorithm field MUST be represented either as an unsigned decimal 775 integer or as an algorithm mnemonic specified in Appendix A.1. 777 The Digest Type field MUST be represented as an unsigned decimal 778 integer. 780 The Digest MUST be represented as a sequence of case-insensitive 781 hexadecimal digits. Whitespace is allowed within the hexadecimal 782 text. 784 5.4 DS RR Example 786 The following example shows a DNSKEY RR and its corresponding DS RR. 788 dskey.example.com. 86400 IN DNSKEY 256 3 5 ( AQOeiiR0GOMYkDshWoSKz9Xz 789 fwJr1AYtsmx3TGkJaNXVbfi/ 790 2pHm822aJ5iI9BMzNXxeYCmZ 791 DRD99WYwYqUSdjMmmAphXdvx 792 egXd/M5+X7OrzKBaMbCVdFLU 793 Uh6DhweJBjEVv5f2wwjM9Xzc 794 nOf+EPbtG9DMBmADjFDc2w/r 795 ljwvFw== 796 ) ; key id = 60485 798 dskey.example.com. 86400 IN DS 60485 5 1 ( 2BB183AF5F22588179A53B0A 799 98631FAD1A292118 ) 801 The first four text fields specify the name, TTL, Class, and RR type 802 (DS). Value 60485 is the key tag for the corresponding 803 "dskey.example.com." DNSKEY RR, and value 5 denotes the algorithm 804 used by this "dskey.example.com." DNSKEY RR. The value 1 is the 805 algorithm used to construct the digest, and the rest of the RDATA 806 text is the digest in hexadecimal. 808 6. Canonical Form and Order of Resource Records 810 This section defines a canonical form for resource records, a 811 canonical ordering of DNS names, and a canonical ordering of resource 812 records within an RRset. A canonical name order is required to 813 construct the NSEC name chain. A canonical RR form and ordering 814 within an RRset are required to construct and verify RRSIG RRs. 816 6.1 Canonical DNS Name Order 818 For purposes of DNS security, owner names are ordered by treating 819 individual labels as unsigned left-justified octet strings. The 820 absence of a octet sorts before a zero value octet, and upper case 821 US-ASCII letters are treated as if they were lower case US-ASCII 822 letters. 824 To compute the canonical ordering of a set of DNS names, start by 825 sorting the names according to their most significant (rightmost) 826 labels. For names in which the most significant label is identical, 827 continue sorting according to their next most significant label, and 828 so forth. 830 For example, the following names are sorted in canonical DNS name 831 order. The most significant label is "example". At this level, 832 "example" sorts first, followed by names ending in "a.example", then 833 names ending "z.example". The names within each level are sorted in 834 the same way. 836 example 837 a.example 838 yljkjljk.a.example 839 Z.a.example 840 zABC.a.EXAMPLE 841 z.example 842 \001.z.example 843 *.z.example 844 \200.z.example 846 6.2 Canonical RR Form 848 For purposes of DNS security, the canonical form of an RR is the wire 849 format of the RR where: 851 1. Every domain name in the RR is fully expanded (no DNS name 852 compression) and fully qualified; 854 2. All uppercase US-ASCII letters in the owner name of the RR are 855 replaced by the corresponding lowercase US-ASCII letters; 857 3. If the type of the RR is NS, MD, MF, CNAME, SOA, MB, MG, MR, PTR, 858 HINFO, MINFO, MX, HINFO, RP, AFSDB, RT, SIG, PX, NXT, NAPTR, KX, 859 SRV, DNAME, A6, RRSIG or NSEC, all uppercase US-ASCII letters in 860 the DNS names contained within the RDATA are replaced by the 861 corresponding lowercase US-ASCII letters; 863 4. If the owner name of the RR is a wildcard name, the owner name is 864 in its original unexpanded form, including the "*" label (no 865 wildcard substitution); and 867 5. The RR's TTL is set to its original value as it appears in the 868 originating authoritative zone or the Original TTL field of the 869 covering RRSIG RR. 871 6.3 Canonical RR Ordering Within An RRset 873 For purposes of DNS security, RRs with the same owner name, class, 874 and type are sorted by RDATA: first by RDATA length, shortest to 875 longest, then by the canonical form of the RDATA itself in the case 876 of length equality, treating the RDATA portion of the canonical form 877 of each RR as a left justified unsigned octet sequence. The absence 878 of an octet sorts before a zero octet. 880 7. IANA Considerations 882 This document introduces no new IANA considerations, because all of 883 the protocol parameters used in this document have already been 884 assigned by previous specifications. However, since the evolution of 885 DNSSEC has been long and somewhat convoluted, this section attempts 886 to describe the current state of the IANA registries and other 887 protocol parameters which are (or once were) related to DNSSEC. 889 DNS Resource Record Types: [RFC2535] assigned types 24, 25, and 30 to 890 the SIG, KEY, and NXT RRs, respectively. 891 [I-D.ietf-dnsext-delegation-signer] assigned DNS Resource Record 892 Type 43 to DS. [I-D.ietf-dnsext-dnssec-2535typecode-change] 893 assigned types 46, 47, and 48 to the RRSIG, NSEC, and DNSKEY RRs, 894 respectively. [I-D.ietf-dnsext-dnssec-2535typecode-change] also 895 marked type 30 (NXT) as Obsolete, and restricted use of types 24 896 (SIG) and 25 (KEY) to the "SIG(0)" transaction security protocol 897 described in [RFC2931]. 899 SIG(0) Algorithm Numbers: [RFC2535] created an IANA registry for 900 DNSSEC Resource Record Algorithm field numbers, and assigned 901 values 1-4 and 252-255. [RFC3110] assigned value 5. 902 [I-D.ietf-dnsext-dnssec-2535typecode-change] renamed this registry 903 to "SIG(0) Algorithm Numbers" to indicate that this registry is 904 now used only by the "SIG(0)" transaction security protocol 905 described in [RFC2931]. 907 DNS Security Algorithm Numbers: 908 [I-D.ietf-dnsext-dnssec-2535typecode-change] created a new "DNS 909 Security Algorithm Numbers" registry, assigned initial values to 910 algorithms 2 (Diffie-Hellman), 3 (DSA/SHA-1), 5 (RSA/SHA-1), 253 911 (private algorithms - domain name) and 254 (private algorithms - 912 OID), and reserved values 0, 1, and 255. As stated in 913 [I-D.ietf-dnsext-dnssec-2535typecode-change], value 4 and values 914 6-252 are available for assignment by IETF Standards Action. 916 [I-D.ietf-dnsext-delegation-signer] created an IANA registry for 917 DNSSEC DS Digest Types, and assigned value 0 to reserved and value 918 1 to SHA-1. 920 KEY Protocol Values: [RFC2535] created an IANA Registry for KEY 921 Protocol Values, but [RFC3445] re-assigned all assigned values 922 other than 3 to reserved and closed this IANA registry. The 923 registry remains closed, and all KEY and DNSKEY records are 924 required to have Protocol Octet value of 3. 926 Flag bits in the KEY and DNSKEY RRs: The Flag bits in the KEY and 927 DNSKEY RRs are not assigned by IANA, and there is no IANA registry 928 for these flags. All changes to the meaning of the Flag bits in 929 the KEY and DNSKEY RRs require a standards action. 931 Bit zero of Type Bit Map in NSEC RRs: The meaning of a value of 1 in 932 bit zero of the Type Bit Map of an NSEC RR can only be assigned by 933 a standards action. 935 8. Security Considerations 937 This document describes the format of four DNS resource records used 938 by the DNS security extensions, and presents an algorithm for 939 calculating a key tag for a public key. Other than the items 940 described below, the resource records themselves introduce no 941 security considerations. The use of these records is specified in a 942 separate document, and security considerations related to the use 943 these resource records are discussed in that document. 945 The DS record points to a DNSKEY RR using a cryptographic digest, the 946 key algorithm type and a key tag. The DS record is intended to 947 identify an existing DNSKEY RR, but it is theoretically possible for 948 an attacker to generate a DNSKEY that matches all the DS fields. The 949 probability of constructing such a matching DNSKEY depends on the 950 type of digest algorithm in use. The only currently defined digest 951 algorithm is SHA-1, and the working group believes that constructing 952 a public key which would match the algorithm, key tag, and SHA-1 953 digest given in a DS record would be a sufficiently difficult problem 954 that such an attack is not a serious threat at this time. 956 The key tag is used to help select DNSKEY resource records 957 efficiently, but it does not uniquely identify a single DNSKEY 958 resource record. It is possible for two distinct DNSKEY RRs to have 959 the same owner name, the same algorithm type, and the same key tag. 960 An implementation which used only the key tag to select a DNSKEY RR 961 might select the wrong public key in some circumstances. 963 9. Acknowledgments 965 This document was created from the input and ideas of several members 966 of the DNS Extensions Working Group and working group mailing list. 967 The editors would like to express their thanks for the comments and 968 suggestions received during the revision of these security extension 969 specifications. 971 Normative References 973 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 974 STD 13, RFC 1034, November 1987. 976 [RFC1035] Mockapetris, P., "Domain names - implementation and 977 specification", STD 13, RFC 1035, November 1987. 979 [RFC1521] Borenstein, N. and N. Freed, "MIME (Multipurpose Internet 980 Mail Extensions) Part One: Mechanisms for Specifying and 981 Describing the Format of Internet Message Bodies", RFC 982 1521, September 1993. 984 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 985 August 1996. 987 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 988 Requirement Levels", BCP 14, RFC 2119, March 1997. 990 [RFC2136] Vixie, P., Thomson, S., Rekhter, Y. and J. Bound, "Dynamic 991 Updates in the Domain Name System (DNS UPDATE)", RFC 2136, 992 April 1997. 994 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 995 Specification", RFC 2181, July 1997. 997 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 998 NCACHE)", RFC 2308, March 1998. 1000 [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC 1001 2671, August 1999. 1003 [RFC2931] Eastlake, D., "DNS Request and Transaction Signatures ( 1004 SIG(0)s)", RFC 2931, September 2000. 1006 [RFC3110] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain 1007 Name System (DNS)", RFC 3110, May 2001. 1009 [RFC3445] Massey, D. and S. Rose, "Limiting the Scope of the KEY 1010 Resource Record (RR)", RFC 3445, December 2002. 1012 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 1013 (RR) Types", RFC 3597, September 2003. 1015 [I-D.ietf-dnsext-delegation-signer] 1016 Gudmundsson, O., "Delegation Signer Resource Record", 1017 draft-ietf-dnsext-delegation-signer-15 (work in progress), 1018 June 2003. 1020 [I-D.ietf-dnsext-dnssec-intro] 1021 Arends, R., Austein, R., Larson, M., Massey, D. and S. 1022 Rose, "DNS Security Introduction and Requirements", 1023 draft-ietf-dnsext-dnssec-intro-07 (work in progress), 1024 October 2003. 1026 [I-D.ietf-dnsext-dnssec-protocol] 1027 Arends, R., Austein, R., Larson, M., Massey, D. and S. 1028 Rose, "Protocol Modifications for the DNS Security 1029 Extensions", draft-ietf-dnsext-dnssec-protocol-03 (work in 1030 progress), October 2003. 1032 [I-D.ietf-dnsext-keyrr-key-signing-flag] 1033 Kolkman, O., Schlyter, J. and E. Lewis, "KEY RR Secure 1034 Entry Point Flag", 1035 draft-ietf-dnsext-keyrr-key-signing-flag-11 (work in 1036 progress), October 2003. 1038 [I-D.ietf-dnsext-dnssec-2535typecode-change] 1039 Weiler, S., "Legacy Resolver Compatibility for Delegation 1040 Signer", draft-ietf-dnsext-dnssec-2535typecode-change-05 1041 (work in progress), October 2003. 1043 Informative References 1045 [RFC2535] Eastlake, D., "Domain Name System Security Extensions", 1046 RFC 2535, March 1999. 1048 [RFC2930] Eastlake, D., "Secret Key Establishment for DNS (TKEY 1049 RR)", RFC 2930, September 2000. 1051 Authors' Addresses 1053 Roy Arends 1054 Telematica Instituut 1055 Drienerlolaan 5 1056 7522 NB Enschede 1057 NL 1059 EMail: roy.arends@telin.nl 1061 Rob Austein 1062 Internet Software Consortium 1063 40 Gavin Circle 1064 Reading, MA 01867 1065 USA 1067 EMail: sra@isc.org 1069 Matt Larson 1070 VeriSign, Inc. 1071 21345 Ridgetop Circle 1072 Dulles, VA 20166-6503 1073 USA 1075 EMail: mlarson@verisign.com 1077 Dan Massey 1078 USC Information Sciences Institute 1079 3811 N. Fairfax Drive 1080 Arlington, VA 22203 1081 USA 1083 EMail: masseyd@isi.edu 1084 Scott Rose 1085 National Institute for Standards and Technology 1086 100 Bureau Drive 1087 Gaithersburg, MD 20899-8920 1088 USA 1090 EMail: scott.rose@nist.gov 1092 Appendix A. DNSSEC Algorithm and Digest Types 1094 The DNS security extensions are designed to be independent of the 1095 underlying cryptographic algorithms. The DNSKEY, RRSIG, and DS 1096 resource records all use a DNSSEC Algorithm Number to identify the 1097 cryptographic algorithm in use by the resource record. The DS 1098 resource record also specifies a Digest Algorithm Number to identify 1099 the digest algorithm used to construct the DS record. The currently 1100 defined Algorithm and Digest Types are listed below. Additional 1101 Algorithm or Digest Types could be added as advances in cryptography 1102 warrant. 1104 A DNSSEC aware resolver or name server MUST implement all MANDATORY 1105 algorithms. 1107 A.1 DNSSEC Algorithm Types 1109 An "Algorithm Number" field in the DNSKEY, RRSIG, and DS resource 1110 record types identifies the cryptographic algorithm used by the 1111 resource record. Algorithm specific formats are described in 1112 separate documents. The following table lists the currently defined 1113 algorithm types and provides references to their supporting 1114 documents: 1116 VALUE Algorithm [mnemonic] RFC STATUS 1117 0 Reserved - - 1118 1 RSA/MD5 [RSA/MD5] RFC 2537 NOT RECOMMENDED 1119 2 Diffie-Hellman [DH] RFC 2539 OPTIONAL 1120 3 DSA [DSA] RFC 2536 OPTIONAL 1121 4 elliptic curve [ECC] TBA OPTIONAL 1122 5 RSA/SHA1 [RSA/SHA1] RFC 3110 MANDATORY 1123 6-251 available for assignment - 1124 252 reserved - 1125 253 private [PRIVATE_DNS] see below OPTIONAL 1126 254 private [PRIVATE_OID] see below OPTIONAL 1127 255 reserved - - 1129 A.1.1 Private Algorithm Types 1131 Algorithm number 253 is reserved for private use and will never be 1132 assigned to a specific algorithm. The public key area in the DNSKEY 1133 RR and the signature area in the RRSIG RR begin with a wire encoded 1134 domain name, which MUST NOT be compressed. The domain name indicates 1135 the private algorithm to use and the remainder of the public key area 1136 is determined by that algorithm. Entities should only use domain 1137 names they control to designate their private algorithms. 1139 Algorithm number 254 is reserved for private use and will never be 1140 assigned to a specific algorithm. The public key area in the DNSKEY 1141 RR and the signature area in the RRSIG RR begin with an unsigned 1142 length byte followed by a BER encoded Object Identifier (ISO OID) of 1143 that length. The OID indicates the private algorithm in use and the 1144 remainder of the area is whatever is required by that algorithm. 1145 Entities should only use OIDs they control to designate their private 1146 algorithms. 1148 A.2 DNSSEC Digest Types 1150 A "Digest Type" field in the DS resource record types identifies the 1151 cryptographic digest algorithm used by the resource record. The 1152 following table lists the currently defined digest algorithm types. 1154 VALUE Algorithm STATUS 1155 0 Reserved - 1156 1 SHA-1 MANDATORY 1157 2-255 Unassigned - 1159 Appendix B. Key Tag Calculation 1161 The Key Tag field in the RRSIG and DS resource record types provides 1162 a mechanism for selecting a public key efficiently. In most cases, a 1163 combination of owner name, algorithm, and key tag can efficiently 1164 identify a DNSKEY record. Both the RRSIG and DS resource records 1165 have corresponding DNSKEY records. The Key Tag field in the RRSIG 1166 and DS records can be used to help select the corresponding DNSKEY RR 1167 efficiently when more than one candidate DNSKEY RR is available. 1169 However, it is essential to note that the key tag is not a unique 1170 identifier. It is theoretically possible for two distinct DNSKEY RRs 1171 to have the same owner name, the same algorithm, and the same key 1172 tag. The key tag is used to limit the possible candidate keys, but it 1173 does not uniquely identify a DNSKEY record. Implementations MUST NOT 1174 assume that the key tag uniquely identifies a DNSKEY RR. 1176 The key tag is the same for all DNSKEY algorithm types except 1177 algorithm 1 (please see Appendix B.1 for the definition of the key 1178 tag for algorithm 1). The key tag algorithm is the sum of the wire 1179 format of the DNSKEY RDATA broken into 2 octet groups. First the 1180 RDATA (in wire format) is treated as a series of 2 octet groups, 1181 these groups are then added together ignoring any carry bits. A 1182 reference implementation of the key tag algorithm is as an ANSI C 1183 function is given below with the RDATA portion of the DNSKEY RR is 1184 used as input. It is not necessary to use the following reference 1185 code verbatim, but the numerical value of the Key Tag MUST be 1186 identical to what the reference implementation would generate for the 1187 same input. 1189 Please note that the algorithm for calculating the Key Tag is almost 1190 but not completely identical to the familiar ones complement checksum 1191 used in many other Internet protocols. Key Tags MUST be calculated 1192 using the algorithm described here rather than the ones complement 1193 checksum. 1195 The following ANSI C reference implementation calculates the value of 1196 a Key Tag. This reference implementation applies to all algorithm 1197 types except algorithm 1 (see Appendix B.1). The input is the wire 1198 format of the RDATA portion of the DNSKEY RR. The code is written 1199 for clarity, not efficiency. 1201 /* 1202 * Assumes that int is at least 16 bits. 1203 * First octet of the key tag is the most significant 8 bits of the 1204 * return value; 1205 * Second octet of the key tag is the least significant 8 bits of the 1206 * return value. 1208 */ 1210 unsigned int 1211 keytag ( 1212 unsigned char key[], /* the RDATA part of the DNSKEY RR */ 1213 unsigned int keysize /* the RDLENGTH */ 1214 ) 1215 { 1216 unsigned long ac; /* assumed to be 32 bits or larger */ 1217 int i; /* loop index */ 1219 for ( ac = 0, i = 0; i < keysize; ++i ) 1220 ac += (i & 1) ? key[i] : key[i] << 8; 1221 ac += (ac >> 16) & 0xFFFF; 1222 return ac & 0xFFFF; 1223 } 1225 B.1 Key Tag for Algorithm 1 (RSA/MD5) 1227 The key tag for algorithm 1 (RSA/MD5) is defined differently than the 1228 key tag for all other algorithms, for historical reasons. For a 1229 DNSKEY RR with algorithm 1, the key tag is defined to be the most 1230 significant 16 bits of the least significant 24 bits in the public 1231 key modulus (in other words, the 4th to last and 3rd to last octets 1232 of the public key modulus). 1234 Please note that Algorithm 1 is NOT RECOMMENDED. 1236 Intellectual Property Statement 1238 The IETF takes no position regarding the validity or scope of any 1239 intellectual property or other rights that might be claimed to 1240 pertain to the implementation or use of the technology described in 1241 this document or the extent to which any license under such rights 1242 might or might not be available; neither does it represent that it 1243 has made any effort to identify any such rights. Information on the 1244 IETF's procedures with respect to rights in standards-track and 1245 standards-related documentation can be found in BCP-11. Copies of 1246 claims of rights made available for publication and any assurances of 1247 licenses to be made available, or the result of an attempt made to 1248 obtain a general license or permission for the use of such 1249 proprietary rights by implementors or users of this specification can 1250 be obtained from the IETF Secretariat. 1252 The IETF invites any interested party to bring to its attention any 1253 copyrights, patents or patent applications, or other proprietary 1254 rights which may cover technology that may be required to practice 1255 this standard. Please address the information to the IETF Executive 1256 Director. 1258 Full Copyright Statement 1260 Copyright (C) The Internet Society (2003). All Rights Reserved. 1262 This document and translations of it may be copied and furnished to 1263 others, and derivative works that comment on or otherwise explain it 1264 or assist in its implementation may be prepared, copied, published 1265 and distributed, in whole or in part, without restriction of any 1266 kind, provided that the above copyright notice and this paragraph are 1267 included on all such copies and derivative works. However, this 1268 document itself may not be modified in any way, such as by removing 1269 the copyright notice or references to the Internet Society or other 1270 Internet organizations, except as needed for the purpose of 1271 developing Internet standards in which case the procedures for 1272 copyrights defined in the Internet Standards process must be 1273 followed, or as required to translate it into languages other than 1274 English. 1276 The limited permissions granted above are perpetual and will not be 1277 revoked by the Internet Society or its successors or assignees. 1279 This document and the information contained herein is provided on an 1280 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 1281 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 1282 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 1283 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1284 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1286 Acknowledgement 1288 Funding for the RFC Editor function is currently provided by the 1289 Internet Society.