home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc1828 < prev    next >
Text File  |  1995-08-08  |  10KB  |  335 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         P. Metzger
  8. Request for Comments: 1828                                      Piermont
  9. Category: Standards Track                                     W. Simpson
  10.                                                               Daydreamer
  11.                                                              August 1995
  12.  
  13.  
  14.                    IP Authentication using Keyed MD5
  15.  
  16.  
  17.  
  18. Status of this Memo
  19.  
  20.    This document specifies an Internet standards track protocol for the
  21.    Internet community, and requests discussion and suggestions for
  22.    improvements.  Please refer to the current edition of the "Internet
  23.    Official Protocol Standards" (STD 1) for the standardization state
  24.    and status of this protocol.  Distribution of this memo is unlimited.
  25.  
  26.  
  27. Abstract
  28.  
  29.    This document describes the use of keyed MD5 with the IP
  30.    Authentication Header.
  31.  
  32.  
  33. Table of Contents
  34.  
  35.      1.     Introduction ..........................................    1
  36.         1.1       Keys ............................................    1
  37.         1.2       Data Size .......................................    1
  38.         1.3       Performance .....................................    1
  39.  
  40.      2.     Calculation ...........................................    2
  41.  
  42.      SECURITY CONSIDERATIONS ......................................    2
  43.      ACKNOWLEDGEMENTS .............................................    3
  44.      REFERENCES ...................................................    3
  45.      AUTHOR'S ADDRESS .............................................    4
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Metzger & Simpson             Standards Track                   [Page i]
  59.  
  60. RFC 1828                         AH MD5                      August 1995
  61.  
  62.  
  63. 1.  Introduction
  64.  
  65.    The Authentication Header (AH) [RFC-1826] provides integrity and
  66.    authentication for IP datagrams.  This specification describes the AH
  67.    use of keys with Message Digest 5 (MD5) [RFC-1321].
  68.  
  69.    All implementations that claim conformance or compliance with the
  70.    Authentication Header specification MUST implement this keyed MD5
  71.    mechanism.
  72.  
  73.    This document assumes that the reader is familiar with the related
  74.    document "Security Architecture for the Internet Protocol" [RFC-
  75.    1825], which defines the overall security plan for IP, and provides
  76.    important background for this specification.
  77.  
  78.  
  79.  
  80. 1.1.  Keys
  81.  
  82.    The secret authentication key shared between the communicating
  83.    parties SHOULD be a cryptographically strong random number, not a
  84.    guessable string of any sort.
  85.  
  86.    The shared key is not constrained by this transform to any particular
  87.    size.  Lengths of up to 128 bits MUST be supported by the
  88.    implementation, although any particular key may be shorter.  Longer
  89.    keys are encouraged.
  90.  
  91.  
  92.  
  93. 1.2.  Data Size
  94.  
  95.    MD5's 128-bit output is naturally 64-bit aligned.  Typically, there
  96.    is no further padding of the Authentication Data field.
  97.  
  98.  
  99.  
  100. 1.3.  Performance
  101.  
  102.    MD5 software speeds are adequate for commonly deployed LAN and WAN
  103.    links, but reportedly are too slow for newer link technologies [RFC-
  104.    1810].
  105.  
  106.    Nota Bene:
  107.       Suggestions are sought on alternative authentication algorithms
  108.       that have significantly faster throughput, are not patent-
  109.       encumbered, and still retain adequate cryptographic strength.
  110.  
  111.  
  112.  
  113. Metzger & Simpson             Standards Track                   [Page 1]
  114.  
  115. RFC 1828                         AH MD5                      August 1995
  116.  
  117.  
  118. 2.  Calculation
  119.  
  120.    The 128-bit digest is calculated as described in [RFC-1321].  The
  121.    specification of MD5 includes a portable 'C' programming language
  122.    description of the MD5 algorithm.
  123.  
  124.    The form of the authenticated message is
  125.  
  126.             key, keyfill, datagram, key, MD5fill
  127.  
  128.    First, the variable length secret authentication key is filled to the
  129.    next 512-bit boundary, using the same pad with length technique
  130.    defined for MD5.
  131.  
  132.    Then, the filled key is concatenated with (immediately followed by)
  133.    the invariant fields of the entire IP datagram (variant fields are
  134.    zeroed), concatenated with (immediately followed by) the original
  135.    variable length key again.
  136.  
  137.    A trailing pad with length to the next 512-bit boundary for the
  138.    entire message is added by MD5 itself.  The 128-bit MD5 digest is
  139.    calculated, and the result is inserted into the Authentication Data
  140.    field.
  141.  
  142.    Discussion:
  143.       When the implementation adds the keys and padding in place before
  144.       and after the IP datagram, care must be taken that the keys and/or
  145.       padding are not sent over the link by the link driver.
  146.  
  147.  
  148.  
  149. Security Considerations
  150.  
  151.    Users need to understand that the quality of the security provided by
  152.    this specification depends completely on the strength of the MD5 hash
  153.    function, the correctness of that algorithm's implementation, the
  154.    security of the key management mechanism and its implementation, the
  155.    strength of the key [CN94], and upon the correctness of the
  156.    implementations in all of the participating nodes.
  157.  
  158.    At the time of writing of this document, it is known to be possible
  159.    to produce collisions in the compression function of MD5 [dBB93].
  160.    There is not yet a known method to exploit these collisions to attack
  161.    MD5 in practice, but this fact is disturbing to some authors
  162.    [Schneier94].
  163.  
  164.    It has also recently been determined [vOW94] that it is possible to
  165.    build a machine for $10 Million that could find two chosen text
  166.  
  167.  
  168.  
  169. Metzger & Simpson             Standards Track                   [Page 2]
  170.  
  171. RFC 1828                         AH MD5                      August 1995
  172.  
  173.  
  174.    variants with a common MD5 hash value.  However, it is unclear
  175.    whether this attack is applicable to a keyed MD5 transform.
  176.  
  177.    This attack requires approximately 24 days.  The same form of attack
  178.    is useful on any iterated n-bit hash function, and the time is
  179.    entirely due to the 128-bit length of the MD5 hash.
  180.  
  181.    Although there is no substantial weakness for most IP security
  182.    applications, it should be recognized that current technology is
  183.    catching up to the 128-bit hash length used by MD5.  Applications
  184.    requiring extremely high levels of security may wish to move in the
  185.    near future to algorithms with longer hash lengths.
  186.  
  187.  
  188.  
  189. Acknowledgements
  190.  
  191.    This document was reviewed by the IP Security Working Group of the
  192.    Internet Engineering Task Force (IETF).  Comments should be submitted
  193.    to the ipsec@ans.net mailing list.
  194.  
  195.    Some of the text of this specification was derived from work by
  196.    Randall Atkinson for the SIP, SIPP, and IPv6 Working Groups.
  197.  
  198.    The basic concept and use of MD5 is derived in large part from the
  199.    work done for SNMPv2 [RFC-1446].
  200.  
  201.    Steve Bellovin, Phil Karn, Charles Lynn, Dave Mihelcic, Hilarie
  202.    Orman, Jeffrey Schiller, Joe Touch, and David Wagner provided useful
  203.    critiques of earlier versions of this draft.
  204.  
  205.  
  206.  
  207. References
  208.  
  209.    [CN94]   Carroll, J.M., and Nudiati, S., "On Weak Keys and Weak Data:
  210.             Foiling the Two Nemeses", Cryptologia, Vol. 18 No. 23 pp.
  211.             253-280, July 1994.
  212.  
  213.    [dBB93]  den Boer, B., and Bosselaers, A., "Collisions for the
  214.             Compression function of MD5", Advances in Cryptology --
  215.             Eurocrypt '93 Proceedings, Berlin: Springer-Verlag 1994
  216.  
  217.    [KR95]   Kaliski, B., and Robshaw, M., "Message authentication with
  218.             MD5", CryptoBytes (RSA Labs Technical Newsletter), vol.1
  219.             no.1, Spring 1995.
  220.  
  221.  
  222.  
  223.  
  224. Metzger & Simpson             Standards Track                   [Page 3]
  225.  
  226. RFC 1828                         AH MD5                      August 1995
  227.  
  228.  
  229.    [RFC-1321]
  230.             Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
  231.             MIT and RSA Data Security, Inc., April 1992.
  232.  
  233.    [RFC-1446]
  234.             Galvin, J., and K. McCloghrie, "Security Protocols for
  235.             Version 2 of the Simple Network Management Protocol
  236.             (SNMPv2)", RFC 1446, TIS, Hughes LAN Systems, April
  237.             1993.
  238.  
  239.    [RFC-1700]
  240.             Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
  241.             RFC 1700, USC/Information Sciences Institute, October 1994.
  242.  
  243.    [RFC-1800]
  244.             Postel, J., "Internet Official Protocol Standards", STD 1,
  245.             RFC 1800, USC/Information Sciences Institute, July 1995.
  246.  
  247.    [RFC-1810]
  248.             Touch, J., "Report on MD5 Performance", RFC 1810,
  249.             USC/Information Sciences Institute, June 1995.
  250.  
  251.    [RFC-1825]
  252.             Atkinson, R., "Security Architecture for the Internet
  253.             Protocol", RFC 1825, NRL, August 1995.
  254.  
  255.    [RFC-1826]
  256.             Atkinson, R., "IP Authentication Header", RFC 1826, NRL
  257.             August 1995.
  258.  
  259.    [Schneier94]
  260.             Schneier, B., "Applied Cryptography", John Wiley & Sons, New
  261.             York, NY, 1994.  ISBN 0-471-59756-2
  262.  
  263.    [vOW94]  van Oorschot, P. C., and Wiener, M. J., "Parallel Collision
  264.             Search with Applications to Hash Functions and Discrete
  265.             Logarithms", Proceedings of the 2nd ACM Conf. Computer and
  266.             Communications Security, Fairfax, VA, November 1994.
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279. Metzger & Simpson             Standards Track                   [Page 4]
  280.  
  281. RFC 1828                         AH MD5                      August 1995
  282.  
  283.  
  284. Author's Address
  285.  
  286.    Questions about this memo can also be directed to:
  287.  
  288.       Perry Metzger
  289.       Piermont Information Systems Inc.
  290.       160 Cabrini Blvd., Suite #2
  291.       New York, NY  10033
  292.  
  293.       perry@piermont.com
  294.  
  295.  
  296.       William Allen Simpson
  297.       Daydreamer
  298.       Computer Systems Consulting Services
  299.       1384 Fontaine
  300.       Madison Heights, Michigan  48071
  301.  
  302.       Bill.Simpson@um.cc.umich.edu
  303.           bsimpson@MorningStar.com
  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. Metzger & Simpson             Standards Track                   [Page 5]
  335.