idnits 2.17.1 draft-ietf-dnsext-tkey-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The abstract seems to contain references ([RFC2845]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 177 has weird spacing: '...-stream undef...' -- 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 2000) is 8657 days in the past. Is this intentional? 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: 'RFC 2845' is mentioned on line 619, but not defined ** Obsolete undefined reference: RFC 2845 (Obsoleted by RFC 8945) == Missing Reference: 'RFC 1034' is mentioned on line 101, but not defined -- Looks like a reference, but probably isn't: '1035' on line 101 == Missing Reference: 'RFC 2535' is mentioned on line 562, but not defined ** Obsolete undefined reference: RFC 2535 (Obsoleted by RFC 4033, RFC 4034, RFC 4035) == Missing Reference: 'RFC 2136' is mentioned on line 102, but not defined == Missing Reference: 'RFC 2119' is mentioned on line 126, but not defined == Missing Reference: 'RFC 1995' is mentioned on line 128, but not defined == Missing Reference: 'RFC 1750' is mentioned on line 583, but not defined ** Obsolete undefined reference: RFC 1750 (Obsoleted by RFC 4086) == Missing Reference: 'RFC 1982' is mentioned on line 229, but not defined == Missing Reference: 'RFC 2030' is mentioned on line 238, but not defined ** Obsolete undefined reference: RFC 2030 (Obsoleted by RFC 4330) == Missing Reference: 'RFC 2104' is mentioned on line 313, but not defined == Missing Reference: 'RFC 2539' is mentioned on line 365, but not defined == Missing Reference: 'RFC 2437' is mentioned on line 575, but not defined ** Obsolete undefined reference: RFC 2437 (Obsoleted by RFC 3447) == Missing Reference: 'RFC 2434' is mentioned on line 599, but not defined ** Obsolete undefined reference: RFC 2434 (Obsoleted by RFC 5226) -- Possible downref: Non-RFC (?) normative reference: ref. 'Schneier' Summary: 11 errors (**), 0 flaws (~~), 15 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 DNSEXT Working Group Donald E. Eastlake, 3rd 2 INTERNET-DRAFT Motorola 3 Expires: January 2001 July 2000 5 Secret Key Establishment for DNS (TKEY RR) 6 ------ --- ------------- --- --- ----- --- 7 9 Status of This Document 11 This draft is intended to be become a Proposed Standard RFC. 12 Distribution of this document is unlimited. Comments should be sent 13 to the DNS working group mailing list or 14 to the author. 16 This document is an Internet-Draft and is in full conformance with 17 all provisions of Section 10 of RFC2026. Internet-Drafts are working 18 documents of the Internet Engineering Task Force (IETF), its areas, 19 and its working groups. Note that other groups may also distribute 20 working documents as Internet-Drafts. 22 Internet-Drafts are draft documents valid for a maximum of six 23 months. Internet-Drafts may be updated, replaced, or obsoleted by 24 other documents at any time. It is not appropriate to use Internet- 25 Drafts as reference material or to cite them other than as a 26 ``working draft'' or ``work in progress.'' 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 Abstract 36 [RFC 2845] provides a means of authenticating Domain Name System 37 (DNS) queries and responses using shared secret keys via the TSIG 38 resource record (RR). However, it provides no mechanism for setting 39 up such keys other than manual exchange. This document describes a 40 TKEY RR that can be used in a number of different modes to establish 41 shared secret keys between a DNS resolver and server. 43 Acknowledgments 45 The comments and ideas of the following persons (listed in alphabetic 46 order) have been incorporated herein and are gratefully acknowledged: 48 Olafur Gudmundsson (TIS) 50 Stuart Kwan (Microsoft) 52 Ed Lewis (TIS) 54 Erik Nordmark (SUN) 56 Brian Wellington (Nominum) 58 Table of Contents 60 Status of This Document....................................1 62 Abstract...................................................2 63 Acknowledgments............................................2 65 Table of Contents..........................................3 67 1. Introduction............................................4 68 1.1 Overview of Contents...................................4 69 2. The TKEY Resource Record................................5 70 2.1 The Name Field.........................................5 71 2.2 The TTL Field..........................................6 72 2.3 The Algorithm Field....................................6 73 2.4 The Inception and Expiration Fields....................6 74 2.5 The Mode Field.........................................7 75 2.6 The Error Field........................................7 76 2.7 The Key Size and Data Fields...........................8 77 2.8 The Other Size and Data Fields.........................8 78 3. General TKEY Considerations.............................8 79 4. Exchange via Resolver Query.............................9 80 4.1 Query for Diffie-Hellman Exchanged Keying..............9 81 4.2 Query for TKEY Deletion...............................10 82 4.3 Query for GSS-API Establishment.......................11 83 4.4 Query for Server Assigned Keying......................11 84 4.5 Query for Resolver Assigned Keying....................12 85 5. Spontaneous Server Inclusion...........................13 86 5.1 Spontaneous Server Key Deletion.......................13 87 6. Methods of Encryption..................................14 88 7. IANA Considerations....................................14 89 8. Security Considerations................................15 91 References................................................16 93 Author's Address..........................................17 94 Expiration and File Name..................................17 96 1. Introduction 98 The Domain Name System (DNS) is a hierarchical, distributed, highly 99 available database used for bi-directional mapping between domain 100 names and addresses, for email routing, and for other information 101 [RFC 1034, 1035]. It has been extended to provide for public key 102 security and dynamic update [RFC 2535, RFC 2136]. Familiarity with 103 these RFCs is assumed. 105 [RFC 2845] provides a means of efficiently authenticating DNS 106 messages using shared secret keys via the TSIG resource record (RR) 107 but provides no mechanism for setting up such keys other than manual 108 exchange. This document specifies a TKEY RR that can be used in a 109 number of different modes to establish and delete such shared secret 110 keys between a DNS resolver and server. 112 Note that TKEY established keying material and TSIGs that use it are 113 associated with DNS servers or resolvers. They are not associated 114 with zones. They may be used to authenticate queries and responses 115 but they do not provide zone based DNS data origin or denial 116 authentication [RFC 2535]. 118 Certain modes of TKEY perform encryption which may affect their 119 export or import status for some countries. The affected modes 120 specified in this document are the server assigned mode and the 121 resolver assigned mode. 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 125 document are to be interpreted as described in [RFC 2119]. 127 In all cases herein, the term "resolver" includes that part of a 128 server which may make full and incremental [RFC 1995] zone transfer 129 queries, forwards recursive queries, etc. 131 1.1 Overview of Contents 133 Section 2 below specifies the TKEY RR and provides a description of 134 and considerations for its constituent fields. 136 Section 3 describes general principles of operations with TKEY. 138 Section 4 discusses key agreement and deletion via DNS requests with 139 the Query opcode for RR type TKEY. This method is applicable to all 140 currently defined TKEY modes, although in some cases it is not what 141 would intuitively be called a "query". 143 Section 5 discusses spontaneous inclusion of TKEY RRs in responses by 144 servers which is currently used only for key deletion. 146 Section 6 describes encryption methods for transmitting secret key 147 information. In this document these are used only for the server 148 assigned mode and the resolver assigned mode. 150 Section 7 covers IANA considerations in assignment of TKEY modes. 152 Finally, Section 8 provides the required security considerations 153 section. 155 2. The TKEY Resource Record 157 The TKEY resource record (RR) has the structure given below. Its RR 158 type code is 249. 160 Field Type Comment 161 ----- ---- ------- 163 NAME domain see description below 164 TTYPE u_int16_t TKEY = 249 165 CLASS u_int16_t ignored, SHOULD be 255 (ANY) 166 TTL u_int32_t ignored, SHOULD be zero 167 RDLEN u_int16_t size of RDATA 168 RDATA: 169 Algorithm: domain 170 Inception: u_int32_t 171 Expiration: u_int32_t 172 Mode: u_int16_t 173 Error: u_int16_t 174 Key Size: u_int16_t 175 Key Data: octet-stream 176 Other Size: u_int16_t 177 Other Data: octet-stream undefined by this specification 179 2.1 The Name Field 181 The Name field relates to naming keys. Its meaning differs somewhat 182 with mode and context as explained in subsequent sections. 184 At any DNS server or resolver only one octet string of keying 185 material may be in place for any particular key name. An attempt to 186 establish another set of keying material at a server for an existing 187 name returns a BADNAME error. 189 For a TKEY with a non-root name appearing in a query, the TKEY RR 190 name SHOULD be a domain locally unique at the resolver, less than 128 191 octets long in wire encoding, and meaningful to the resolver to 192 assist in distinguishing keys and/or key agreement sessions. For 193 TKEY(s) appearing in a response to a query, the TKEY RR name SHOULD 194 be a globally unique server assigned domain. 196 A reasonable key naming strategy is as follows: 198 If the key is generated as the result of a query with root as 199 its owner name, then the server SHOULD create a globally unique 200 domain name, to be the key name, by suffixing a pseudo-random 201 [RFC 1750] label with a domain name of the server. For example 202 89n3mDgX072pp.server1.example.com. If generation of a new 203 pseudo-random name in each case is an excessive computation load 204 or entropy drain, a serial number prefix can be added to a fixed 205 pseudo-random name generated an DNS server start time, such as 206 1001.89n3mDgX072pp.server1.example.com. 208 If the key is generated as the result of a query with a non-root 209 name, say 789.resolver.example.net, then use the concatenation 210 of that with a name of the server. For example 211 789.resolver.example.net.server1.example.com. 213 2.2 The TTL Field 215 The TTL field is meaningless in TKEY RRs. It SHOULD always be zero to 216 be sure that older DNS implementations do not cache TKEY RRs. 218 2.3 The Algorithm Field 220 The algorithm name is in the form of a domain name with the same 221 meaning as in [RFC 2845]. The algorithm determines how the secret 222 keying material agreed to using the TKEY RR is actually used to 223 derive the algorithm specific key. 225 2.4 The Inception and Expiration Fields 227 The inception time and expiration times are in number of seconds 228 since the beginning of 1 January 1970 GMT ignoring leap seconds 229 treated as modulo 2**32 using ring arithmetic [RFC 1982]. In messages 230 between a DNS resolver and a DNS server where these fields are 231 meaningful, they are either the requested validity interval for the 232 keying material asked for or specify the validity interval of keying 233 material provided. 235 To avoid different interpretations of the inception and expiration 236 times in TKEY RRs, resolvers and servers exchanging them must have 237 the same idea of what time it is. One way of doing this is with the 238 NTP protocol [RFC 2030] but that or any other time synchronization 239 used for this purpose MUST be done securely. 241 2.5 The Mode Field 243 The mode field specifies the general scheme for key agreement or the 244 purpose of the TKEY DNS message. Servers and resolvers supporting 245 this specification MUST implement the Diffie-Hellman key agreement 246 mode and the key deletion mode for queries. All other modes are 247 OPTIONAL. A server supporting TKEY that receives a TKEY request with 248 a mode it does not support returns the BADMODE error. The following 249 values of the Mode octet are defined, available, or reserved: 251 Value Description 252 ----- ----------- 253 0 - reserved, see section 7 254 1 server assignment 255 2 Diffie-Hellman exchange 256 3 GSS-API negotiation 257 4 resolver assignment 258 5 key deletion 259 6-65534 - available, see section 7 260 65535 - reserved, see section 7 262 2.6 The Error Field 264 The error code field is an extended RCODE. The following values are 265 defined: 267 Value Description 268 ----- ----------- 269 0 - no error 270 1-15 a non-extended RCODE 271 16 BADSIG (TSIG) 272 17 BADKEY (TSIG) 273 18 BADTIME (TSIG) 274 19 BADMODE 275 20 BADNAME 276 21 BADALG 278 When the TKEY Error Field is non-zero in a response to a TKEY query, 279 the DNS header RCODE field indicates no error. However, it is 280 possible if a TKEY is spontaneously included in a response the TKEY 281 RR and DNS header error field could have unrelated non-zero error 282 codes. 284 2.7 The Key Size and Data Fields 286 The key data size field is an unsigned 16 bit integer in network 287 order which specifies the size of the key exchange data field in 288 octets. The meaning of this data depends on the mode. 290 2.8 The Other Size and Data Fields 292 The Other Size and Other Data fields are not used in this 293 specification but may be used in future extensions. The RDLEN field 294 MUST equal the length of the RDATA section through the end of Other 295 Data or the RR is to be considered malformed and rejected. 297 3. General TKEY Considerations 299 TKEY is a meta-RR that is not stored or cached in the DNS and does 300 not appear in zone files. It supports a variety of modes for the 301 establishment and deletion of shared secret keys information between 302 DNS resolvers and servers. The establishment of such a shared key 303 requires that state be maintained at both ends and the allocation of 304 the resources to maintain such state may require mutual agreement. In 305 the absence of willingness to provide such state, servers MUST return 306 errors such as NOTIMP or REFUSED for an attempt to use TKEY and 307 resolvers are free to ignore any TKEY RRs they receive. 309 The shared secret keying material developed by using TKEY is a plain 310 octet sequence. The means by which this shared secret keying 311 material, exchanged via TKEY, is actually used in any particular TSIG 312 algorithm is algorithm dependent and is defined in connection with 313 that algorithm. For example, see [RFC 2104] for how TKEY agreed 314 shared secret keying material is used in the HMAC-MD5 algorithm or 315 other HMAC algorithms. 317 There MUST NOT be more than one TKEY RR in a DNS query or response. 319 Except for GSS-API mode, TKEY responses MUST always have DNS 320 transaction authentication to protect the integrity of any keying 321 data, error codes, etc. This authentication MUST use a previously 322 established secret (TSIG) or public (SIG(0)) key and MUST NOT use any 323 key that the response to be verified is itself providing. 325 TKEY queries MUST be authenticated for all modes except GSS-API and, 326 under some circumstances, server assignment mode. In particular, if 327 the query for a server assigned key is for a key to assert some 328 privilege, such as update authority, then the query must be 329 authenticated to avoid spoofing. However, if the key is just to be 330 used for transaction security, then spoofing will lead at worst to 331 denial of service. Query authentication SHOULD use an established 332 secret (TSIG) key authenticator if available. Otherwise, it must use 333 a public (SIG(0)) key signature. It MUST NOT use any key that the 334 query is itself providing. 336 In the absence of required TKEY authentication, a NOTAUTH error MUST 337 be returned. 339 To avoid replay attacks, it is necessary that a TKEY response or 340 query not be valid if replayed on the order of 2**32 second (about 341 136 years), or a multiple thereof, later. To accomplish this, the 342 keying material used in any TSIG or SIG(0) RR that authenticates a 343 TKEY message MUST NOT have a lifetime of more then 2**31 - 1 seconds 344 (about 68 years). Thus, on attempted replay, the authenticating TSIG 345 or SIG(0) RR will not be verifiable due to key expiration and the 346 replay will fail. 348 4. Exchange via Resolver Query 350 One method for a resolver and a server to agree about shared secret 351 keying material for use in TSIG is through DNS requests from the 352 resolver which are syntactically DNS queries for type TKEY. Such 353 queries MUST be accompanied by a TKEY RR in the additional 354 information section to indicate the mode in use and accompanied by 355 other information where required. 357 Type TKEY queries SHOULD NOT be flagged as recursive and servers MAY 358 ignore the recursive header bit in TKEY queries they receive. 360 4.1 Query for Diffie-Hellman Exchanged Keying 362 Diffie-Hellman (DH) key exchange is means whereby two parties can 363 derive some shared secret information without requiring any secrecy 364 of the messages they exchange [Schneier]. Provisions have been made 365 for the storage of DH public keys in the DNS [RFC 2539]. 367 A resolver sends a query for type TKEY accompanied by a TKEY RR in 368 the additional information section specifying the Diffie-Hellman mode 369 and accompanied by a KEY RR also in the additional information 370 section specifying a resolver Diffie-Hellman key. The TKEY RR 371 algorithm field is set to the authentication algorithm the resolver 372 plans to use. The "key data" provided in the TKEY is used as a random 373 [RFC 1750] nonce to avoid always deriving the same keying material 374 for the same pair of DH KEYs. 376 The server response contains a TKEY in its answer section with the 377 Diffie-Hellman mode. The "key data" provided in this TKEY is used as 378 an additional nonce to avoid always deriving the same keying material 379 for the same pair of DH KEYs. If the TKEY error field is non-zero, 380 the query failed for the reason given. FORMERR is given if the query 381 included no DH KEY and BADKEY is given if the query included an 382 incompatible DH KEY. 384 If the TKEY error field is zero, the resolver supplied Diffie-Hellman 385 KEY RR SHOULD be echoed in the additional information section and a 386 server Diffie-Hellman KEY RR will also be present in the answer 387 section of the response. Both parties can then calculate the same 388 shared secret quantity from the pair of Diffie-Hellman (DH) keys used 389 [Schneier] (provided these DH keys use the same generator and 390 modulus) and the data in the TKEY RRs. The TKEY RR data is mixed 391 with the DH result as follows: 393 keying material = 394 XOR ( DH value, MD5 ( query data | DH value ) | 395 MD5 ( server data | DH value ) ) 397 Where XOR is an exclusive-OR operation and "|" is byte-stream 398 concatenation. The shorter of the two operands to XOR is byte-wise 399 left justified and padded with zero-valued bytes to match the length 400 of the other operand. "DH value" is the Diffie-Hellman value derived 401 from the KEY RRs. Query data and server data are the values sent in 402 the TKEY RR data fields. These "query data" and "server data" nonces 403 are suffixed by the DH value, digested by MD5, the results 404 concatenated, and then XORed with the DH value. 406 The inception and expiry times in the query TKEY RR are those 407 requested for the keying material. The inception and expiry times in 408 the response TKEY RR are the maximum period the server will consider 409 the keying material valid. Servers may pre-expire keys so this is 410 not a guarantee. 412 4.2 Query for TKEY Deletion 414 Keys established via TKEY can be treated as soft state. Since DNS 415 transactions are originated by the resolver, the resolver can simply 416 toss keys, although it may have to go through another key exchange if 417 it later needs one. Similarly, the server can discard keys although 418 that will result in an error on receiving a query with a TSIG using 419 the discarded key. 421 To avoid attempted reliance in requests on keys no longer in effect, 422 servers MUST implement key deletion whereby the server "discards" a 423 key on receipt from a resolver of an authenticated delete request for 424 a TKEY RR with the key's name. If the server has no record of a key 425 with that name, it returns BADNAME. 427 Key deletion TKEY queries MUST be authenticated. This authentication 428 MAY be a TSIG RR using the key to be deleted. 430 For querier assigned and Diffie-Hellman keys, the server MUST truly 431 "discard" all active state associated with the key. For server 432 assigned keys, the server MAY simply mark the key as no longer 433 retained by the client and may re-send it in response to a future 434 query for server assigned keying material. 436 4.3 Query for GSS-API Establishment 438 This mode is described in a separate document under preparation which 439 should be seen for the full description. Basically the resolver and 440 server can exchange queries and responses for type TKEY with a TKEY 441 RR specifying the GSS-API mode in the additional information section 442 and a GSS-API token in the key data portion of the TKEY RR. 444 Any issues of possible encryption of parts the GSS-API token data 445 being transmitted are handled by the GSS-API level. In addition, the 446 GSS-API level provides its own authentication so that this mode of 447 TKEY query and response MAY be, but do not need to be, authenticated 448 with TSIG RR or SIG(0) RR. 450 The inception and expiry times in a GSS-API mode TKEY RR are ignored. 452 4.4 Query for Server Assigned Keying 454 Optionally, the server can assign keying for the resolver. It is 455 sent to the resolver encrypted under a resolver public key. See 456 section 6 for description of encryption methods. 458 A resolver sends a query for type TKEY accompanied by a TKEY RR 459 specifying the "server assignment" mode and a resolver KEY RR to be 460 used in encrypting the response, both in the additional information 461 section. The TKEY algorithm field is set to the authentication 462 algorithm the resolver plans to use. It is RECOMMENDED that any "key 463 data" provided in the query TKEY RR by the resolver be strongly mixed 464 by the server with server generated randomness [RFC 1750] to derive 465 the keying material to be used. The KEY RR that appears in the query 466 need not be accompanied by a SIG(KEY) RR. If the query is 467 authenticated by the resolver with a TSIG RR [RFC 2845] or SIG(0) RR 468 and that authentication is verified, then any SIG(KEY) provided in 469 the query SHOULD be ignored. The KEY RR in such a query SHOULD have 470 a name that corresponds to the resolver but it is only essential that 471 it be a public key for which the resolver has the corresponding 472 private key so it can decrypt the response data. 474 The server response contains a TKEY RR in its answer section with the 475 server assigned mode and echoes the KEY RR provided in the query in 476 its additional information section. 478 If the reponse TKEY error field is zero, the key data portion of the 479 response TKEY RR will be the server assigned keying data encrypted 480 under the public key in the resolver provided KEY RR. In this case, 481 the owner name of the answer TKEY RR will be the server assigned name 482 of the key. 484 If the error field of the response TKEY is non-zero, the query failed 485 for the reason given. FORMERR is given if the query specified no 486 encryption key. 488 The inception and expiry times in the query TKEY RR are those 489 requested for the keying material. The inception and expiry times in 490 the response TKEY are the maximum period the server will consider the 491 keying material valid. Servers may pre-expire keys so this is not a 492 guarantee. 494 The resolver KEY RR MUST be authenticated, through the authentication 495 of this query with a TSIG or SIG(0) or the signing of the resolver 496 KEY with a SIG(KEY). Otherwise, an attacker can forge a resolver KEY 497 for which they know the private key, and thereby the attacker could 498 obtain a valid shared secret key from the server. 500 4.5 Query for Resolver Assigned Keying 502 Optionally, a server can accept resolver assigned keys. The keying 503 material MUST be encrypted under a server key for protection in 504 transmission as described in Section 6. 506 The resolver sends a TKEY query with a TKEY RR that specifies the 507 encrypted keying material and a KEY RR specifying the server public 508 key used to encrypt the data, both in the additional information 509 section. The name of the key and the keying data are completely 510 controlled by the sending resolver so a globally unique key name 511 SHOULD be used. The KEY RR used MUST be one for which the server has 512 the corresponding private key, or it will not be able to decrypt the 513 keying material and will return a FORMERR. It is also important that 514 no untrusted party (preferably no other party than the server) has 515 the private key corresponding to the KEY RR because, if they do, they 516 can capture the messages to the server, learn the shared secret, and 517 spoof valid TSIGs. 519 The query TKEY RR inception and expiry give the time period the 520 querier intends to consider the keying material valid. The server 521 can return a lesser time interval to advise that it will not maintain 522 state for that long and can pre-expire keys in any case. 524 This mode of query MUST be authenticated with a TSIG or SIG(0). 525 Otherwise, an attacker can forge a resolver assigned TKEY query, and 526 thereby the attacker could specify a shared secret key that would be 527 accepted, used, and honored by the server. 529 5. Spontaneous Server Inclusion 531 A DNS server may include a TKEY RR spontaneously as additional 532 information in responses. This SHOULD only be done if the server 533 knows the querier understands TKEY and has this option implemented. 534 This technique can be used to delete a key and may be specified for 535 modes defined in the future. A disadvantage of this technique is 536 that there is no way for the server to get any error or success 537 indication back and, in the case of UDP, no way to even know if the 538 DNS response reached the resolver. 540 5.1 Spontaneous Server Key Deletion 542 A server can optionally tell a client that it has deleted a secret 543 key by spontaneously including a TKEY RR in the additional 544 information section of a response with the key's name and specifying 545 the key deletion mode. Such a response SHOULD be authenticated. If 546 authenticated, it "deletes" the key with the given name. The 547 inception and expiry times of the delete TKEY RR are ignored. Failure 548 by a client to receive or properly process such additional 549 information in a response would mean that the client might use a key 550 that the server had discarded and would then get an error indication. 552 For server assigned and Diffie-Hellman keys, the client MUST 553 "discard" active state associated with the key. For querier assigned 554 keys, the querier MAY simply mark the key as no longer retained by 555 the server and may re-send it in a future query specifying querier 556 assigned keying material. 558 6. Methods of Encryption 560 For the server assigned and resolver assigned key agreement modes, 561 the keying material is sent within the key data field of a TKEY RR 562 encrypted under the public key in an accompanying KEY RR [RFC 2535]. 563 This KEY RR MUST be for a public key algorithm where the public and 564 private keys can be used for encryption and the corresponding 565 decryption which recovers the originally encrypted data. The KEY RR 566 SHOULD correspond to a name for the decrypting resolver/server such 567 that the decrypting process has access to the corresponding private 568 key to decrypt the data. The secret keying material being sent will 569 generally be fairly short, usually less than 256 bits, because that 570 is adequate for very strong protection with modern keyed hash or 571 symmetric algorithms. 573 If the KEY RR specifies the RSA algorithm, then the keying material 574 is encrypted as per the description of RSAES-PKCS1-v1_5 encryption in 575 PKCS#1 [RFC 2437]. (Note, the secret keying material being sent is 576 directly RSA encrypted in PKCS#1 format. It is not "enveloped" under 577 some other symmetric algorithm.) In the unlikely event that the 578 keying material will not fit within one RSA modulus of the chosen 579 public key, additional RSA encryption blocks are included. The 580 length of each block is clear from the public RSA key specified and 581 the RSAES-PKCS1-v1_5 padding makes it clear what part of the 582 encrypted data is actually keying material and what part is 583 formatting or the required at least eight bytes of random [RFC 1750] 584 padding. 586 7. IANA Considerations 588 This section is to be interpreted as provided in [RFC 2434]. 590 Mode field values 0x0000 and 0xFFFF are reserved. 592 Mode field values 0x0001 through 0x00FF, and 0XFF00 through 0XFFFE 593 can only be assigned by an IETF Standards Action. 595 Mode field values 0x0100 through 0x0FFF and 0xF0000 through 0xFEFF 596 are allocated by IESG approval or IETF consensus. 598 Mode field values 0x1000 through 0xEFFF are allocated based on 599 Specification Required as defined in [RFC 2434]. 601 Mode values should not be changed when the status of their use 602 changes. For example, a mode value assigned based just on providing 603 a specification should not be changed later just because that use's 604 status is changed to standards track. 606 The following assignments are documented herein: 608 RR Type 249 for TKEY. 610 TKEY Modes 1 through 5 as listed in section 2.5. 612 Extended RCODE Error values of 19, 20, and 21 as listed in 613 section 2.6. 615 8. Security Considerations 617 The entirety of this specification is concerned with the secure 618 establishment of a shared secret between DNS clients and servers in 619 support of TSIG [RFC 2845]. 621 Protection against denial of service via the use of TKEY is not 622 provided. 624 References 626 [Schneier] - Bruce Schneier, "Applied Cryptography: Protocols, 627 Algorithms, and Source Code in C", 1996, John Wiley and Sons 629 RFC 1034 - P. Mockapetris, "Domain Names - Concepts and Facilities", 630 STD 13, November 1987. 632 RFC 1035 - P. Mockapetris, "Domain Names - Implementation and 633 Specifications", STD 13, November 1987. 635 RFC 1750 - D. Eastlake, S. Crocker & J. Schiller, "Randomness 636 Recommendations for Security", December 1994. 638 RFC 1982 - Robert Elz, Randy Bush, "Serial Number Arithmetic", 639 09/03/1996. 641 RFC 1995 - Masataka Ohta, "Incremental Zone Transfer in DNS", August 642 1996. 644 RFC 2030 - D. Mills, "Simple Network Time Protocol (SNTP) Version 4 645 for IPv4, IPv6 and OSI", October 1996. 647 RFC 2104 - H. Krawczyk, M. Bellare, R. Canetti, "HMAC: Keyed-Hashing 648 for Message Authentication", February 1997. 650 RFC 2119 - S. Bradner, "Key words for use in RFCs to Indicate 651 Requirement Levels", March 1997. 653 RFC 2136 - P. Vixie, S. Thomson, Y. Rekhter, J. Bound, "Dynamic 654 Updates in the Domain Name System (DNS UPDATE)", 04/21/1997. 656 RFC 2434 - T. Narten, H. Alvestrand, "Guidelines for Writing an IANA 657 Considerations Section in RFCs, October 1998. 659 RFC 2437 - B. Kaliski, J. Staddon, "PKCS #1: RSA Cryptography 660 Specifications Version 2.0", October 1998. 662 RFC 2535 - D. Eastlake, "Domain Name System Security Extensions", 663 March 1999. 665 RFC 2539 - D. Eastlake, "Storage of Diffie-Hellman Keys in the Domain 666 Name System (DNS)", March 1999. 668 RFC 2845 - P. Vixie, O. Gudmundsson, D. Eastlake, B. 669 Wellington,"Secret Key Transaction Authentication for DNS (TSIG)", 670 May 2000. 672 Author's Address 674 Donald E. Eastlake 3rd 675 Motorola 676 140 Forest Avenue 677 Hudson, MA 01749 USA 679 Telephone: +1 978-562-2827 (h) 680 +1 508-261-5434 (w) 681 FAX: +1 508-261-4447 (w) 682 email: Donald.Eastlake@motorola.com 684 Expiration and File Name 686 This draft expires January 2001. 688 Its file name is draft-ietf-dnsext-tkey-04.txt.