Request for Comments: Obsoletes: 2095 September IMAP/POP AUTHorize Extension for Simple Challenge/Response

Similar documents
Network Working Group. Category: Standards Track September The SRP Authentication and Key Exchange System

Category: Standards Track August POP URL Scheme. Status of this Memo

Network Working Group Request for Comments: 2085 Category: Standards Track NIST February HMAC-MD5 IP Authentication with Replay Prevention

Network Working Group. Extreme Networks July Intermediate System to Intermediate System (IS-IS) Cryptographic Authentication

Network Working Group. Category: Standards Track December 1994

Network Working Group. Obsoletes: 1225 June 1993

Network Working Group Internet Draft: Using TLS with IMAP, POP3 and ACAP Document: draft-newman-tls-imappop-08.txt February 1999

Request for Comments: 1652

Category: Standards Track July The Post Office Protocol (POP3) Simple Authentication and Security Layer (SASL) Authentication Mechanism

Network Working Group Request for Comments: 2595 Category: Standards Track June 1999

Network Working Group Internet Draft: Using TLS with IMAP4, POP3 and ACAP Document: draft-newman-tls-imappop-06.txt January 1999

Network Working Group Request for Comments: 2059 Category: Informational January 1997

Internet Engineering Task Force (IETF) Request for Comments: Category: Informational ISSN: March 2011

Network Working Group. Document: draft-myers-auth-sasl-05.txt September Simple Authentication and Security Layer. Status of this Memo

Category: Standards Track Sun Microsystems Laboratories November 2000

Internet Engineering Task Force (IETF) Obsoletes: 2831 July 2011 Category: Informational ISSN:

June The Internet-standard Network Management Framework consists of three components. They are:

Network Working Group. Document: draft-myers-auth-sasl-02.txt July Simple Authentication and Session Layer. Status of this Memo

Network Working Group. Category: Standards Track October Simple Authentication and Security Layer (SASL)

Request for Comments: 3566 Category: Standards Track Intel September The AES-XCBC-MAC-96 Algorithm and Its Use With IPsec

Request for Comments: 2476 Category: Standards Track MCI December 1998

Network Working Group Request for Comments: 2202 Category: Informational NIST September 1997

Request for Comments: 4315 December 2005 Obsoletes: 2359 Category: Standards Track. Internet Message Access Protocol (IMAP) - UIDPLUS extension

Network Working Group. Category: Informational February 1997

PPP Configuration Options

September Copyright (C) The Internet Society (2000). All Rights Reserved.

Network Working Group. Category: Standards Track January 1997

Category: Informational Alcatel January 2006

ColdFusion Foundations: POP3. Mosh Teitelbaum evoch, LLC

Network Working Group Internet Draft: SMTP Authentication Document: draft-myers-smtp-auth-00.txt April SMTP Service Extension for Authentication

CSCE 715: Network Systems Security

Network Working Group Request for Comments: 2866 Category: Informational June 2000 Obsoletes: 2139

Network Working Group Request for Comments: December 2004

Message Authentication with MD5 *

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms

Network Working Group Request for Comments: 4432 March 2006 Category: Standards Track

Message Authentication and Hash function 2

Internet Engineering Task Force (IETF) Category: Experimental. February 2010

Network Working Group. Category: Standards Track NIST November 1998

Request for Comments: 3548 July 2003 Category: Informational

Message Authentication Codes and Cryptographic Hash Functions

Updates: 2453 Category: Standards Track February RIPv2 Cryptographic Authentication. Status of This Memo

The KX.509 Protocol. William Doster Marcus Watts Dan Hyde University of Michigan ABSTRACT

Category: Standards Track March Extensible Provisioning Protocol (EPP) Transport Over TCP

Network Working Group

Request for Comments: 3206 Category: Standards Track February 2002

Point-to-Point Extensions Working Group Internet Draft April EAP SIM Authentication (Version 1) draft-haverinen-pppext-eap-sim-01.

Network Working Group Request for Comments: 2342 Category: Standards Track Innosoft May 1998

