1 Internet Engineering Task Force M. Badra
2 INTERNET DRAFT O. Cherkaoui
5 Expires: 8, February 2004 A. Serhrouchni
10 Pre-Shared-Key key Exchange methods for TLS
11 <draft-badra-tls-key-exchange-00.txt>
16 By submitting this Internet-Draft, I certify that any applicable
17 patent or other IPR claims of which I am aware have been disclosed,
18 or will be disclosed, and any of which I become aware will be
19 disclosed, in accordance with RFC 3668.
21 Internet-Drafts are working documents of the Internet Engineering
22 Task Force (IETF), its areas, and its working groups. Note that
23 other groups may also distribute working documents as Internet
26 Internet-Drafts are draft documents valid for a maximum of six
27 months and may be updated, replaced, or obsoleted by other documents
28 at any time. It is inappropriate to use Internet-Drafts as reference
29 material or to cite them other than as "work in progress."
31 The list of current Internet-Drafts can be accessed at
32 http://www.ietf.org/ietf/1id-abstracts.txt
34 The list of Internet-Draft Shadow Directories can be accessed at
35 http://www.ietf.org/shadow.html.
37 This Internet-Draft will expire on February 8, 2005.
41 Copyright (C) The Internet Society (2004). All Rights Reserved.
45 This document specifies new key exchange methods for Transport Layer
46 Security protocol to support authentication based on pre installed
47 key and to allow anonymous exchanges, identity protection And
48 Perfect Forward Secrecy.
55 Badra, et. al. Expires February 2005 [Page 1]
57 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
61 Transport Layer Security (TLS) [TLS] is an authentication protocol
62 that establishes a secure channel, as well as mutual authentication,
63 protected cipher suite negotiation and key exchange between two
64 entities. TLS handshake uses certificates and PKI for mutual
65 authentication and key exchange. In many cases, a TLS public-key-
66 based handshake is unnecessary; especially for closed environments
67 or for clients pre-configured. This document specifies how to
68 establish a TLS session using symmetric keys.
70 Although several Internet Draft authors ([TLSPSK], [TLSSK],
71 [TSLEXP], etc) propose the pre shared key mechanism, none of them
72 provides neither anonymous exchanges and identity protection against
73 eavesdropping nor Perfect Forward Secrecy (PFS). On the other hand,
74 some approaches like [ISATLS], propose a radical change to the TLS
75 protocol. Other like [SPTLS], propose Password-based cipher suite
76 for TLS Handshake scheme.
78 This document specifies new key exchange methods for TLS for pre
79 shared key. The advantageous use of the pre shared key regarding the
80 Public Key Infrastructure (PKI) based certificates is that the pre
81 shared key reduces the cryptographic operations, the messages load
82 and the number of round trips.
84 1.1. Requirements language
86 The key words "MUST", "SHALL", "SHOULD", and "MAY", in this document
87 are to be interpreted as described in RFC-2119.
89 2. Changes to the TLS Handshake protocol
91 TLS [TLS] defines the client key exchange message that is always
92 sent by the client. With this message [TLS], the premaster secret is
93 set, either though direct transmission of the RSA-encrypted secret,
94 or by the transmission of Diffie-Hellman parameters which will allow
95 each side to agree upon the same premaster secret. The structure of
96 this message depends on which key exchange method has been selected.
97 The actual TLS standard defines two methods using RSA or
98 Diffie_Hellman algorithms.
100 The rest of this document describes the changes to the handshake
101 messages contents when the pre shared key is being used.
105 In order to negotiate and to signal to the server that the client
106 wishes to use a pre_shared_key key exchange method, the client MAY
107 include an extension of type "psk_key_exchange (9)" in the extended
108 client hello, such is defined in [TLSEXT]. The "extension_data"
111 Badra, et. al. Expires - February 2005 [Page 2]
113 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
115 field of the psk key exchange extension SHALL contain
116 "PSKKeyExchangeMethod" where:
119 PSKMethod psk_methods_list<0..2^16-1>;
120 } PSKKeyExchangeMethod;
123 MethodType method_type;
124 Select (method_type) {
125 case rsa_psk : RSAPSK
126 case diffie_hellman_psk : DHPSK
130 enum { rsa_psk(0), diffie_hellmen_psk(1), (255) } MethodType;
132 Here, "PSKKeyExchangeMethod" provides a list of PSK key exchange
133 methods that the client supports.
135 2.3. Server Key Exchange
137 The format of ServerKeyExchange is as follow:
140 select (KeyExchangeAlgorithm) {
142 ServerDHParams params;
143 Signature signed_params;
145 ServerRSAParams params;
146 Signature signed_params;
148 ServerRSAParamsPSK params;
149 Signature signed_params; /*optional/
150 case diffie_hellman_psk: /*NEW/
151 ServerDHParamsPSK params;
152 Signature signed_params;/*optional/
156 rsa_psk and diffie_hellman_psk cases are respectively identical to
157 rsa and diffie_hellman cases that are definied in [TLS].
159 Note that because the pre_shared_key SHOULD protect entities against
160 man-in-the-middle attack (see section 2.4), the server MAY not sign
161 its Diffie_Hellman parameters and thus the signed_params field MAY
162 be omitted. For more information, see security considerations
167 Badra, et. al. Expires - February 2005 [Page 3]
169 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
171 2.2. Client Key Exchange
173 This document adds two new key exchange methods to the enumerated
174 KeyExchangeAlgorithm originally defined in [TLS].
177 rsa, diffie_hellman, rsa_psk, diffie_hellman_psk
178 } KeyExchangeAlgorithm;
180 Thus, the structure of the client key exchange becomes as follow:
183 select (KeyEchangeAlgorithm){
184 case rsa: EncryptedPreMasterSecret;
185 case diffie_hellman: ClientDiffieHellmanPublic;
186 case rsa_psk: EncryptPreMasterSecretPSK; /*NEW/
187 case diffie_hellman_psk: ClientDiffieHellmanPublicPSK; /*NEW/
191 2.2.1. rsa_psk encrypted premaster secret message
193 If rsa_psk is being used for key agreement, the client generates a
194 30-byte random value, concatenates it with the pre shared key
195 identity, encrypts the result (premaster secret) using the server
196 public key and sends it in an encrypted premaster secret message.
198 Structure of the premaster secret:
201 ProtocolVersion client_version;
203 opaque psk_identity<1..2^16-1>;
204 opaque pad[16-psk_identity.length];
207 struct { public-key-encrypted PreMasterSecret pre_master_secret;
208 } EncryptedPreMasterSecretPSK;
210 For interoperation issues, this document uses the same definition
211 used in [TLSSRP]. Thus, the psk_identity SHALL be UTF-8 encoded
212 Unicode, where the psk_identity is the pre shared key identifier.
214 If the psk_identity is less than 16 bytes in length, the premaster
215 secret will be padded to obtain 46 bytes. For example, if the
216 psk_identity length is 13 bytes, then the last three bytes of the
217 premaster secret will be 0x03 0x03 0x03. This mechanism will allow
218 the server to extract the psk_identity from the premaster secret.
223 Badra, et. al. Expires - February 2005 [Page 4]
225 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
227 2.2.2. diffie_hellman_psk encrypted premaster secret message
229 Because the client does not use any certificate, its value Yc needs
230 to be sent. As a result, the case implicit MAY be omitted.
233 select (PublicValueEncoding) {
234 case implicit: struct { };
235 case explicit: opaque dh_Yc<1..2^16-1>;
237 opaque psk_identity<1..2^16-1>;
238 } ClientDiffieHellmanPublicPSK;
241 The client's Diffie-Hellman public value (Yc).
244 The pre shared key identifier.
246 The psk_identity helps the client to indicate which key it wants to
247 use and the server to retrieve the corresponding pre shared key
248 value, if exists. When using a Diffie-Hellman based key exchange
249 method, the psk_identity is sent in the clear.
251 2.4. Computing the master secret
253 This document uses the same mechanism defined in [TLS] for keys
254 computation and calculation, except the master secret key. It
255 generates the master secret by applying the PRF on the premaster
256 secret XOR pre_shared_key value instead of the premaster secret:
258 master_secret = PRF(pre_master_secret XOR pre_shared_key,
260 ClientHello.random + ServerHello.random)[0..47];
262 As a result, if the server uses a static private key and if this key
263 is compromised, the intruder must have the pre_shared_key to decrypt
266 On the other hand, if either the client or the server calculates an
267 incorrect premaster_secret XOR pre_shared_key value, the finished
268 messages will fail to decrypt properly and the other party will
269 return a bad_record_mac alert. This MAY happen when the server does
270 not send its certificate and that a man-in-the-middle intercepts the
271 session exchanges and sends its public key instead of the server
279 Badra, et. al. Expires - February 2005 [Page 5]
281 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
285 Three new TLS error alerts are defined by this document (This
286 section is inspired by [TLSSRP]):
288 a) "unknown_psk_key_exchange" (integer) - this alert MAY be sent by
289 a server that does not support any PSK key exchange methods sent
290 by the client. This alert is always a warning. Upon receiving
291 this alert, the client MAY send a new hello message on the same
292 connection using another TLS authentication methods.
294 b) "unknown_psk_identity" (integer) - this alert MAY be sent by a
295 server that receives an unknown ticket identity. This alert is
298 c) "missing_psk_identity" (integer) - this alert MAY be sent by a
299 server that would like to select an offered PSK key exchange
300 method, if the MethodType extension is absent from the client's
301 hello message. This alert is always a warning. Upon receiving
302 this alert, the client MAY send a new hello message on the same
303 connection, this time including the MethodType extension.
307 In order to indicate the support of the shared key type, the client
308 adds the extension "psk_key_exchange (9)" to its extended hello
311 When the server receives an extended client hello message, it
312 replies by its hello that contains the following attributes:
313 Protocol Version, Random, Session ID, Cipher Suite, and Compression
316 If the server is able to agree on a key exchange method using the
317 pre shared key, it will send its server key exchange message that
318 contains the selected method. In this case, the Certificate message
319 MAY be omitted from the response.
321 If the server does not support any PSK key exchange methods sent by
322 the client, the server MAY abort the handshake with a
323 unknown_key_exchange alert.
325 Now the server will send the server hello done message, indicating
326 that the hello-message phase of the handshake is completed.
328 The client send its client key exchange message. The content of this
329 message depends on the method selected between the client hello and
330 the server key exchange messages.
334 Badra, et. al. Expires - February 2005 [Page 6]
336 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
338 The handshake exchange is given in the following diagram:
340 ClientHello -------->
341 (MethodType) ServerHello
344 <-------- ServerHelloDone
351 * Indicates an optional message which is not always sent.
353 3. Security considerations
355 The server MUST stock the shared key in a secure and protected
356 manner in order to prevent attackers from retrieving its value.
358 During the handshake phase, the server MAY send its certificate. The
359 certificate's use protects entities against man-in-the-middle
362 If the server certificate is omitted, the client and the server
363 authenticate each other via the finished messages. In fact, the
364 finished value is computed using the master_secret calculated during
365 the establishment session and the pre shared key. Thus, if the
366 client is intercepted by a bogus server, this later will be
367 detectable by the client during the finished phase. As a result, no
368 third party can calculate the same finished value without having the
369 correct pre_shared_key. Instead, the third party MAY discover the
370 pre shared key identity sent in the client key exchange message.
372 When using a Diffie-Hellman based PSK key exchange method, the
373 client sends its psk_identity in the clear. In order to avoid this
374 issue, the client could first open a conventional anonymous and then
375 renegotiate a PSK key exchange method with the handshake protected
376 by the first connection. Another solution MAY be done using the
377 pseudonym management.
379 3.1. Key management with non-human support
381 In the case where the client does not enter his credentials manually
382 during the session establishment and that he does not need to
383 remember them, then he can stock them on a secure token (e.g.
384 smartcard) or in a local file. In this case, the server and the
385 client MAY update the pre shared key value after each session has
386 been formed. In this case, the both MAY add a seed to their
387 credentials entries. By this method, the client's support and the
390 Badra, et. al. Expires - February 2005 [Page 7]
392 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
394 server calculate the seed and update the pre shared key as following
397 seed(0) is a random on 16 bytes.
399 seed(i) = P_MD5(seed(i-1) XOR psk_identity,
401 ClientHello.random + ServerHello.random)[0..16];
403 psk(i) = PRF(psk(i-1) XOR premaster secret(i), "pre shared key",
404 ServerHello.random + ClientHello.random)[0..48];
406 With this mechanism, the psk_identity remains unchanged. However,
407 when the client connect to the server, it sends the seed (seed(i-1)
408 for session i) instead of the psk_identity. The rest of the protocol
409 is unchangeable. This SHALL ensure, among other, PFS and anonymity.
411 4. IANA Considerations
417 This document has been inspired by [TLS], [TLSSRP] and [TLSPSK].
418 Thus, it reused extracts of these documents.
422 6.1. Normative References
424 [TLSEXT] Blake-Wilson, S., Nystrom, M., Hopwwod, D., Mikkelsen, J.
425 and Wright, T., "Transport Layer Security (TLS)
426 Extensions", RFC 3546, June 2003.
428 [TLS] Dierks, T., and Allen, C., "The TLS Protocol Version 1.0",
429 RFC 2246, November 1998.
431 [ISATLS] Hajjeh, I., and Serhrouchni, A., "ISAKMP Handshake for
432 SSL/TLS", IEEE GLOBECOM'03, Vol. 3, San Francisco, USA,
433 1-5 December 2003, Pages: 1481-1485.
435 [SPTLS] Steiner, Michael, et. al., "Secure Password-Based Cipher
436 Suite for TLS", ACM Transaction on Information and System
437 Security, Vol. 4, No. 2, May 2001, Pages 134-157.
439 6.2. Informative References
441 [TLSSRP] Taylor, D., Wu, T., Mavroyanopoulos, N., and Perrin,
442 T., "Using SRP for TLS Authentication",
443 draft-ietf-tls-srp-07.txt, Internet Draft (work in
444 progress), June 2004.
445 Badra, et. al. Expires - February 2005 [Page 8]
447 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
449 [TLSPSK] Eronen, P., and Tschofenig, H., "Pre-Shared Key
450 Ciphersuites for Transport Layer Security (TLS)",
451 draft-eronen-tls-psk-00.txt, Internet Draft (work in
452 progress), August 2004.
454 [TLSSK] Gutmann, P.,"Use of Shared Keys in the TLS Protocol",
455 draft-ietf-tls-sharedkeys-02.txt, Internet Draft
456 (expired), October 2003.
458 [TSLEXP] Badra, M., Serhrouchni, A., and Urien, P., "TLS Express",
459 draft-badra-tls-express-00.txt, Internet Draft (work in
460 progress), June 2004.
462 6. Author's Addresses
467 75634 Paris Phone: NA
468 France Email: Mohamad.Badra@enst.fr
472 Montreal (Quebec) Phone: NA
473 Canada Email: cherkaoui.omar@uqam.ca
478 75634 Paris Phone: NA
479 France Email: Ibrahim.Hajjeh@enst.fr
484 75634 Paris Phone: NA
485 France Email: Ahmed.Serhrouchni@enst.fr
487 Intellectual Property Statement
489 The IETF takes no position regarding the validity or scope of any
490 Intellectual Property Rights or other rights that might be claimed
491 to pertain to the implementation or use of the technology described
492 in this document or the extent to which any license under such
493 rights might or might not be available; nor does it represent that
494 it has made any independent effort to identify any such rights.
495 Information on the IETF's procedures with respect to rights in IETF
496 Documents can be found in BCP 78 and BCP 79.
498 Copies of IPR disclosures made to the IETF Secretariat and any
499 assurances of licenses to be made available, or the result of an
500 Badra, et. al. Expires - February 2005 [Page 9]
502 INTERNET-DRAFT PSK key Exchange methods for TLS August 2004
504 attempt made to obtain a general license or permission for the use
505 of such proprietary rights by implementers or users of this
506 specification can be obtained from the IETF on-line IPR repository
507 at http://www.ietf.org/ipr.
509 The IETF invites any interested party to bring to its attention any
510 copyrights, patents or patent applications, or other proprietary
511 rights that may cover technology that may be required to implement
512 this standard. Please address the information to the IETF at
515 Disclaimer of Validity
517 This document and the information contained herein are provided on
518 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
519 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
520 INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
521 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
522 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
523 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
527 Copyright (C) The Internet Society (2004). This document is subject
528 to the rights, licenses and restrictions contained in BCP 78, and
529 except as set forth therein, the authors retain all their rights.
533 Funding for the RFC Editor function is currently provided by the
556 Badra, et. al. Expires - February 2005 [Page 10]