3 Network Working Group P. Eronen
5 Expires: August 6, 2004 H. Tschofenig
10 Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)
11 draft-eronen-tls-psk-00.txt
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 other
20 groups may also distribute working documents as Internet-Drafts.
22 Internet-Drafts are draft documents valid for a maximum of six months
23 and may be updated, replaced, or obsoleted by other documents at any
24 time. It is inappropriate to use Internet-Drafts as reference
25 material or to cite them other than as "work in progress."
27 The list of current Internet-Drafts can be accessed at http://
28 www.ietf.org/ietf/1id-abstracts.txt.
30 The list of Internet-Draft Shadow Directories can be accessed at
31 http://www.ietf.org/shadow.html.
33 This Internet-Draft will expire on August 6, 2004.
37 Copyright (C) The Internet Society (2004). All Rights Reserved.
41 This document specifies new ciphersuites for the Transport Layer
42 Security (TLS) protocol to support authentication based on pre-shared
43 keys. These pre-shared keys are symmetric keys, shared in advance
44 among the communicating parties, and do not require any public key
47 Conventions used in this document
49 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
50 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
51 document are to be interpreted as described in [KEYWORDS].
55 Eronen & Tschofenig Expires August 6, 2004 [Page 1]
57 Internet-Draft PSK Ciphersuites for TLS February 2004
62 Usually TLS uses public key certificates [TLS] or Kerberos [TLS-KRB]
63 for authentication. This document describes how to use symmetric keys
64 (later called pre-shared keys or PSKs), shared in advance among the
65 communicating parties, to establish a TLS connection.
67 There are basically two reasons why one might want to do this:
69 o First, TLS may be used in performance-constrained environments
70 where the CPU power needed for public key operations is not
73 o Second, pre-shared keys may be more convenient from a key
74 management point of view. For instance, in closed environments
75 where the connections are mostly configured manually in advance,
76 it may be easier to configure a PSK than to use certificates.
77 Another case is when the parties already have a mechanism for
78 setting up a shared secret key, and that mechanism could be used
79 to "bootstrap" a key for authenticating a TLS connection.
81 This document specifies a number of new ciphersuites for TLS. These
82 ciphersuites use a new authentication and key exchange algorithm for
83 PSKs, and re-use existing cipher and MAC algorithms from [TLS] and
86 1.1 Applicability statement
88 The ciphersuites defined in this document are intended for a rather
89 limited set of applications, usually involving only a very small
90 number of clients and servers. Even in such environments, other
91 alternatives may be more appropriate.
93 If the main goal is to avoid PKIs, another possibility worth
94 considering is to use self-signed certificates with public key
95 fingerprints. Instead of manually configuring a shared secret in,
96 for instance, some configuration file, a fingerprint (hash) of the
97 other party's public key (or certificate) could be placed there
100 It is also possible to use SRP for shared secret authentication
101 [TLS-SRP]. However, SRP requires more computational resources and may
102 have some IPR issues. However, it does provide protection against
111 Eronen & Tschofenig Expires August 6, 2004 [Page 2]
113 Internet-Draft PSK Ciphersuites for TLS February 2004
118 It is assumed that the reader is familiar with ordinary TLS
119 handshake, shown below. The elements in parenthesis are not included
120 in PSK-based ciphersuites.
125 ClientHello -------->
130 <-------- ServerHelloDone
138 Application Data <-------> Application Data
141 The client indicates its willingness to use pre-shared key
142 authentication by including one or more PSK-based ciphersuites in the
143 ClientHello message. The following ciphersuites are defined in this
146 CipherSuite TLS_PSK_WITH_RC4_128_SHA = { 0x00, 0xTBD };
147 CipherSuite TLS_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0xTBD };
148 CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0xTBD };
149 CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0xTBD };
151 Note that this document defines only a new authentication and key
152 exchange algorithm; see [TLS] and [TLS-AES] for description of the
153 cipher and MAC algorithms.
155 If the TLS server also wants to use pre-shared keys, it selects one
156 of the PSK ciphersuites, places the selected ciphersuite in the
157 ServerHello message, and includes an appropriate ServerKeyExchange
158 message (see below). The Certificate and CertificateRequest payloads
159 are omitted from the response.
161 Both clients and servers may have pre-shared keys with several
162 different parties. The client indicates which key to use by including
163 a "PSK identity" in the ClientKeyExchange message (note that unlike
167 Eronen & Tschofenig Expires August 6, 2004 [Page 3]
169 Internet-Draft PSK Ciphersuites for TLS February 2004
172 in [TLS-SHAREDKEYS], the session_id field in ClientHello message
173 keeps its usual meaning). To help the client in selecting which
174 identity to use, the server can provide a "PSK identity hint" in the
175 ServerKeyExchange message (note that if no hint is provided, a
176 ServerKeyExchange message is still sent).
178 This document does not specify the format of the PSK identity or PSK
179 identity hint; neither is specified how exactly the client uses the
180 hint (if it uses it at all). The parties have to agree on the
181 identities when the shared secret is configured (however, see Section
182 4 for related security considerations).
184 The format of the ServerKeyExchange and ClientKeyExchange messages is
188 select (KeyExchangeAlgorithm) {
190 ServerDHParams params;
191 Signature signed_params;
193 ServerRSAParams params;
194 Signature signed_params;
196 opaque psk_identity_hint<0..2^16-1>;
201 select (KeyExchangeAlgorithm) {
202 case rsa: EncryptedPreMasterSecret;
203 case diffie_hellman: ClientDiffieHellmanPublic;
204 case psk: opaque psk_identity<0..2^16-1>; /* NEW */
208 The premaster secret is formed as follows: concatenate 24 zero
209 octets, followed by SHA-1 hash [FIPS180-2] of the PSK itself,
210 followed by 4 zero octets.
212 Note: This effectively means that only the HMAC-SHA1 part of the
213 TLS PRF is used, and the HMAC-MD5 part is not used. See
214 [Krawczyk20040113] for a more detailed rationale. The PSK is first
215 hashed so that PSKs longer than 24 octets can be used; this is
216 similar to what is done in [HMAC] if the key length is longer than
219 If the server does not recognize the PSK identity, it SHOULD respond
223 Eronen & Tschofenig Expires August 6, 2004 [Page 4]
225 Internet-Draft PSK Ciphersuites for TLS February 2004
228 with a decrypt_error alert message. This alert is also sent if
229 validating the Finished message fails. The use of the same alert
230 message makes it more difficult to find out which PSK identities are
233 3. IANA considerations
235 This document does not define any new namespaces to be managed by
236 IANA. It does require assignment of several new ciphersuite numbers,
237 but it is unclear how this is done, since the TLS spec does not say
238 who is responsible for assigning them :-)
240 4. Security Considerations
242 As with all schemes involving shared keys, special care should be
243 taken to protect the shared values and to limit their exposure over
246 The ciphersuites defined in this document do not provide Perfect
247 Forward Secrecy (PFS). That is, if the shared secret key is somehow
248 compromised, an attacker can decrypt old conversations. (Note that
249 the most popular TLS key exchange algorithm, RSA, does not provide
252 Use of a fixed shared secret of limited entropy (such as a password)
253 allows an attacker to perform a brute-force or dictionary attack to
254 recover the secret. This may be either an off-line attack (against a
255 captured TLS conversation), or an on-line attack where the attacker
256 tries to connect to the server and tries different keys. Note that
257 the protocol requires the client to prove it knows the key first, so
258 just attempting to connect to a server does not reveal information
259 required for an off-line attack. It is RECOMMENDED that
260 implementations that allow the administrator to manually configure
261 the PSK also provide a functionality for generating a new random PSK,
262 taking [RANDOMNESS] into account.
264 The PSK identity is sent in cleartext. While using a user name or
265 other similar string as the PSK identity is the most straightforward
266 option, it may lead to problems in some environments since an
267 eavesdropper is able to identify the communicating parties. Even when
268 the identity does not reveal any information itself, reusing the same
269 identity over time may eventually allow an attacker to use traffic
270 analysis to the identify parties. It should be noted that this is no
271 worse than client certificates, since they are also sent in
279 Eronen & Tschofenig Expires August 6, 2004 [Page 5]
281 Internet-Draft PSK Ciphersuites for TLS February 2004
286 The protocol defined in this document is heavily based on work by Tim
287 Dierks and Peter Gutmann, and borrows some text from [TLS-SHAREDKEYS]
288 and [TLS-AES]. Valuable feedback was also provided by Peter Gutmann
291 When the first version of this draft was almost ready, the authors
292 learned that something similar had been proposed already in 1996
293 [TLS-PASSAUTH]. However, this draft is not intended for web password
294 authentication, but rather other uses of TLS.
299 Bradner, S., "Key words for use in RFCs to Indicate
300 Requirement Levels", RFC 2119, March 1997.
302 [TLS-AES] Chown, P., "Advanced Encryption Standard (AES)
303 Ciphersuites for Transport Layer Security (TLS)", RFC
306 [TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
307 RFC 2246, January 1999.
310 Eastlake, D., Crocker, S. and J. Schiller, "Randomness
311 Recommendations for Security", RFC 1750, December 1994.
314 National Institute of Standards and Technology,
315 "Specifications for the Secure Hash Standard", Federal
316 Information Processing Standard (FIPS) Publication 180-2,
319 Informative References
322 Gutmann, P., "Use of Shared Keys in the TLS Protocol",
323 draft-ietf-tls-sharedkeys-02 (work in progress), October
326 [HMAC] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC:
327 Keyed-Hashing for Message Authentication", RFC 2104,
331 Krawczyk, H., "Re: TLS shared keys PRF", message on
335 Eronen & Tschofenig Expires August 6, 2004 [Page 6]
337 Internet-Draft PSK Ciphersuites for TLS February 2004
340 ietf-tls@lists.certicom.com mailing list 2004-01-13,
341 http://www.imc.org/ietf-tls/mail-archive/msg04098.html.
343 [TLS-KRB] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher
344 Suites to Transport Layer Security (TLS)", RFC 2712,
348 Simon, D., "Addition of Shared Key Authentication to
349 Transport Layer Security (TLS)",
350 draft-ietf-tls-passauth-00 (expired), November 1996.
352 [TLS-SRP] Taylor, D., Wu, T., Mavroyanopoulos, N. and T. Perrin,
353 "Using SRP for TLS Authentication", draft-ietf-tls-srp-06
354 (work in progress), January 2004.
360 Nokia Research Center
362 FIN-00045 Nokia Group
365 EMail: pasi.eronen@nokia.com
374 EMail: Hannes.Tschofenig@siemens.com
376 Appendix A. Comparison with draft-ietf-tls-sharedkeys-02 (informative)
378 [TLS-SHAREDKEYS] presents another way to use shared keys with TLS.
379 Instead of defining new ciphersuites, it re-uses the TLS session
380 cache and session resumption functionality.
382 The approach presented in this document is, in our opinion, more
383 elegant and better in line with the design of TLS. However, it does
384 probably require more changes to existing TLS implementations.
385 Nevertheless, these changes should be rather straightforward,
386 especially for implementations that already support multiple key
387 exchange algorithms and have a modular architecture.
391 Eronen & Tschofenig Expires August 6, 2004 [Page 7]
393 Internet-Draft PSK Ciphersuites for TLS February 2004
396 The changes required are roughly the following:
398 1. An API to pass psk_identities and keys around from the application
399 to the TLS library. Most likely, both push-style interface (use
400 this psk_identity and key) and callbacks (given a psk_identity,
401 fetch corresponding shared secret) would be useful.
403 2. An API to determine which psk_identity was used for a session.
405 3. PSK ciphersuite identifiers must be added to the list of supported
408 4. Processing of PSK messages in the handshake code.
410 The session-cache based approach probably requires the following
411 changes (depending on details of the TLS implementation):
413 1. Most TLS implementations do not expose an API that allows detailed
414 modification of the session cache, so some modifications are
415 required (especially if the implementation is done in some
416 reasonably type-safe language, the application cannot just use
417 some pointer tricks to access private data structures).
419 On the client side, we need an API to communicate session_id, key
420 and whatever is used to look up entries from the session cache
421 (for instance, some implementations use IP address and port
422 number) to the TLS implementation (and initialize other session
423 cache fields to some sensible values).
425 On the server side, we need to communicate session_id and key.
426 Most likely, both push-style interface (use this session_id and
427 key) and pull callbacks (given a session_id, fetch corresponding
428 shared secret) would be useful (but callbacks may require more
431 2. An API to determine which session_id was used (and to determine if
432 shared secret or normal RSA was used).
434 3. The session resumption code normally checks that resumed sessions
435 use the same ciphersuite as the original session. Unless a single
436 ciphersuite is hardcoded to the session cache, this code has to be
437 modified (and the session cache needs a flag indicating which
438 entries were created using ordinary handshake and which using
439 shared-secret API--unless the check is omitted for all sessions,
440 breaking TLS 1.0 rules).
447 Eronen & Tschofenig Expires August 6, 2004 [Page 8]
449 Internet-Draft PSK Ciphersuites for TLS February 2004
452 4. If the TLS implementation supports compression, resumed sessions
453 must use the same compression method as the original. Either
454 compressions has to be disabled or this code modified.
456 5. TLS implementation should also check that the resumed session uses
457 the same protocol version; this needs changes as well, unless a
458 single version number is hardcoded.
460 6. The session cache code may need modifications to ensure the stored
461 entries actually stay there long enough to be useful. Currently
462 implementations are free to discard entries whenever they want.
463 However, probably most implementations would not require any
503 Eronen & Tschofenig Expires August 6, 2004 [Page 9]
505 Internet-Draft PSK Ciphersuites for TLS February 2004
508 Intellectual Property Statement
510 The IETF takes no position regarding the validity or scope of any
511 intellectual property or other rights that might be claimed to
512 pertain to the implementation or use of the technology described in
513 this document or the extent to which any license under such rights
514 might or might not be available; neither does it represent that it
515 has made any effort to identify any such rights. Information on the
516 IETF's procedures with respect to rights in standards-track and
517 standards-related documentation can be found in BCP-11. Copies of
518 claims of rights made available for publication and any assurances of
519 licenses to be made available, or the result of an attempt made to
520 obtain a general license or permission for the use of such
521 proprietary rights by implementors or users of this specification can
522 be obtained from the IETF Secretariat.
524 The IETF invites any interested party to bring to its attention any
525 copyrights, patents or patent applications, or other proprietary
526 rights which may cover technology that may be required to practice
527 this standard. Please address the information to the IETF Executive
531 Full Copyright Statement
533 Copyright (C) The Internet Society (2004). All Rights Reserved.
535 This document and translations of it may be copied and furnished to
536 others, and derivative works that comment on or otherwise explain it
537 or assist in its implementation may be prepared, copied, published
538 and distributed, in whole or in part, without restriction of any
539 kind, provided that the above copyright notice and this paragraph are
540 included on all such copies and derivative works. However, this
541 document itself may not be modified in any way, such as by removing
542 the copyright notice or references to the Internet Society or other
543 Internet organizations, except as needed for the purpose of
544 developing Internet standards in which case the procedures for
545 copyrights defined in the Internet Standards process must be
546 followed, or as required to translate it into languages other than
549 The limited permissions granted above are perpetual and will not be
550 revoked by the Internet Society or its successors or assignees.
552 This document and the information contained herein is provided on an
553 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
554 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
555 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
559 Eronen & Tschofenig Expires August 6, 2004 [Page 10]
561 Internet-Draft PSK Ciphersuites for TLS February 2004
564 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
565 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
570 Funding for the RFC Editor function is currently provided by the
615 Eronen & Tschofenig Expires August 6, 2004 [Page 11]