]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/doc/draft/draft-ietf-dnsext-rfc2539bis-dhk-06.txt
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / doc / draft / draft-ietf-dnsext-rfc2539bis-dhk-06.txt
1
2 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
3 OBSOLETES: RFC 2539                               Donald E. Eastlake 3rd
4                                                    Motorola Laboratories
5 Expires: January 2006                                          July 2005
6
7
8
9
10         Storage of Diffie-Hellman Keying Information in the DNS
11         ------- -- -------------- ------ ----------- -- --- ---
12                <draft-ietf-dnsext-rfc2539bis-dhk-06.txt>
13
14
15
16 Status of This Document
17
18    By submitting this Internet-Draft, each author represents that any
19    applicable patent or other IPR claims of which he or she is aware
20    have been or will be disclosed, and any of which he or she becomes
21    aware will be disclosed, in accordance with Section 6 of BCP 79.
22
23    Distribution of this document is unlimited. Comments should be sent
24    to the DNS extensions working group mailing list
25    <namedroppers@ops.ietf.org>.
26
27    Internet-Drafts are working documents of the Internet Engineering
28    Task Force (IETF), its areas, and its working groups.  Note that
29    other groups may also distribute working documents as Internet-
30    Drafts.
31
32    Internet-Drafts are draft documents valid for a maximum of six months
33    and may be updated, replaced, or obsoleted by other documents at any
34    time.  It is inappropriate to use Internet-Drafts as reference
35    material or to cite them other than a "work in progress."
36
37    The list of current Internet-Drafts can be accessed at
38    http://www.ietf.org/1id-abstracts.html
39
40    The list of Internet-Draft Shadow Directories can be accessed at
41    http://www.ietf.org/shadow.html
42
43
44 Abstract
45
46    The standard method for encoding Diffie-Hellman keys in the Domain
47    Name System is specified.
48
49
50
51 Copyright
52
53    Copyright (C) The Internet Society 2005.
54
55
56
57 D. Eastlake 3rd                                                 [Page 1]
58 \f
59
60 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
61
62
63 Acknowledgements
64
65    Part of the format for Diffie-Hellman keys and the description
66    thereof was taken from a work in progress by Ashar Aziz, Tom Markson,
67    and Hemma Prafullchandra.  In addition, the following persons
68    provided useful comments that were incorporated into the predecessor
69    of this document: Ran Atkinson, Thomas Narten.
70
71
72
73 Table of Contents
74
75       Status of This Document....................................1
76       Abstract...................................................1
77       Copyright..................................................1
78
79       Acknowledgements...........................................2
80       Table of Contents..........................................2
81
82       1. Introduction............................................3
83       1.1 About This Document....................................3
84       1.2 About Diffie-Hellman...................................3
85       2. Encoding Diffie-Hellman Keying Information..............4
86       3. Performance Considerations..............................5
87       4. IANA Considerations.....................................5
88       5. Security Considerations.................................5
89       Copyright and Disclaimer...................................5
90
91       Normative References.......................................7
92       Informative Refences.......................................7
93
94       Author Address.............................................8
95       Expiration and File Name...................................8
96
97       Appendix A: Well known prime/generator pairs...............9
98       A.1. Well-Known Group 1:  A 768 bit prime..................9
99       A.2. Well-Known Group 2:  A 1024 bit prime.................9
100       A.3. Well-Known Group 3:  A 1536 bit prime................10
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115 D. Eastlake 3rd                                                 [Page 2]
116 \f
117
118 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
119
120
121 1. Introduction
122
123    The Domain Name System (DNS) is the global hierarchical replicated
124    distributed database system for Internet addressing, mail proxy, and
125    similar information [RFC 1034, 1035]. The DNS has been extended to
126    include digital signatures and cryptographic keys as described in
127    [RFC 4033, 4034, 4035] and additonal work is underway which would use
128    the storage of keying information in the DNS.
129
130
131
132 1.1 About This Document
133
134    This document describes how to store Diffie-Hellman keys in the DNS.
135    Familiarity with the Diffie-Hellman key exchange algorithm is assumed
136    [Schneier, RFC 2631].
137
138
139
140 1.2 About Diffie-Hellman
141
142    Diffie-Hellman requires two parties to interact to derive keying
143    information which can then be used for authentication.  Thus Diffie-
144    Hellman is inherently a key agreement algorithm. As a result, no
145    format is defined for Diffie-Hellman "signature information".  For
146    example, assume that two parties have local secrets "i" and "j".
147    Assume they each respectively calculate X and Y as follows:
148
149         X = g**i ( mod p )
150
151         Y = g**j ( mod p )
152
153    They exchange these quantities and then each calculates a Z as
154    follows:
155
156         Zi = Y**i ( mod p )
157
158         Zj = X**j ( mod p )
159
160    Zi and Zj will both be equal to g**(i*j)(mod p) and will be a shared
161    secret between the two parties that an adversary who does not know i
162    or j will not be able to learn from the exchanged messages (unless
163    the adversary can derive i or j by performing a discrete logarithm
164    mod p which is hard for strong p and g).
165
166    The private key for each party is their secret i (or j).  The public
167    key is the pair p and g, which must be the same for the parties, and
168    their individual X (or Y).
169
170    For further information about Diffie-Hellman and precautions to take
171
172
173 D. Eastlake 3rd                                                 [Page 3]
174 \f
175
176 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
177
178
179    in deciding on a p and g, see [RFC 2631].
180
181
182
183 2. Encoding Diffie-Hellman Keying Information
184
185    When Diffie-Hellman keys appear within the RDATA portion of a RR,
186    they are encoded as shown below.
187
188    The period of key validity is not included in this data but is
189    indicated separately, for example by an RR such as RRSIG which signs
190    and authenticates the RR containing the keying information.
191
192                             1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
193         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
194        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
195        |           KEY flags           |    protocol   |  algorithm=2  |
196        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
197        |     prime length (or flag)    |  prime (p) (or special)       /
198        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
199        /  prime (p)  (variable length) |       generator length        |
200        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
201        | generator (g) (variable length)                               |
202        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
203        |     public value length       | public value (variable length)/
204        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
205        /  public value (g^i mod p)    (variable length)                |
206        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
207
208    Prime length is the length of the Diffie-Hellman prime (p) in bytes
209    if it is 16 or greater.  Prime contains the binary representation of
210    the Diffie-Hellman prime with most significant byte first (i.e., in
211    network order). If "prime length" field is 1 or 2, then the "prime"
212    field is actually an unsigned index into a table of 65,536
213    prime/generator pairs and the generator length SHOULD be zero.  See
214    Appedix A for defined table entries and Section 4 for information on
215    allocating additional table entries.  The meaning of a zero or 3
216    through 15 value for "prime length" is reserved.
217
218    Generator length is the length of the generator (g) in bytes.
219    Generator is the binary representation of generator with most
220    significant byte first.  PublicValueLen is the Length of the Public
221    Value (g**i (mod p)) in bytes.  PublicValue is the binary
222    representation of the DH public value with most significant byte
223    first.
224
225
226
227
228
229
230
231 D. Eastlake 3rd                                                 [Page 4]
232 \f
233
234 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
235
236
237 3. Performance Considerations
238
239    Current DNS implementations are optimized for small transfers,
240    typically less than 512 bytes including DNS overhead.  Larger
241    transfers will perform correctly and extensions have been
242    standardized [RFC 2671] to make larger transfers more efficient. But
243    it is still advisable at this time to make reasonable efforts to
244    minimize the size of RR sets containing keying information consistent
245    with adequate security.
246
247
248
249 4. IANA Considerations
250
251    Assignment of meaning to Prime Lengths of 0 and 3 through 15 requires
252    an IETF consensus as defined in [RFC 2434].
253
254    Well known prime/generator pairs number 0x0000 through 0x07FF can
255    only be assigned by an IETF standards action. [RFC 2539], the
256    Proposed Standard predecessor of this document, assigned 0x0001
257    through 0x0002. This document additionally assigns 0x0003.  Pairs
258    number 0s0800 through 0xBFFF can be assigned based on RFC
259    documentation. Pairs number 0xC000 through 0xFFFF are available for
260    private use and are not centrally coordinated. Use of such private
261    pairs outside of a closed environment may result in conflicts and/or
262    security failures.
263
264
265
266 5. Security Considerations
267
268    Keying information retrieved from the DNS should not be trusted
269    unless (1) it has been securely obtained from a secure resolver or
270    independently verified by the user and (2) this secure resolver and
271    secure obtainment or independent verification conform to security
272    policies acceptable to the user.  As with all cryptographic
273    algorithms, evaluating the necessary strength of the key is important
274    and dependent on security policy.
275
276    In addition, the usual Diffie-Hellman key strength considerations
277    apply. (p-1)/2 should also be prime, g should be primitive mod p, p
278    should be "large", etc. See [RFC 2631, Schneier].
279
280
281
282 Copyright and Disclaimer
283
284    Copyright (C) The Internet Society (2005).  This document is subject to
285    the rights, licenses and restrictions contained in BCP 78, and except
286    as set forth therein, the authors retain all their rights.
287
288
289 D. Eastlake 3rd                                                 [Page 5]
290 \f
291
292 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
293
294
295    This document and the information contained herein are provided on an
296    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
297    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
298    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
299    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
300    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
301    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
302
303
304
305
306
307
308
309
310
311
312
313
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
339
340
341
342
343
344
345
346
347 D. Eastlake 3rd                                                 [Page 6]
348 \f
349
350 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
351
352
353 Normative References
354
355    [RFC 2631] - "Diffie-Hellman Key Agreement Method", E. Rescorla, June
356    1999.
357
358    [RFC 2434] - "Guidelines for Writing an IANA Considerations Section
359    in RFCs", T.  Narten, H. Alvestrand, October 1998.
360
361    [RFC 4034] - Arends, R., Austein, R., Larson, M., Massey, D., and S.
362    Rose, "Resource Records for the DNS Security Extensions", RFC 4034,
363    March 2005.
364
365
366
367 Informative Refences
368
369    [RFC 1034] - "Domain names - concepts and facilities", P.
370    Mockapetris, November 1987.
371
372    [RFC 1035] - "Domain names - implementation and specification", P.
373    Mockapetris, November 1987.
374
375    [RFC 2539] - "Storage of Diffie-Hellman Keys in the Domain Name
376    System (DNS)", D. Eastlake, March 1999, obsoleted by this RFC.
377
378    [RFC 2671] - "Extension Mechanisms for DNS (EDNS0)", P. Vixie, August
379    1999.
380
381    [RFC 4033] - Arends, R., Austein, R., Larson, M., Massey, D., and S.
382    Rose, "DNS Security Introduction and Requirements", RFC 4033, March
383    2005.
384
385    [RFC 4035] - Arends, R., Austein, R., Larson, M., Massey, D., and S.
386    Rose, "Protocol Modifications for the DNS Security Extensions", RFC
387    4035, March 2005.
388
389    [Schneier] - Bruce Schneier, "Applied Cryptography: Protocols,
390    Algorithms, and Source Code in C" (Second Edition), 1996, John Wiley
391    and Sons.
392
393
394
395
396
397
398
399
400
401
402
403
404
405 D. Eastlake 3rd                                                 [Page 7]
406 \f
407
408 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
409
410
411 Author Address
412
413    Donald E. Eastlake 3rd
414    Motorola Laboratories
415    155 Beaver Street
416    Milford, MA 01757 USA
417
418    Telephone:   +1-508-786-7554
419    EMail:       Donald.Eastlake@motorola.com
420
421
422
423 Expiration and File Name
424
425    This draft expires in January 2006.
426
427    Its file name is draft-ietf-dnsext-rfc2539bis-dhk-06.txt.
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463 D. Eastlake 3rd                                                 [Page 8]
464 \f
465
466 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
467
468
469 Appendix A: Well known prime/generator pairs
470
471    These numbers are copied from the IPSEC effort where the derivation of
472    these values is more fully explained and additional information is
473    available.
474    Richard Schroeppel performed all the mathematical and computational
475    work for this appendix.
476
477
478
479 A.1. Well-Known Group 1:  A 768 bit prime
480
481    The prime is 2^768 - 2^704 - 1 + 2^64 * { [2^638 pi] + 149686 }.  Its
482    decimal value is
483           155251809230070893513091813125848175563133404943451431320235
484           119490296623994910210725866945387659164244291000768028886422
485           915080371891804634263272761303128298374438082089019628850917
486           0691316593175367469551763119843371637221007210577919
487
488    Prime modulus: Length (32 bit words): 24, Data (hex):
489             FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
490             29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
491             EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
492             E485B576 625E7EC6 F44C42E9 A63A3620 FFFFFFFF FFFFFFFF
493
494    Generator: Length (32 bit words): 1, Data (hex): 2
495
496
497
498 A.2. Well-Known Group 2:  A 1024 bit prime
499
500    The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }.
501    Its decimal value is
502          179769313486231590770839156793787453197860296048756011706444
503          423684197180216158519368947833795864925541502180565485980503
504          646440548199239100050792877003355816639229553136239076508735
505          759914822574862575007425302077447712589550957937778424442426
506          617334727629299387668709205606050270810842907692932019128194
507          467627007
508
509    Prime modulus:  Length (32 bit words): 32, Data (hex):
510             FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
511             29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
512             EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
513             E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
514             EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
515             FFFFFFFF FFFFFFFF
516
517    Generator: Length (32 bit words): 1, Data (hex): 2
518
519
520
521 D. Eastlake 3rd                                                 [Page 9]
522 \f
523
524 INTERNET-DRAFT                     Diffie-Hellman Information in the DNS
525
526
527 A.3. Well-Known Group 3:  A 1536 bit prime
528
529    The prime is 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] +  741804 }.
530    Its decimal value is
531             241031242692103258855207602219756607485695054850245994265411
532             694195810883168261222889009385826134161467322714147790401219
533             650364895705058263194273070680500922306273474534107340669624
534             601458936165977404102716924945320037872943417032584377865919
535             814376319377685986952408894019557734611984354530154704374720
536             774996976375008430892633929555996888245787241299381012913029
537             459299994792636526405928464720973038494721168143446471443848
538             8520940127459844288859336526896320919633919
539
540    Prime modulus Length (32 bit words): 48, Data (hex):
541               FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
542               29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
543               EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
544               E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
545               EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
546               C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
547               83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
548               670C354E 4ABC9804 F1746C08 CA237327 FFFFFFFF FFFFFFFF
549
550    Generator: Length (32 bit words):  1, Data (hex): 2
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579 D. Eastlake 3rd                                                [Page 10]
580 \f