Request for Comments: 7298 Updates: 6126 July 2014 Category: Experimental ISSN:

Updates: 6126 (if approved) March 21, 2014 Intended status: Experimental Expires: September 22, 2014

Cheating CHAP. Sebastian Krahmer February 2, 2002

Data Integrity & Authentication. Message Authentication Codes (MACs)

Network Working Group. Siemens Networks GmbH & Co KG February Online Certificate Status Protocol (OCSP) Extensions to IKEv2

GroupWise Software Developer Kit IMAP Support. February 2018

Internet Engineering Task Force (IETF) Category: Standards Track ISSN: October 2015

Network and System Security

Network Working Group. February 2005

Network Working Group Request for Comments: October 1998

Category: Informational May 1996

Internet Engineering Task Force (IETF) Request for Comments: 5769 Category: Informational April 2010 ISSN:

Category: Standards Track January 1999

User Authentication in an Internet Protocol

Internet Engineering Task Force (IETF) Request for Comments: Obsoletes: 1652 Category: Standards Track

October 4, 2000 Expires in six months. SMTP Service Extension for Secure SMTP over TLS. Status of this Memo

Data Integrity. Modified by: Dr. Ramzi Saifan

Request for Comments: J. Salowey, Ed. Cisco Systems, Inc. March Transport Layer Security (TLS) Transport Mapping for Syslog

Updates: 6126 (if approved) March 11, 2013 Intended status: Experimental Expires: September 12, 2013

Network Working Group Request for Comments: 2058 Category: Standards Track. Merit W. Simpson Daydreamer S. Willens. Livingston.

Network Working Group. Category: Informational January 2000

REMOTE AUTHENTICATION DIAL IN USER SERVICE

Updates: 6126 (if approved) August 20, 2012 Intended status: Experimental Expires: February 21, 2013

Internet Engineering Task Force (IETF) Request for Comments: 8437 Updates: 3501 August 2018 Category: Standards Track ISSN:

Request for Comments: 1828 Category: Standards Track Daydreamer August 1995

Merit Network, Incorporated Bernard Aboba Microsoft March 1997

Independent Submission Request for Comments: 6218 Category: Informational. J. Walker Intel Corporation J. Salowey Cisco Systems April 2011

M. Rose Dover Beach Consulting, Inc. February 1993

Request for Comments: 3110 Obsoletes: 2537 May 2001 Category: Standards Track. RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)

Internet and Intranet Protocols and Applications

PKCS #5 v2.0: Password-Based Cryptography Standard

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015

Network Working Group Request for Comments: D. Mitton RSA, Security Division of EMC B. Aboba Microsoft Corporation January 2008

Request for Comments: 1332 Obsoletes: RFC 1172 May The PPP Internet Protocol Control Protocol (IPCP)

Request for Comments: 5437 Category: Standards Track Isode Limited January 2009

Network Working Group. Obsoletes: RFC 1081 May 1991

PROTECTING CONVERSATIONS

Protocols, Technologies and Standards Secure network protocols for the OSI stack P2.1 WLAN Security WPA, WPA2, IEEE i, IEEE 802.1X P2.

Using SRP for TLS Authentication

October Network News Transfer Protocol (NNTP) Extension for Authentication. Status of This Memo

Network Working Group Request for Comments: Category: Standards Track Merit W. Simpson Daydreamer June 2000

Ubiquitous One-Time Password Service Using Generic Authentication Architecture

Network Working Group. Updates: 3463, 4468, 4954 June 2008 Category: Best Current Practice. A Registry for SMTP Enhanced Mail System Status Codes

Request for Comments: Category: Standards Track April 2006

October Principles of Operation for the TPC.INT Subdomain: Remote Printing -- Administrative Policies

Cryptography. Summer Term 2010

Lecture 1 Applied Cryptography (Part 1)

Intended status: Informational Expires: March 7, 2019 Huawei Technologies N. Leymann Deutsche Telekom G. Swallow Independent September 3, 2018

Internet-Draft November 12, 2005 Obsoletes: 3548 (if approved) Expires: May 16, 2006

