2 TLS Working Group P. Eronen
4 Expires: February 16, 2005 H. Tschofenig
9 Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)
10 draft-ietf-tls-psk-01.txt
14 By submitting this Internet-Draft, I certify that any applicable
15 patent or other IPR claims of which I am aware have been disclosed,
16 and any of which I become aware will be disclosed, in accordance with
19 Internet-Drafts are working documents of the Internet Engineering
20 Task Force (IETF), its areas, and its working groups. Note that
21 other groups may also distribute working documents as
24 Internet-Drafts are draft documents valid for a maximum of six months
25 and may be updated, replaced, or obsoleted by other documents at any
26 time. It is inappropriate to use Internet-Drafts as reference
27 material or to cite them other than as "work in progress."
29 The list of current Internet-Drafts can be accessed at
30 http://www.ietf.org/ietf/1id-abstracts.txt.
32 The list of Internet-Draft Shadow Directories can be accessed at
33 http://www.ietf.org/shadow.html.
35 This Internet-Draft will expire on February 16, 2005.
39 Copyright (C) The Internet Society (2004). All Rights Reserved.
43 This document specifies three sets of new ciphersuites for the
44 Transport Layer Security (TLS) protocol to support authentication
45 based on pre-shared keys. These pre-shared keys are symmetric keys,
46 shared in advance among the communicating parties. The first set of
47 ciphersuites uses only symmetric key operations for authentication.
48 The second set uses a Diffie-Hellman exchange authenticated with a
49 pre-shared key; and the third set combines public key authentication
50 of the server with pre-shared key authentication of the client.
54 Eronen & Tschofenig Expires February 16, 2005 [Page 1]
56 Internet-Draft PSK Ciphersuites for TLS August 2004
61 Usually TLS uses public key certificates [3] or Kerberos [11] for
62 authentication. This document describes how to use symmetric keys
63 (later called pre-shared keys or PSKs), shared in advance among the
64 communicating parties, to establish a TLS connection.
66 There are basically two reasons why one might want to do this:
68 o First, TLS may be used in performance-constrained environments
69 where the CPU power needed for public key operations is not
72 o Second, pre-shared keys may be more convenient from a key
73 management point of view. For instance, in closed environments
74 where the connections are mostly configured manually in advance,
75 it may be easier to configure a PSK than to use certificates.
76 Another case is when the parties already have a mechanism for
77 setting up a shared secret key, and that mechanism could be used
78 to "bootstrap" a key for authenticating a TLS connection.
80 This document specifies three sets of new ciphersuites for TLS.
81 These ciphersuites use new key exchange algorithms, and re-use
82 existing cipher and MAC algorithms from [3] and [2]. A summary of
83 these ciphersuites is shown below.
85 CipherSuite Key Exchange Cipher Hash
87 TLS_PSK_WITH_RC4_128_SHA PSK RC4_128 SHA
88 TLS_PSK_WITH_3DES_EDE_CBC_SHA PSK 3DES_EDE_CBC SHA
89 TLS_PSK_WITH_AES_128_CBC_SHA PSK AES_128_CBC SHA
90 TLS_PSK_WITH_AES_256_CBC_SHA PSK AES_256_CBC SHA
91 TLS_DHE_PSK_WITH_RC4_128_SHA DHE_PSK RC4_128 SHA
92 TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA DHE_PSK 3DES_EDE_CBC SHA
93 TLS_DHE_PSK_WITH_AES_128_CBC_SHA DHE_PSK AES_128_CBC SHA
94 TLS_DHE_PSK_WITH_AES_256_CBC_SHA DHE_PSK AES_256_CBC SHA
95 TLS_RSA_PSK_WITH_RC4_128_SHA RSA_PSK RC4_128 SHA
96 TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA RSA_PSK 3DES_EDE_CBC SHA
97 TLS_RSA_PSK_WITH_AES_128_CBC_SHA RSA_PSK AES_128_CBC SHA
98 TLS_RSA_PSK_WITH_AES_256_CBC_SHA RSA_PSK AES_256_CBC SHA
100 The first set of ciphersuites (with PSK key exchange algorithm),
101 defined in Section 2 use only symmetric key algorithms, and are thus
102 especially suitable for performance-constrained environments.
104 The ciphersuites in Section 3 (with DHE_PSK key exchange algorithm)
105 use a PSK to authenticate a Diffie-Hellman exchange. These
106 ciphersuites give some additional protection against dictionary
110 Eronen & Tschofenig Expires February 16, 2005 [Page 2]
112 Internet-Draft PSK Ciphersuites for TLS August 2004
115 attacks, and also provide Perfect Forward Secrecy (PFS).
117 The third set of ciphersuites (with RSA_PSK key exchange algorithm),
118 defined in Section 4, combine public key based authentication of the
119 server (using RSA and certificates) with mutual authentication using
122 1.1 Applicability statement
124 The ciphersuites defined in this document are intended for a rather
125 limited set of applications, usually involving only a very small
126 number of clients and servers. Even in such environments, other
127 alternatives may be more appropriate.
129 If the main goal is to avoid PKIs, another possibility worth
130 considering is to use self-signed certificates with public key
131 fingerprints. Instead of manually configuring a shared secret in,
132 for instance, some configuration file, a fingerprint (hash) of the
133 other party's public key (or certificate) could be placed there
136 It is also possible to use the SRP (Secure Remote Password)
137 ciphersuites for shared secret authentication [13]. SRP was designed
138 to be used with passwords, and incorporates protection against
139 dictionary attacks. However, it is computationally more expensive
140 than the PSK ciphersuites in Section 2.
142 1.2 Conventions used in this document
144 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
145 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
146 document are to be interpreted as described in [1].
166 Eronen & Tschofenig Expires February 16, 2005 [Page 3]
168 Internet-Draft PSK Ciphersuites for TLS August 2004
171 2. PSK key exchange algorithm
173 This section defines the PSK key exchange algorithm and associated
174 ciphersuites. These ciphersuites use only symmetric key algorithms.
176 It is assumed that the reader is familiar with ordinary TLS
177 handshake, shown below. The elements in parenthesis are not included
178 when PSK key exchange algorithm is used.
183 ClientHello -------->
188 <-------- ServerHelloDone
196 Application Data <-------> Application Data
199 The client indicates its willingness to use pre-shared key
200 authentication by including one or more PSK ciphersuites in the
201 ClientHello message. If the TLS server also wants to use pre-shared
202 keys, it selects one of the PSK ciphersuites, places the selected
203 ciphersuite in the ServerHello message, and includes an appropriate
204 ServerKeyExchange message (see below). The Certificate and
205 CertificateRequest payloads are omitted from the response.
207 Both clients and servers may have pre-shared keys with several
208 different parties. The client indicates which key to use by
209 including a "PSK identity" in the ClientKeyExchange message (note
210 that unlike in [6], the session_id field in ClientHello message keeps
211 its usual meaning). To help the client in selecting which identity
212 to use, the server can provide a "PSK identity hint" in the
213 ServerKeyExchange message (note that if no hint is provided, a
214 ServerKeyExchange message is still sent).
216 This document does not specify the format of the PSK identity or PSK
217 identity hint; neither is specified how exactly the client uses the
218 hint (if it uses it at all). The parties have to agree on the
222 Eronen & Tschofenig Expires February 16, 2005 [Page 4]
224 Internet-Draft PSK Ciphersuites for TLS August 2004
227 identities when the shared secret is configured (however, see Section
228 6 for related security considerations). In situations where the
229 identity is entered by a person, it is RECOMMENDED that the input is
230 processed using an appropriate stringprep [9] profile and encoded in
231 octets using UTF-8 encoding [14]. One possible stringprep profile is
234 The format of the ServerKeyExchange and ClientKeyExchange messages is
238 select (KeyExchangeAlgorithm) {
239 /* other cases for rsa, diffie_hellman, etc. */
241 opaque psk_identity_hint<0..2^16-1>;
246 select (KeyExchangeAlgorithm) {
247 /* other cases for rsa, diffie_hellman, etc. */
249 opaque psk_identity<0..2^16-1>;
253 The premaster secret is formed as follows: If the PSK is N octets
254 long, concatenate N zero octets and the PSK.
256 Note: This effectively means that only the HMAC-SHA1 part of the
257 TLS PRF is used, and the HMAC-MD5 part is not used. See [7] for a
258 more detailed rationale.
260 The TLS handshake is authenticated using the Finished messages as
263 If the server does not recognize the PSK identity, it MAY respond
264 with an "unknown_psk_identity" alert message. Alternatively, if the
265 server wishes to hide the fact that the PSK identity was not known,
266 it MAY continue the protocol as if the PSK identity existed but the
267 key was incorrect: that is, respond with a "decrypt_error" alert.
269 3. DHE_PSK key exchange algorithm
271 This section defines additional ciphersuites that use a PSK to
272 authenticate a Diffie-Hellman exchange. These ciphersuites give some
273 additional protection against dictionary attacks, and also provide
274 Perfect Forward Secrecy (PFS). See Section 6 for discussion of
278 Eronen & Tschofenig Expires February 16, 2005 [Page 5]
280 Internet-Draft PSK Ciphersuites for TLS August 2004
283 related security considerations.
285 When these ciphersuites are used, the ServerKeyExchange and
286 ClientKeyExchange also include the Diffie-Hellman parameters. The
287 PSK identity and identity hint fields have the same meaning as in the
290 The format of the ServerKeyExchange and ClientKeyExchange messages is
294 select (KeyExchangeAlgorithm) {
295 /* other cases for rsa, diffie_hellman, etc. */
296 case diffie_hellman_psk: /* NEW */
297 opaque psk_identity_hint<0..2^16-1>;
298 ServerDHParams params;
303 select (KeyExchangeAlgorithm) {
304 /* other cases for rsa, diffie_hellman, etc. */
305 case diffie_hellman_psk: /* NEW */
306 opaque psk_identity<0..2^16-1>;
307 ClientDiffieHellmanPublic public;
311 The premaster secret is formed as follows: concatenate the value
312 produced by the Diffie-Hellman exchange (with leading zero bytes
313 stripped as in other Diffie-Hellman based ciphersuites) and the PSK,
316 4. RSA_PSK key exchange algorithm
318 The ciphersuites in this section use RSA and certificates to
319 authenticate the server, in addition to using a PSK.
321 As in normal RSA ciphersuites, the server must send a Certificate
322 message. The format of the ServerKeyExchange and ClientKeyExchange
323 messages is shown below.
334 Eronen & Tschofenig Expires February 16, 2005 [Page 6]
336 Internet-Draft PSK Ciphersuites for TLS August 2004
340 select (KeyExchangeAlgorithm) {
341 /* other cases for rsa, diffie_hellman, etc. */
342 case rsa_psk: /* NEW */
343 opaque psk_identity_hint<0..2^16-1>;
348 select (KeyExchangeAlgorithm) {
349 /* other cases for rsa, diffie_hellman, etc. */
350 case rsa_psk: /* NEW */
351 opaque psk_identity<0..2^16-1>;
352 EncryptedPreMasterSecret;
356 The premaster secret is formed as follows: concatenate the 48-byte
357 value generated by the client (and sent to the server in
358 ClientKeyExchange message) and the PSK, in this order.
360 5. IANA considerations
362 (This depends on whether this document is published before or after
365 (If after 1.1) This document does not create any new namespaces to be
366 maintained by IANA, but it requires new values in the ciphersuite
367 namespace defined in TLS 1.1 specification.
369 (If before 1.1) There are no IANA actions associated with this
370 document. For easier reference in the future, the ciphersuite
371 numbers defined in this document are summarized below.
373 CipherSuite TLS_PSK_WITH_RC4_128_SHA = { 0x00, 0xTBD };
374 CipherSuite TLS_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0xTBD };
375 CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0xTBD };
376 CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0xTBD };
377 CipherSuite TLS_DHE_PSK_WITH_RC4_128_SHA = { 0x00, 0xTBD };
378 CipherSuite TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0xTBD };
379 CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0xTBD };
380 CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0xTBD };
381 CipherSuite TLS_RSA_PSK_WITH_RC4_128_SHA = { 0x00, 0xTBD };
382 CipherSuite TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0xTBD };
383 CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0xTBD };
384 CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0xTBD };
386 This document also defines a new TLS alert message,
390 Eronen & Tschofenig Expires February 16, 2005 [Page 7]
392 Internet-Draft PSK Ciphersuites for TLS August 2004
395 unknown_psk_identity(TBD). Since IANA does not maintain a registry
396 of TLS alert messages, no IANA action is needed for this.
398 6. Security Considerations
400 As with all schemes involving shared keys, special care should be
401 taken to protect the shared values and to limit their exposure over
404 6.1 Perfect forward secrecy (PFS)
406 The PSK and RSA_PSK ciphersuites defined in this document do not
407 provide Perfect Forward Secrecy (PFS). That is, if the shared secret
408 key (in PSK ciphersuites), or both the shared secret key and the RSA
409 private key (in RSA_PSK ciphersuites), is somehow compromised, an
410 attacker can decrypt old conversations.
412 The DHE_PSK ciphersuites provide Perfect Forward Secrecy if a fresh
413 DH private key is generated for each handshake.
415 6.2 Brute-force and dictionary attacks
417 Use of a fixed shared secret of limited entropy (such as a password)
418 may allow an attacker to perform a brute-force or dictionary attack
419 to recover the secret. This may be either an off-line attack
420 (against a captured TLS handshake messages), or an on-line attack
421 where the attacker attempts to connect to the server and tries
424 For the PSK ciphersuites, an attacker can get the information
425 required for an off-line attack by eavesdropping a TLS handshake, or
426 by getting a valid client to attempt connection with the attacker (by
427 tricking the client to connect to wrong address, or intercepting a
428 connection attempt to the correct address, for instance).
430 For the DHE_PSK ciphersuites, an attacker can obtain the information
431 by getting a valid client to attempt connection with the attacker.
432 Passive eavesdropping alone is not sufficient.
434 For the RSA_PSK ciphersuites, only the server (authenticated using
435 RSA and certificates) can obtain sufficient information for an
438 It is RECOMMENDED that implementations that allow the administrator
439 to manually configure the PSK also provide a functionality for
440 generating a new random PSK, taking [4] into account.
446 Eronen & Tschofenig Expires February 16, 2005 [Page 8]
448 Internet-Draft PSK Ciphersuites for TLS August 2004
453 The PSK identity is sent in cleartext. While using a user name or
454 other similar string as the PSK identity is the most straightforward
455 option, it may lead to problems in some environments since an
456 eavesdropper is able to identify the communicating parties. Even
457 when the identity does not reveal any information itself, reusing the
458 same identity over time may eventually allow an attacker to perform
459 traffic analysis to identify the parties. It should be noted that
460 this is no worse than client certificates, since they are also sent
463 6.4 Implementation notes
465 The implementation notes in [10] about correct implementation and use
466 of RSA (including Section 7.4.7.1) and Diffie-Hellman (including
467 Appendix F.1.1.3) apply to the DHE_PSK and RSA_PSK ciphersuites as
472 The protocol defined in this document is heavily based on work by Tim
473 Dierks and Peter Gutmann, and borrows some text from [6] and [2].
474 Valuable feedback was also provided by Philip Ginzboorg, Peter
475 Gutmann, David Jablon, Nikos Mavroyanopoulos, Bodo Moeller, and Mika
478 When the first version of this draft was almost ready, the authors
479 learned that something similar had been proposed already in 1996
480 [12]. However, this draft is not intended for web password
481 authentication, but rather for other uses of TLS.
483 The DHE_PSK and RSA_PSK ciphersuites borrow heavily from [5].
487 o Identity privacy could be provided (in DHE_PSK/RSA_PSK versions)
488 by encrypting the psk_identity payload with keys derived from the
489 DH value/RSA-encrypted random (but not PSK). But perhaps this
490 would be an unnecessary complication.
492 o The way the PSK is combined with DH value (and is then used to
493 calculate the Finished message) is not exactly the traditional
494 way. It should be OK with TLS-PRF, though.
502 Eronen & Tschofenig Expires February 16, 2005 [Page 9]
504 Internet-Draft PSK Ciphersuites for TLS August 2004
509 9.1 Normative References
511 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
512 Levels", RFC 2119, March 1997.
514 [2] Chown, P., "Advanced Encryption Standard (AES) Ciphersuites for
515 Transport Layer Security (TLS)", RFC 3268, June 2002.
517 [3] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
520 [4] Eastlake, D., Crocker, S. and J. Schiller, "Randomness
521 Recommendations for Security", RFC 1750, December 1994.
523 9.2 Informative References
525 [5] Badra, M., Cherkaoui, O., Hajjeh, I. and A. Serhrouchni,
526 "Pre-Shared-Key key Exchange methods for TLS",
527 draft-badra-tls-key-exchange-00 (work in progress), August
530 [6] Gutmann, P., "Use of Shared Keys in the TLS Protocol",
531 draft-ietf-tls-sharedkeys-02 (expired), October 2003.
533 [7] Krawczyk, H., "Re: TLS shared keys PRF", message on
534 ietf-tls@lists.certicom.com mailing list 2004-01-13,
535 http://www.imc.org/ietf-tls/mail-archive/msg04098.html.
537 [8] Zeilenga, K., "SASLprep: Stringprep profile for user names and
538 passwords", draft-ietf-sasl-saslprep-10 (work in progress),
541 [9] Hoffman, P. and M. Blanchet, "Preparation of Internationalized
542 Strings ("stringprep")", RFC 3454, December 2002.
544 [10] Dierks, T. and E. Rescorla, "The TLS Protocol Version 1.1",
545 draft-ietf-tls-rfc2246-bis-08 (work in progress), August 2004.
547 [11] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher Suites
548 to Transport Layer Security (TLS)", RFC 2712, October 1999.
550 [12] Simon, D., "Addition of Shared Key Authentication to Transport
551 Layer Security (TLS)", draft-ietf-tls-passauth-00 (expired),
554 [13] Taylor, D., Wu, T., Mavroyanopoulos, N. and T. Perrin, "Using
558 Eronen & Tschofenig Expires February 16, 2005 [Page 10]
560 Internet-Draft PSK Ciphersuites for TLS August 2004
563 SRP for TLS Authentication", draft-ietf-tls-srp-07 (work in
564 progress), June 2004.
566 [14] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
573 Nokia Research Center
575 FIN-00045 Nokia Group
578 EMail: pasi.eronen@nokia.com
587 EMail: Hannes.Tschofenig@siemens.com
589 Appendix A. Changelog
591 (This section should be removed by the RFC Editor before
594 Changes from draft-ietf-tls-psk-00 to -01:
596 o Added DHE_PSK and RSA_PSK key exchange algorithms, and updated
597 other text accordingly
599 o Removed SHA-1 hash from PSK key exchange premaster secret
600 construction (since premaster secret doesn't need to be 48 bytes).
602 o Added unknown_psk_identity alert message.
604 o Updated IANA considerations section.
606 Changes from draft-eronen-tls-psk-00 to draft-ietf-tls-psk-00:
608 o Updated dictionary attack considerations based on comments from
614 Eronen & Tschofenig Expires February 16, 2005 [Page 11]
616 Internet-Draft PSK Ciphersuites for TLS August 2004
619 o Added a recommendation about using UTF-8 in the identity field.
621 o Removed Appendix A comparing this document with
622 draft-ietf-tls-sharedkeys-02.
624 o Removed IPR comment about SPR.
626 o Minor editorial changes.
670 Eronen & Tschofenig Expires February 16, 2005 [Page 12]
672 Internet-Draft PSK Ciphersuites for TLS August 2004
675 Intellectual Property Statement
677 The IETF takes no position regarding the validity or scope of any
678 Intellectual Property Rights or other rights that might be claimed to
679 pertain to the implementation or use of the technology described in
680 this document or the extent to which any license under such rights
681 might or might not be available; nor does it represent that it has
682 made any independent effort to identify any such rights. Information
683 on the procedures with respect to rights in RFC documents can be
684 found in BCP 78 and BCP 79.
686 Copies of IPR disclosures made to the IETF Secretariat and any
687 assurances of licenses to be made available, or the result of an
688 attempt made to obtain a general license or permission for the use of
689 such proprietary rights by implementers or users of this
690 specification can be obtained from the IETF on-line IPR repository at
691 http://www.ietf.org/ipr.
693 The IETF invites any interested party to bring to its attention any
694 copyrights, patents or patent applications, or other proprietary
695 rights that may cover technology that may be required to implement
696 this standard. Please address the information to the IETF at
700 Disclaimer of Validity
702 This document and the information contained herein are provided on an
703 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
704 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
705 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
706 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
707 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
708 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
713 Copyright (C) The Internet Society (2004). This document is subject
714 to the rights, licenses and restrictions contained in BCP 78, and
715 except as set forth therein, the authors retain all their rights.
720 Funding for the RFC Editor function is currently provided by the
726 Eronen & Tschofenig Expires February 16, 2005 [Page 13]