7 Network Working Group C. Newman
8 Request for Comments: 2444 Innosoft
9 Updates: 2222 October 1998
10 Category: Standards Track
13 The One-Time-Password SASL Mechanism
17 This document specifies an Internet standards track protocol for the
18 Internet community, and requests discussion and suggestions for
19 improvements. Please refer to the current edition of the "Internet
20 Official Protocol Standards" (STD 1) for the standardization state
21 and status of this protocol. Distribution of this memo is unlimited.
25 Copyright (C) The Internet Society (1998). All Rights Reserved.
29 OTP [OTP] provides a useful authentication mechanism for situations
30 where there is limited client or server trust. Currently, OTP is
31 added to protocols in an ad-hoc fashion with heuristic parsing. This
32 specification defines an OTP SASL [SASL] mechanism so it can be
33 easily and formally integrated into many application protocols.
35 1. How to Read This Document
37 The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
38 "RECOMMENDED" and "MAY" in this document are to be interpreted as
39 defined in "Key words for use in RFCs to Indicate Requirement Levels"
42 This memo assumes the reader is familiar with OTP [OTP], OTP extended
43 responses [OTP-EXT] and SASL [SASL].
47 The OTP SASL mechanism replaces the SKEY SASL mechanism [SASL]. OTP
48 is a good choice for usage scenarios where the client is untrusted
49 (e.g., a kiosk client), as a one-time password will only give the
50 client a single opportunity to act on behalf of the user. OTP is
51 also a good choice for situations where interactive logins are
52 permitted to the server, as a compromised OTP authentication database
53 is only subject to dictionary attacks, unlike authentication
54 databases for other simple mechanisms such as CRAM-MD5 [CRAM-MD5].
58 Newman Standards Track [Page 1]
60 RFC 2444 OTP SASL Mechanism October 1998
63 It is important to note that each use of the OTP mechanism causes the
64 authentication database entry for a user to be updated.
66 This SASL mechanism provides a formal way to integrate OTP into
67 SASL-enabled protocols including IMAP [IMAP4], ACAP [ACAP], POP3
68 [POP-AUTH] and LDAPv3 [LDAPv3].
70 3. Profiling OTP for SASL
72 OTP [OTP] and OTP extended responses [OTP-EXT] offer a number of
73 options. However, for authentication to succeed, the client and
74 server need compatible option sets. This specification defines a
75 single SASL mechanism: OTP. The following rules apply to this
78 o The extended response syntax MUST be used.
80 o Servers MUST support the following four OTP extended responses:
81 "hex", "word", "init-hex" and "init-word". Servers MUST support
82 the "word" and "init-word" responses for the standard dictionary
83 and SHOULD support alternate dictionaries. Servers MUST NOT
84 require use of any additional OTP extensions or options.
86 o Clients SHOULD support display of the OTP challenge to the user
87 and entry of an OTP in multi-word format. Clients MAY also
88 support direct entry of the pass phrase and compute the "hex" or
91 o Clients MUST indicate when authentication fails due to the
92 sequence number getting too low and SHOULD offer the user the
93 option to reset the sequence using the "init-hex" or "init-word"
96 Support for the MD5 algorithm is REQUIRED, and support for the SHA1
97 algorithm is RECOMMENDED.
99 4. OTP Authentication Mechanism
101 The mechanism does not provide any security layer.
103 The client begins by sending a message to the server containing the
104 following two pieces of information.
106 (1) An authorization identity. When the empty string is used, this
107 defaults to the authentication identity. This is used by system
108 administrators or proxy servers to login with a different user
109 identity. This field may be up to 255 octets and is terminated by a
110 NUL (0) octet. US-ASCII printable characters are preferred, although
114 Newman Standards Track [Page 2]
116 RFC 2444 OTP SASL Mechanism October 1998
119 UTF-8 [UTF-8] printable characters are permitted to support
120 international names. Use of character sets other than US-ASCII and
123 (2) An authentication identity. The identity whose pass phrase will
124 be used. This field may be up to 255 octets. US-ASCII printable
125 characters are preferred, although UTF-8 [UTF-8] printable characters
126 are permitted to support international names. Use of character sets
127 other than US-ASCII and UTF-8 is forbidden.
129 The server responds by sending a message containing the OTP challenge
130 as described in OTP [OTP] and OTP extended responses [OTP-EXT].
132 If a client sees an unknown hash algorithm name it will not be able
133 to process a pass phrase input by the user. In this situation the
134 client MAY prompt for the six-word format, issue the cancel sequence
135 as specified by the SASL profile for the protocol in use and try a
136 different SASL mechanism, or close the connection and refuse to
137 authenticate. As a result of this behavior, a server is restricted
138 to one OTP hash algorithm per user.
140 On success, the client generates an extended response in the "hex",
141 "word", "init-hex" or "init-word" format. The client is not required
142 to terminate the response with a space or a newline and SHOULD NOT
143 include unnecessary whitespace.
145 Servers MUST tolerate input of arbitrary length, but MAY fail the
146 authentication if the length of client input exceeds reasonable size.
150 In these example, "C:" represents lines sent from the client to the
151 server and "S:" represents lines sent from the server to the client.
152 The user name is "tim" and no authorization identity is provided.
153 The "<NUL>" below represents an ASCII NUL octet.
155 The following is an example of the OTP mechanism using the ACAP
156 [ACAP] profile of SASL. The pass phrase used in this example is:
159 C: a001 AUTHENTICATE "OTP" {4}
161 S: + "otp-md5 499 ke1234 ext"
162 C: "hex:5bf075d9959d036f"
163 S: a001 OK "AUTHENTICATE completed"
170 Newman Standards Track [Page 3]
172 RFC 2444 OTP SASL Mechanism October 1998
175 Here is the same example using the six-words response:
177 C: a001 AUTHENTICATE "OTP" {4}
179 S: + "otp-md5 499 ke1234 ext"
180 C: "word:BOND FOGY DRAB NE RISE MART"
181 S: a001 OK "AUTHENTICATE completed"
183 Here is the same example using the OTP-SHA1 mechanism:
185 C: a001 AUTHENTICATE "OTP" {4}
187 S: + "otp-sha1 499 ke1234 ext"
188 C: "hex:c90fc02cc488df5e"
189 S: a001 OK "AUTHENTICATE completed"
191 Here is the same example with the init-hex extended response
193 C: a001 AUTHENTICATE "OTP" {4}
195 S: + "otp-md5 499 ke1234 ext"
196 C: "init-hex:5bf075d9959d036f:md5 499 ke1235:3712dcb4aa5316c1"
197 S: a001 OK "OTP sequence reset, authentication complete"
199 The following is an example of the OTP mechanism using the IMAP
200 [IMAP4] profile of SASL. The pass phrase used in this example is:
203 C: a001 AUTHENTICATE OTP
206 S: + b3RwLW1kNSAxMjMga2UxMjM0IGV4dA==
207 C: aGV4OjExZDRjMTQ3ZTIyN2MxZjE=
208 S: a001 OK AUTHENTICATE completed
210 Note that the lack of an initial client response and the base64
211 encoding are characteristics of the IMAP profile of SASL. The server
212 challenge is "otp-md5 123 ke1234 ext" and the client response is
213 "hex:11d4c147e227c1f1".
215 6. Security Considerations
217 This specification introduces no security considerations beyond those
218 those described in SASL [SASL], OTP [OTP] and OTP extended responses
219 [OTP-EXT]. A brief summary of these considerations follows:
221 This mechanism does not provide session privacy, server
222 authentication or protection from active attacks.
226 Newman Standards Track [Page 4]
228 RFC 2444 OTP SASL Mechanism October 1998
231 This mechanism is subject to passive dictionary attacks. The
232 severity of this attack can be reduced by choosing pass phrases well.
234 The server authentication database necessary for use with OTP need
235 not be plaintext-equivalent.
237 Server implementations MUST protect against the race attack [OTP].
239 7. Multinational Considerations
241 As remote access is a crucial service, users are encouraged to
242 restrict user names and pass phrases to the US-ASCII character set.
243 However, if characters outside the US-ASCII chracter set are used in
244 user names and pass phrases, then they are interpreted according to
247 Server support for alternate dictionaries is strongly RECOMMENDED to
248 permit use of the six-word format with non-English words.
250 8. IANA Considerations
252 Here is the registration template for the OTP SASL mechanism:
254 SASL mechanism name: OTP
255 Security Considerations: See section 6 of this memo
256 Published specification: this memo
257 Person & email address to contact for futher information:
258 see author's address section below
259 Intended usage: COMMON
260 Author/Change controller: see author's address section below
262 This memo also amends the SKEY SASL mechanism registration [SASL] by
263 changing its intended usage to OBSOLETE.
267 [ACAP] Newman, C. and J. Myers, "ACAP -- Application
268 Configuration Access Protocol", RFC 2244, November 1997.
270 [CRAM-MD5] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
271 AUTHorize Extension for Simple Challenge/Response", RFC
272 2195, September 1997.
274 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
275 4rev1", RFC 2060, December 1996.
277 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
278 Requirement Levels", BCP 14, RFC 2119, March 1997.
282 Newman Standards Track [Page 5]
284 RFC 2444 OTP SASL Mechanism October 1998
287 [LDAPv3] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory
288 Access Protocol (v3)", RFC 2251, December 1997.
290 [MD5] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321,
293 [OTP] Haller, N., Metz, C., Nesser, P. and M. Straw, "A One-Time
294 Password System", RFC 2289, February 1998.
296 [OTP-EXT] Metz, C., "OTP Extended Responses", RFC 2243, November
299 [POP-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
302 [SASL] Myers, J., "Simple Authentication and Security Layer
303 (SASL)", RFC 2222, October 1997.
305 [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
306 10646", RFC 2279, January 1998.
311 Innosoft International, Inc.
313 West Covina, CA 91790 USA
315 EMail: chris.newman@innosoft.com
338 Newman Standards Track [Page 6]
340 RFC 2444 OTP SASL Mechanism October 1998
343 11. Full Copyright Statement
345 Copyright (C) The Internet Society (1998). All Rights Reserved.
347 This document and translations of it may be copied and furnished to
348 others, and derivative works that comment on or otherwise explain it
349 or assist in its implementation may be prepared, copied, published
350 and distributed, in whole or in part, without restriction of any
351 kind, provided that the above copyright notice and this paragraph are
352 included on all such copies and derivative works. However, this
353 document itself may not be modified in any way, such as by removing
354 the copyright notice or references to the Internet Society or other
355 Internet organizations, except as needed for the purpose of
356 developing Internet standards in which case the procedures for
357 copyrights defined in the Internet Standards process must be
358 followed, or as required to translate it into languages other than
361 The limited permissions granted above are perpetual and will not be
362 revoked by the Internet Society or its successors or assigns.
364 This document and the information contained herein is provided on an
365 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
366 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
367 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
368 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
369 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
394 Newman Standards Track [Page 7]