Network Working Group Request for Comments: 1829 Category: Standards Track Piermont W. Simpson Daydreamer August 1995

SMTP. George Porter CSE 124 February 12, 2015

Data Integrity & Authentication. Message Authentication Codes (MACs)

Transcription:

Network Working Group Request for Comments: 2195 Category: Standards Track Obsoletes: 2095 J. Klensin R. Catoe P. Krumviede MCI September 1997 IMAP/POP AUTHorize Extension for Simple Challenge/Response Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Abstract While IMAP4 supports a number of strong authentication mechanisms as described in RFC 1731, it lacks any mechanism that neither passes cleartext, reusable passwords across the network nor requires either a significant security infrastructure or that the mail server update a mail-system-wide user authentication file on each mail access. This specification provides a simple challenge-response authentication protocol that is suitable for use with IMAP4. Since it utilizes Keyed-MD5 digests and does not require that the secret be stored in the clear on the server, it may also constitute an improvement on APOP for POP3 use as specified in RFC 1734. 1. Introduction Existing Proposed Standards specify an AUTHENTICATE mechanism for the IMAP4 protocol [IMAP, IMAP-AUTH] and a parallel AUTH mechanism for the POP3 protocol [POP3-AUTH]. The AUTHENTICATE mechanism is intended to be extensible; the four methods specified in [IMAP-AUTH] are all fairly powerful and require some security infrastructure to support. The base POP3 specification [POP3] also contains a lightweight challenge-response mechanism called APOP. APOP is associated with most of the risks associated with such protocols: in particular, it requires that both the client and server machines have access to the shared secret in cleartext form. CRAM offers a method for avoiding such cleartext storage while retaining the algorithmic simplicity of APOP in using only MD5, though in a "keyed" method. Klensin, Catoe & Krumviede Standards Track [Page 1]

At present, IMAP [IMAP] lacks any facility corresponding to APOP. The only alternative to the strong mechanisms identified in [IMAP- AUTH] is a presumably cleartext username and password, supported through the LOGIN command in [IMAP]. This document describes a simple challenge-response mechanism, similar to APOP and PPP CHAP [PPP], that can be used with IMAP (and, in principle, with POP3). This mechanism also has the advantage over some possible alternatives of not requiring that the server maintain information about email "logins" on a per-login basis. While mechanisms that do require such per-login history records may offer enhanced security, protocols such as IMAP, which may have several connections between a given client and server open more or less simultaneous, may make their implementation particularly challenging. 2. Challenge-Response Authentication Mechanism (CRAM) The authentication type associated with CRAM is "CRAM-MD5". The data encoded in the first ready response contains an presumptively arbitrary string of random digits, a timestamp, and the fully-qualified primary host name of the server. The syntax of the unencoded form must correspond to that of an RFC 822 msg-id [RFC822] as described in [POP3]. The client makes note of the data and then responds with a string consisting of the user name, a space, and a digest. The latter is computed by applying the keyed MD5 algorithm from [KEYED-MD5] where the key is a shared secret and the digested text is the timestamp (including angle-brackets). This shared secret is a string known only to the client and server. The digest parameter itself is a 16-octet value which is sent in hexadecimal format, using lower-case ASCII characters. When the server receives this client response, it verifies the digest provided. If the digest is correct, the server should consider the client authenticated and respond appropriately. Keyed MD5 is chosen for this application because of the greater security imparted to authentication of short messages. In addition, the use of the techniques described in [KEYED-MD5] for precomputation of intermediate results make it possible to avoid explicit cleartext storage of the shared secret on the server system by instead storing the intermediate results which are known as "contexts". Klensin, Catoe & Krumviede Standards Track [Page 2]

