]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/doc/rfc/rfc2537.txt
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / doc / rfc / rfc2537.txt
1
2
3
4
5
6
7 Network Working Group                                        D. Eastlake
8 Request for Comments: 2537                                           IBM
9 Category: Standards Track                                     March 1999
10
11
12          RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)
13
14 Status of this Memo
15
16    This document specifies an Internet standards track protocol for the
17    Internet community, and requests discussion and suggestions for
18    improvements.  Please refer to the current edition of the "Internet
19    Official Protocol Standards" (STD 1) for the standardization state
20    and status of this protocol.  Distribution of this memo is unlimited.
21
22 Copyright Notice
23
24    Copyright (C) The Internet Society (1999).  All Rights Reserved.
25
26 Abstract
27
28    A standard method for storing RSA keys and and RSA/MD5 based
29    signatures in the Domain Name System is described which utilizes DNS
30    KEY and SIG resource records.
31
32 Table of Contents
33
34    Abstract...................................................1
35    1. Introduction............................................1
36    2. RSA Public KEY Resource Records.........................2
37    3. RSA/MD5 SIG Resource Records............................2
38    4. Performance Considerations..............................3
39    5. Security Considerations.................................4
40    References.................................................4
41    Author's Address...........................................5
42    Full Copyright Statement...................................6
43
44 1. Introduction
45
46    The Domain Name System (DNS) is the global hierarchical replicated
47    distributed database system for Internet addressing, mail proxy, and
48    other information. The DNS has been extended to include digital
49    signatures and cryptographic keys as described in [RFC 2535].  Thus
50    the DNS can now be secured and used for secure key distribution.
51
52
53
54
55
56
57
58 Eastlake                    Standards Track                     [Page 1]
59 \f
60 RFC 2537            RSA/MD5 KEYs and SIGs in the DNS          March 1999
61
62
63    This document describes how to store RSA keys and and RSA/MD5 based
64    signatures in the DNS.  Familiarity with the RSA algorithm is assumed
65    [Schneier].  Implementation of the RSA algorithm in DNS is
66    recommended.
67
68    The key words "MUST", "REQUIRED", "SHOULD", "RECOMMENDED", and "MAY"
69    in this document are to be interpreted as described in RFC 2119.
70
71 2. RSA Public KEY Resource Records
72
73    RSA public keys are stored in the DNS as KEY RRs using algorithm
74    number 1 [RFC 2535].  The structure of the algorithm specific portion
75    of the RDATA part of such RRs is as shown below.
76
77            Field             Size
78            -----             ----
79            exponent length   1 or 3 octets (see text)
80            exponent          as specified by length field
81            modulus           remaining space
82
83    For interoperability, the exponent and modulus are each currently
84    limited to 4096 bits in length.  The public key exponent is a
85    variable length unsigned integer.  Its length in octets is
86    represented as one octet if it is in the range of 1 to 255 and by a
87    zero octet followed by a two octet unsigned length if it is longer
88    than 255 bytes.  The public key modulus field is a multiprecision
89    unsigned integer.  The length of the modulus can be determined from
90    the RDLENGTH and the preceding RDATA fields including the exponent.
91    Leading zero octets are prohibited in the exponent and modulus.
92
93 3. RSA/MD5 SIG Resource Records
94
95    The signature portion of the SIG RR RDATA area, when using the
96    RSA/MD5 algorithm, is calculated as shown below.  The data signed is
97    determined as specified in [RFC 2535].  See [RFC 2535] for fields in
98    the SIG RR RDATA which precede the signature itself.
99
100
101      hash = MD5 ( data )
102
103      signature = ( 00 | 01 | FF* | 00 | prefix | hash ) ** e (mod n)
104
105
106
107
108
109
110
111
112
113
114 Eastlake                    Standards Track                     [Page 2]
115 \f
116 RFC 2537            RSA/MD5 KEYs and SIGs in the DNS          March 1999
117
118
119    where MD5 is the message digest algorithm documented in [RFC 1321],
120    "|" is concatenation, "e" is the private key exponent of the signer,
121    and "n" is the modulus of the signer's public key.  01, FF, and 00
122    are fixed octets of the corresponding hexadecimal value. "prefix" is
123    the ASN.1 BER MD5 algorithm designator prefix specified in [RFC
124    2437], that is,
125
126       hex 3020300c06082a864886f70d020505000410 [NETSEC].
127
128    This prefix is included to make it easier to use RSAREF (or similar
129    packages such as EuroRef).  The FF octet MUST be repeated the maximum
130    number of times such that the value of the quantity being
131    exponentiated is the same length in octets as the value of n.
132
133    (The above specifications are identical to the corresponding part of
134    Public Key Cryptographic Standard #1 [RFC 2437].)
135
136    The size of n, including most and least significant bits (which will
137    be 1) MUST be not less than 512 bits and not more than 4096 bits.  n
138    and e SHOULD be chosen such that the public exponent is small.
139
140    Leading zero bytes are permitted in the RSA/MD5 algorithm signature.
141
142    A public exponent of 3 minimizes the effort needed to verify a
143    signature.  Use of 3 as the public exponent is weak for
144    confidentiality uses since, if the same data can be collected
145    encrypted under three different keys with an exponent of 3 then,
146    using the Chinese Remainder Theorem [NETSEC], the original plain text
147    can be easily recovered.  This weakness is not significant for DNS
148    security because we seek only authentication, not confidentiality.
149
150 4. Performance Considerations
151
152    General signature generation speeds are roughly the same for RSA and
153    DSA [RFC 2536].  With sufficient pre-computation, signature
154    generation with DSA is faster than RSA.  Key generation is also
155    faster for DSA.  However, signature verification is an order of
156    magnitude slower with DSA when the RSA public exponent is chosen to
157    be small as is recommended for KEY RRs used in domain name system
158    (DNS) data authentication.
159
160    Current DNS implementations are optimized for small transfers,
161    typically less than 512 bytes including overhead.  While larger
162    transfers will perform correctly and work is underway to make larger
163
164
165
166
167
168
169
170 Eastlake                    Standards Track                     [Page 3]
171 \f
172 RFC 2537            RSA/MD5 KEYs and SIGs in the DNS          March 1999
173
174
175    transfers more efficient, it is still advisable at this time to make
176    reasonable efforts to minimize the size of KEY RR sets stored within
177    the DNS consistent with adequate security.  Keep in mind that in a
178    secure zone, at least one authenticating SIG RR will also be
179    returned.
180
181 5. Security Considerations
182
183    Many of the general security consideration in [RFC 2535] apply.  Keys
184    retrieved from the DNS should not be trusted unless (1) they have
185    been securely obtained from a secure resolver or independently
186    verified by the user and (2) this secure resolver and secure
187    obtainment or independent verification conform to security policies
188    acceptable to the user.  As with all cryptographic algorithms,
189    evaluating the necessary strength of the key is essential and
190    dependent on local policy.
191
192    For interoperability, the RSA key size is limited to 4096 bits.  For
193    particularly critical applications, implementors are encouraged to
194    consider the range of available algorithms and key sizes.
195
196 References
197
198    [NETSEC]     Kaufman, C., Perlman, R. and M. Speciner, "Network
199                 Security: PRIVATE Communications in a PUBLIC World",
200                 Series in Computer Networking and Distributed
201                 Communications, 1995.
202
203    [RFC 2437]   Kaliski, B. and J. Staddon, "PKCS #1: RSA Cryptography
204                 Specifications Version 2.0", RFC 2437, October 1998.
205
206    [RFC 1034]   Mockapetris, P., "Domain Names - Concepts and
207                 Facilities", STD 13, RFC 1034, November 1987.
208
209    [RFC 1035]   Mockapetris, P., "Domain Names - Implementation and
210                 Specification", STD 13, RFC 1035, November 1987.
211
212    [RFC 1321]   Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321
213                 April 1992.
214
215    [RFC 2535]   Eastlake, D., "Domain Name System Security Extensions",
216                 RFC 2535, March 1999.
217
218    [RFC 2536]   EastLake, D., "DSA KEYs and SIGs in the Domain Name
219                 System (DNS)", RFC 2536, March 1999.
220
221
222
223
224
225
226 Eastlake                    Standards Track                     [Page 4]
227 \f
228 RFC 2537            RSA/MD5 KEYs and SIGs in the DNS          March 1999
229
230
231    [Schneier]   Bruce Schneier, "Applied Cryptography Second Edition:
232                 protocols, algorithms, and source code in C", 1996, John
233                 Wiley and Sons, ISBN 0-471-11709-9.
234
235 Author's Address
236
237    Donald E. Eastlake 3rd
238    IBM
239    65 Shindegan Hill Road, RR #1
240    Carmel, NY 10512
241
242    Phone:   +1-914-276-2668(h)
243             +1-914-784-7913(w)
244    Fax:     +1-914-784-3833(w)
245    EMail:   dee3@us.ibm.com
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282 Eastlake                    Standards Track                     [Page 5]
283 \f
284 RFC 2537            RSA/MD5 KEYs and SIGs in the DNS          March 1999
285
286
287 Full Copyright Statement
288
289    Copyright (C) The Internet Society (1999).  All Rights Reserved.
290
291    This document and translations of it may be copied and furnished to
292    others, and derivative works that comment on or otherwise explain it
293    or assist in its implementation may be prepared, copied, published
294    and distributed, in whole or in part, without restriction of any
295    kind, provided that the above copyright notice and this paragraph are
296    included on all such copies and derivative works.  However, this
297    document itself may not be modified in any way, such as by removing
298    the copyright notice or references to the Internet Society or other
299    Internet organizations, except as needed for the purpose of
300    developing Internet standards in which case the procedures for
301    copyrights defined in the Internet Standards process must be
302    followed, or as required to translate it into languages other than
303    English.
304
305    The limited permissions granted above are perpetual and will not be
306    revoked by the Internet Society or its successors or assigns.
307
308    This document and the information contained herein is provided on an
309    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
310    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
311    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
312    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
313    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338 Eastlake                    Standards Track                     [Page 6]
339 \f