Debian Codegraph @

rfc4279.html

raw
1 <pre>Network Working Group P. Eronen, Ed.
2 Request for Comments: 4279 Nokia
3 Category: Standards Track H. Tschofenig, Ed.
4 Siemens
5 December 2005
6
7
8 <span class="h1">Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)</span>
9
10 Status of This Memo
11
12 This document specifies an Internet standards track protocol for the
13 Internet community, and requests discussion and suggestions for
14 improvements. Please refer to the current edition of the "Internet
15 Official Protocol Standards" (STD 1) for the standardization state
16 and status of this protocol. Distribution of this memo is unlimited.
17
18 Copyright Notice
19
20 Copyright (C) The Internet Society (2005).
21
22 Abstract
23
24 This document specifies three sets of new ciphersuites for the
25 Transport Layer Security (TLS) protocol to support authentication
26 based on pre-shared keys (PSKs). These pre-shared keys are symmetric
27 keys, shared in advance among the communicating parties. The first
28 set of ciphersuites uses only symmetric key operations for
29 authentication. The second set uses a Diffie-Hellman exchange
30 authenticated with a pre-shared key, and the third set combines
31 public key authentication of the server with pre-shared key
32 authentication of the client.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
55
56
57 Table of Contents
58
59 <a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
60 <a href="#section-1.1">1.1</a>. Applicability Statement ....................................<a href="#page-3">3</a>
61 <a href="#section-1.2">1.2</a>. Conventions Used in This Document ..........................<a href="#page-4">4</a>
62 <a href="#section-2">2</a>. PSK Key Exchange Algorithm ......................................<a href="#page-4">4</a>
63 <a href="#section-3">3</a>. DHE_PSK Key Exchange Algorithm ..................................<a href="#page-6">6</a>
64 <a href="#section-4">4</a>. RSA_PSK Key Exchange Algorithm ..................................<a href="#page-7">7</a>
65 <a href="#section-5">5</a>. Conformance Requirements ........................................<a href="#page-8">8</a>
66 <a href="#section-5.1">5.1</a>. PSK Identity Encoding ......................................<a href="#page-8">8</a>
67 <a href="#section-5.2">5.2</a>. Identity Hint ..............................................<a href="#page-9">9</a>
68 <a href="#section-5.3">5.3</a>. Requirements for TLS Implementations .......................<a href="#page-9">9</a>
69 <a href="#section-5.4">5.4</a>. Requirements for Management Interfaces .....................<a href="#page-9">9</a>
70 <a href="#section-6">6</a>. IANA Considerations ............................................<a href="#page-10">10</a>
71 <a href="#section-7">7</a>. Security Considerations ........................................<a href="#page-10">10</a>
72 <a href="#section-7.1">7.1</a>. Perfect Forward Secrecy (PFS) .............................<a href="#page-10">10</a>
73 <a href="#section-7.2">7.2</a>. Brute-Force and Dictionary Attacks ........................<a href="#page-10">10</a>
74 <a href="#section-7.3">7.3</a>. Identity Privacy ..........................................<a href="#page-11">11</a>
75 <a href="#section-7.4">7.4</a>. Implementation Notes ......................................<a href="#page-11">11</a>
76 <a href="#section-8">8</a>. Acknowledgements ...............................................<a href="#page-11">11</a>
77 <a href="#section-9">9</a>. References .....................................................<a href="#page-12">12</a>
78 <a href="#section-9.1">9.1</a>. Normative References ......................................<a href="#page-12">12</a>
79 <a href="#section-9.2">9.2</a>. Informative References ....................................<a href="#page-12">12</a>
80
81 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
82
83 Usually, TLS uses public key certificates [<a href="#ref-TLS" title="&quot;The TLS Protocol Version 1.0&quot;">TLS</a>] or Kerberos [<a href="#ref-KERB" title="&quot;Addition of Kerberos Cipher Suites to Transport Layer Security (TLS)&quot;">KERB</a>]
84 for authentication. This document describes how to use symmetric
85 keys (later called pre-shared keys or PSKs), shared in advance among
86 the communicating parties, to establish a TLS connection.
87
88 There are basically two reasons why one might want to do this:
89
90 o First, using pre-shared keys can, depending on the ciphersuite,
91 avoid the need for public key operations. This is useful if TLS
92 is used in performance-constrained environments with limited CPU
93 power.
94
95 o Second, pre-shared keys may be more convenient from a key
96 management point of view. For instance, in closed environments
97 where the connections are mostly configured manually in advance,
98 it may be easier to configure a PSK than to use certificates.
99 Another case is when the parties already have a mechanism for
100 setting up a shared secret key, and that mechanism could be used
101 to "bootstrap" a key for authenticating a TLS connection.
102
103
104
105
106
107
108 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
111
112
113 This document specifies three sets of new ciphersuites for TLS.
114 These ciphersuites use new key exchange algorithms, and reuse
115 existing cipher and MAC algorithms from [<a href="#ref-TLS" title="&quot;The TLS Protocol Version 1.0&quot;">TLS</a>] and [<a href="#ref-AES" title="&quot;Advanced Encryption Standard (AES) Ciphersuites for Transport Layer Security (TLS)&quot;">AES</a>]. A summary
116 of these ciphersuites is shown below.
117
118 CipherSuite Key Exchange Cipher Hash
119
120 TLS_PSK_WITH_RC4_128_SHA PSK RC4_128 SHA
121 TLS_PSK_WITH_3DES_EDE_CBC_SHA PSK 3DES_EDE_CBC SHA
122 TLS_PSK_WITH_AES_128_CBC_SHA PSK AES_128_CBC SHA
123 TLS_PSK_WITH_AES_256_CBC_SHA PSK AES_256_CBC SHA
124 TLS_DHE_PSK_WITH_RC4_128_SHA DHE_PSK RC4_128 SHA
125 TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA DHE_PSK 3DES_EDE_CBC SHA
126 TLS_DHE_PSK_WITH_AES_128_CBC_SHA DHE_PSK AES_128_CBC SHA
127 TLS_DHE_PSK_WITH_AES_256_CBC_SHA DHE_PSK AES_256_CBC SHA
128 TLS_RSA_PSK_WITH_RC4_128_SHA RSA_PSK RC4_128 SHA
129 TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA RSA_PSK 3DES_EDE_CBC SHA
130 TLS_RSA_PSK_WITH_AES_128_CBC_SHA RSA_PSK AES_128_CBC SHA
131 TLS_RSA_PSK_WITH_AES_256_CBC_SHA RSA_PSK AES_256_CBC SHA
132
133 The ciphersuites in <a href="#section-2">Section 2</a> (with PSK key exchange algorithm) use
134 only symmetric key algorithms and are thus especially suitable for
135 performance-constrained environments.
136
137 The ciphersuites in <a href="#section-3">Section 3</a> (with DHE_PSK key exchange algorithm)
138 use a PSK to authenticate a Diffie-Hellman exchange. These
139 ciphersuites protect against dictionary attacks by passive
140 eavesdroppers (but not active attackers) and also provide Perfect
141 Forward Secrecy (PFS).
142
143 The ciphersuites in <a href="#section-4">Section 4</a> (with RSA_PSK key exchange algorithm)
144 combine public-key-based authentication of the server (using RSA and
145 certificates) with mutual authentication using a PSK.
146
147 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Applicability Statement</span>
148
149 The ciphersuites defined in this document are intended for a rather
150 limited set of applications, usually involving only a very small
151 number of clients and servers. Even in such environments, other
152 alternatives may be more appropriate.
153
154 If the main goal is to avoid Public-Key Infrastructures (PKIs),
155 another possibility worth considering is using self-signed
156 certificates with public key fingerprints. Instead of manually
157 configuring a shared secret in, for instance, some configuration
158 file, a fingerprint (hash) of the other party's public key (or
159 certificate) could be placed there instead.
160
161
162
163
164 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
167
168
169 It is also possible to use the SRP (Secure Remote Password)
170 ciphersuites for shared secret authentication [<a href="#ref-SRP" title="&quot;Using SRP for TLS Authentication&quot;">SRP</a>]. SRP was
171 designed to be used with passwords, and it incorporates protection
172 against dictionary attacks. However, it is computationally more
173 expensive than the PSK ciphersuites in <a href="#section-2">Section 2</a>.
174
175 <span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Conventions Used in This Document</span>
176
177 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
178 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
179 document are to be interpreted as described in [<a href="#ref-KEYWORDS" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">KEYWORDS</a>].
180
181 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. PSK Key Exchange Algorithm</span>
182
183 This section defines the PSK key exchange algorithm and associated
184 ciphersuites. These ciphersuites use only symmetric key algorithms.
185
186 It is assumed that the reader is familiar with the ordinary TLS
187 handshake, shown below. The elements in parenthesis are not included
188 when the PSK key exchange algorithm is used, and "*" indicates a
189 situation-dependent message that is not always sent.
190
191 Client Server
192 ------ ------
193
194 ClientHello --------&gt;
195 ServerHello
196 (Certificate)
197 ServerKeyExchange*
198 (CertificateRequest)
199 &lt;-------- ServerHelloDone
200 (Certificate)
201 ClientKeyExchange
202 (CertificateVerify)
203 ChangeCipherSpec
204 Finished --------&gt;
205 ChangeCipherSpec
206 &lt;-------- Finished
207 Application Data &lt;-------&gt; Application Data
208
209 The client indicates its willingness to use pre-shared key
210 authentication by including one or more PSK ciphersuites in the
211 ClientHello message. If the TLS server also wants to use pre-shared
212 keys, it selects one of the PSK ciphersuites, places the selected
213 ciphersuite in the ServerHello message, and includes an appropriate
214 ServerKeyExchange message (see below). The Certificate and
215 CertificateRequest payloads are omitted from the response.
216
217
218
219
220 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
223
224
225 Both clients and servers may have pre-shared keys with several
226 different parties. The client indicates which key to use by
227 including a "PSK identity" in the ClientKeyExchange message (note
228 that unlike in [<a href="#ref-SHAREDKEYS" title="&quot;Use of Shared Keys in the TLS Protocol&quot;">SHAREDKEYS</a>], the session_id field in ClientHello
229 message keeps its usual meaning). To help the client in selecting
230 which identity to use, the server can provide a "PSK identity hint"
231 in the ServerKeyExchange message. If no hint is provided, the
232 ServerKeyExchange message is omitted. See <a href="#section-5">Section 5</a> for a more
233 detailed description of these fields.
234
235 The format of the ServerKeyExchange and ClientKeyExchange messages is
236 shown below.
237
238 struct {
239 select (KeyExchangeAlgorithm) {
240 /* other cases for rsa, diffie_hellman, etc. */
241 case psk: /* NEW */
242 opaque psk_identity_hint&lt;0..2^16-1&gt;;
243 };
244 } ServerKeyExchange;
245
246 struct {
247 select (KeyExchangeAlgorithm) {
248 /* other cases for rsa, diffie_hellman, etc. */
249 case psk: /* NEW */
250 opaque psk_identity&lt;0..2^16-1&gt;;
251 } exchange_keys;
252 } ClientKeyExchange;
253
254 The premaster secret is formed as follows: if the PSK is N octets
255 long, concatenate a uint16 with the value N, N zero octets, a second
256 uint16 with the value N, and the PSK itself.
257
258 Note 1: All the ciphersuites in this document share the same
259 general structure for the premaster secret, namely,
260
261 struct {
262 opaque other_secret&lt;0..2^16-1&gt;;
263 opaque psk&lt;0..2^16-1&gt;;
264 };
265
266 Here "other_secret" either is zeroes (plain PSK case) or comes
267 from the Diffie-Hellman or RSA exchange (DHE_PSK and RSA_PSK,
268 respectively). See Sections <a href="#section-3">3</a> and <a href="#section-4">4</a> for a more detailed
269 description.
270
271 Note 2: Using zeroes for "other_secret" effectively means that
272 only the HMAC-SHA1 part (but not the HMAC-MD5 part) of the TLS PRF
273
274
275
276 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
279
280
281 is used when constructing the master secret. This was considered
282 more elegant from an analytical viewpoint than, for instance,
283 using the same key for both the HMAC-MD5 and HMAC-SHA1 parts. See
284 [<a href="#ref-KRAWCZYK" title="&quot;Re: TLS shared keys PRF&quot;">KRAWCZYK</a>] for a more detailed rationale.
285
286 The TLS handshake is authenticated using the Finished messages as
287 usual.
288
289 If the server does not recognize the PSK identity, it MAY respond
290 with an "unknown_psk_identity" alert message. Alternatively, if the
291 server wishes to hide the fact that the PSK identity was not known,
292 it MAY continue the protocol as if the PSK identity existed but the
293 key was incorrect: that is, respond with a "decrypt_error" alert.
294
295 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. DHE_PSK Key Exchange Algorithm</span>
296
297 This section defines additional ciphersuites that use a PSK to
298 authenticate a Diffie-Hellman exchange. These ciphersuites give some
299 additional protection against dictionary attacks and also provide
300 Perfect Forward Secrecy (PFS). See <a href="#section-7">Section 7</a> for discussion of
301 related security considerations.
302
303 When these ciphersuites are used, the ServerKeyExchange and
304 ClientKeyExchange messages also include the Diffie-Hellman
305 parameters. The PSK identity and identity hint fields have the same
306 meaning as in the previous section (note that the ServerKeyExchange
307 message is always sent, even if no PSK identity hint is provided).
308
309 The format of the ServerKeyExchange and ClientKeyExchange messages is
310 shown below.
311
312 struct {
313 select (KeyExchangeAlgorithm) {
314 /* other cases for rsa, diffie_hellman, etc. */
315 case diffie_hellman_psk: /* NEW */
316 opaque psk_identity_hint&lt;0..2^16-1&gt;;
317 ServerDHParams params;
318 };
319 } ServerKeyExchange;
320
321 struct {
322 select (KeyExchangeAlgorithm) {
323 /* other cases for rsa, diffie_hellman, etc. */
324 case diffie_hellman_psk: /* NEW */
325 opaque psk_identity&lt;0..2^16-1&gt;;
326 ClientDiffieHellmanPublic public;
327 } exchange_keys;
328 } ClientKeyExchange;
329
330
331
332 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
335
336
337 The premaster secret is formed as follows. First, perform the
338 Diffie-Hellman computation in the same way as for other
339 Diffie-Hellman-based ciphersuites in [<a href="#ref-TLS" title="&quot;The TLS Protocol Version 1.0&quot;">TLS</a>]. Let Z be the value
340 produced by this computation (with leading zero bytes stripped as in
341 other Diffie-Hellman-based ciphersuites). Concatenate a uint16
342 containing the length of Z (in octets), Z itself, a uint16 containing
343 the length of the PSK (in octets), and the PSK itself.
344
345 This corresponds to the general structure for the premaster secrets
346 (see Note 1 in <a href="#section-2">Section 2</a>) in this document, with "other_secret"
347 containing Z.
348
349 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. RSA_PSK Key Exchange Algorithm</span>
350
351 The ciphersuites in this section use RSA and certificates to
352 authenticate the server, in addition to using a PSK.
353
354 As in normal RSA ciphersuites, the server must send a Certificate
355 message. The format of the ServerKeyExchange and ClientKeyExchange
356 messages is shown below. If no PSK identity hint is provided, the
357 ServerKeyExchange message is omitted.
358
359 struct {
360 select (KeyExchangeAlgorithm) {
361 /* other cases for rsa, diffie_hellman, etc. */
362 case rsa_psk: /* NEW */
363 opaque psk_identity_hint&lt;0..2^16-1&gt;;
364 };
365 } ServerKeyExchange;
366
367 struct {
368 select (KeyExchangeAlgorithm) {
369 /* other cases for rsa, diffie_hellman, etc. */
370 case rsa_psk: /* NEW */
371 opaque psk_identity&lt;0..2^16-1&gt;;
372 EncryptedPreMasterSecret;
373 } exchange_keys;
374 } ClientKeyExchange;
375
376 The EncryptedPreMasterSecret field sent from the client to the server
377 contains a 2-byte version number and a 46-byte random value,
378 encrypted using the server's RSA public key as described in <a href="#section-7.4.7.1">Section</a>
379 <a href="#section-7.4.7.1">7.4.7.1</a> of [<a href="#ref-TLS" title="&quot;The TLS Protocol Version 1.0&quot;">TLS</a>]. The actual premaster secret is formed by both
380 parties as follows: concatenate a uint16 with the value 48, the
381 2-byte version number and the 46-byte random value, a uint16
382 containing the length of the PSK (in octets), and the PSK itself.
383 (The premaster secret is thus 52 octets longer than the PSK.)
384
385
386
387
388 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
391
392
393 This corresponds to the general structure for the premaster secrets
394 (see Note 1 in <a href="#section-2">Section 2</a>) in this document, with "other_secret"
395 containing both the 2-byte version number and the 46-byte random
396 value.
397
398 Neither the normal RSA ciphersuites nor these RSA_PSK ciphersuites
399 themselves specify what the certificates contain (in addition to the
400 RSA public key), or how the certificates are to be validated. In
401 particular, it is possible to use the RSA_PSK ciphersuites with
402 unvalidated self-signed certificates to provide somewhat similar
403 protection against dictionary attacks, as the DHE_PSK ciphersuites
404 define in <a href="#section-3">Section 3</a>.
405
406 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Conformance Requirements</span>
407
408 It is expected that different types of identities are useful for
409 different applications running over TLS. This document does not
410 therefore mandate the use of any particular type of identity (such as
411 IPv4 address or Fully Qualified Domain Name (FQDN)).
412
413 However, the TLS client and server clearly have to agree on the
414 identities and keys to be used. To improve interoperability, this
415 document places requirements on how the identity is encoded in the
416 protocol, and what kinds of identities and keys implementations have
417 to support.
418
419 The requirements for implementations are divided into two categories,
420 requirements for TLS implementations and management interfaces. In
421 this context, "TLS implementation" refers to a TLS library or module
422 that is intended to be used for several different purposes, while
423 "management interface" would typically be implemented by a particular
424 application that uses TLS.
425
426 This document does not specify how the server stores the keys and
427 identities, or how exactly it finds the key corresponding to the
428 identity it receives. For instance, if the identity is a domain
429 name, it might be appropriate to do a case-insensitive lookup. It is
430 RECOMMENDED that before looking up the key, the server processes the
431 PSK identity with a stringprep profile [<a href="#ref-STRINGPREP" title="&quot;Preparation of Internationalized Strings (&quot;">STRINGPREP</a>] appropriate for
432 the identity in question (such as Nameprep [<a href="#ref-NAMEPREP" title="&quot;Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)&quot;">NAMEPREP</a>] for components
433 of domain names or SASLprep for usernames [<a href="#ref-SASLPREP" title="&quot;SASLprep: Stringprep Profile for User Names and Passwords&quot;">SASLPREP</a>]).
434
435 <span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. PSK Identity Encoding</span>
436
437 The PSK identity MUST be first converted to a character string, and
438 then encoded to octets using UTF-8 [<a href="#ref-UTF8" title="&quot;UTF-8, a transformation format of ISO 10646&quot;">UTF8</a>]. For instance,
439
440
441
442
443
444 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
447
448
449 o IPv4 addresses are sent as dotted-decimal strings (e.g.,
450 "192.0.2.1"), not as 32-bit integers in network byte order.
451
452 o Domain names are sent in their usual text form [<a href="#ref-DNS" title="&quot;Domain names - implementation and specification&quot;">DNS</a>] (e.g.,
453 "www.example.com" or "embedded\.dot.example.net"), not in DNS
454 protocol format.
455
456 o X.500 Distinguished Names are sent in their string representation
457 [<a href="#ref-LDAPDN" title="&quot;LDAP: String Representation of Distinguished Names&quot;">LDAPDN</a>], not as BER-encoded ASN.1.
458
459 This encoding is clearly not optimal for many types of identities.
460 It was chosen to avoid identity-type-specific parsing and encoding
461 code in implementations where the identity is configured by a person
462 using some kind of management interface. Requiring such identity-
463 type-specific code would also increase the chances for
464 interoperability problems resulting from different implementations
465 supporting different identity types.
466
467 <span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Identity Hint</span>
468
469 In the absence of an application profile specification specifying
470 otherwise, servers SHOULD NOT provide an identity hint and clients
471 MUST ignore the identity hint field. Applications that do use this
472 field MUST specify its contents, how the value is chosen by the TLS
473 server, and what the TLS client is expected to do with the value.
474
475 <span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Requirements for TLS Implementations</span>
476
477 TLS implementations supporting these ciphersuites MUST support
478 arbitrary PSK identities up to 128 octets in length, and arbitrary
479 PSKs up to 64 octets in length. Supporting longer identities and
480 keys is RECOMMENDED.
481
482 <span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Requirements for Management Interfaces</span>
483
484 In the absence of an application profile specification specifying
485 otherwise, a management interface for entering the PSK and/or PSK
486 identity MUST support the following:
487
488 o Entering PSK identities consisting of up to 128 printable Unicode
489 characters. Supporting as wide a character repertoire and as long
490 identities as feasible is RECOMMENDED.
491
492 o Entering PSKs up to 64 octets in length as ASCII strings and in
493 hexadecimal encoding.
494
495
496
497
498
499
500 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
503
504
505 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IANA Considerations</span>
506
507 IANA does not currently have a registry for TLS ciphersuite or alert
508 numbers, so there are no IANA actions associated with this document.
509
510 For easier reference in the future, the ciphersuite numbers defined
511 in this document are summarized below.
512
513 CipherSuite TLS_PSK_WITH_RC4_128_SHA = { 0x00, 0x8A };
514 CipherSuite TLS_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0x8B };
515 CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0x8C };
516 CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0x8D };
517 CipherSuite TLS_DHE_PSK_WITH_RC4_128_SHA = { 0x00, 0x8E };
518 CipherSuite TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0x8F };
519 CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0x90 };
520 CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0x91 };
521 CipherSuite TLS_RSA_PSK_WITH_RC4_128_SHA = { 0x00, 0x92 };
522 CipherSuite TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = { 0x00, 0x93 };
523 CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA = { 0x00, 0x94 };
524 CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA = { 0x00, 0x95 };
525
526 This document also defines a new TLS alert message,
527 unknown_psk_identity(115).
528
529 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
530
531 As with all schemes involving shared keys, special care should be
532 taken to protect the shared values and to limit their exposure over
533 time.
534
535 <span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Perfect Forward Secrecy (PFS)</span>
536
537 The PSK and RSA_PSK ciphersuites defined in this document do not
538 provide Perfect Forward Secrecy (PFS). That is, if the shared secret
539 key (in PSK ciphersuites), or both the shared secret key and the RSA
540 private key (in RSA_PSK ciphersuites), is somehow compromised, an
541 attacker can decrypt old conversations.
542
543 The DHE_PSK ciphersuites provide Perfect Forward Secrecy if a fresh
544 Diffie-Hellman private key is generated for each handshake.
545
546 <span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Brute-Force and Dictionary Attacks</span>
547
548 Use of a fixed shared secret of limited entropy (for example, a PSK
549 that is relatively short, or was chosen by a human and thus may
550 contain less entropy than its length would imply) may allow an
551 attacker to perform a brute-force or dictionary attack to recover the
552 secret. This may be either an off-line attack (against a captured
553
554
555
556 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
559
560
561 TLS handshake messages) or an on-line attack where the attacker
562 attempts to connect to the server and tries different keys.
563
564 For the PSK ciphersuites, an attacker can get the information
565 required for an off-line attack by eavesdropping on a TLS handshake,
566 or by getting a valid client to attempt connection with the attacker
567 (by tricking the client to connect to the wrong address, or by
568 intercepting a connection attempt to the correct address, for
569 instance).
570
571 For the DHE_PSK ciphersuites, an attacker can obtain the information
572 by getting a valid client to attempt connection with the attacker.
573 Passive eavesdropping alone is not sufficient.
574
575 For the RSA_PSK ciphersuites, only the server (authenticated using
576 RSA and certificates) can obtain sufficient information for an
577 off-line attack.
578
579 It is RECOMMENDED that implementations that allow the administrator
580 to manually configure the PSK also provide a functionality for
581 generating a new random PSK, taking [<a href="#ref-RANDOMNESS" title="&quot;Randomness Requirements for Security&quot;">RANDOMNESS</a>] into account.
582
583 <span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. Identity Privacy</span>
584
585 The PSK identity is sent in cleartext. Although using a user name or
586 other similar string as the PSK identity is the most straightforward
587 option, it may lead to problems in some environments since an
588 eavesdropper is able to identify the communicating parties. Even
589 when the identity does not reveal any information itself, reusing the
590 same identity over time may eventually allow an attacker to perform
591 traffic analysis to identify the parties. It should be noted that
592 this is no worse than client certificates, since they are also sent
593 in cleartext.
594
595 <span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>. Implementation Notes</span>
596
597 The implementation notes in [<a href="#ref-TLS11" title="&quot;The TLS Protocol Version 1.1&quot;">TLS11</a>] about correct implementation and
598 use of RSA (including <a href="#section-7.4.7.1">Section 7.4.7.1</a>) and Diffie-Hellman (including
599 <a href="#appendix-F.1.1.3">Appendix F.1.1.3</a>) apply to the DHE_PSK and RSA_PSK ciphersuites as
600 well.
601
602 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Acknowledgements</span>
603
604 The protocol defined in this document is heavily based on work by Tim
605 Dierks and Peter Gutmann, and borrows some text from [<a href="#ref-SHAREDKEYS" title="&quot;Use of Shared Keys in the TLS Protocol&quot;">SHAREDKEYS</a>] and
606 [<a href="#ref-AES" title="&quot;Advanced Encryption Standard (AES) Ciphersuites for Transport Layer Security (TLS)&quot;">AES</a>]. The DHE_PSK and RSA_PSK ciphersuites are based on earlier
607 work in [<a href="#ref-KEYEX" title="&quot;Pre-Shared-Key key Exchange methods for TLS&quot;">KEYEX</a>].
608
609
610
611
612 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
615
616
617 Valuable feedback was also provided by Bernard Aboba, Lakshminath
618 Dondeti, Philip Ginzboorg, Peter Gutmann, Sam Hartman, Russ Housley,
619 David Jablon, Nikos Mavroyanopoulos, Bodo Moeller, Eric Rescorla, and
620 Mika Tervonen.
621
622 When the first version of this document was almost ready, the authors
623 learned that something similar had been proposed already in 1996
624 [<a href="#ref-PASSAUTH" title="&quot;Addition of Shared Key Authentication to Transport Layer Security (TLS)&quot;">PASSAUTH</a>]. However, this document is not intended for web password
625 authentication, but rather for other uses of TLS.
626
627 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
628
629 <span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Normative References</span>
630
631 [<a id="ref-AES">AES</a>] Chown, P., "Advanced Encryption Standard (AES)
632 Ciphersuites for Transport Layer Security (TLS)", <a href="./rfc3268">RFC</a>
633 <a href="./rfc3268">3268</a>, June 2002.
634
635 [<a id="ref-KEYWORDS">KEYWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
636 Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
637
638 [<a id="ref-RANDOMNESS">RANDOMNESS</a>] Eastlake, D., 3rd, Schiller, J., and S. Crocker,
639 "Randomness Requirements for Security", <a href="https://www.rfc-editor.org/bcp/bcp106">BCP 106</a>, <a href="./rfc4086">RFC</a>
640 <a href="./rfc4086">4086</a>, June 2005.
641
642 [<a id="ref-TLS">TLS</a>] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
643 <a href="./rfc2246">RFC 2246</a>, January 1999.
644
645 [<a id="ref-UTF8">UTF8</a>] Yergeau, F., "UTF-8, a transformation format of ISO
646 10646", STD 63, <a href="./rfc3629">RFC 3629</a>, November 2003.
647
648 <span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Informative References</span>
649
650 [<a id="ref-DNS">DNS</a>] Mockapetris, P., "Domain names - implementation and
651 specification", STD 13, <a href="./rfc1035">RFC 1035</a>, November 1987.
652
653 [<a id="ref-KERB">KERB</a>] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher
654 Suites to Transport Layer Security (TLS)", <a href="./rfc2712">RFC 2712</a>,
655 October 1999.
656
657 [<a id="ref-KEYEX">KEYEX</a>] Badra, M., Cherkaoui, O., Hajjeh, I. and A. Serhrouchni,
658 "Pre-Shared-Key key Exchange methods for TLS", Work in
659 Progress, August 2004.
660
661 [<a id="ref-KRAWCZYK">KRAWCZYK</a>] Krawczyk, H., "Re: TLS shared keys PRF", message on
662 [email protected] mailing list 2004-01-13,
663 <a href="http://www.imc.org/ietf-tls/mail-archive/msg04098.html">http://www.imc.org/ietf-tls/mail-archive/msg04098.html</a>.
664
665
666
667
668 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
671
672
673 [<a id="ref-LDAPDN">LDAPDN</a>] Zeilenga, K., "LDAP: String Representation of
674 Distinguished Names", Work in Progress, February 2005.
675
676 [<a id="ref-NAMEPREP">NAMEPREP</a>] Hoffman, P. and M. Blanchet, "Nameprep: A Stringprep
677 Profile for Internationalized Domain Names (IDN)", <a href="./rfc3491">RFC</a>
678 <a href="./rfc3491">3491</a>, March 2003.
679
680 [<a id="ref-PASSAUTH">PASSAUTH</a>] Simon, D., "Addition of Shared Key Authentication to
681 Transport Layer Security (TLS)", Work in Progress,
682 November 1996.
683
684 [<a id="ref-SASLPREP">SASLPREP</a>] Zeilenga, K., "SASLprep: Stringprep Profile for User
685 Names and Passwords", <a href="./rfc4013">RFC 4013</a>, February 2005.
686
687 [<a id="ref-SHAREDKEYS">SHAREDKEYS</a>] Gutmann, P., <a style="text-decoration: none" href='https://www.google.com/search?sitesearch=datatracker.ietf.org%2Fdoc%2Fhtml%2F&amp;q=inurl:draft-+%22Use+of+Shared+Keys+in+the+TLS+Protocol%22'>"Use of Shared Keys in the TLS Protocol"</a>,
688 Work in Progress, October 2003.
689
690 [<a id="ref-SRP">SRP</a>] Taylor, D., Wu, T., Mavroyanopoulos, N. and T. Perrin,
691 "Using SRP for TLS Authentication", Work in Progress,
692 March 2005.
693
694 [<a id="ref-STRINGPREP">STRINGPREP</a>] Hoffman, P. and M. Blanchet, "Preparation of
695 Internationalized Strings ("stringprep")", <a href="./rfc3454">RFC 3454</a>,
696 December 2002.
697
698 [<a id="ref-TLS11">TLS11</a>] Dierks, T. and E. Rescorla, "The TLS Protocol Version
699 1.1", Work in Progress, June 2005.
700
701 Authors' and Contributors' Addresses
702
703 Pasi Eronen
704 Nokia Research Center
705 P.O. Box 407
706 FIN-00045 Nokia Group
707 Finland
708
709 EMail: [email protected]
710
711
712 Hannes Tschofenig
713 Siemens
714 Otto-Hahn-Ring 6
715 Munich, Bayern 81739
716 Germany
717
718 EMail: [email protected]
719
720
721
722
723
724 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
727
728
729 Mohamad Badra
730 ENST Paris
731 46 rue Barrault
732 75634 Paris
733 France
734
735 EMail: [email protected]
736
737
738 Omar Cherkaoui
739 UQAM University
740 Montreal (Quebec)
741 Canada
742
743 EMail: [email protected]
744
745
746 Ibrahim Hajjeh
747 ESRGroups
748 17 passage Barrault
749 75013 Paris
750 France
751
752 EMail: [email protected]
753
754
755 Ahmed Serhrouchni
756 ENST Paris
757 46 rue Barrault
758 75634 Paris
759 France
760
761 EMail: [email protected]
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780 <span class="grey">Eronen &amp; Tschofenig Standards Track [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc4279">RFC 4279</a> PSK Ciphersuites for TLS December 2005</span>
783
784
785 Full Copyright Statement
786
787 Copyright (C) The Internet Society (2005).
788
789 This document is subject to the rights, licenses and restrictions
790 contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
791 retain all their rights.
792
793 This document and the information contained herein are provided on an
794 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
795 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
796 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
797 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
798 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
799 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
800
801 Intellectual Property
802
803 The IETF takes no position regarding the validity or scope of any
804 Intellectual Property Rights or other rights that might be claimed to
805 pertain to the implementation or use of the technology described in
806 this document or the extent to which any license under such rights
807 might or might not be available; nor does it represent that it has
808 made any independent effort to identify any such rights. Information
809 on the procedures with respect to rights in RFC documents can be
810 found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
811
812 Copies of IPR disclosures made to the IETF Secretariat and any
813 assurances of licenses to be made available, or the result of an
814 attempt made to obtain a general license or permission for the use of
815 such proprietary rights by implementers or users of this
816 specification can be obtained from the IETF on-line IPR repository at
817 <a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
818
819 The IETF invites any interested party to bring to its attention any
820 copyrights, patents or patent applications, or other proprietary
821 rights that may cover technology that may be required to implement
822 this standard. Please address the information to the IETF at ietf-
823 [email protected].
824
825 Acknowledgement
826
827 Funding for the RFC Editor function is currently provided by the
828 Internet Society.
829
830
831
832
833
834
835
836 Eronen &amp; Tschofenig Standards Track [Page 15]
837 </pre>