CRAM does not support a protection mechanism. Example: The examples in this document show the use of the CRAM mechanism with the IMAP4 AUTHENTICATE command [IMAP-AUTH]. The base64 encoding of the challenges and responses is part of the IMAP4 AUTHENTICATE command, not part of the CRAM specification itself. S: * OK IMAP4 Server C: A0001 AUTHENTICATE CRAM-MD5 S: + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+ C: dgltigi5mtnhnjayyzdlzge3ytq5nwi0ztzlnzmzngqzodkw S: A0001 OK CRAM authentication successful In this example, the shared secret is the string tanstaaftanstaaf. Hence, the Keyed MD5 digest is produced by calculating MD5((tanstaaftanstaaf XOR opad), MD5((tanstaaftanstaaf XOR ipad), <1896.697170952@postoffice.reston.mci.net>)) where ipad and opad are as defined in the keyed-md5 Work in Progress [KEYED-MD5] and the string shown in the challenge is the base64 encoding of <1896.697170952@postoffice.reston.mci.net>. The shared secret is null-padded to a length of 64 bytes. If the shared secret is longer than 64 bytes, the MD5 digest of the shared secret is used as a 16 byte input to the keyed MD5 calculation. This produces a digest value (in hexadecimal) of b913a602c7eda7a495b4e6e7334d3890 The user name is then prepended to it, forming tim b913a602c7eda7a495b4e6e7334d3890 Which is then base64 encoded to meet the requirements of the IMAP4 AUTHENTICATE command (or the similar POP3 AUTH command), yielding dgltigi5mtnhnjayyzdlzge3ytq5nwi0ztzlnzmzngqzodkw Klensin, Catoe & Krumviede Standards Track [Page 3]

3. References [CHAP] Lloyd, B., and W. Simpson, "PPP Authentication Protocols", RFC 1334, October 1992. [IMAP] Crispin, M., "Internet Message Access Protocol - Version 4rev1", RFC 2060, University of Washington, December 1996. [IMAP-AUTH] Myers, J., "IMAP4 Authentication Mechanisms", RFC 1731, Carnegie Mellon, December 1994. [KEYED-MD5] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997. [MD5] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321, MIT Laboratory for Computer Science, April 1992. [POP3] Myers, J., and M. Rose, "Post Office Protocol - Version 3", STD 53, RFC 1939, Carnegie Mellon, May 1996. [POP3-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734, Carnegie Mellon, December, 1994. 4. Security Considerations It is conjectured that use of the CRAM authentication mechanism provides origin identification and replay protection for a session. Accordingly, a server that implements both a cleartext password command and this authentication type should not allow both methods of access for a given user. While the saving, on the server, of "contexts" (see section 2) is marginally better than saving the shared secrets in cleartext as is required by CHAP [CHAP] and APOP [POP3], it is not sufficient to protect the secrets if the server itself is compromised. Consequently, servers that store the secrets or contexts must both be protected to a level appropriate to the potential information value in user mailboxes and identities. As the length of the shared secret increases, so does the difficulty of deriving it. While there are now suggestions in the literature that the use of MD5 and keyed MD5 in authentication procedures probably has a limited effective lifetime, the technique is now widely deployed and widely understood. It is believed that this general understanding may assist with the rapid replacement, by CRAM-MD5, of the current uses of permanent cleartext passwords in IMAP. This document has been Klensin, Catoe & Krumviede Standards Track [Page 4]

deliberately written to permit easy upgrading to use SHA (or whatever alternatives emerge) when they are considered to be widely available and adequately safe. Even with the use of CRAM, users are still vulnerable to active attacks. An example of an increasingly common active attack is TCP Session Hijacking as described in CERT Advisory CA-95:01 [CERT95]. See section 1 above for additional discussion. 5. Acknowledgements This memo borrows ideas and some text liberally from [POP3] and [RFC-1731] and thanks are due the authors of those documents. Ran Atkinson made a number of valuable technical and editorial contributions to the document. 6. Authors Addresses John C. Klensin 800 Boylston St, 7th floor Boston, MA 02199 EMail: klensin@mci.net Phone: +1 617 960 1011 Randy Catoe 2100 Reston Parkway Reston, VA 22091 EMail: randy@mci.net Phone: +1 703 715 7366 Paul Krumviede 2100 Reston Parkway Reston, VA 22091 EMail: paul@mci.net Phone: +1 703 715 7251 Klensin, Catoe & Krumviede Standards Track [Page 5]