7Network Working Group J. Jansen
8Request for Comments: 5702 NLnet Labs
9Category: Standards Track October 2009
12 Use of SHA-2 Algorithms with RSA in
13 DNSKEY and RRSIG Resource Records for DNSSEC
17 This document describes how to produce RSA/SHA-256 and RSA/SHA-512
18 DNSKEY and RRSIG resource records for use in the Domain Name System
19 Security Extensions (RFC 4033, RFC 4034, and RFC 4035).
23 This document specifies an Internet standards track protocol for the
24 Internet community, and requests discussion and suggestions for
25 improvements. Please refer to the current edition of the "Internet
26 Official Protocol Standards" (STD 1) for the standardization state
27 and status of this protocol. Distribution of this memo is unlimited.
31 Copyright (c) 2009 IETF Trust and the persons identified as the
32 document authors. All rights reserved.
34 This document is subject to BCP 78 and the IETF Trust's Legal
35 Provisions Relating to IETF Documents
36 (http://trustee.ietf.org/license-info) in effect on the date of
37 publication of this document. Please review these documents
38 carefully, as they describe your rights and restrictions with respect
39 to this document. Code Components extracted from this document must
40 include Simplified BSD License text as described in Section 4.e of
41 the Trust Legal Provisions and are provided without warranty as
42 described in the BSD License.
58Jansen Standards Track [Page 1]
60RFC 5702 DNSSEC RSA/SHA-2 October 2009
65 1. Introduction ....................................................2
66 2. DNSKEY Resource Records .........................................3
67 2.1. RSA/SHA-256 DNSKEY Resource Records ........................3
68 2.2. RSA/SHA-512 DNSKEY Resource Records ........................3
69 3. RRSIG Resource Records ..........................................3
70 3.1. RSA/SHA-256 RRSIG Resource Records .........................4
71 3.2. RSA/SHA-512 RRSIG Resource Records .........................4
72 4. Deployment Considerations .......................................5
73 4.1. Key Sizes ..................................................5
74 4.2. Signature Sizes ............................................5
75 5. Implementation Considerations ...................................5
76 5.1. Support for SHA-2 Signatures ...............................5
77 5.2. Support for NSEC3 Denial of Existence ......................5
78 6. Examples ........................................................6
79 6.1. RSA/SHA-256 Key and Signature ..............................6
80 6.2. RSA/SHA-512 Key and Signature ..............................7
81 7. IANA Considerations .............................................8
82 8. Security Considerations .........................................8
83 8.1. SHA-1 versus SHA-2 Considerations for RRSIG
84 Resource Records ...........................................8
85 8.2. Signature Type Downgrade Attacks ...........................8
86 9. Acknowledgments .................................................9
87 10. References .....................................................9
88 10.1. Normative References ......................................9
89 10.2. Informative References ....................................9
93 The Domain Name System (DNS) is the global, hierarchical distributed
94 database for Internet Naming. The DNS has been extended to use
95 cryptographic keys and digital signatures for the verification of the
96 authenticity and integrity of its data. [RFC4033], [RFC4034], and
97 [RFC4035] describe these DNS Security Extensions, called DNSSEC.
99 RFC 4034 describes how to store DNSKEY and RRSIG resource records,
100 and specifies a list of cryptographic algorithms to use. This
101 document extends that list with the algorithms RSA/SHA-256 and RSA/
102 SHA-512, and specifies how to store DNSKEY data and how to produce
103 RRSIG resource records with these hash algorithms.
105 Familiarity with DNSSEC, RSA, and the SHA-2 [FIPS.180-3.2008] family
106 of algorithms is assumed in this document.
114Jansen Standards Track [Page 2]
116RFC 5702 DNSSEC RSA/SHA-2 October 2009
119 To refer to both SHA-256 and SHA-512, this document will use the name
120 SHA-2. This is done to improve readability. When a part of text is
121 specific for either SHA-256 or SHA-512, their specific names are
122 used. The same goes for RSA/SHA-256 and RSA/SHA-512, which will be
123 grouped using the name RSA/SHA-2.
125 The term "SHA-2" is not officially defined but is usually used to
126 refer to the collection of the algorithms SHA-224, SHA-256, SHA-384,
127 and SHA-512. Since SHA-224 and SHA-384 are not used in DNSSEC, SHA-2
128 will only refer to SHA-256 and SHA-512 in this document.
130 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
131 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
132 document are to be interpreted as described in [RFC2119].
1342. DNSKEY Resource Records
136 The format of the DNSKEY RR can be found in [RFC4034]. [RFC3110]
137 describes the use of RSA/SHA-1 for DNSSEC signatures.
1392.1. RSA/SHA-256 DNSKEY Resource Records
141 RSA public keys for use with RSA/SHA-256 are stored in DNSKEY
142 resource records (RRs) with the algorithm number 8.
144 For interoperability, as in [RFC3110], the key size of RSA/SHA-256
145 keys MUST NOT be less than 512 bits and MUST NOT be more than 4096
1482.2. RSA/SHA-512 DNSKEY Resource Records
150 RSA public keys for use with RSA/SHA-512 are stored in DNSKEY
151 resource records (RRs) with the algorithm number 10.
153 The key size of RSA/SHA-512 keys MUST NOT be less than 1024 bits and
154 MUST NOT be more than 4096 bits.
1563. RRSIG Resource Records
158 The value of the signature field in the RRSIG RR follows the RSASSA-
159 PKCS1-v1_5 signature scheme and is calculated as follows. The values
160 for the RDATA fields that precede the signature data are specified in
170Jansen Standards Track [Page 3]
172RFC 5702 DNSSEC RSA/SHA-2 October 2009
177 Here XXX is either 256 or 512, depending on the algorithm used, as
178 specified in FIPS PUB 180-3; "data" is the wire format data of the
179 resource record set that is signed, as specified in [RFC4034].
181 signature = ( 00 | 01 | FF* | 00 | prefix | hash ) ** e (mod n)
183 Here "|" is concatenation; "00", "01", "FF", and "00" are fixed
184 octets of corresponding hexadecimal value; "e" is the private
185 exponent of the signing RSA key; and "n" is the public modulus of the
186 signing key. The FF octet MUST be repeated the exact number of times
187 so that the total length of the concatenated term in parentheses
188 equals the length of the modulus of the signer's public key ("n").
190 The "prefix" is intended to make the use of standard cryptographic
191 libraries easier. These specifications are taken directly from the
192 specifications of RSASSA-PKCS1-v1_5 in PKCS #1 v2.1 (Section 8.2 of
193 [RFC3447]), and EMSA-PKCS1-v1_5 encoding in PKCS #1 v2.1 (Section 9.2
194 of [RFC3447]). The prefixes for the different algorithms are
1973.1. RSA/SHA-256 RRSIG Resource Records
199 RSA/SHA-256 signatures are stored in the DNS using RRSIG resource
200 records (RRs) with algorithm number 8.
202 The prefix is the ASN.1 DER SHA-256 algorithm designator prefix, as
203 specified in PKCS #1 v2.1 [RFC3447]:
205 hex 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20
2073.2. RSA/SHA-512 RRSIG Resource Records
209 RSA/SHA-512 signatures are stored in the DNS using RRSIG resource
210 records (RRs) with algorithm number 10.
212 The prefix is the ASN.1 DER SHA-512 algorithm designator prefix, as
213 specified in PKCS #1 v2.1 [RFC3447]:
215 hex 30 51 30 0d 06 09 60 86 48 01 65 03 04 02 03 05 00 04 40
226Jansen Standards Track [Page 4]
228RFC 5702 DNSSEC RSA/SHA-2 October 2009
2314. Deployment Considerations
235 Apart from the restrictions in Section 2, this document will not
236 specify what size of keys to use. That is an operational issue and
237 depends largely on the environment and intended use. A good starting
238 point for more information would be NIST SP 800-57 [NIST800-57].
242 In this family of signing algorithms, the size of signatures is
243 related to the size of the key and not to the hashing algorithm used
244 in the signing process. Therefore, RRSIG resource records produced
245 with RSA/SHA-256 or RSA/SHA-512 will have the same size as those
246 produced with RSA/SHA-1, if the keys have the same length.
2485. Implementation Considerations
2505.1. Support for SHA-2 Signatures
252 DNSSEC-aware implementations SHOULD be able to support RRSIG and
253 DNSKEY resource records created with the RSA/SHA-2 algorithms as
254 defined in this document.
2565.2. Support for NSEC3 Denial of Existence
258 [RFC5155] defines new algorithm identifiers for existing signing
259 algorithms, to indicate that zones signed with these algorithm
260 identifiers can use NSEC3 as well as NSEC records to provide denial
261 of existence. That mechanism was chosen to protect implementations
262 predating RFC 5155 from encountering resource records about which
263 they could not know. This document does not define such algorithm
266 A DNSSEC validator that implements RSA/SHA-2 MUST be able to validate
267 negative answers in the form of both NSEC and NSEC3 with hash
268 algorithm 1, as defined in [RFC5155]. An authoritative server that
269 does not implement NSEC3 MAY still serve zones that use RSA/SHA-2
270 with NSEC denial of existence.
282Jansen Standards Track [Page 5]
284RFC 5702 DNSSEC RSA/SHA-2 October 2009
2896.1. RSA/SHA-256 Key and Signature
291 Given a private key with the following values (in Base64):
293 Private-key-format: v1.2
294 Algorithm: 8 (RSASHA256)
295 Modulus: wVwaxrHF2CK64aYKRUibLiH30KpPuPBjel7E8ZydQW1HYWHfoGm
296 idzC2RnhwCC293hCzw+TFR2nqn8OVSY5t2Q==
298 PrivateExponent: UR44xX6zB3eaeyvTRzmskHADrPCmPWnr8dxsNwiDGHzrMKLN+i/
299 HAam+97HxIKVWNDH2ba9Mf1SA8xu9dcHZAQ==
300 Prime1: 4c8IvFu1AVXGWeFLLFh5vs7fbdzdC6U82fduE6KkSWk=
301 Prime2: 2zZpBE8ZXVnL74QjG4zINlDfH+EOEtjJJ3RtaYDugvE=
302 Exponent1: G2xAPFfK0KGxGANDVNxd1K1c9wOmmJ51mGbzKFFNMFk=
303 Exponent2: GYxP1Pa7CAwtHm8SAGX594qZVofOMhgd6YFCNyeVpKE=
304 Coefficient: icQdNRjlZGPmuJm2TIadubcO8X7V4y07aVhX464tx8Q=
306 The DNSKEY record for this key would be:
308 example.net. 3600 IN DNSKEY (256 3 8 AwEAAcFcGsaxxdgiuuGmCkVI
309 my4h99CqT7jwY3pexPGcnUFtR2Fh36BponcwtkZ4cAgtvd4Qs8P
310 kxUdp6p/DlUmObdk= );{id = 9033 (zsk), size = 512b}
312 With this key, sign the following RRSet, consisting of 1 A record:
314 www.example.net. 3600 IN A 192.0.2.91
316 If the inception date is set at 00:00 hours on January 1st, 2000, and
317 the expiration date at 00:00 hours on January 1st, 2030, the
318 following signature should be created:
320 www.example.net. 3600 IN RRSIG (A 8 3 3600 20300101000000
321 20000101000000 9033 example.net. kRCOH6u7l0QGy9qpC9
322 l1sLncJcOKFLJ7GhiUOibu4teYp5VE9RncriShZNz85mwlMgNEa
323 cFYK/lPtPiVYP4bwg==);{id = 9033}
338Jansen Standards Track [Page 6]
340RFC 5702 DNSSEC RSA/SHA-2 October 2009
3436.2. RSA/SHA-512 Key and Signature
345 Given a private key with the following values (in Base64):
347 Private-key-format: v1.2
348 Algorithm: 10 (RSASHA512)
349 Modulus: 0eg1M5b563zoq4k5ZEOnWmd2/BvpjzedJVdfIsDcMuuhE5SQ3pf
350 Q7qmdaeMlC6Nf8DKGoUPGPXe06cP27/WRODtxXquSUytkO0kJDk
351 8KX8PtA0+yBWwy7UnZDyCkynO00Uuk8HPVtZeMO1pHtlAGVnc8V
354 PrivateExponent: rFS1IPbJllFFgFc33B5DDlC1egO8e81P4fFadODbp56V7sphKa6
355 AZQCx8NYAew6VXFFPAKTw41QdHnK5kIYOwxvfFDjDcUGza88qbj
356 yrDPSJenkeZbISMUSSqy7AMFzEolkk6WSn6k3thUVRgSlqDoOV3
358 Prime1: 8mbtsu9Tl9v7tKSHdCIeprLIQXQLzxlSZun5T1n/OjvXSUtvD7x
359 nZJ+LHqaBj1dIgMbCq2U8O04QVcK3TS9GiQ==
360 Prime2: 3a6gkfs74d0Jb7yL4j4adAif4fcp7ZrGt7G5NRVDDY/Mv4TERAK
361 Ma0TKN3okKE0A7X+Rv2K84mhT4QLDlllEcw==
362 Exponent1: v3D5A9uuCn5rgVR7wgV8ba0/KSpsdSiLgsoA42GxiB1gvvs7gJM
363 MmVTDu/ZG1p1ZnpLbhh/S/Qd/MSwyNlxC+Q==
364 Exponent2: m+ezf9dsDvYQK+gzjOLWYeKq5xWYBEYFGa3BLocMiF4oxkzOZ3J
365 PZSWU/h1Fjp5RV7aPP0Vmx+hNjYMPIQ8Y5w==
366 Coefficient: Je5YhYpUron/WdOXjxNAxDubAp3i5X7UOUfhJcyIggqwY86IE0Q
367 /Bk0Dw4SC9zxnsimmdBXW2Izd8Lwuk8FQcQ==
369 The DNSKEY record for this key would be:
371 example.net. 3600 IN DNSKEY (256 3 10 AwEAAdHoNTOW+et86KuJOWRD
372 p1pndvwb6Y83nSVXXyLA3DLroROUkN6X0O6pnWnjJQujX/AyhqFD
373 xj13tOnD9u/1kTg7cV6rklMrZDtJCQ5PCl/D7QNPsgVsMu1J2Q8g
374 pMpztNFLpPBz1bWXjDtaR7ZQBlZ3PFY12ZTSncorffcGmhOL
375 );{id = 3740 (zsk), size = 1024b}
377 With this key, sign the following RRSet, consisting of 1 A record:
379 www.example.net. 3600 IN A 192.0.2.91
381 If the inception date is set at 00:00 hours on January 1st, 2000, and
382 the expiration date at 00:00 hours on January 1st, 2030, the
383 following signature should be created:
385 www.example.net. 3600 IN RRSIG (A 10 3 3600 20300101000000
386 20000101000000 3740 example.net. tsb4wnjRUDnB1BUi+t
387 6TMTXThjVnG+eCkWqjvvjhzQL1d0YRoOe0CbxrVDYd0xDtsuJRa
388 eUw1ep94PzEWzr0iGYgZBWm/zpq+9fOuagYJRfDqfReKBzMweOL
389 DiNa8iP5g9vMhpuv6OPlvpXwm9Sa9ZXIbNl1MBGk0fthPgxdDLw
394Jansen Standards Track [Page 7]
396RFC 5702 DNSSEC RSA/SHA-2 October 2009
3997. IANA Considerations
401 This document updates the IANA registry "DNS SECURITY ALGORITHM
402 NUMBERS -- per [RFC4035]" (http://www.iana.org/protocols). The
403 following entries are added to the registry:
406 Value Description Mnemonic Signing Sec. References
407 8 RSA/SHA-256 RSASHA256 Y * RFC 5702
408 10 RSA/SHA-512 RSASHA512 Y * RFC 5702
410 * There has been no determination of standardization of the use of
411 this algorithm with Transaction Security.
4138. Security Considerations
4158.1. SHA-1 versus SHA-2 Considerations for RRSIG Resource Records
417 Users of DNSSEC are encouraged to deploy SHA-2 as soon as software
418 implementations allow for it. SHA-2 is widely believed to be more
419 resilient to attack than SHA-1, and confidence in SHA-1's strength is
420 being eroded by recently announced attacks. Regardless of whether or
421 not the attacks on SHA-1 will affect DNSSEC, it is believed (at the
422 time of this writing) that SHA-2 is the better choice for use in
425 SHA-2 is considered sufficiently strong for the immediate future, but
426 predictions about future development in cryptography and
427 cryptanalysis are beyond the scope of this document.
429 The signature scheme RSASSA-PKCS1-v1_5 is chosen to match the one
430 used for RSA/SHA-1 signatures. This should ease implementation of
431 the new hashing algorithms in DNSSEC software.
4338.2. Signature Type Downgrade Attacks
435 Since each RRSet MUST be signed with each algorithm present in the
436 DNSKEY RRSet at the zone apex (see Section 2.2 of [RFC4035]), a
437 malicious party cannot filter out the RSA/SHA-2 RRSIG and force the
438 validator to use the RSA/SHA-1 signature if both are present in the
439 zone. This should provide resilience against algorithm downgrade
440 attacks, if the validator supports RSA/SHA-2.
450Jansen Standards Track [Page 8]
452RFC 5702 DNSSEC RSA/SHA-2 October 2009
457 This document is a minor extension to [RFC4034]. Also, we try to
458 follow the documents [RFC3110] and [RFC4509] for consistency. The
459 authors of and contributors to these documents are gratefully
460 acknowledged for their hard work.
462 The following people provided additional feedback and text: Jaap
463 Akkerhuis, Mark Andrews, Roy Arends, Rob Austein, Francis Dupont,
464 Miek Gieben, Alfred Hoenes, Paul Hoffman, Peter Koch, Scott Rose,
465 Michael St. Johns, and Wouter Wijngaards.
46910.1. Normative References
472 National Institute of Standards and Technology, "Secure
473 Hash Standard", FIPS PUB 180-3, October 2008.
475 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
476 Requirement Levels", BCP 14, RFC 2119, March 1997.
478 [RFC3110] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain
479 Name System (DNS)", RFC 3110, May 2001.
481 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
482 Rose, "DNS Security Introduction and Requirements",
483 RFC 4033, March 2005.
485 [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
486 Rose, "Resource Records for the DNS Security Extensions",
487 RFC 4034, March 2005.
489 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
490 Rose, "Protocol Modifications for the DNS Security
491 Extensions", RFC 4035, March 2005.
49310.2. Informative References
496 Barker, E., Barker, W., Burr, W., Polk, W., and M. Smid,
497 "Recommendations for Key Management", NIST SP 800-57,
500 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
501 Standards (PKCS) #1: RSA Cryptography Specifications
502 Version 2.1", RFC 3447, February 2003.
506Jansen Standards Track [Page 9]
508RFC 5702 DNSSEC RSA/SHA-2 October 2009
511 [RFC4509] Hardaker, W., "Use of SHA-256 in DNSSEC Delegation Signer
512 (DS) Resource Records (RRs)", RFC 4509, May 2006.
514 [RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS
515 Security (DNSSEC) Hashed Authenticated Denial of
516 Existence", RFC 5155, March 2008.
526 EMail: jelte@NLnetLabs.nl
527 URI: http://www.nlnetlabs.nl/
562Jansen Standards Track [Page 10]