2 INTERNET-DRAFT Diffie-Hellman Information in the DNS
3 OBSOLETES: RFC 2539 Donald E. Eastlake 3rd
5 Expires: January 2006 July 2005
10 Storage of Diffie-Hellman Keying Information in the DNS
11 ------- -- -------------- ------ ----------- -- --- ---
12 <draft-ietf-dnsext-rfc2539bis-dhk-06.txt>
16 Status of This Document
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.
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>.
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-
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."
37 The list of current Internet-Drafts can be accessed at
38 http://www.ietf.org/1id-abstracts.html
40 The list of Internet-Draft Shadow Directories can be accessed at
41 http://www.ietf.org/shadow.html
46 The standard method for encoding Diffie-Hellman keys in the Domain
47 Name System is specified.
53 Copyright (C) The Internet Society 2005.
57 D. Eastlake 3rd [Page 1]
60 INTERNET-DRAFT Diffie-Hellman Information in the DNS
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.
75 Status of This Document....................................1
76 Abstract...................................................1
77 Copyright..................................................1
79 Acknowledgements...........................................2
80 Table of Contents..........................................2
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
91 Normative References.......................................7
92 Informative Refences.......................................7
94 Author Address.............................................8
95 Expiration and File Name...................................8
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
115 D. Eastlake 3rd [Page 2]
118 INTERNET-DRAFT Diffie-Hellman Information in the DNS
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.
132 1.1 About This Document
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].
140 1.2 About Diffie-Hellman
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:
153 They exchange these quantities and then each calculates a Z as
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).
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).
170 For further information about Diffie-Hellman and precautions to take
173 D. Eastlake 3rd [Page 3]
176 INTERNET-DRAFT Diffie-Hellman Information in the DNS
179 in deciding on a p and g, see [RFC 2631].
183 2. Encoding Diffie-Hellman Keying Information
185 When Diffie-Hellman keys appear within the RDATA portion of a RR,
186 they are encoded as shown below.
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.
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
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.
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
231 D. Eastlake 3rd [Page 4]
234 INTERNET-DRAFT Diffie-Hellman Information in the DNS
237 3. Performance Considerations
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.
249 4. IANA Considerations
251 Assignment of meaning to Prime Lengths of 0 and 3 through 15 requires
252 an IETF consensus as defined in [RFC 2434].
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
266 5. Security Considerations
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.
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].
282 Copyright and Disclaimer
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.
289 D. Eastlake 3rd [Page 5]
292 INTERNET-DRAFT Diffie-Hellman Information in the DNS
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.
347 D. Eastlake 3rd [Page 6]
350 INTERNET-DRAFT Diffie-Hellman Information in the DNS
355 [RFC 2631] - "Diffie-Hellman Key Agreement Method", E. Rescorla, June
358 [RFC 2434] - "Guidelines for Writing an IANA Considerations Section
359 in RFCs", T. Narten, H. Alvestrand, October 1998.
361 [RFC 4034] - Arends, R., Austein, R., Larson, M., Massey, D., and S.
362 Rose, "Resource Records for the DNS Security Extensions", RFC 4034,
369 [RFC 1034] - "Domain names - concepts and facilities", P.
370 Mockapetris, November 1987.
372 [RFC 1035] - "Domain names - implementation and specification", P.
373 Mockapetris, November 1987.
375 [RFC 2539] - "Storage of Diffie-Hellman Keys in the Domain Name
376 System (DNS)", D. Eastlake, March 1999, obsoleted by this RFC.
378 [RFC 2671] - "Extension Mechanisms for DNS (EDNS0)", P. Vixie, August
381 [RFC 4033] - Arends, R., Austein, R., Larson, M., Massey, D., and S.
382 Rose, "DNS Security Introduction and Requirements", RFC 4033, March
385 [RFC 4035] - Arends, R., Austein, R., Larson, M., Massey, D., and S.
386 Rose, "Protocol Modifications for the DNS Security Extensions", RFC
389 [Schneier] - Bruce Schneier, "Applied Cryptography: Protocols,
390 Algorithms, and Source Code in C" (Second Edition), 1996, John Wiley
405 D. Eastlake 3rd [Page 7]
408 INTERNET-DRAFT Diffie-Hellman Information in the DNS
413 Donald E. Eastlake 3rd
414 Motorola Laboratories
416 Milford, MA 01757 USA
418 Telephone: +1-508-786-7554
419 EMail: Donald.Eastlake@motorola.com
423 Expiration and File Name
425 This draft expires in January 2006.
427 Its file name is draft-ietf-dnsext-rfc2539bis-dhk-06.txt.
463 D. Eastlake 3rd [Page 8]
466 INTERNET-DRAFT Diffie-Hellman Information in the DNS
469 Appendix A: Well known prime/generator pairs
471 These numbers are copied from the IPSEC effort where the derivation of
472 these values is more fully explained and additional information is
474 Richard Schroeppel performed all the mathematical and computational
475 work for this appendix.
479 A.1. Well-Known Group 1: A 768 bit prime
481 The prime is 2^768 - 2^704 - 1 + 2^64 * { [2^638 pi] + 149686 }. Its
483 155251809230070893513091813125848175563133404943451431320235
484 119490296623994910210725866945387659164244291000768028886422
485 915080371891804634263272761303128298374438082089019628850917
486 0691316593175367469551763119843371637221007210577919
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
494 Generator: Length (32 bit words): 1, Data (hex): 2
498 A.2. Well-Known Group 2: A 1024 bit prime
500 The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }.
502 179769313486231590770839156793787453197860296048756011706444
503 423684197180216158519368947833795864925541502180565485980503
504 646440548199239100050792877003355816639229553136239076508735
505 759914822574862575007425302077447712589550957937778424442426
506 617334727629299387668709205606050270810842907692932019128194
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
517 Generator: Length (32 bit words): 1, Data (hex): 2
521 D. Eastlake 3rd [Page 9]
524 INTERNET-DRAFT Diffie-Hellman Information in the DNS
527 A.3. Well-Known Group 3: A 1536 bit prime
529 The prime is 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] + 741804 }.
531 241031242692103258855207602219756607485695054850245994265411
532 694195810883168261222889009385826134161467322714147790401219
533 650364895705058263194273070680500922306273474534107340669624
534 601458936165977404102716924945320037872943417032584377865919
535 814376319377685986952408894019557734611984354530154704374720
536 774996976375008430892633929555996888245787241299381012913029
537 459299994792636526405928464720973038494721168143446471443848
538 8520940127459844288859336526896320919633919
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
550 Generator: Length (32 bit words): 1, Data (hex): 2
579 D. Eastlake 3rd [Page 10]