idnits 2.17.1 draft-ietf-dnsext-dnssec-records-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1.a on line 24. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1307. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1284. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1291. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1297. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. ** The document uses RFC 3667 boilerplate or RFC 3978-like boilerplate instead of verbatim RFC 3978 boilerplate. After 6 May 2005, submission of drafts without verbatim RFC 3978 boilerplate is not accepted. The following non-3978 patterns matched text found in the document. That text should be removed or replaced: This document is an Internet-Draft and is subject to all provisions of Section 3 of RFC 3667. By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. 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 == 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 (September 20, 2004) is 7158 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: 'Mnemonic' is mentioned on line 1153, but not defined == Missing Reference: 'RSAMD5' is mentioned on line 1156, but not defined == Missing Reference: 'DH' is mentioned on line 1157, but not defined == Missing Reference: 'DSA' is mentioned on line 1158, but not defined == Missing Reference: 'ECC' is mentioned on line 1159, but not defined == Missing Reference: 'RSASHA1' is mentioned on line 1160, but not defined == Missing Reference: 'INDIRECT' is mentioned on line 1161, but not defined == Missing Reference: 'PRIVATEDNS' is mentioned on line 1162, but not defined == Missing Reference: 'PRIVATEOID' is mentioned on line 1163, but not defined == Unused Reference: 'RFC2136' is defined on line 1027, but no explicit reference was found in the text == Unused Reference: 'RFC2671' is defined on line 1040, but no explicit reference was found in the text == Unused Reference: 'RFC3845' is defined on line 1081, but no explicit reference was found in the text == Outdated reference: A later version (-13) exists of draft-ietf-dnsext-dnssec-intro-10 == Outdated reference: A later version (-09) exists of draft-ietf-dnsext-dnssec-protocol-06 ** Obsolete normative reference: RFC 2671 (Obsoleted by RFC 6891) ** Obsolete normative reference: RFC 3445 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) ** Obsolete normative reference: RFC 3548 (Obsoleted by RFC 4648) ** Obsolete normative reference: RFC 3658 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) ** Obsolete normative reference: RFC 3755 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) ** Obsolete normative reference: RFC 3757 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) -- Obsolete informational reference (is this intentional?): RFC 2535 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) -- Obsolete informational reference (is this intentional?): RFC 2537 (Obsoleted by RFC 3110) -- Obsolete informational reference (is this intentional?): RFC 3845 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) Summary: 11 errors (**), 0 flaws (~~), 17 warnings (==), 12 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: March 21, 2005 R. Austein 5 ISC 6 M. Larson 7 VeriSign 8 D. Massey 9 USC/ISI 10 S. Rose 11 NIST 12 September 20, 2004 14 Resource Records for the DNS Security Extensions 15 draft-ietf-dnsext-dnssec-records-10 17 Status of this Memo 19 This document is an Internet-Draft and is subject to all provisions 20 of section 3 of RFC 3667. By submitting this Internet-Draft, each 21 author represents that any applicable patent or other IPR claims of 22 which he or she is aware have been or will be disclosed, and any of 23 which he or she become aware will be disclosed, in accordance with 24 RFC 3668. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF), its areas, and its working groups. Note that 28 other groups may also distribute working documents as 29 Internet-Drafts. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 The list of current Internet-Drafts can be accessed at 37 http://www.ietf.org/ietf/1id-abstracts.txt. 39 The list of Internet-Draft Shadow Directories can be accessed at 40 http://www.ietf.org/shadow.html. 42 This Internet-Draft will expire on March 21, 2005. 44 Copyright Notice 46 Copyright (C) The Internet Society (2004). 48 Abstract 49 This document is part of a family of documents that describes the DNS 50 Security Extensions (DNSSEC). The DNS Security Extensions are a 51 collection of resource records and protocol modifications that 52 provide source authentication for the DNS. This document defines the 53 public key (DNSKEY), delegation signer (DS), resource record digital 54 signature (RRSIG), and authenticated denial of existence (NSEC) 55 resource records. The purpose and format of each resource record is 56 described in detail, and an example of each resource record is given. 58 This document obsoletes RFC 2535 and incorporates changes from all 59 updates to RFC 2535. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 64 1.1 Background and Related Documents . . . . . . . . . . . . . 4 65 1.2 Reserved Words . . . . . . . . . . . . . . . . . . . . . . 4 66 2. The DNSKEY Resource Record . . . . . . . . . . . . . . . . . . 5 67 2.1 DNSKEY RDATA Wire Format . . . . . . . . . . . . . . . . . 5 68 2.1.1 The Flags Field . . . . . . . . . . . . . . . . . . . 5 69 2.1.2 The Protocol Field . . . . . . . . . . . . . . . . . . 6 70 2.1.3 The Algorithm Field . . . . . . . . . . . . . . . . . 6 71 2.1.4 The Public Key Field . . . . . . . . . . . . . . . . . 6 72 2.1.5 Notes on DNSKEY RDATA Design . . . . . . . . . . . . . 6 73 2.2 The DNSKEY RR Presentation Format . . . . . . . . . . . . 6 74 2.3 DNSKEY RR Example . . . . . . . . . . . . . . . . . . . . 7 75 3. The RRSIG Resource Record . . . . . . . . . . . . . . . . . . 8 76 3.1 RRSIG RDATA Wire Format . . . . . . . . . . . . . . . . . 8 77 3.1.1 The Type Covered Field . . . . . . . . . . . . . . . . 9 78 3.1.2 The Algorithm Number Field . . . . . . . . . . . . . . 9 79 3.1.3 The Labels Field . . . . . . . . . . . . . . . . . . . 9 80 3.1.4 Original TTL Field . . . . . . . . . . . . . . . . . . 10 81 3.1.5 Signature Expiration and Inception Fields . . . . . . 10 82 3.1.6 The Key Tag Field . . . . . . . . . . . . . . . . . . 10 83 3.1.7 The Signer's Name Field . . . . . . . . . . . . . . . 11 84 3.1.8 The Signature Field . . . . . . . . . . . . . . . . . 11 85 3.2 The RRSIG RR Presentation Format . . . . . . . . . . . . . 12 86 3.3 RRSIG RR Example . . . . . . . . . . . . . . . . . . . . . 12 87 4. The NSEC Resource Record . . . . . . . . . . . . . . . . . . . 14 88 4.1 NSEC RDATA Wire Format . . . . . . . . . . . . . . . . . . 14 89 4.1.1 The Next Domain Name Field . . . . . . . . . . . . . . 14 90 4.1.2 The Type Bit Maps Field . . . . . . . . . . . . . . . 15 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 . . . . . . . . . . . . . . . . . . . . . 16 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 . . . . . . . . . . . . . . . . . . . 24 109 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 25 110 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 111 10.1 Normative References . . . . . . . . . . . . . . . . . . . . 26 112 10.2 Informative References . . . . . . . . . . . . . . . . . . . 27 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 27 114 A. DNSSEC Algorithm and Digest Types . . . . . . . . . . . . . . 29 115 A.1 DNSSEC Algorithm Types . . . . . . . . . . . . . . . . . . 29 116 A.1.1 Private Algorithm Types . . . . . . . . . . . . . . . 29 117 A.2 DNSSEC Digest Types . . . . . . . . . . . . . . . . . . . 30 118 B. Key Tag Calculation . . . . . . . . . . . . . . . . . . . . . 31 119 B.1 Key Tag for Algorithm 1 (RSA/MD5) . . . . . . . . . . . . 32 120 Intellectual Property and Copyright Statements . . . . . . . . 33 122 1. Introduction 124 The DNS Security Extensions (DNSSEC) introduce four new DNS resource 125 record types: DNSKEY, RRSIG, NSEC, and DS. This document defines the 126 purpose of each resource record (RR), the RR's RDATA format, and its 127 presentation format (ASCII representation). 129 1.1 Background and Related Documents 131 This document is part of a family of documents that define DNSSEC, 132 which should be read together as a set. 134 [I-D.ietf-dnsext-dnssec-intro] contains an introduction to DNSSEC and 135 definition of common terms; the reader is assumed to be familiar with 136 this document. [I-D.ietf-dnsext-dnssec-intro] also contains a list 137 of other documents updated by and obsoleted by this document set. 139 [I-D.ietf-dnsext-dnssec-protocol] defines the DNSSEC protocol 140 operations. 142 The reader is also assumed to be familiar with the basic DNS concepts 143 described in [RFC1034], [RFC1035], and the subsequent documents that 144 update them, particularly [RFC2181] and [RFC2308]. 146 This document defines the DNSSEC resource records. 148 1.2 Reserved Words 150 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 151 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 152 document are to be interpreted as described in [RFC2119]. 154 2. The DNSKEY Resource Record 156 DNSSEC uses public key cryptography to sign and authenticate DNS 157 resource record sets (RRsets). The public keys are stored in DNSKEY 158 resource records and are used in the DNSSEC authentication process 159 described in [I-D.ietf-dnsext-dnssec-protocol]: A zone signs its 160 authoritative RRsets using a private key and stores the corresponding 161 public key in a DNSKEY RR. A resolver can then use the public key to 162 authenticate signatures covering the RRsets in the zone. 164 The DNSKEY RR is not intended as a record for storing arbitrary 165 public keys and MUST NOT be used to store certificates or public keys 166 that do not directly relate to the DNS infrastructure. 168 The Type value for the DNSKEY RR type is 48. 170 The DNSKEY RR is class independent. 172 The DNSKEY RR has no special TTL requirements. 174 2.1 DNSKEY RDATA Wire Format 176 The RDATA for a DNSKEY RR consists of a 2 octet Flags Field, a 1 177 octet Protocol Field, a 1 octet Algorithm Field, and the Public Key 178 Field. 180 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 181 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 182 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 183 | Flags | Protocol | Algorithm | 184 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 185 / / 186 / Public Key / 187 / / 188 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 190 2.1.1 The Flags Field 192 Bit 7 of the Flags field is the Zone Key flag. If bit 7 has value 1, 193 then the DNSKEY record holds a DNS zone key and the DNSKEY RR's owner 194 name MUST be the name of a zone. If bit 7 has value 0, then the 195 DNSKEY record holds some other type of DNS public key and MUST NOT be 196 used to verify RRSIGs that cover RRsets. 198 Bit 15 of the Flags field is the Secure Entry Point flag, described 199 in [RFC3757]. If bit 15 has value 1, then the DNSKEY record holds a 200 key intended for use as a secure entry point. This flag is only 201 intended to be to a hint to zone signing or debugging software as to 202 the intended use of this DNSKEY record; validators MUST NOT alter 203 their behavior during the signature validation process in any way 204 based on the setting of this bit. This also means a DNSKEY RR with 205 the SEP bit set would also need the Zone Key flag set in order to 206 legally be able to generate signatures. A DNSKEY RR with the SEP set 207 and the Zone Key flag not set MUST NOT be used to verify RRSIGs that 208 cover RRsets. 210 Bits 0-6 and 8-14 are reserved: these bits MUST have value 0 upon 211 creation of the DNSKEY RR, and MUST be ignored upon reception. 213 2.1.2 The Protocol Field 215 The Protocol Field MUST have value 3 and the DNSKEY RR MUST be 216 treated as invalid during signature verification if found to be some 217 value other than 3. 219 2.1.3 The Algorithm Field 221 The Algorithm field identifies the public key's cryptographic 222 algorithm and determines the format of the Public Key field. A list 223 of DNSSEC algorithm types can be found in Appendix A.1 225 2.1.4 The Public Key Field 227 The Public Key Field holds the public key material. The format 228 depends on the algorithm of the key being stored and are described in 229 separate documents. 231 2.1.5 Notes on DNSKEY RDATA Design 233 Although the Protocol Field always has value 3, it is retained for 234 backward compatibility with early versions of the KEY record. 236 2.2 The DNSKEY RR Presentation Format 238 The presentation format of the RDATA portion is as follows: 240 The Flag field MUST be represented as an unsigned decimal integer. 241 Given the currently defined flags, the possible values are: 0, 256, 242 or 257. 244 The Protocol Field MUST be represented as an unsigned decimal integer 245 with a value of 3. 247 The Algorithm field MUST be represented either as an unsigned decimal 248 integer or as an algorithm mnemonic as specified in Appendix A.1. 250 The Public Key field MUST be represented as a Base64 encoding of the 251 Public Key. Whitespace is allowed within the Base64 text. For a 252 definition of Base64 encoding, see [RFC3548]. 254 2.3 DNSKEY RR Example 256 The following DNSKEY RR stores a DNS zone key for example.com. 258 example.com. 86400 IN DNSKEY 256 3 5 ( AQPSKmynfzW4kyBv015MUG2DeIQ3 259 Cbl+BBZH4b/0PY1kxkmvHjcZc8no 260 kfzj31GajIQKY+5CptLr3buXA10h 261 WqTkF7H6RfoRqXQeogmMHfpftf6z 262 Mv1LyBUgia7za6ZEzOJBOztyvhjL 263 742iU/TpPSEDhm2SNKLijfUppn1U 264 aNvv4w== ) 266 The first four text fields specify the owner name, TTL, Class, and RR 267 type (DNSKEY). Value 256 indicates that the Zone Key bit (bit 7) in 268 the Flags field has value 1. Value 3 is the fixed Protocol value. 269 Value 5 indicates the public key algorithm. Appendix A.1 identifies 270 algorithm type 5 as RSA/SHA1 and indicates that the format of the 271 RSA/SHA1 public key field is defined in [RFC3110]. The remaining 272 text is a Base64 encoding of the public key. 274 3. The RRSIG Resource Record 276 DNSSEC uses public key cryptography to sign and authenticate DNS 277 resource record sets (RRsets). Digital signatures are stored in 278 RRSIG resource records and are used in the DNSSEC authentication 279 process described in [I-D.ietf-dnsext-dnssec-protocol]. A validator 280 can use these RRSIG RRs to authenticate RRsets from the zone. The 281 RRSIG RR MUST only be used to carry verification material (digital 282 signatures) used to secure DNS operations. 284 An RRSIG record contains the signature for an RRset with a particular 285 name, class, and type. The RRSIG RR specifies a validity interval 286 for the signature and uses the Algorithm, the Signer's Name, and the 287 Key Tag to identify the DNSKEY RR containing the public key that a 288 validator can use to verify the signature. 290 Because every authoritative RRset in a zone must be protected by a 291 digital signature, RRSIG RRs must be present for names containing a 292 CNAME RR. This is a change to the traditional DNS specification 293 [RFC1034] that stated that if a CNAME is present for a name, it is 294 the only type allowed at that name. A RRSIG and NSEC (see Section 4) 295 MUST exist for the same name as a CNAME resource record in a signed 296 zone. 298 The Type value for the RRSIG RR type is 46. 300 The RRSIG RR is class independent. 302 An RRSIG RR MUST have the same class as the RRset it covers. 304 The TTL value of an RRSIG RR MUST match the TTL value of the RRset it 305 covers. This is an exception to the [RFC2181] rules for TTL values 306 of individual RRs within a RRset: individual RRSIG with the same 307 owner name will have different TTL values if the RRsets they cover 308 have different TTL values. 310 3.1 RRSIG RDATA Wire Format 312 The RDATA for an RRSIG RR consists of a 2 octet Type Covered field, a 313 1 octet Algorithm field, a 1 octet Labels field, a 4 octet Original 314 TTL field, a 4 octet Signature Expiration field, a 4 octet Signature 315 Inception field, a 2 octet Key tag, the Signer's Name field, and the 316 Signature field. 318 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 319 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 320 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 321 | Type Covered | Algorithm | Labels | 322 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 323 | Original TTL | 324 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 325 | Signature Expiration | 326 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 327 | Signature Inception | 328 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 329 | Key Tag | / 330 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name / 331 / / 332 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 333 / / 334 / Signature / 335 / / 336 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 338 3.1.1 The Type Covered Field 340 The Type Covered field identifies the type of the RRset that is 341 covered by this RRSIG record. 343 3.1.2 The Algorithm Number Field 345 The Algorithm Number field identifies the cryptographic algorithm 346 used to create the signature. A list of DNSSEC algorithm types can 347 be found in Appendix A.1 349 3.1.3 The Labels Field 351 The Labels field specifies the number of labels in the original RRSIG 352 RR owner name. The significance of this field is that a validator 353 uses it to determine if the answer was synthesized from a wildcard. 354 If so, it can be used to determine what owner name was used in 355 generating the signature. 357 To validate a signature, the validator needs the original owner name 358 that was used to create the signature. If the original owner name 359 contains a wildcard label ("*"), the owner name may have been 360 expanded by the server during the response process, in which case the 361 validator will need to reconstruct the original owner name in order 362 to validate the signature. [I-D.ietf-dnsext-dnssec-protocol] 363 describes how to use the Labels field to reconstruct the original 364 owner name. 366 The value of the Labels field MUST NOT count either the null (root) 367 label that terminates the owner name or the wildcard label (if 368 present). The value of the Labels field MUST be less than or equal 369 to the number of labels in the RRSIG owner name. For example, 370 "www.example.com." has a Labels field value of 3, and 371 "*.example.com." has a Labels field value of 2. Root (".") has a 372 Labels field value of 0. 374 Although the wildcard label is not included in the count stored in 375 the Labels field of the RRSIG RR, the wildcard label is part of the 376 RRset's owner name when generating or verifying the signature. 378 3.1.4 Original TTL Field 380 The Original TTL field specifies the TTL of the covered RRset as it 381 appears in the authoritative zone. 383 The Original TTL field is necessary because a caching resolver 384 decrements the TTL value of a cached RRset. In order to validate a 385 signature, a validator requires the original TTL. 386 [I-D.ietf-dnsext-dnssec-protocol] describes how to use the Original 387 TTL field value to reconstruct the original TTL. 389 3.1.5 Signature Expiration and Inception Fields 391 The Signature Expiration and Inception fields specify a validity 392 period for the signature. The RRSIG record MUST NOT be used for 393 authentication prior to the inception date and MUST NOT be used for 394 authentication after the expiration date. 396 The Signature Expiration and Inception field values specify a date 397 and time in the form of a 32-bit unsigned number of seconds elapsed 398 since 1 January 1970 00:00:00 UTC, ignoring leap seconds, in network 399 byte order. The longest interval which can be expressed by this 400 format without wrapping is approximately 136 years. An RRSIG RR can 401 have an Expiration field value which is numerically smaller than the 402 Inception field value if the expiration field value is near the 403 32-bit wrap-around point or if the signature is long lived. Because 404 of this, all comparisons involving these fields MUST use "Serial 405 number arithmetic" as defined in [RFC1982]. As a direct consequence, 406 the values contained in these fields cannot refer to dates more than 407 68 years in either the past or the future. 409 3.1.6 The Key Tag Field 411 The Key Tag field contains the key tag value of the DNSKEY RR that 412 validates this signature, in network byte order. Appendix B explains 413 how to calculate Key Tag values. 415 3.1.7 The Signer's Name Field 417 The Signer's Name field value identifies the owner name of the DNSKEY 418 RR which a validator is supposed to use to validate this signature. 419 The Signer's Name field MUST contain the name of the zone of the 420 covered RRset. A sender MUST NOT use DNS name compression on the 421 Signer's Name field when transmitting a RRSIG RR. 423 3.1.8 The Signature Field 425 The Signature field contains the cryptographic signature that covers 426 the RRSIG RDATA (excluding the Signature field) and the RRset 427 specified by the RRSIG owner name, RRSIG class, and RRSIG Type 428 Covered field. The format of this field depends on the algorithm in 429 use and these formats are described in separate companion documents. 431 3.1.8.1 Signature Calculation 433 A signature covers the RRSIG RDATA (excluding the Signature Field) 434 and covers the data RRset specified by the RRSIG owner name, RRSIG 435 class, and RRSIG Type Covered fields. The RRset is in canonical form 436 (see Section 6) and the set RR(1),...RR(n) is signed as follows: 438 signature = sign(RRSIG_RDATA | RR(1) | RR(2)... ) where 440 "|" denotes concatenation; 442 RRSIG_RDATA is the wire format of the RRSIG RDATA fields 443 with the Signer's Name field in canonical form and 444 the Signature field excluded; 446 RR(i) = owner | type | class | TTL | RDATA length | RDATA 448 "owner" is the fully qualified owner name of the RRset in 449 canonical form (for RRs with wildcard owner names, the 450 wildcard label is included in the owner name); 452 Each RR MUST have the same owner name as the RRSIG RR; 454 Each RR MUST have the same class as the RRSIG RR; 456 Each RR in the RRset MUST have the RR type listed in the 457 RRSIG RR's Type Covered field; 459 Each RR in the RRset MUST have the TTL listed in the 460 RRSIG Original TTL Field; 462 Any DNS names in the RDATA field of each RR MUST be in 463 canonical form; and 465 The RRset MUST be sorted in canonical order. 467 See Section 6.2 and Section 6.3 for details on canonical form and 468 ordering of RRsets. 470 3.2 The RRSIG RR Presentation Format 472 The presentation format of the RDATA portion is as follows: 474 The Type Covered field is represented as a RR type mnemonic. When 475 the mnemonic is not known, the TYPE representation as described in 476 [RFC3597] (section 5) MUST be used. 478 The Algorithm field value MUST be represented either as an unsigned 479 decimal integer or as an algorithm mnemonic as specified in Appendix 480 A.1. 482 The Labels field value MUST be represented as an unsigned decimal 483 integer. 485 The Original TTL field value MUST be represented as an unsigned 486 decimal integer. 488 The Signature Expiration Time and Inception Time field values MUST be 489 represented either as seconds since 1 January 1970 00:00:00 UTC or in 490 the form YYYYMMDDHHmmSS in UTC, where: 491 YYYY is the year (0001-9999, but see Section 3.1.5); 492 MM is the month number (01-12); 493 DD is the day of the month (01-31); 494 HH is the hour in 24 hours notation (00-23); 495 mm is the minute (00-59); and 496 SS is the second (00-59). 498 The Key Tag field MUST be represented as an unsigned decimal integer. 500 The Signer's Name field value MUST be represented as a domain name. 502 The Signature field is represented as a Base64 encoding of the 503 signature. Whitespace is allowed within the Base64 text. See 504 Section 2.2. 506 3.3 RRSIG RR Example 508 The following RRSIG RR stores the signature for the A RRset of 509 host.example.com: 511 host.example.com. 86400 IN RRSIG A 5 3 86400 20030322173103 ( 512 20030220173103 2642 example.com. 513 oJB1W6WNGv+ldvQ3WDG0MQkg5IEhjRip8WTr 514 PYGv07h108dUKGMeDPKijVCHX3DDKdfb+v6o 515 B9wfuh3DTJXUAfI/M0zmO/zz8bW0Rznl8O3t 516 GNazPwQKkRN20XPXV6nwwfoXmJQbsLNrLfkG 517 J5D6fwFm8nN+6pBzeDQfsS3Ap3o= ) 519 The first four fields specify the owner name, TTL, Class, and RR type 520 (RRSIG). The "A" represents the Type Covered field. The value 5 521 identifies the algorithm used (RSA/SHA1) to create the signature. 522 The value 3 is the number of Labels in the original owner name. The 523 value 86400 in the RRSIG RDATA is the Original TTL for the covered A 524 RRset. 20030322173103 and 20030220173103 are the expiration and 525 inception dates, respectively. 2642 is the Key Tag, and example.com. 526 is the Signer's Name. The remaining text is a Base64 encoding of the 527 signature. 529 Note that combination of RRSIG RR owner name, class, and Type Covered 530 indicate that this RRSIG covers the "host.example.com" A RRset. The 531 Label value of 3 indicates that no wildcard expansion was used. The 532 Algorithm, Signer's Name, and Key Tag indicate this signature can be 533 authenticated using an example.com zone DNSKEY RR whose algorithm is 534 5 and key tag is 2642. 536 4. The NSEC Resource Record 538 The NSEC resource record lists two separate things: the next owner 539 name (in the canonical ordering of the zone) which contains 540 authoritative data or a delegation point NS RRset, and the set of RR 541 types present at the NSEC RR's owner name. The complete set of NSEC 542 RRs in a zone both indicate which authoritative RRsets exist in a 543 zone and also form a chain of authoritative owner names in the zone. 544 This information is used to provide authenticated denial of existence 545 for DNS data, as described in [I-D.ietf-dnsext-dnssec-protocol]. 547 Because every authoritative name in a zone must be part of the NSEC 548 chain, NSEC RRs must be present for names containing a CNAME RR. 549 This is a change to the traditional DNS specification [RFC1034] that 550 stated that if a CNAME is present for a name, it is the only type 551 allowed at that name. An RRSIG (see Section 3) and NSEC MUST exist 552 for the same name as a CNAME resource record in a signed zone. 554 See [I-D.ietf-dnsext-dnssec-protocol] for discussion of how a zone 555 signer determines precisely which NSEC RRs it needs to include in a 556 zone. 558 The type value for the NSEC RR is 47. 560 The NSEC RR is class independent. 562 The NSEC RR SHOULD have the same TTL value as the SOA minimum TTL 563 field. This is in the spirit of negative caching [RFC2308]. 565 4.1 NSEC RDATA Wire Format 567 The RDATA of the NSEC RR is as shown below: 569 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 570 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 571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 572 / Next Domain Name / 573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 574 / Type Bit Maps / 575 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 577 4.1.1 The Next Domain Name Field 579 The Next Domain field contains the next owner name (in the canonical 580 ordering of the zone) which has authoritative data or contains a 581 delegation point NS RRset; see Section 6.1 for an explanation of 582 canonical ordering. The value of the Next Domain Name field in the 583 last NSEC record in the zone is the name of the zone apex (the owner 584 name of the zone's SOA RR). This indicates that the owner name of 585 the NSEC RR is the last name in the canonical ordering of the zone. 587 A sender MUST NOT use DNS name compression on the Next Domain Name 588 field when transmitting an NSEC RR. 590 Owner names of RRsets not authoritative for the given zone (such as 591 glue records) MUST NOT be listed in the Next Domain Name unless at 592 least one authoritative RRset exists at the same owner name. 594 4.1.2 The Type Bit Maps Field 596 The Type Bit Maps field identifies the RRset types which exist at the 597 NSEC RR's owner name. 599 The RR type space is split into 256 window blocks, each representing 600 the low-order 8 bits of the 16-bit RR type space. Each block that 601 has at least one active RR type is encoded using a single octet 602 window number (from 0 to 255), a single octet bitmap length (from 1 603 to 32) indicating the number of octets used for the window block's 604 bitmap, and up to 32 octets (256 bits) of bitmap. 606 Blocks are present in the NSEC RR RDATA in increasing numerical 607 order. 609 Type Bit Maps Field = ( Window Block # | Bitmap Length | Bitmap )+ 611 where "|" denotes concatenation. 613 Each bitmap encodes the low-order 8 bits of RR types within the 614 window block, in network bit order. The first bit is bit 0. For 615 window block 0, bit 1 corresponds to RR type 1 (A), bit 2 corresponds 616 to RR type 2 (NS), and so forth. For window block 1, bit 1 617 corresponds to RR type 257, bit 2 to RR type 258. If a bit is set, 618 it indicates that an RRset of that type is present for the NSEC RR's 619 owner name. If a bit is clear, it indicates that no RRset of that 620 type is present for the NSEC RR's owner name. 622 Bits representing pseudo-types MUST be clear, since they do not 623 appear in zone data. If encountered, they MUST be ignored upon 624 reading. 626 Blocks with no types present MUST NOT be included. Trailing zero 627 octets in the bitmap MUST be omitted. The length of each block's 628 bitmap is determined by the type code with the largest numerical 629 value, within that block, among the set of RR types present at the 630 NSEC RR's owner name. Trailing zero octets not specified MUST be 631 interpreted as zero octets. 633 The bitmap for the NSEC RR at a delegation point requires special 634 attention. Bits corresponding to the delegation NS RRset and the RR 635 types for which the parent zone has authoritative data MUST be set; 636 bits corresponding to any non-NS RRset for which the parent is not 637 authoritative MUST be clear. 639 A zone MUST NOT include an NSEC RR for any domain name that only 640 holds glue records. 642 4.1.3 Inclusion of Wildcard Names in NSEC RDATA 644 If a wildcard owner name appears in a zone, the wildcard label ("*") 645 is treated as a literal symbol and is treated the same as any other 646 owner name for purposes of generating NSEC RRs. Wildcard owner names 647 appear in the Next Domain Name field without any wildcard expansion. 648 [I-D.ietf-dnsext-dnssec-protocol] describes the impact of wildcards 649 on authenticated denial of existence. 651 4.2 The NSEC RR Presentation Format 653 The presentation format of the RDATA portion is as follows: 655 The Next Domain Name field is represented as a domain name. 657 The Type Bit Maps field is represented as a sequence of RR type 658 mnemonics. When the mnemonic is not known, the TYPE representation 659 as described in [RFC3597] (section 5) MUST be used. 661 4.3 NSEC RR Example 663 The following NSEC RR identifies the RRsets associated with 664 alfa.example.com. and identifies the next authoritative name after 665 alfa.example.com. 667 alfa.example.com. 86400 IN NSEC host.example.com. ( 668 A MX RRSIG NSEC TYPE1234 ) 670 The first four text fields specify the name, TTL, Class, and RR type 671 (NSEC). The entry host.example.com. is the next authoritative name 672 after alfa.example.com. in canonical order. The A, MX, RRSIG, NSEC, 673 and TYPE1234 mnemonics indicate there are A, MX, RRSIG, NSEC, and 674 TYPE1234 RRsets associated with the name alfa.example.com. 676 The RDATA section of the NSEC RR above would be encoded as: 678 0x04 'h' 'o' 's' 't' 679 0x07 'e' 'x' 'a' 'm' 'p' 'l' 'e' 680 0x03 'c' 'o' 'm' 0x00 681 0x00 0x06 0x40 0x01 0x00 0x00 0x00 0x03 682 0x04 0x1b 0x00 0x00 0x00 0x00 0x00 0x00 683 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 684 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 685 0x00 0x00 0x00 0x00 0x20 687 Assuming that the validator can authenticate this NSEC record, it 688 could be used to prove that beta.example.com does not exist, or could 689 be used to prove there is no AAAA record associated with 690 alfa.example.com. Authenticated denial of existence is discussed in 691 [I-D.ietf-dnsext-dnssec-protocol]. 693 5. The DS Resource Record 695 The DS Resource Record refers to a DNSKEY RR and is used in the DNS 696 DNSKEY authentication process. A DS RR refers to a DNSKEY RR by 697 storing the key tag, algorithm number, and a digest of the DNSKEY RR. 698 Note that while the digest should be sufficient to identify the 699 public key, storing the key tag and key algorithm helps make the 700 identification process more efficient. By authenticating the DS 701 record, a resolver can authenticate the DNSKEY RR to which the DS 702 record points. The key authentication process is described in 703 [I-D.ietf-dnsext-dnssec-protocol]. 705 The DS RR and its corresponding DNSKEY RR have the same owner name, 706 but they are stored in different locations. The DS RR appears only 707 on the upper (parental) side of a delegation, and is authoritative 708 data in the parent zone. For example, the DS RR for "example.com" is 709 stored in the "com" zone (the parent zone) rather than in the 710 "example.com" zone (the child zone). The corresponding DNSKEY RR is 711 stored in the "example.com" zone (the child zone). This simplifies 712 DNS zone management and zone signing, but introduces special response 713 processing requirements for the DS RR; these are described in 714 [I-D.ietf-dnsext-dnssec-protocol]. 716 The type number for the DS record is 43. 718 The DS resource record is class independent. 720 The DS RR has no special TTL requirements. 722 5.1 DS RDATA Wire Format 724 The RDATA for a DS RR consists of a 2 octet Key Tag field, a one 725 octet Algorithm field, a one octet Digest Type field, and a Digest 726 field. 728 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 729 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 730 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 731 | Key Tag | Algorithm | Digest Type | 732 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 733 / / 734 / Digest / 735 / / 736 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 738 5.1.1 The Key Tag Field 740 The Key Tag field lists the key tag of the DNSKEY RR referred to by 741 the DS record, in network byte order. 743 The Key Tag used by the DS RR is identical to the Key Tag used by 744 RRSIG RRs. Appendix B describes how to compute a Key Tag. 746 5.1.2 The Algorithm Field 748 The Algorithm field lists the algorithm number of the DNSKEY RR 749 referred to by the DS record. 751 The algorithm number used by the DS RR is identical to the algorithm 752 number used by RRSIG and DNSKEY RRs. Appendix A.1 lists the 753 algorithm number types. 755 5.1.3 The Digest Type Field 757 The DS RR refers to a DNSKEY RR by including a digest of that DNSKEY 758 RR. The Digest Type field identifies the algorithm used to construct 759 the digest. Appendix A.2 lists the possible digest algorithm types. 761 5.1.4 The Digest Field 763 The DS record refers to a DNSKEY RR by including a digest of that 764 DNSKEY RR. 766 The digest is calculated by concatenating the canonical form of the 767 fully qualified owner name of the DNSKEY RR with the DNSKEY RDATA, 768 and then applying the digest algorithm. 770 digest = digest_algorithm( DNSKEY owner name | DNSKEY RDATA); 772 "|" denotes concatenation 774 DNSKEY RDATA = Flags | Protocol | Algorithm | Public Key. 776 The size of the digest may vary depending on the digest algorithm and 777 DNSKEY RR size. As of the time of writing, the only defined digest 778 algorithm is SHA-1, which produces a 20 octet digest. 780 5.2 Processing of DS RRs When Validating Responses 782 The DS RR links the authentication chain across zone boundaries, so 783 the DS RR requires extra care in processing. The DNSKEY RR referred 784 to in the DS RR MUST be a DNSSEC zone key. The DNSKEY RR Flags MUST 785 have Flags bit 7 set. If the DNSKEY flags do not indicate a DNSSEC 786 zone key, the DS RR (and DNSKEY RR it references) MUST NOT be used in 787 the validation process. 789 5.3 The DS RR Presentation Format 791 The presentation format of the RDATA portion is as follows: 793 The Key Tag field MUST be represented as an unsigned decimal integer. 795 The Algorithm field MUST be represented either as an unsigned decimal 796 integer or as an algorithm mnemonic specified in Appendix A.1. 798 The Digest Type field MUST be represented as an unsigned decimal 799 integer. 801 The Digest MUST be represented as a sequence of case-insensitive 802 hexadecimal digits. Whitespace is allowed within the hexadecimal 803 text. 805 5.4 DS RR Example 807 The following example shows a DNSKEY RR and its corresponding DS RR. 809 dskey.example.com. 86400 IN DNSKEY 256 3 5 ( AQOeiiR0GOMYkDshWoSKz9Xz 810 fwJr1AYtsmx3TGkJaNXVbfi/ 811 2pHm822aJ5iI9BMzNXxeYCmZ 812 DRD99WYwYqUSdjMmmAphXdvx 813 egXd/M5+X7OrzKBaMbCVdFLU 814 Uh6DhweJBjEVv5f2wwjM9Xzc 815 nOf+EPbtG9DMBmADjFDc2w/r 816 ljwvFw== 817 ) ; key id = 60485 819 dskey.example.com. 86400 IN DS 60485 5 1 ( 2BB183AF5F22588179A53B0A 820 98631FAD1A292118 ) 822 The first four text fields specify the name, TTL, Class, and RR type 823 (DS). Value 60485 is the key tag for the corresponding 824 "dskey.example.com." DNSKEY RR, and value 5 denotes the algorithm 825 used by this "dskey.example.com." DNSKEY RR. The value 1 is the 826 algorithm used to construct the digest, and the rest of the RDATA 827 text is the digest in hexadecimal. 829 6. Canonical Form and Order of Resource Records 831 This section defines a canonical form for resource records, a 832 canonical ordering of DNS names, and a canonical ordering of resource 833 records within an RRset. A canonical name order is required to 834 construct the NSEC name chain. A canonical RR form and ordering 835 within an RRset are required to construct and verify RRSIG RRs. 837 6.1 Canonical DNS Name Order 839 For purposes of DNS security, owner names are ordered by treating 840 individual labels as unsigned left-justified octet strings. The 841 absence of a octet sorts before a zero value octet, and upper case 842 US-ASCII letters are treated as if they were lower case US-ASCII 843 letters. 845 To compute the canonical ordering of a set of DNS names, start by 846 sorting the names according to their most significant (rightmost) 847 labels. For names in which the most significant label is identical, 848 continue sorting according to their next most significant label, and 849 so forth. 851 For example, the following names are sorted in canonical DNS name 852 order. The most significant label is "example". At this level, 853 "example" sorts first, followed by names ending in "a.example", then 854 names ending "z.example". The names within each level are sorted in 855 the same way. 857 example 858 a.example 859 yljkjljk.a.example 860 Z.a.example 861 zABC.a.EXAMPLE 862 z.example 863 \001.z.example 864 *.z.example 865 \200.z.example 867 6.2 Canonical RR Form 869 For purposes of DNS security, the canonical form of an RR is the wire 870 format of the RR where: 871 1. Every domain name in the RR is fully expanded (no DNS name 872 compression) and fully qualified; 873 2. All uppercase US-ASCII letters in the owner name of the RR are 874 replaced by the corresponding lowercase US-ASCII letters; 876 3. If the type of the RR is NS, MD, MF, CNAME, SOA, MB, MG, MR, PTR, 877 HINFO, MINFO, MX, HINFO, RP, AFSDB, RT, SIG, PX, NXT, NAPTR, KX, 878 SRV, DNAME, A6, RRSIG or NSEC, all uppercase US-ASCII letters in 879 the DNS names contained within the RDATA are replaced by the 880 corresponding lowercase US-ASCII letters; 881 4. If the owner name of the RR is a wildcard name, the owner name is 882 in its original unexpanded form, including the "*" label (no 883 wildcard substitution); and 884 5. The RR's TTL is set to its original value as it appears in the 885 originating authoritative zone or the Original TTL field of the 886 covering RRSIG RR. 888 6.3 Canonical RR Ordering Within An RRset 890 For purposes of DNS security, RRs with the same owner name, class, 891 and type are sorted by treating the RDATA portion of the canonical 892 form of each RR as a left-justified unsigned octet sequence where the 893 absence of an octet sorts before a zero octet. 895 [RFC2181] specifies that an RRset is not allowed to contain duplicate 896 records (multiple RRs with the same owner name, class, type, and 897 RDATA). Therefore, if an implementation detects duplicate RRs when 898 putting the RRset in canonical form, the implementation MUST treat 899 this as a protocol error. If the implementation chooses to handle 900 this protocol error in the spirit of the robustness principle (being 901 liberal in what it accepts), the implementation MUST remove all but 902 one of the duplicate RR(s) for purposes of calculating the canonical 903 form of the RRset. 905 7. IANA Considerations 907 This document introduces no new IANA considerations, because all of 908 the protocol parameters used in this document have already been 909 assigned by previous specifications. However, since the evolution of 910 DNSSEC has been long and somewhat convoluted, this section attempts 911 to describe the current state of the IANA registries and other 912 protocol parameters which are (or once were) related to DNSSEC. 914 Please refer to [I-D.ietf-dnsext-dnssec-protocol] for additional IANA 915 considerations. 917 DNS Resource Record Types: [RFC2535] assigned types 24, 25, and 30 to 918 the SIG, KEY, and NXT RRs, respectively. [RFC3658] assigned DNS 919 Resource Record Type 43 to DS. [RFC3755] assigned types 46, 47, 920 and 48 to the RRSIG, NSEC, and DNSKEY RRs, respectively. 921 [RFC3755] also marked type 30 (NXT) as Obsolete, and restricted 922 use of types 24 (SIG) and 25 (KEY) to the "SIG(0)" transaction 923 security protocol described in [RFC2931] and the transaction KEY 924 Resource Record described in [RFC2930]. 926 DNS Security Algorithm Numbers: [RFC2535] created an IANA registry 927 for DNSSEC Resource Record Algorithm field numbers, and assigned 928 values 1-4 and 252-255. [RFC3110] assigned value 5. [RFC3755] 929 altered this registry to include flags for each entry regarding 930 its use with the DNS security extensions. Each algorithm entry 931 could refer to an algorithm that can be used for zone signing, 932 transaction security (see [RFC2931]) or both. Values 6-251 are 933 available for assignment by IETF standards action [RFC3755]. See 934 Appendix A for a full listing of the DNS Security Algorithm 935 Numbers entries at the time of writing and their status of use in 936 DNSSEC. 938 [RFC3658] created an IANA registry for DNSSEC DS Digest Types, and 939 assigned value 0 to reserved and value 1 to SHA-1. 941 KEY Protocol Values: [RFC2535] created an IANA Registry for KEY 942 Protocol Values, but [RFC3445] re-assigned all values other than 3 943 to reserved and closed this IANA registry. The registry remains 944 closed, and all KEY and DNSKEY records are required to have 945 Protocol Octet value of 3. 947 Flag bits in the KEY and DNSKEY RRs: [RFC3755] created an IANA 948 registry for the DNSSEC KEY and DNSKEY RR flag bits. Initially, 949 this registry only contains an assignment for bit 7 (the ZONE bit) 950 and a reservation for bit 15 for the Secure Entry Point flag (SEP 951 bit) [RFC3757]. As also stated in [RFC3755], bits 0-6 and 8-14 952 are available for assignment by IETF Standards Action. 954 8. Security Considerations 956 This document describes the format of four DNS resource records used 957 by the DNS security extensions, and presents an algorithm for 958 calculating a key tag for a public key. Other than the items 959 described below, the resource records themselves introduce no 960 security considerations. Please see [I-D.ietf-dnsext-dnssec-intro] 961 and [I-D.ietf-dnsext-dnssec-protocol] for additional security 962 considerations related to the use of these records. 964 The DS record points to a DNSKEY RR using a cryptographic digest, the 965 key algorithm type and a key tag. The DS record is intended to 966 identify an existing DNSKEY RR, but it is theoretically possible for 967 an attacker to generate a DNSKEY that matches all the DS fields. The 968 probability of constructing such a matching DNSKEY depends on the 969 type of digest algorithm in use. The only currently defined digest 970 algorithm is SHA-1, and the working group believes that constructing 971 a public key which would match the algorithm, key tag, and SHA-1 972 digest given in a DS record would be a sufficiently difficult problem 973 that such an attack is not a serious threat at this time. 975 The key tag is used to help select DNSKEY resource records 976 efficiently, but it does not uniquely identify a single DNSKEY 977 resource record. It is possible for two distinct DNSKEY RRs to have 978 the same owner name, the same algorithm type, and the same key tag. 979 An implementation which uses only the key tag to select a DNSKEY RR 980 might select the wrong public key in some circumstances. 982 The table of algorithms in Appendix A and the key tag calculation 983 algorithms in Appendix B include the RSA/MD5 algorithm for 984 completeness, but the RSA/MD5 algorithm is NOT RECOMMENDED, as 985 explained in [RFC3110]. 987 9. Acknowledgments 989 This document was created from the input and ideas of the members of 990 the DNS Extensions Working Group and working group mailing list. The 991 editors would like to express their thanks for the comments and 992 suggestions received during the revision of these security extension 993 specifications. While explicitly listing everyone who has 994 contributed during the decade during which DNSSEC has been under 995 development would be an impossible task, 996 [I-D.ietf-dnsext-dnssec-intro] includes a list of some of the 997 participants who were kind enough to comment on these documents. 999 10. References 1001 10.1 Normative References 1003 [I-D.ietf-dnsext-dnssec-intro] 1004 Arends, R., Austein, R., Larson, M., Massey, D. and S. 1005 Rose, "DNS Security Introduction and Requirements", 1006 draft-ietf-dnsext-dnssec-intro-10 (work in progress), May 1007 2004. 1009 [I-D.ietf-dnsext-dnssec-protocol] 1010 Arends, R., Austein, R., Larson, M., Massey, D. and S. 1011 Rose, "Protocol Modifications for the DNS Security 1012 Extensions", draft-ietf-dnsext-dnssec-protocol-06 (work in 1013 progress), May 2004. 1015 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 1016 STD 13, RFC 1034, November 1987. 1018 [RFC1035] Mockapetris, P., "Domain names - implementation and 1019 specification", STD 13, RFC 1035, November 1987. 1021 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 1022 August 1996. 1024 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1025 Requirement Levels", BCP 14, RFC 2119, March 1997. 1027 [RFC2136] Vixie, P., Thomson, S., Rekhter, Y. and J. Bound, "Dynamic 1028 Updates in the Domain Name System (DNS UPDATE)", RFC 2136, 1029 April 1997. 1031 [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS 1032 Specification", RFC 2181, July 1997. 1034 [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS 1035 NCACHE)", RFC 2308, March 1998. 1037 [RFC2536] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System 1038 (DNS)", RFC 2536, March 1999. 1040 [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC 1041 2671, August 1999. 1043 [RFC2931] Eastlake, D., "DNS Request and Transaction Signatures ( 1044 SIG(0)s)", RFC 2931, September 2000. 1046 [RFC3110] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain 1047 Name System (DNS)", RFC 3110, May 2001. 1049 [RFC3445] Massey, D. and S. Rose, "Limiting the Scope of the KEY 1050 Resource Record (RR)", RFC 3445, December 2002. 1052 [RFC3548] Josefsson, S., "The Base16, Base32, and Base64 Data 1053 Encodings", RFC 3548, July 2003. 1055 [RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record 1056 (RR) Types", RFC 3597, September 2003. 1058 [RFC3658] Gudmundsson, O., "Delegation Signer (DS) Resource Record 1059 (RR)", RFC 3658, December 2003. 1061 [RFC3755] Weiler, S., "Legacy Resolver Compatibility for Delegation 1062 Signer", RFC 3755, April 2004. 1064 [RFC3757] Kolkman, O., Schlyter, J. and E. Lewis, "KEY RR Secure 1065 Entry Point Flag", RFC 3757, April 2004. 1067 10.2 Informative References 1069 [RFC2535] Eastlake, D., "Domain Name System Security Extensions", 1070 RFC 2535, March 1999. 1072 [RFC2537] Eastlake, D., "RSA/MD5 KEYs and SIGs in the Domain Name 1073 System (DNS)", RFC 2537, March 1999. 1075 [RFC2539] Eastlake, D., "Storage of Diffie-Hellman Keys in the 1076 Domain Name System (DNS)", RFC 2539, March 1999. 1078 [RFC2930] Eastlake, D., "Secret Key Establishment for DNS (TKEY 1079 RR)", RFC 2930, September 2000. 1081 [RFC3845] Schlyter, J., "DNS Security (DNSSEC) NextSECure (NSEC) 1082 RDATA Format", RFC 3845, August 2004. 1084 Authors' Addresses 1086 Roy Arends 1087 Telematica Instituut 1088 Drienerlolaan 5 1089 7522 NB Enschede 1090 NL 1092 EMail: roy.arends@telin.nl 1093 Rob Austein 1094 Internet Systems Consortium 1095 950 Charter Street 1096 Redwood City, CA 94063 1097 USA 1099 EMail: sra@isc.org 1101 Matt Larson 1102 VeriSign, Inc. 1103 21345 Ridgetop Circle 1104 Dulles, VA 20166-6503 1105 USA 1107 EMail: mlarson@verisign.com 1109 Dan Massey 1110 USC Information Sciences Institute 1111 3811 N. Fairfax Drive 1112 Arlington, VA 22203 1113 USA 1115 EMail: masseyd@isi.edu 1117 Scott Rose 1118 National Institute for Standards and Technology 1119 100 Bureau Drive 1120 Gaithersburg, MD 20899-8920 1121 USA 1123 EMail: scott.rose@nist.gov 1125 Appendix A. DNSSEC Algorithm and Digest Types 1127 The DNS security extensions are designed to be independent of the 1128 underlying cryptographic algorithms. The DNSKEY, RRSIG, and DS 1129 resource records all use a DNSSEC Algorithm Number to identify the 1130 cryptographic algorithm in use by the resource record. The DS 1131 resource record also specifies a Digest Algorithm Number to identify 1132 the digest algorithm used to construct the DS record. The currently 1133 defined Algorithm and Digest Types are listed below. Additional 1134 Algorithm or Digest Types could be added as advances in cryptography 1135 warrant. 1137 A DNSSEC aware resolver or name server MUST implement all MANDATORY 1138 algorithms. 1140 A.1 DNSSEC Algorithm Types 1142 The DNSKEY, RRSIG, and DS RRs use an 8-bit number used to identify 1143 the security algorithm being used. These values are stored in the 1144 "Algorithm number" field in the resource record RDATA. 1146 Some algorithms are usable only for zone signing (DNSSEC), some only 1147 for transaction security mechanisms (SIG(0) and TSIG), and some for 1148 both. Those usable for zone signing may appear in DNSKEY, RRSIG, and 1149 DS RRs. Those usable for transaction security would be present in 1150 SIG(0) and KEY RRs as described in [RFC2931] 1152 Zone 1153 Value Algorithm [Mnemonic] Signing References Status 1154 ----- -------------------- --------- ---------- --------- 1155 0 reserved 1156 1 RSA/MD5 [RSAMD5] n [RFC2537] NOT RECOMMENDED 1157 2 Diffie-Hellman [DH] n [RFC2539] - 1158 3 DSA/SHA-1 [DSA] y [RFC2536] OPTIONAL 1159 4 Elliptic Curve [ECC] TBA - 1160 5 RSA/SHA-1 [RSASHA1] y [RFC3110] MANDATORY 1161 252 Indirect [INDIRECT] n - 1162 253 Private [PRIVATEDNS] y see below OPTIONAL 1163 254 Private [PRIVATEOID] y see below OPTIONAL 1164 255 reserved 1166 6 - 251 Available for assignment by IETF Standards Action. 1168 A.1.1 Private Algorithm Types 1170 Algorithm number 253 is reserved for private use and will never be 1171 assigned to a specific algorithm. The public key area in the DNSKEY 1172 RR and the signature area in the RRSIG RR begin with a wire encoded 1173 domain name, which MUST NOT be compressed. The domain name indicates 1174 the private algorithm to use and the remainder of the public key area 1175 is determined by that algorithm. Entities should only use domain 1176 names they control to designate their private algorithms. 1178 Algorithm number 254 is reserved for private use and will never be 1179 assigned to a specific algorithm. The public key area in the DNSKEY 1180 RR and the signature area in the RRSIG RR begin with an unsigned 1181 length byte followed by a BER encoded Object Identifier (ISO OID) of 1182 that length. The OID indicates the private algorithm in use and the 1183 remainder of the area is whatever is required by that algorithm. 1184 Entities should only use OIDs they control to designate their private 1185 algorithms. 1187 A.2 DNSSEC Digest Types 1189 A "Digest Type" field in the DS resource record types identifies the 1190 cryptographic digest algorithm used by the resource record. The 1191 following table lists the currently defined digest algorithm types. 1193 VALUE Algorithm STATUS 1194 0 Reserved - 1195 1 SHA-1 MANDATORY 1196 2-255 Unassigned - 1198 Appendix B. Key Tag Calculation 1200 The Key Tag field in the RRSIG and DS resource record types provides 1201 a mechanism for selecting a public key efficiently. In most cases, a 1202 combination of owner name, algorithm, and key tag can efficiently 1203 identify a DNSKEY record. Both the RRSIG and DS resource records 1204 have corresponding DNSKEY records. The Key Tag field in the RRSIG 1205 and DS records can be used to help select the corresponding DNSKEY RR 1206 efficiently when more than one candidate DNSKEY RR is available. 1208 However, it is essential to note that the key tag is not a unique 1209 identifier. It is theoretically possible for two distinct DNSKEY RRs 1210 to have the same owner name, the same algorithm, and the same key 1211 tag. The key tag is used to limit the possible candidate keys, but 1212 it does not uniquely identify a DNSKEY record. Implementations MUST 1213 NOT assume that the key tag uniquely identifies a DNSKEY RR. 1215 The key tag is the same for all DNSKEY algorithm types except 1216 algorithm 1 (please see Appendix B.1 for the definition of the key 1217 tag for algorithm 1). The key tag algorithm is the sum of the wire 1218 format of the DNSKEY RDATA broken into 2 octet groups. First the 1219 RDATA (in wire format) is treated as a series of 2 octet groups, 1220 these groups are then added together ignoring any carry bits. 1222 A reference implementation of the key tag algorithm is as an ANSI C 1223 function is given below with the RDATA portion of the DNSKEY RR is 1224 used as input. It is not necessary to use the following reference 1225 code verbatim, but the numerical value of the Key Tag MUST be 1226 identical to what the reference implementation would generate for the 1227 same input. 1229 Please note that the algorithm for calculating the Key Tag is almost 1230 but not completely identical to the familiar ones-complement checksum 1231 used in many other Internet protocols. Key Tags MUST be calculated 1232 using the algorithm described here rather than the ones complement 1233 checksum. 1235 The following ANSI C reference implementation calculates the value of 1236 a Key Tag. This reference implementation applies to all algorithm 1237 types except algorithm 1 (see Appendix B.1). The input is the wire 1238 format of the RDATA portion of the DNSKEY RR. The code is written 1239 for clarity, not efficiency. 1241 /* 1242 * Assumes that int is at least 16 bits. 1243 * First octet of the key tag is the most significant 8 bits of the 1244 * return value; 1245 * Second octet of the key tag is the least significant 8 bits of the 1246 * return value. 1247 */ 1249 unsigned int 1250 keytag ( 1251 unsigned char key[], /* the RDATA part of the DNSKEY RR */ 1252 unsigned int keysize /* the RDLENGTH */ 1253 ) 1254 { 1255 unsigned long ac; /* assumed to be 32 bits or larger */ 1256 int i; /* loop index */ 1258 for ( ac = 0, i = 0; i < keysize; ++i ) 1259 ac += (i & 1) ? key[i] : key[i] << 8; 1260 ac += (ac >> 16) & 0xFFFF; 1261 return ac & 0xFFFF; 1262 } 1264 B.1 Key Tag for Algorithm 1 (RSA/MD5) 1266 The key tag for algorithm 1 (RSA/MD5) is defined differently than the 1267 key tag for all other algorithms, for historical reasons. For a 1268 DNSKEY RR with algorithm 1, the key tag is defined to be the most 1269 significant 16 bits of the least significant 24 bits in the public 1270 key modulus (in other words, the 4th to last and 3rd to last octets 1271 of the public key modulus). 1273 Please note that Algorithm 1 is NOT RECOMMENDED. 1275 Intellectual Property Statement 1277 The IETF takes no position regarding the validity or scope of any 1278 Intellectual Property Rights or other rights that might be claimed to 1279 pertain to the implementation or use of the technology described in 1280 this document or the extent to which any license under such rights 1281 might or might not be available; nor does it represent that it has 1282 made any independent effort to identify any such rights. Information 1283 on the procedures with respect to rights in RFC documents can be 1284 found in BCP 78 and BCP 79. 1286 Copies of IPR disclosures made to the IETF Secretariat and any 1287 assurances of licenses to be made available, or the result of an 1288 attempt made to obtain a general license or permission for the use of 1289 such proprietary rights by implementers or users of this 1290 specification can be obtained from the IETF on-line IPR repository at 1291 http://www.ietf.org/ipr. 1293 The IETF invites any interested party to bring to its attention any 1294 copyrights, patents or patent applications, or other proprietary 1295 rights that may cover technology that may be required to implement 1296 this standard. Please address the information to the IETF at 1297 ietf-ipr@ietf.org. 1299 Disclaimer of Validity 1301 This document and the information contained herein are provided on an 1302 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1303 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 1304 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 1305 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 1306 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1307 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1309 Copyright Statement 1311 Copyright (C) The Internet Society (2004). This document is subject 1312 to the rights, licenses and restrictions contained in BCP 78, and 1313 except as set forth therein, the authors retain all their rights. 1315 Acknowledgment 1317 Funding for the RFC Editor function is currently provided by the 1318 Internet Society.