Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / contrib / bind9 / doc / draft / draft-ietf-dnsext-tsig-sha-06.txt
blob00476ae507eea45a3b4f79ee2b2a39e71200f844
2 INTERNET-DRAFT                                    Donald E. Eastlake 3rd
3 UPDATES RFC 2845                                   Motorola Laboratories
4 Expires: July 2006                                          January 2006
6                   HMAC SHA TSIG Algorithm Identifiers
7                   ---- --- ---- --------- -----------
8                   <draft-ietf-dnsext-tsig-sha-06.txt>
11 Status of This Document
13    By submitting this Internet-Draft, each author represents that any
14    applicable patent or other IPR claims of which he or she is aware
15    have been or will be disclosed, and any of which he or she becomes
16    aware will be disclosed, in accordance with Section 6 of BCP 79.
18    This draft is intended to be become a Proposed Standard RFC.
19    Distribution of this document is unlimited. Comments should be sent
20    to the DNSEXT working group mailing list <namedroppers@ops.ietf.org>.
22    Internet-Drafts are working documents of the Internet Engineering
23    Task Force (IETF), its areas, and its working groups.  Note that
24    other groups may also distribute working documents as Internet-
25    Drafts.
27    Internet-Drafts are draft documents valid for a maximum of six months
28    and may be updated, replaced, or obsoleted by other documents at any
29    time.  It is inappropriate to use Internet-Drafts as reference
30    material or to cite them other than as "work in progress."
32    The list of current Internet-Drafts can be accessed at
33    http://www.ietf.org/1id-abstracts.html
35    The list of Internet-Draft Shadow Directories can be accessed at
36    http://www.ietf.org/shadow.html
39 Abstract
41    Use of the Domain Name System TSIG resource record requires
42    specification of a cryptographic message authentication code.
43    Currently identifiers have been specified only for the HMAC MD5
44    (Message Digest) and GSS (Generic Security Service) TSIG algorithms.
45    This document standardizes identifiers and implementation
46    requirements for additional HMAC SHA (Secure Hash Algorithm) TSIG
47    algorithms and standardizes how to specify and handle the truncation
48    of HMAC values in TSIG.
51 Copyright Notice
53    Copyright (C) The Internet Society (2006).
57 D. Eastlake 3rd                                                 [Page 1]
60 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
63 Table of Contents
65       Status of This Document....................................1
66       Abstract...................................................1
67       Copyright Notice...........................................1
69       Table of Contents..........................................2
71       1. Introduction............................................3
73       2. Algorithms and Identifiers..............................4
75       3. Specifying Truncation...................................5
76       3.1 Truncation Specification...............................5
78       4. TSIG Truncation Policy and Error Provisions.............6
80       5. IANA Considerations.....................................7
81       6. Security Considerations.................................7
82       7. Copyright and Disclaimer................................7
84       8. Normative References....................................8
85       9. Informative References..................................8
87       Author's Address...........................................9
88       Additional IPR Provisions..................................9
89       Expiration and File Name...................................9
115 D. Eastlake 3rd                                                 [Page 2]
118 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
121 1. Introduction
123    [RFC 2845] specifies a TSIG Resource Record (RR) that can be used to
124    authenticate DNS (Domain Name System [STD 13]) queries and responses.
125    This RR contains a domain name syntax data item which names the
126    authentication algorithm used. [RFC 2845] defines the HMAC-MD5.SIG-
127    ALG.REG.INT name for authentication codes using the HMAC [RFC 2104]
128    algorithm with the MD5 [RFC 1321] hash algorithm. IANA has also
129    registered "gss-tsig" as an identifier for TSIG authentication where
130    the cryptographic operations are delegated to the Generic Security
131    Service (GSS) [RFC 3645].
133    It should be noted that use of TSIG presumes prior agreement, between
134    the resolver and server involved, as to the algorithm and key to be
135    used.
137    In Section 2, this document specifies additional names for TSIG
138    authentication algorithms based on US NIST SHA (United States,
139    National Institute of Science and Technology, Secure Hash Algorithm)
140    algorithms and HMAC and specifies the implementation requirements for
141    those algorithms.
143    In Section 3, this document specifies the effect of inequality
144    between the normal output size of the specified hash function and the
145    length of MAC (message authentication code) data given in the TSIG
146    RR. In particular, it specifies that a shorter length field value
147    specifies truncation and a longer length field is an error.
149    In Section 4, policy restrictions and implications related to
150    truncation and a new error code to indicate truncation shorter than
151    permitted by policy are described and specified.
153    The use herein of MUST, SHOULD, MAY, MUST NOT, and SHOULD NOT is as
154    defined in [RFC 2119].
173 D. Eastlake 3rd                                                 [Page 3]
176 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
179 2. Algorithms and Identifiers
181    TSIG Resource Records (RRs) [RFC 2845] are used to authenticate DNS
182    queries and responses.  They are intended to be efficient symmetric
183    authentication codes based on a shared secret. (Asymmetric signatures
184    can be provided using the SIG RR [RFC 2931]. In particular, SIG(0)
185    can be used for transaction signatures.) Used with a strong hash
186    function, HMAC [RFC 2104] provides a way to calculate such symmetric
187    authentication codes. The only specified HMAC based TSIG algorithm
188    identifier has been HMAC-MD5.SIG-ALG.REG.INT based on MD5 [RFC 1321].
190    The use of SHA-1 [FIPS 180-2, RFC 3174], which is a 160 bit hash, as
191    compared with the 128 bits for MD5, and additional hash algorithms in
192    the SHA family [FIPS 180-2, RFC 3874, SHA2draft] with 224, 256, 384,
193    and 512 bits, may be preferred in some cases particularly since
194    increasingly successful cryptanalytic attacks are being made on the
195    shorter hashes.
197    Use of TSIG between a DNS resolver and server is by mutual agreement.
198    That agreement can include the support of additional algorithms and
199    criteria as to which algorithms and truncations are acceptable,
200    subject to the restriction and guidelines in Section 3 and 4 below.
201    Key agreement can be by the TKEY mechanism [RFC 2930] or other
202    mutually agreeable method.
204    The current HMAC-MD5.SIG-ALG.REG.INT and gss-tsig identifiers are
205    included in the table below for convenience.  Implementations which
206    support TSIG MUST also implement HMAC SHA1 and HMAC SHA256 and MAY
207    implement gss-tsig and the other algorithms listed below.
209          Mandatory      HMAC-MD5.SIG-ALG.REG.INT
210          Optional       gss-tsig
211          Mandatory      hmac-sha1
212          Optional       hmac-sha224
213          Mandatory      hmac-sha256
214          Optional       hamc-sha384
215          Optional       hmac-sha512
217    SHA-1 truncated to 96 bits (12 octets) SHOULD be implemented.
231 D. Eastlake 3rd                                                 [Page 4]
234 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
237 3. Specifying Truncation
239    When space is at a premium and the strength of the full length of an
240    HMAC is not needed, it is reasonable to truncate the HMAC output and
241    use the truncated value for authentication. HMAC SHA-1 truncated to
242    96 bits is an option available in several IETF protocols including
243    IPSEC and TLS.
245    The TSIG RR [RFC 2845] includes a "MAC size" field, which gives the
246    size of the MAC field in octets. But [RFC 2845] does not specify what
247    to do if this MAC size differs from the length of the output of HMAC
248    for a particular hash function. Truncation is indicated by a MAC size
249    less than the HMAC size as specified below.
253 3.1 Truncation Specification
255    The specification for TSIG handling is changed as follows:
257    1. If "MAC size" field is greater than HMAC output length:
258          This case MUST NOT be generated and if received MUST cause the
259       packet to be dropped and RCODE 1 (FORMERR) to be returned.
261    2. If "MAC size" field equals HMAC output length:
262          Operation is as described in [RFC 2845] with the entire output
263       HMAC output present.
265    3. "MAC size" field is less than HMAC output length but greater than
266       that specified in case 4 below:
267          This is sent when the signer has truncated the HMAC output to
268       an allowable length, as described in RFC 2104, taking initial
269       octets and discarding trailing octets. TSIG truncation can only be
270       to an integral number of octets. On receipt of a packet with
271       truncation thus indicated, the locally calculated MAC is similarly
272       truncated and only the truncated values compared for
273       authentication. The request MAC used when calculating the TSIG MAC
274       for a reply is the truncated request MAC.
276    4. "MAC size" field is less than the larger of 10 (octets) and half
277       the length of the hash function in use:
278          With the exception of certain TSIG error messages described in
279       RFC 2845 section 3.2 where it is permitted that the MAC size be
280       zero, this case MUST NOT be generated and if received MUST cause
281       the packet to be dropped and RCODE 1 (FORMERR) to be returned. The
282       size limit for this case can also, for the hash functions
283       mentioned in this document, be stated as less than half the hash
284       function length for hash functions other than MD5 and less than 10
285       octets for MD5.
289 D. Eastlake 3rd                                                 [Page 5]
292 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
295 4. TSIG Truncation Policy and Error Provisions
297    Use of TSIG is by mutual agreement between a resolver and server.
298    Implicit in such "agreement" are criterion as to acceptable keys and
299    algorithms and, with the extensions in this document, truncations.
300    Note that it is common for implementations to bind the TSIG secret
301    key or keys that may be in place at a resolver and server to
302    particular algorithms. Thus such implementations only permit the use
303    of an algorithm if there is an associated key in place. Receipt of an
304    unknown, unimplemented, or disabled algorithm typically results in a
305    BADKEY error.
307       Local policies MAY require the rejection of TSIGs even though they
308    use an algorithm for which implementation is mandatory.
310       When a local policy permits acceptance of a TSIG with a particular
311    algorithm and a particular non-zero amount of truncation it SHOULD
312    also permit the use of that algorithm with lesser truncation (a
313    longer MAC) up to the full HMAC output.
315       Regardless of a lower acceptable truncated MAC length specified by
316    local policy, a reply SHOULD be sent with a MAC at least as long as
317    that in the corresponding request unless the request specified a MAC
318    length longer than the HMAC output.
320       Implementations permitting multiple acceptable algorithms and/or
321    truncations SHOULD permit this list to be ordered by presumed
322    strength and SHOULD allow different truncations for the same
323    algorithm to be treated as separate entities in this list. When so
324    implemented, policies SHOULD accept a presumed stronger algorithm and
325    truncation than the minimum strength required by the policy.
327       If a TSIG is received with truncation which is permitted under
328    Section 3 above but the MAC is too short for the local policy in
329    force, an RCODE of TBA [22 suggested](BADTRUNC) MUST be returned.
347 D. Eastlake 3rd                                                 [Page 6]
350 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
353 5. IANA Considerations
355    This document, on approval for publication as a standards track RFC,
356    (1) registers the new TSIG algorithm identifiers listed in Section 2
357    with IANA and (2) allocates the BADTRUNC RCODE TBA [22 suggested] in
358    Section 4. [RFC 2845]
362 6. Security Considerations
364    For all of the message authentication code algorithms listed herein,
365    those producing longer values are believed to be stronger; however,
366    while there have been some arguments that mild truncation can
367    strengthen a MAC by reducing the information available to an
368    attacker, excessive truncation clearly weakens authentication by
369    reducing the number of bits an attacker has to try to break the
370    authentication by brute force [RFC 2104].
372    Significant progress has been made recently in cryptanalysis of hash
373    function of the type used herein, all of which ultimately derive from
374    the design of MD4. While the results so far should not effect HMAC,
375    the stronger SHA-1 and SHA-256 algorithms are being made mandatory
376    due to caution.
378    See the Security Considerations section of [RFC 2845].  See also the
379    Security Considerations section of [RFC 2104] from which the limits
380    on truncation in this RFC were taken.
384 7. Copyright and Disclaimer
386    Copyright (C) The Internet Society (2006).
388    This document is subject to the rights, licenses and restrictions
389    contained in BCP 78, and except as set forth therein, the authors
390    retain all their rights.
393    This document and the information contained herein are provided on an
394    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
395    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
396    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
397    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
398    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
399    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
405 D. Eastlake 3rd                                                 [Page 7]
408 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
411 8. Normative References
413    [FIPS 180-2] - "Secure Hash Standard", (SHA-1/224/256/384/512) US
414    Federal Information Processing Standard, with Change Notice 1,
415    February 2004.
417    [RFC 1321] - Rivest, R., "The MD5 Message-Digest Algorithm ", RFC
418    1321, April 1992.
420    [RFC 2104] - Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
421    Hashing for Message Authentication", RFC 2104, February 1997.
423    [RFC 2119] - Bradner, S., "Key words for use in RFCs to Indicate
424    Requirement Levels", BCP 14, RFC 2119, March 1997.
426    [RFC 2845] - Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B.
427    Wellington, "Secret Key Transaction Authentication for DNS (TSIG)",
428    RFC 2845, May 2000.
430    [RFC 3174] - Eastlake 3rd, D. and P. Jones, "US Secure Hash Algorithm
431    1 (SHA1)", RFC 3174, September 2001.
433    [RFC 3874] - R. Housely, "A 224-bit One-way Hash Function: SHA-224",
434    September 2004,
436    [SHA2draft] - Eastlake, D., T. Hansen, "US Secure Hash Algorithms
437    (SHA)", draft-eastlake-sha2-*.txt, work in progress.
439    [STD 13]
440          Mockapetris, P., "Domain names - concepts and facilities", STD
441          13, RFC 1034, November 1987.
443          Mockapetris, P., "Domain names - implementation and
444          specification", STD 13, RFC 1035, November 1987.
448 9. Informative References.
450    [RFC 2930] - Eastlake 3rd, D., "Secret Key Establishment for DNS
451    (TKEY RR)", RFC 2930, September 2000.
453    [RFC 2931] - Eastlake 3rd, D., "DNS Request and Transaction
454    Signatures ( SIG(0)s )", RFC 2931, September 2000.
456    [RFC 3645] - Kwan, S., Garg, P., Gilroy, J., Esibov, L., Westhead,
457    J., and R. Hall, "Generic Security Service Algorithm for Secret Key
458    Transaction Authentication for DNS (GSS-TSIG)", RFC 3645, October
459    2003.
463 D. Eastlake 3rd                                                 [Page 8]
466 INTERNET-DRAFT                                 HMAC-SHA TSIG Identifiers
469 Author's Address
471    Donald E. Eastlake 3rd
472    Motorola Laboratories
473    155 Beaver Street
474    Milford, MA 01757 USA
476    Telephone:   +1-508-786-7554 (w)
478    EMail:       Donald.Eastlake@motorola.com
482 Additional IPR Provisions
484    The IETF takes no position regarding the validity or scope of any
485    Intellectual Property Rights or other rights that might be claimed
486    to pertain to the implementation or use of the technology
487    described in this document or the extent to which any license
488    under such rights might or might not be available; nor does it
489    represent that it has made any independent effort to identify any
490    such rights.  Information on the procedures with respect to
491    rights in RFC documents can be found in BCP 78 and BCP 79.
493    Copies of IPR disclosures made to the IETF Secretariat and any
494    assurances of licenses to be made available, or the result of an
495    attempt made to obtain a general license or permission for the use
496    of such proprietary rights by implementers or users of this
497    specification can be obtained from the IETF on-line IPR repository
498    at http://www.ietf.org/ipr.
500    The IETF invites any interested party to bring to its attention
501    any copyrights, patents or patent applications, or other
502    proprietary rights that may cover technology that may be required
503    to implement this standard.  Please address the information to the
504    IETF at ietf-ipr@ietf.org.
508 Expiration and File Name
510    This draft expires in July 2006.
512    Its file name is draft-ietf-dnsext-tsig-sha-06.txt
521 D. Eastlake 3rd                                                 [Page 9]