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