rfc6331.Moving_Digest-MD5_to_Historic 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. Internet Engineering Task Force (IETF) A. Melnikov
  2. Request for Comments: 6331 Isode Limited
  3. Obsoletes: 2831 July 2011
  4. Category: Informational
  5. ISSN: 2070-1721
  6. Moving DIGEST-MD5 to Historic
  7. Abstract
  8. This memo describes problems with the DIGEST-MD5 Simple
  9. Authentication and Security Layer (SASL) mechanism as specified in
  10. RFC 2831. It marks DIGEST-MD5 as OBSOLETE in the IANA Registry of
  11. SASL mechanisms and moves RFC 2831 to Historic status.
  12. Status of This Memo
  13. This document is not an Internet Standards Track specification; it is
  14. published for informational purposes.
  15. This document is a product of the Internet Engineering Task Force
  16. (IETF). It represents the consensus of the IETF community. It has
  17. received public review and has been approved for publication by the
  18. Internet Engineering Steering Group (IESG). Not all documents
  19. approved by the IESG are a candidate for any level of Internet
  20. Standard; see Section 2 of RFC 5741.
  21. Information about the current status of this document, any errata,
  22. and how to provide feedback on it may be obtained at
  23. http://www.rfc-editor.org/info/rfc6331.
  24. Copyright Notice
  25. Copyright (c) 2011 IETF Trust and the persons identified as the
  26. document authors. All rights reserved.
  27. This document is subject to BCP 78 and the IETF Trust's Legal
  28. Provisions Relating to IETF Documents
  29. (http://trustee.ietf.org/license-info) in effect on the date of
  30. publication of this document. Please review these documents
  31. carefully, as they describe your rights and restrictions with respect
  32. to this document. Code Components extracted from this document must
  33. include Simplified BSD License text as described in Section 4.e of
  34. the Trust Legal Provisions and are provided without warranty as
  35. described in the Simplified BSD License.
  36. Melnikov Informational [Page 1]
  37. RFC 6331 Moving DIGEST-MD5 to Historic July 2011
  38. This document may contain material from IETF Documents or IETF
  39. Contributions published or made publicly available before November
  40. 10, 2008. The person(s) controlling the copyright in some of this
  41. material may not have granted the IETF Trust the right to allow
  42. modifications of such material outside the IETF Standards Process.
  43. Without obtaining an adequate license from the person(s) controlling
  44. the copyright in such materials, this document may not be modified
  45. outside the IETF Standards Process, and derivative works of it may
  46. not be created outside the IETF Standards Process, except to format
  47. it for publication as an RFC or to translate it into languages other
  48. than English.
  49. Table of Contents
  50. 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 2
  51. 2. Security Considerations . . . . . . . . . . . . . . . . . . . 5
  52. 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
  53. 4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5
  54. 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
  55. 5.1. Normative References . . . . . . . . . . . . . . . . . . . . 5
  56. 5.2. Informative References . . . . . . . . . . . . . . . . . . . 5
  57. 1. Introduction and Overview
  58. [RFC2831] defines how HTTP Digest Authentication [RFC2617] can be
  59. used as a Simple Authentication and Security Layer (SASL) [RFC4422]
  60. mechanism for any protocol that has a SASL profile. It was intended
  61. both as an improvement over CRAM-MD5 [RFC2195] and as a convenient
  62. way to support a single authentication mechanism for web, email, the
  63. Lightweight Directory Access Protocol (LDAP), and other protocols.
  64. While it can be argued that it is an improvement over CRAM-MD5, many
  65. implementors commented that the additional complexity of DIGEST-MD5
  66. makes it difficult to implement fully and securely.
  67. Below is an incomplete list of problems with the DIGEST-MD5 mechanism
  68. as specified in [RFC2831]:
  69. 1. The mechanism has too many options and modes. Some of them are
  70. not well described and are not widely implemented. For example,
  71. DIGEST-MD5 allows the "qop" directive to contain multiple values,
  72. but it also allows for multiple qop directives to be specified.
  73. The handling of multiple options is not specified, which results
  74. in minor interoperability problems. Some implementations
  75. amalgamate multiple qop values into one, while others treat
  76. multiple qops as an error. Another example is the use of an
  77. empty authorization identity. In SASL, an empty authorization
  78. identity means that the client is willing to authorize as the
  79. authentication identity. The document is not clear on whether
  80. Melnikov Informational [Page 2]
  81. RFC 6331 Moving DIGEST-MD5 to Historic July 2011
  82. the authzid must be omitted or if it can be specified with an
  83. empty value to convey this. The requirement for backward
  84. compatibility with HTTP Digest means that the situation is even
  85. worse. For example, DIGEST-MD5 requires all usernames/passwords
  86. that can be entirely represented in the ISO-8859-1 charset to be
  87. down converted from UTF-8 [RFC3629] to ISO-8859-1 [ISO-8859-1].
  88. Another example is the use of quoted strings. Handling of
  89. characters that need escaping is not properly described, and the
  90. DIGEST-MD5 document has no examples to demonstrate correct
  91. behavior.
  92. 2. The DIGEST-MD5 document uses ABNF from RFC 822 [RFC0822], which
  93. allows an extra construct and allows for "implied folding
  94. whitespace" to be inserted in many places. The difference from a
  95. more common ABNF defined in [RFC5234] is confusing for some
  96. implementors. As a result, many implementations do not accept
  97. folding whitespace in many places where it is allowed.
  98. 3. The DIGEST-MD5 document uses the concept of a "realm" to define a
  99. collection of accounts. A DIGEST-MD5 server can support one or
  100. more realms. The DIGEST-MD5 document does not provide any
  101. guidance on how realms should be named and, more importantly, how
  102. they can be entered in User Interfaces (UIs). As a result, many
  103. DIGEST-MD5 clients have confusing UIs, do not allow users to
  104. enter a realm, and/or do not allow users to pick one of the
  105. server-supported realms.
  106. 4. Use of username in the inner hash is problematic. The inner hash
  107. of DIGEST-MD5 is an MD5 hash of colon-separated username, realm,
  108. and password. Implementations may choose to store inner hashes
  109. instead of clear text passwords. This has some useful
  110. properties, such as protection from compromise of authentication
  111. databases containing the same username and password on other
  112. servers if a server with the username and password is
  113. compromised; however, this is rarely done in practice. First,
  114. the inner hash is not compatible with widely deployed Unix
  115. password databases, and second, changing the username would
  116. invalidate the inner hash.
  117. 5. Description of DES/3DES [DES] and RC4 security layers are
  118. inadequate to produce independently developed interoperable
  119. implementations. In the DES/3DES case, this is partly a problem
  120. with existing DES APIs.
  121. 6. DIGEST-MD5 outer hash (the value of the "response" directive)
  122. does not protect the whole authentication exchange, which makes
  123. the mechanism vulnerable to "man-in-the-middle" (MITM) attacks,
  124. such as modification of the list of supported qops or ciphers.
  125. Melnikov Informational [Page 3]
  126. RFC 6331 Moving DIGEST-MD5 to Historic July 2011
  127. 7. The following features are missing from DIGEST-MD5, making it
  128. insecure or unsuitable for use in protocols:
  129. A. Channel bindings [RFC5056].
  130. B. Hash agility (i.e., no easy way to replace the MD5 hash
  131. function with another one).
  132. C. Support for SASLPrep [RFC4013] or any other type of Unicode
  133. character normalization of usernames and passwords. The
  134. original DIGEST-MD5 document predates SASLPrep and does not
  135. recommend any Unicode character normalization.
  136. 8. The cryptographic primitives in DIGEST-MD5 are not up to today's
  137. standards, in particular:
  138. A. The MD5 hash is sufficiently weak to make a brute force
  139. attack on DIGEST-MD5 easy with common hardware [RFC6151].
  140. B. The RC4 algorithm is prone to attack when used as the
  141. security layer without discarding the initial key stream
  142. output [RFC6229].
  143. C. The DES cipher for the security layer is considered insecure
  144. due to its small key space [RFC3766].
  145. Note that most of the problems listed above are already present in
  146. the HTTP Digest authentication mechanism.
  147. Because DIGEST-MD5 is defined as an extensible mechanism, it is
  148. possible to fix most of the problems listed above. However, this
  149. would increase implementation complexity of an already complex
  150. mechanism even further, so the effort is not worth the cost. In
  151. addition, an implementation of a "fixed" DIGEST-MD5 specification
  152. would likely either not interoperate with any existing implementation
  153. of [RFC2831] or would be vulnerable to various downgrade attacks.
  154. Note that despite DIGEST-MD5 seeing some deployment on the Internet,
  155. this specification recommends obsoleting DIGEST-MD5 because DIGEST-
  156. MD5, as implemented, is not a reasonable candidate for further
  157. standardization and should be deprecated in favor of one or more new
  158. password-based mechanisms currently being designed.
  159. The Salted Challenge Response Authentication Mechanism (SCRAM) family
  160. of SASL mechanisms [RFC5802] has been developed to provide similar
  161. features as DIGEST-MD5 but with a better design.
  162. Melnikov Informational [Page 4]
  163. RFC 6331 Moving DIGEST-MD5 to Historic July 2011
  164. 2. Security Considerations
  165. Security issues are discussed throughout this document.
  166. 3. IANA Considerations
  167. IANA has changed the "Intended usage" of the DIGEST-MD5 mechanism
  168. registration in the SASL mechanism registry to OBSOLETE. The SASL
  169. mechanism registry is specified in [RFC4422] and is currently
  170. available at:
  171. http://www.iana.org/assignments/sasl-mechanisms
  172. 4. Acknowledgements
  173. The author gratefully acknowledges the feedback provided by Chris
  174. Newman, Simon Josefsson, Kurt Zeilenga, Sean Turner, and Abhijit
  175. Menon-Sen. Various text was copied from other RFCs, in particular,
  176. from [RFC2831].
  177. 5. References
  178. 5.1. Normative References
  179. [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence,
  180. S., Leach, P., Luotonen, A., and L. Stewart, "HTTP
  181. Authentication: Basic and Digest Access
  182. Authentication", RFC 2617, June 1999.
  183. [RFC2831] Leach, P. and C. Newman, "Using Digest Authentication
  184. as a SASL Mechanism", RFC 2831, May 2000.
  185. 5.2. Informative References
  186. [DES] National Institute of Standards and Technology, "Data
  187. Encryption Standard (DES)", FIPS PUB 46-3,
  188. October 1999.
  189. [ISO-8859-1] International Organization for Standardization,
  190. "Information technology - 8-bit single-byte coded
  191. graphic character sets - Part 1: Latin alphabet No. 1",
  192. ISO/IEC 8859-1, 1998.
  193. [RFC0822] Crocker, D., "Standard for the format of ARPA Internet
  194. text messages", STD 11, RFC 822, August 1982.
  195. Melnikov Informational [Page 5]
  196. RFC 6331 Moving DIGEST-MD5 to Historic July 2011
  197. [RFC2195] Klensin, J., Catoe, R., and P. Krumviede, "IMAP/POP
  198. AUTHorize Extension for Simple Challenge/Response",
  199. RFC 2195, September 1997.
  200. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
  201. 10646", STD 63, RFC 3629, November 2003.
  202. [RFC3766] Orman, H. and P. Hoffman, "Determining Strengths For
  203. Public Keys Used For Exchanging Symmetric Keys",
  204. BCP 86, RFC 3766, April 2004.
  205. [RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User
  206. Names and Passwords", RFC 4013, February 2005.
  207. [RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication
  208. and Security Layer (SASL)", RFC 4422, June 2006.
  209. [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure
  210. Channels", RFC 5056, November 2007.
  211. [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
  212. Specifications: ABNF", STD 68, RFC 5234, January 2008.
  213. [RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N.
  214. Williams, "Salted Challenge Response Authentication
  215. Mechanism (SCRAM) SASL and GSS-API Mechanisms",
  216. RFC 5802, July 2010.
  217. [RFC6151] Turner, S. and L. Chen, "Updated Security
  218. Considerations for the MD5 Message-Digest and the HMAC-
  219. MD5 Algorithms", RFC 6151, March 2011.
  220. [RFC6229] Strombergson, J. and S. Josefsson, "Test Vectors for
  221. the Stream Cipher RC4", RFC 6229, May 2011.
  222. Author's Address
  223. Alexey Melnikov
  224. Isode Limited
  225. 5 Castle Business Village
  226. 36 Station Road
  227. Hampton, Middlesex TW12 2BX
  228. UK
  229. EMail: Alexey.Melnikov@isode.com
  230. URI: http://www.melnikov.ca/
  231. Melnikov Informational [Page 6]