4 Transport Layer Security Working D. Taylor
5 Group Forge Research Pty Ltd
6 Internet-Draft November 29, 2002
10 Using SRP for TLS Authentication
15 This document is an Internet-Draft and is in full conformance with
16 all provisions of Section 10 of RFC2026.
18 Internet-Drafts are working documents of the Internet Engineering
19 Task Force (IETF), its areas, and its working groups. Note that
20 other groups may also distribute working documents as Internet-
23 Internet-Drafts are draft documents valid for a maximum of six months
24 and may be updated, replaced, or obsoleted by other documents at any
25 time. It is inappropriate to use Internet-Drafts as reference
26 material or to cite them other than as "work in progress."
28 The list of current Internet-Drafts can be accessed at http://
29 www.ietf.org/ietf/1id-abstracts.txt.
31 The list of Internet-Draft Shadow Directories can be accessed at
32 http://www.ietf.org/shadow.html.
34 This Internet-Draft will expire on May 30, 2003.
38 Copyright (C) The Internet Society (2002). All Rights Reserved.
42 This memo presents a technique for using the SRP [2] (Secure Remote
43 Password) protocol as an authentication method for the TLS
44 [1](Transport Layer Security) protocol.
56 Taylor Expires May 30, 2003 [Page 1]
58 Internet-Draft Using SRP for TLS Authentication November 2002
63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
64 2. SRP Authentication in TLS . . . . . . . . . . . . . . . . . 4
65 2.1 Modifications to the TLS Handshake Sequence . . . . . . . . 4
66 2.1.1 Message Sequence . . . . . . . . . . . . . . . . . . . . . . 4
67 2.1.2 Session Re-use . . . . . . . . . . . . . . . . . . . . . . . 4
68 2.2 SRP Verifier Message Digest Selection . . . . . . . . . . . 5
69 2.3 Changes to the Handshake Message Contents . . . . . . . . . 5
70 2.3.1 Client hello . . . . . . . . . . . . . . . . . . . . . . . . 5
71 2.3.2 Server certificate . . . . . . . . . . . . . . . . . . . . . 5
72 2.3.3 Server key exchange . . . . . . . . . . . . . . . . . . . . 5
73 2.3.4 Client key exchange . . . . . . . . . . . . . . . . . . . . 6
74 2.4 Calculating the Pre-master Secret . . . . . . . . . . . . . 6
75 2.5 Cipher Suite Definitions . . . . . . . . . . . . . . . . . . 6
76 2.6 New Message Structures . . . . . . . . . . . . . . . . . . . 7
77 2.6.1 ExtensionType . . . . . . . . . . . . . . . . . . . . . . . 7
78 2.6.2 Client Hello . . . . . . . . . . . . . . . . . . . . . . . . 7
79 2.6.3 Server Key Exchange . . . . . . . . . . . . . . . . . . . . 7
80 2.6.4 Client Key Exchange . . . . . . . . . . . . . . . . . . . . 9
81 3. Security Considerations . . . . . . . . . . . . . . . . . . 10
82 References . . . . . . . . . . . . . . . . . . . . . . . . . 11
83 Author's Address . . . . . . . . . . . . . . . . . . . . . . 11
84 A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 12
85 Full Copyright Statement . . . . . . . . . . . . . . . . . . 13
112 Taylor Expires May 30, 2003 [Page 2]
114 Internet-Draft Using SRP for TLS Authentication November 2002
119 At the time of writing, TLS uses public key certificiates with RSA/
120 DSA digital signatures, or Kerberos, for authentication.
122 These authentication methods do not seem well suited to the
123 applications now being adapted to use TLS (IMAP [4], FTP [6], or
124 TELNET [7], for example). Given these protocols (and others like
125 them) are designed to use the user name and password method of
126 authentication, being able to safely use user names and passwords to
127 authenticate the TLS connection provides a much easier route to
128 additional security than implementing a public key infrastructure in
131 SRP is an authentication method that allows the use of user names and
132 passwords over unencrypted channels without revealing the password to
133 an eavesdropper. SRP also supplies a shared secret at the end of the
134 authetication sequence that can be used to generate encryption keys.
136 This document describes the use of the SRP authentication method for
139 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
140 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
141 document are to be interpreted as described in RFC 2119.
168 Taylor Expires May 30, 2003 [Page 3]
170 Internet-Draft Using SRP for TLS Authentication November 2002
173 2. SRP Authentication in TLS
175 2.1 Modifications to the TLS Handshake Sequence
177 The advent of SRP-6 [3] allows the SRP protocol to be implemented
178 using the standard sequence of handshake messages defined in [1].
180 The parameters to various messages are given in the following
183 2.1.1 Message Sequence
185 Handshake Message Flow for SRP Authentication
189 Client Hello (I) ------------------------> |
190 | <---------------------------- Server Hello
191 | <---------------------------- Certificate*
192 | <---------------------------- Server Key Exchange (N, g, s, B)
193 | <---------------------------- Server Hello Done
194 Client Key Exchange (A) -----------------> |
195 [Change cipher spec] |
196 Finished --------------------------------> |
197 | [Change cipher spec]
198 | <---------------------------- Finished
200 Application Data <--------------> Application Data
202 * Indicates optional or situation-dependent messages that are not
205 The identifiers given after each message name refer to the SRP
206 variables included in that message. The variables I, N, g, s, A, and
207 B are defined in [3].
209 An extended client hello message, as defined in [8], is used to send
210 the client identifier (the user name).
212 Servers MAY add an SRP extension to the server hello message. For
213 the cipher suites defined in this document no information is carried
214 in the SRP extension in the server hello message. The option to add
215 an SRP extension to the server hello message is given in case it is
220 The short handshake mechanism for re-using sessions for new
224 Taylor Expires May 30, 2003 [Page 4]
226 Internet-Draft Using SRP for TLS Authentication November 2002
229 connections, and renegotiating keys for existing connections will
230 still work with the SRP authentication mechanism and handshake.
232 When a client attemps to re-use a session that uses SRP
233 authentication, it MUST include the SRP extension carrying the user
234 name (I) in the client hello message, in case the server cannot or
235 will not allow re-use of the session, meaning a full handshake
236 sequence is required.
238 If the server does agree to re-use an existing session the server
239 MUST ignore the information in the SRP extension of the client hello
240 message, except for its inclusion in the finished message hashes.
241 This is to ensure attackers cannot replace the authenticated identity
242 without supplying the proper authentication information.
244 2.2 SRP Verifier Message Digest Selection
246 Implementations conforming to this document MUST use the SHA-1
247 message digest with the SRP algorithm.
249 2.3 Changes to the Handshake Message Contents
251 This section describes the changes to the TLS handshake message
252 contents when SRP is being used for authentication. The definitions
253 of the new message contents and the on-the-wire changes are given in
258 The user name is appended to the standard client hello message using
259 the hello message extension mechanism defined in [8].
261 2.3.2 Server certificate
263 The server MUST send a certificate if it agrees to an SRP cipher
264 suite that requires the server to provide additional authentication
265 in the form of a digital signature. See Section 2.5 for details of
266 which ciphersuites defined in this document require a server
267 certificate to be sent.
269 Because the server's certificate is only used for generating a
270 digital signature in SRP cipher suites, the certificate sent MUST
271 contain a public key that can be used for generating digital
274 2.3.3 Server key exchange
276 The server key exchange message contains the prime (N), the generator
280 Taylor Expires May 30, 2003 [Page 5]
282 Internet-Draft Using SRP for TLS Authentication November 2002
285 (g), and the salt value (s) read from the SRP password file based on
286 the value of (I) received in the client hello extension. The server
287 key exchange message also contains the server's public key (B).
289 If the server has sent a certificate message, the server key exchange
290 message MUST be signed.
292 2.3.4 Client key exchange
294 The client key exchange message carries the client's public key (A).
296 2.4 Calculating the Pre-master Secret
298 The shared secret resulting from the SRP calculations (S) (defined in
299 [2]) is used as the pre-master secret.
301 The finished messages perform the same function as the client and
302 server evidence messages (M1 and M2) specified in [2]. If either the
303 client or the server calculate an incorrect value, the finished
304 messages will not be understood, and the connection will be dropped
307 2.5 Cipher Suite Definitions
309 The following cipher suites are added by this draft. The usage of
310 AES ciphersuites is as defined in [5].
312 CipherSuite TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x50 };
314 CipherSuite TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x51 };
316 CipherSuite TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x52 };
318 CipherSuite TLS_SRP_SHA_WITH_AES_128_CBC_SHA = { 0x00,0x53 };
320 CipherSuite TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x54 };
322 CipherSuite TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA = { 0x00,0x55 };
324 CipherSuite TLS_SRP_SHA_WITH_AES_256_CBC_SHA = { 0x00,0x56 };
326 CipherSuite TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x57 };
328 CipherSuite TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA = { 0x00,0x58 };
330 Cipher suites that do not include a digitial signature algorithm
331 identifier assume the server is authenticated by its possesion of the
336 Taylor Expires May 30, 2003 [Page 6]
338 Internet-Draft Using SRP for TLS Authentication November 2002
341 Cipher suites that begin with TLS_SRP_SHA_RSA or TLS_SRP_SHA_DSS
342 require the server to send a certificate message containing a
343 certificate with the specified type of public key, and to sign the
344 server key exchange message using a matching private key.
346 Implementations conforming to this specification MUST implement the
347 TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA ciphersuite, SHOULD implement the
348 TLS_SRP_SHA_WITH_AES_128_CBC_SHA and TLS_SRP_SHA_WITH_AES_256_CBC_SHA
349 ciphersuites, and MAY implement the remaining ciphersuites.
351 2.6 New Message Structures
353 This section shows the structure of the messages passed during a
354 handshake that uses SRP for authentication. The representation
355 language used is the same as that used in [1].
359 A new value, "srp(6)", has been added to the enumerated
360 ExtensionType, defined in [8]. This value MUST be used as the
361 extension number for the SRP extension.
365 The user name (I) is encoded in an SRPExtension structure, and sent
366 in an extended client hello message, using an extension of type
370 enum { client, server } ClientOrServerExtension;
373 select(ClientOrServerExtension) {
375 opaque srp_I<1..2^8-1>;
382 2.6.3 Server Key Exchange
384 When the value of KeyExchangeAlgorithm is set to "srp", the server's
385 SRP parameters are sent in the server key exchange message, encoded
386 in a ServerSRPParams structure.
388 If a certificate is sent to the client the server key exchange
392 Taylor Expires May 30, 2003 [Page 7]
394 Internet-Draft Using SRP for TLS Authentication November 2002
397 message must be signed. The following table gives the
398 SignatureAlgorithm value to be used for each ciphersuite.
400 Ciphersuite SignatureAlgorithm
402 TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA anonymous
404 TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA rsa
406 TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA dsa
408 TLS_SRP_SHA_WITH_AES_128_CBC_SHA anonymous
410 TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA rsa
412 TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA dsa
414 TLS_SRP_SHA_WITH_AES_256_CBC_SHA anonymous
416 TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA rsa
418 TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA dsa
422 select (KeyExchangeAlgorithm) {
424 ServerDHParams params;
425 Signature signed_params;
427 ServerRSAParams params;
428 Signature signed_params;
429 case srp: /* new entry */
430 ServerSRPParams params;
431 Signature signed_params;
436 opaque srp_N<1..2^16-1>;
437 opaque srp_g<1..2^16-1>;
438 opaque srp_s<1..2^8-1>
439 opaque srp_B<1..2^16-1>;
440 } ServerSRPParams; /* SRP parameters */
448 Taylor Expires May 30, 2003 [Page 8]
450 Internet-Draft Using SRP for TLS Authentication November 2002
453 2.6.4 Client Key Exchange
455 When the value of KeyExchangeAlgorithm is set to "srp", the client's
456 ephemeral public key (A) is sent in the client key exchange message,
457 encoded in an ClientSRPPublic structure.
459 An extra value, srp, has been added to the enumerated
460 KeyExchangeAlgorithm, originally defined in TLS [1].
463 select (KeyExchangeAlgorithm) {
464 case rsa: EncryptedPreMasterSecret;
465 case diffie_hellman: ClientDiffieHellmanPublic;
466 case srp: ClientSRPPublic; /* new entry */
470 enum { rsa, diffie_hellman, srp } KeyExchangeAlgorithm;
473 opaque srp_A<1..2^16-1>;
504 Taylor Expires May 30, 2003 [Page 9]
506 Internet-Draft Using SRP for TLS Authentication November 2002
509 3. Security Considerations
511 If an attacker is able to steal the SRP verifier file, the attacker
512 can masquerade as the real host. Filesystem based X.509 certificate
513 installations are vulnerable to a similar attack unless the server's
514 certificate is issued from a PKI that maintains revocation lists, and
515 the client TLS code can both contact the PKI and make use of the
560 Taylor Expires May 30, 2003 [Page 10]
562 Internet-Draft Using SRP for TLS Authentication November 2002
567 [1] Dierks, T. and C. Allen, "The TLS Protocol", RFC 2246, January
570 [2] Wu, T., "The SRP Authentication and Key Exchange System", RFC
571 2945, September 2000.
573 [3] Wu, T., "SRP-6: Improvements and Refinements to the Secure
574 Remote Password Protocol", October 2002.
576 [4] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 2595, June
579 [5] Chown, P., "Advanced Encryption Standard (AES) Ciphersuites for
580 Transport Layer Security (TLS)", RFC 3268, June 2002.
582 [6] Ford-Hutchinson, P., Carpenter, M., Hudson, T., Murray, E. and
583 V. Wiegand, "Securing FTP with TLS", draft-murray-auth-ftp-ssl-
584 09 (work in progress), April 2002.
586 [7] Boe, M. and J. Altman, "TLS-based Telnet Security", draft-ietf-
587 tn3270e-telnet-tls-06 (work in progress), April 2002.
589 [8] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J. and T.
590 Wright, "TLS Extensions", draft-ietf-tls-extensions-05 (work in
591 progress), July 2002.
597 Forge Research Pty Ltd
599 EMail: DavidTaylor@forge.com.au
600 URI: http://www.forge.com.au/
616 Taylor Expires May 30, 2003 [Page 11]
618 Internet-Draft Using SRP for TLS Authentication November 2002
621 Appendix A. Acknowledgements
623 Thanks to all on the IETF tls mailing list for ideas and analysis.
625 Thanks to Tom Wu for adapting the SRP protocol so it fits the
626 standard TLS handshake message sequence.
672 Taylor Expires May 30, 2003 [Page 12]
674 Internet-Draft Using SRP for TLS Authentication November 2002
677 Full Copyright Statement
679 Copyright (C) The Internet Society (2002). All Rights Reserved.
681 This document and translations of it may be copied and furnished to
682 others, and derivative works that comment on or otherwise explain it
683 or assist in its implementation may be prepared, copied, published
684 and distributed, in whole or in part, without restriction of any
685 kind, provided that the above copyright notice and this paragraph are
686 included on all such copies and derivative works. However, this
687 document itself may not be modified in any way, such as by removing
688 the copyright notice or references to the Internet Society or other
689 Internet organizations, except as needed for the purpose of
690 developing Internet standards in which case the procedures for
691 copyrights defined in the Internet Standards process must be
692 followed, or as required to translate it into languages other than
695 The limited permissions granted above are perpetual and will not be
696 revoked by the Internet Society or its successors or assigns.
698 This document and the information contained herein is provided on an
699 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
700 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
701 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
702 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
703 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
707 Funding for the RFC Editor function is currently provided by the
728 Taylor Expires May 30, 2003 [Page 13]