5 TLS Working Group Paul Funk
6 Internet-Draft Funk Software, Inc.
7 Category: Standards Track Simon Blake-Wilson
8 <draft-funk-tls-inner-application-extension-01.txt> Basic Commerce &
20 TLS Inner Application Extension
27 This document is an Internet-Draft and is subject to all provisions
28 of section 3 of RFC 3667. By submitting this Internet-Draft, each
29 author represents that any applicable patent or other IPR claims of
30 which he or she is aware have been or will be disclosed, and any of
31 which he or she become aware will be disclosed, in accordance with
34 Internet-Drafts are working documents of the Internet Engineering
35 Task Force (IETF), its areas, and its working groups. Note that
36 other groups may also distribute working documents as Internet-
39 Internet-Drafts are draft documents valid for a maximum of six
40 months and may be updated, replaced, or obsoleted by other documents
41 at any time. It is inappropriate to use Internet-Drafts as
42 reference material or to cite them other than as "work in progress."
44 The list of current Internet-Drafts can be accessed at
45 http://www.ietf.org/ietf/1id-abstracts.txt.
47 The list of Internet-Draft Shadow Directories can be accessed at
48 http://www.ietf.org/shadow.html.
52 Copyright (C) The Internet Society (2001 - 2005). All Rights
57 Internet-Draft February 2005
60 This document defines a new TLS extension called "Inner
61 Application". When TLS is used with the Inner Application extension
62 (TLS/IA), additional messages are exchanged after completion of the
63 TLS handshake, in effect providing an extended handshake prior to
64 the start of upper layer data communications. Each TLS/IA message
65 contains an encrypted sequence of Attribute-Value-Pairs (AVPs) from
66 the RADIUS/Diameter namespace. Hence, the AVPs defined in RADIUS and
67 Diameter have the same meaning in TLS/AI; that is, each attribute
68 code point refers to the same logical attribute in any of these
69 protocols. Arbitrary "applications" may be implemented using the AVP
70 exchange. Possible applications include EAP or other forms of user
71 authentication, client integrity checking, provisioning of
72 additional tunnels, and the like. Use of the RADIUS/Diameter
73 namespace provides natural compatibility between TLS/IA applications
74 and widely deployed AAA infrastructures.
76 It is anticipated that TLS/IA will be used with and without
77 subsequent protected data communication within the tunnel
78 established by the handshake. For example, TLS/IA may be used to
79 secure an HTTP data connection, allowing more robust password-based
80 user authentication to occur than would otherwise be possible using
81 mechanisms available in HTTP. TLS/IA may also be used for its
82 handshake portion alone; for example, EAP-TTLSv1 encapsulates a
83 TLS/IA handshake in EAP as a means to mutually authenticate a client
84 and server and establish keys for a separate data connection.
88 1 Introduction................................................... 3
89 1.1 A Bit of History .......................................... .. 4
90 1.2 TLS With or Without Upper Layer Data Communications.......... 5
91 2 The Inner Application Extension to TLS......................... 5
92 2.1 TLS/IA Overview.............................................. 7
93 2.2 Message Exchange ............................................ 8
94 2.3 Inner Secret................................................. 9
95 2.3.1 Computing the Inner Secret................................. 9
96 2.3.2 Exporting the Final Inner Secret........................... 10
97 2.3.3 Application Session Key Material........................... 10
98 2.4 Session Resumption........................................... 12
99 2.5 Error Termination............................................ 12
100 2.6 Negotiating the Inner Application Extension.................. 12
101 2.7 InnerApplication Protocol.................................... 13
102 2.7.1 InnerApplicationExtension.................................. 13
103 2.7.2 InnerApplication Message................................... 14
104 2.7.3 IntermediatePhaseFinished and FinalPhaseFinished Messages.. 14
105 2.7.4 The ApplicationPayload Message ............................ 15
106 2.8 Alerts....................................................... 15
107 3 Encapsulation of AVPs within ApplicationPayload Messages....... 16
108 3.1 AVP Format................................................... 16
109 3.2 AVP Sequences................................................ 17
110 3.3 Guidelines for Maximum Compatibility with AAA Servers........ 18
114 Paul Funk expires August 2005 [Page 2]
116 Internet-Draft February 2005
119 4 Tunneled Authentication within Application Phases ............. 18
120 4.1 Implicit challenge........................................... 18
121 4.2 Tunneled Authentication Protocols............................ 19
122 4.2.1 EAP........................................................ 20
123 4.2.2 CHAP....................................................... 20
124 4.2.3 MS-CHAP.................................................... 21
125 4.2.4 MS-CHAP-V2................................................. 21
126 4.2.5 PAP........................................................ 23
127 4.3 Performing Multiple Authentications.......................... 23
128 5 Example Message Sequences...................................... 24
129 5.1 Full Initial Handshake with Multiple Application Phases ..... 24
130 5.2 Resumed Session with Single Application Phase................ 25
131 5.3 Resumed Session with No Application Phase.................... 26
132 6 Security Considerations........................................ 26
133 7 References .................................................... 29
134 7.1 Normative References......................................... 29
135 7.2 Informative References....................................... 30
136 8 Authors' Addresses ........................................... 30
137 9 Intellectual Property Statement............................... 31
142 This specification defines the TLS "Inner Application" extension.
143 The term "TLS/IA" refers to the TLS protocol when used with the
144 Inner Application extension.
146 In TLS/IA, the setup portion of TLS is extended to allow an
147 arbitrary exchange of information between client and server within a
148 protected tunnel established during the TLS handshake and prior to
149 the start of upper layer TLS data communications. The TLS handshake
150 itself is unchanged; the subsequent Inner Application exchange is
151 conducted under the confidentiality and integrity protection
152 afforded by the TLS handshake.
154 The primary motivation for providing such communication is to allow
155 robust user authentication to occur as part of an "extended"
156 handshake, in particular, user authentication that is based on
157 password credentials, which is best conducted under the protection
158 of an encrypted tunnel to preclude dictionary attack by
159 eavesdroppers. For example, Extensible Authentication Protocol (EAP)
160 may be used to authenticate using any of a wide variety of methods
161 as part of this extended handshake. The multi-layer approach of
162 TLS/IA, in which a strong authentication, typically based on a
163 server certificate, is used to protect a password-based
164 authentication, distinguishes it from other TLS variants that rely
165 entirely on a pre-shared key or password for security; for example
168 The protected exchange accommodates any type of client-server
169 application, not just authentication, though authentication may
173 Paul Funk expires August 2005 [Page 3]
175 Internet-Draft February 2005
178 often be the prerequisite that allows other applications to proceed.
179 For example, TLS/IA may be used to set up HTTP connections,
180 establish IPsec security associations (as an alternative to IKE),
181 obtain credentials for single sign-on, provide for client integrity
182 verification, and so on.
184 The new messages that are exchanged between client and server are
185 encoded as sequences of Attribute-Value-Pairs (AVPs) from the
186 RADIUS/Diameter namespace. Use of the RADIUS/Diameter namespace
187 provides natural compatibility between TLS/IA applications and
188 widely deployed AAA infrastructures. This namespace is extensible,
189 allowing new AVPs and, thus, new applications to be defined as
190 needed, either by standards bodies or by vendors wishing to define
191 proprietary applications.
193 The TLS/IA exchange comprises one or more "phases", each of which
194 consists of an arbitrary number of AVP exchanges followed by a
195 confirmation exchange. Authentications occurring in any phase must
196 be confirmed prior to continuing to the next phase. This allows
197 applications to implement security dependencies in which particular
198 assurances are required prior to exchange of additional information.
202 The TLS protocol has its roots in the Netscape SSL protocol, which
203 was originally intended to secure HTTP. It provides either one-way
204 or mutual authentication of client and server based on certificates.
205 In its most typical use in HTTP, the client authenticates the server
206 based on the server's certificate and establishes a tunnel through
207 which HTTP traffic is passed.
209 For the server to authenticate the client within the TLS handshake,
210 the client must have its own certificate. In cases where the client
211 must be authenticated without a certificate, HTTP, not TLS,
212 mechanisms would have to be employed. For example, HTTP headers have
213 been defined to perform user authentications. However, these
214 mechanisms are primitive compared to other mechanisms, most notably
215 EAP, that have been defined for contexts other than HTTP.
216 Furthermore, any mechanisms defined for HTTP cannot be utilized when
217 TLS is used to protect non-HTTP traffic.
219 The TLS protocol has also found an important use in authentication
220 for network access, originally within PPP for dial-up access and
221 later for wireless and wired 802.1X access. Several EAP types have
222 been defined that utilize TLS to perform mutual client-server
223 authentication. The first to appear, EAP-TLS, uses the TLS handshake
224 to authenticate both client and server based on the certificate of
227 Subsequent protocols, such EAP-TTLSv0 and EAP-PEAP, utilize the TLS
228 handshake to allow the client to authenticate the server based on
232 Paul Funk expires August 2005 [Page 4]
234 Internet-Draft February 2005
237 the latter's certificate, then utilize the tunnel established by the
238 TLS handshake to perform user authentication, typically based on
239 password credentials. Such protocols are called "tunneled" EAP
240 protocols. The authentication mechanism used inside the tunnel may
241 itself be EAP, and the tunnel may also be used to convey additional
242 information between client and server.
244 TLS/IA is in effect a merger of the two types of TLS usage described
245 above, based on the recognition that tunneled authentication would
246 be useful in other contexts besides EAP. However, the tunneled
247 protocols mentioned above are not directly compatible with a more
248 generic use of TLS, because they utilize the tunneled data portion
249 of TLS, thus precluding its use for other purposes such as carrying
252 The TLS/IA solution to this problem is to insert an additional
253 message exchange between the TLS handshake and the subsequent data
254 communications phase, carried in a new record type distinct from the
255 record type that carries upper layer data. Thus, the data portion of
256 the TLS exchange becomes available for HTTP or any other protocol or
257 connection that needs to be secured.
259 1.2 TLS With or Without Upper Layer Data Communications
261 It is anticipated that TLS/IA will be used with and without
262 subsequent protected data communication within the tunnel
263 established by the handshake.
265 For example, TLS/IA may be used to secure an HTTP data connection,
266 allowing more robust password-based user authentication to occur
267 within the TLS/IA extended handshake than would otherwise be
268 possible using mechanisms available in HTTP.
270 TLS/IA may also be used for its handshake portion alone. For
271 example, EAP-TTLSv1 encapsulates a TLS/IA extended handshake in EAP
272 as a means to mutually authenticate a client and server and
273 establish keys for a separate data connection; no subsequent TLS
274 data portion is required. Another example might be use of TLS/IA
275 directly over TCP to provide a user with credentials for single
278 2 The Inner Application Extension to TLS
280 The Inner Application extension to TLS follows the guidelines of
283 A new extension type is defined for negotiating use of TLS/IA
285 - The InnerApplicationExtension extension type. The client proposes
286 use of this extension by including a InnerApplicationExtension
287 message in its ClientHello handshake message, and the server
291 Paul Funk expires August 2005 [Page 5]
293 Internet-Draft February 2005
296 confirms its use by including a InnerApplicationExtension message
297 in its ServerHello handshake message.
299 A new record type (ContentType) is defined for use in TLS/IA:
301 - The InnerApplication record type. This record type carries all
302 messages that implement the inner application extension. These
303 messages will occur after the TLS handshake and prior to exchange
306 A new message type is defined for use within the InnerApplication
309 - The InnerApplication message. This message may encapsulate any of
312 - The ApplicationPayload message. This message is used to carry
313 AVP (Attribute-Value Pair) sequences within the TLS/IA
314 extended handshake, in support of client-server applications
315 such as authentication.
317 - The IntermediatePhaseFinished message. This message confirms
318 session keys established during the current TLS/IA phase, and
319 indicates that at least one additional phase is to follow.
321 - The FinalPhaseFinished message. This message confirms session
322 keys established during the current TLS/IA phase, and
323 indicates that no further phases are to follow.
325 Two new alert codes are defined for use in TLS/IA:
327 - The InnerApplicationFailure alert. This error alert allows either
328 party to terminate the TLS/IA extended handshake due to a failure
329 in an application implemented via AVP sequences carried in
330 ApplicationPayload messages.
332 - The InnerApplicationVerification alert. This error alert allows
333 either party to terminate the TLS/IA extended handshake due to
334 incorrect verification data in a received
335 IntermediatePhaseFinished or FinalPhaseFinished message.
337 The following new assigned numbers are used in TLS/IA:
339 - "InnerApplicationExtension" extension type:37703
341 - "InnerApplication" record type: 24
343 - "InnerApplicationFailure" alert code: 208
345 - "InnerApplicationVerification" alert code:209
350 Paul Funk expires August 2005 [Page 6]
352 Internet-Draft February 2005
355 [Editor's note: I have not checked these types yet against types
356 defined in RFCs or drafts. The TLS RFC specifies that new record
357 types use the next number after ones already defined; hence I used
358 24, though I don't know if that is already taken.]
362 In TLS/IA, zero or more "application phases are inserted after the
363 TLS handshake and prior to ordinary data exchange. The last such
364 application phase is called the "final phase"; any application
365 phases prior to the final phase are called "intermediate phases".
367 Intermediate phases are only necessary if interim confirmation of
368 session keys generated during an application phase is desired.
370 Each application phase consists of ApplicationPayload handshake
371 messages exchanged by client and server to implement applications
372 such as authentication, plus concluding messages for cryptographic
373 confirmation. These messages are encapsulated in records with
374 ContentType of InnerApplication.
376 All application phases prior to the final phase use
377 IntermediatePhaseFinished rather than FinalPhaseFinished as the
378 concluding message. The final phase concludes with the
379 FinalPhaseFinished message.
381 Application phases may be omitted entirely only when session
382 resumption is used, provided both client and server agree that no
383 application phase is required. The client indicates in its
384 ClientHello whether it is willing to omit application phases in a
385 resumed session, and the server indicates in its ServerHello whether
386 any application phases are to ensue.
388 In each application phase, the client sends the first
389 ApplicationPayload message. ApplicationPayload messages are then
390 traded one at a time between client and server, until the server
391 concludes the phase by sending, in response to an ApplicationPayload
392 message from the client, an IntermediatePhaseFinished sequence to
393 conclude an intermediate phase, or a FinalPhaseFinished sequence to
394 conclude the final phase. The client then responds with its own
395 IntermediatePhaseFinished or FinalPhaseFinished message.
397 Note that the server MUST NOT send an IntermediatePhaseFinished or
398 FinalPhaseFinished message immediately after sending an
399 ApplicationPayload message. It must allow the client to send an
400 ApplicationPayload message prior to concluding the phase. Thus,
401 within any application phase, there will be one more
402 ApplicationPayload message sent by the client than sent by the
409 Paul Funk expires August 2005 [Page 7]
411 Internet-Draft February 2005
414 The server determines which type of concluding message is used,
415 either IntermediatePhaseFinished or FinalPhaseFinished, and the
416 client MUST echo the same type of concluding message. Each
417 IntermediatePhaseFinished or FinalPhaseFinished message provides
418 cryptographic confirmation of any session keys generated during the
419 current and any prior applications phases.
421 Each ApplicationPayload message contains opaque data interpreted as
422 an AVP (Attribute-Value Pair) sequence. Each AVP in the sequence
423 contains a typed data element. The exchanged AVPs allow client and
424 server to implement "applications" within a secure tunnel. An
425 application may be any procedure that someone may usefully define. A
426 typical application might be authentication; for example, the server
427 may authenticate the client based on password credentials using EAP.
428 Other possible applications include distribution of keys, validating
429 client integrity, setting up IPsec parameters, setting up SSL VPNs,
432 An "inner secret" is computed during each application phase that
433 mixes the TLS master secret with any session keys that have been
434 generated during the current and any previous application phases. At
435 the conclusion of each application phase, a new inner secret is
436 computed and is used to create verification data that is exchanged
437 via the IntermediatePhaseFinished or FinalPhaseFinished messages. By
438 mixing session keys of inner authentications with the TLS master
439 secret, certain man-in-the-middle attacks are thwarted [MITM].
443 Each intermediate application phase consists of ApplicationPayload
444 messages sent alternately by client and server, and a concluding
445 exchange of IntermediatePhaseFinished messages. The first and last
446 ApplicationPayload message in each intermediate phase is sent by the
447 client; the first IntermediatePhaseFinished message is sent by the
448 server. Thus the client begins the exchange with an
449 ApplicationPayload message and the server determines when to
450 conclude it by sending IntermediatePhaseFinished. When it receives
451 the server's IntermediatePhaseFinished message, the client sends its
452 own IntermediatePhaseFinished message, followed by an
453 ApplicationPayload message to begin the next handshake phase.
455 The final application proceeds in the same manner as the
456 intermediate phase, except that the FinalPhaseFinished message is
457 sent by the server and echoed by the client, and the client does not
458 send an ApplicationPayload message for the next phase because there
461 At the start of each application phase, the server MUST wait for the
462 client's opening ApplicationPayload message before it sends its own
463 ApplicationPayload message to the client. The client MAY NOT
464 initiate conclusion of an application handshake phase by sending the
468 Paul Funk expires August 2005 [Page 8]
470 Internet-Draft February 2005
473 first IntermediatePhaseFinished or FinalPhaseFinished message; it
474 MUST allow the server to initiate the conclusion of the phase.
476 Note that it is perfectly acceptable for either client or server to
477 send an ApplicationPayload message containing no AVPs. The client,
478 for example, may have no AVPs to send in its first or last
479 ApplicationPayload message during an application phase.
483 The inner secret is a 48-octet value used to confirm that the
484 endpoints of the TLS handshake are the same entities as the
485 endpoints of the inner authentications that may have been performed
486 during each application phase.
488 The inner secret is initialized at the conclusion of the TLS
489 handshake and permuted at the conclusion of each application phase.
491 The inner secret that results from the final application phase is
492 the final inner secret.
494 When a new (non-resumed) session is negotiated, the resulting final
495 inner secret is saved as part of the session state for use in
498 2.3.1 Computing the Inner Secret
500 At the conclusion of the TLS handshake, each party initializes the
503 - the master secret, if this is a new session
505 - the previously computed final inner secret of the original
506 session, if this is a resumed session
508 At the conclusion of each application phase, prior to computing
509 verification data for inclusion in the IntermediatePhaseFinished or
510 FinalPhaseFinished message, each party permutes the inner secret
511 using a PRF that includes session keys produced during the current
512 application phase. The value that results replaces the current inner
513 secret and is used to compute the verification data.
515 inner_secret = PRF(inner_secret,
516 "inner secret permutation",
517 SecurityParameters.server_random +
518 SecurityParameters.client_random +
519 session_key_material) [0..48];
521 session_key_material is the concatenation of session_key vectors,
522 one for each session key generated during the current phase, where:
527 Paul Funk expires August 2005 [Page 9]
529 Internet-Draft February 2005
532 opaque session_key<1..2^16-1>;
534 In other words, each session key is prefixed by a 2-octet length to
535 produce the session_key vector.
537 Since multiple session keys may be produced during a single
538 application phase, the following method is used to determine the
539 order of concatenation: Each session key is treated as an unsigned
540 big-endian numeric value, and the set of session keys is ordered
541 from lowest to highest. The session keys are then converted to
542 session_key vectors and concatenated in the determined order to form
543 session_key_material.
545 If no session keys were generated during the current phase,
546 session_key_material will be null.
548 Note that session_key_material itself is not a vector and therefore
549 not prefixed with the length of the entire collection of session_key
552 2.3.2 Exporting the Final Inner Secret
554 Note that, within TLS itself, the inner secret is used for
555 verification only, not for encryption. However, the inner secret
556 resulting from the final application phase may be exported for use
557 as a key from which additional session keys may be derived for
558 arbitrary purposes, including encryption of data communications
561 An exported inner secret should not be used directly as a session
562 key. Instead, additional keys should be derived from the inner
563 secret, for example by using a PRF, and the client and server
564 randoms should be incorporated into the derivation. This ensures
565 cryptographic separation between use of the inner secret for session
566 key confirmation and additional use of the inner secret outside
569 Note that for a resumed session that does not include an application
570 phase, the final inner secret of that session is identical to that
571 of the original session; hence, incorporation of randoms becomes
572 critically important to ensure the cryptographic separation of the
573 keys derived from sessions sharing a common original session.
575 2.3.3 Application Session Key Material
577 Many authentication protocols used today generate session keys that
578 are bound to the authentication. Such keying material is normally
579 intended for use in a subsequent data connection for encryption and
580 validation. For example, EAP-TLS, MS-CHAP-V2 and its alter ego EAP-
581 MS-CHAP-V2 each generate session keys.
586 Paul Funk expires August 2005 [Page 10]
588 Internet-Draft February 2005
591 Any session keys generated during an application phase MUST be used
592 to permute the TLS/IA inner secret between one phase and the next,
593 and MUST NOT be used for any other purpose.
595 Each authentication protocol may define how the session key it
596 generates is mapped to an octet sequence of some length for the
597 purpose of TLS/IA mixing. However, for protocols which do not
598 specify this (including the multitude of protocols that pre-date
599 TLS/IA) the following rules are defined. The first rule that applies
600 SHALL be the method for determining the session key:
602 - If the authentication protocol produces an MSK (as defined in
603 [RFC3784]), the MSK is used as the session key. Note that an MSK
606 - If the authentication protocol maps its keying material to the
607 RADIUS attributes MS-MPPE-Recv-Key and MS-MPPE-Send-Key
608 [RFC2548], then the keying material for those attributes are
609 concatenated, with MS-MPPE-Recv-Key first (Note that this rule
610 applies to MS-CHAP-V2 and EAP-MS-CHAP-V2.)
612 - If the authentication protocol uses a pseudo-random function to
613 generate keying material, that function is used to generate 64
614 octets for use as keying material.
616 Providing verification of the binding of session keys to the TLS
617 master secret is necessary to preclude man-in-the-middle attacks
618 against tunneled authentication protocols, as described in [MITM].
619 In such an attack, an unsuspecting client is induced to perform an
620 untunneled authentication with an attacker posing as a server; the
621 attacker then introduces the authentication protocol into a tunneled
622 authentication protocol, fooling an authentic server into believing
623 that the attacker is the authentic user.
625 By mixing both the TLS master secret and session keys generated
626 during application phase authentication into the inner secret used
627 for application phase verification, such attacks are thwarted, as it
628 guarantees that the same client both terminated the TLS handshake
629 and performed the application phase authentication. Note that the
630 session keys generated during authentication must be
631 cryptographically related to the authentication and not derivable
632 from data exchanged during authentication in order for the keying
633 material to be useful in thwarting such attacks.
635 In addition, the fact that the inner secret cryptographically
636 incorporates session keys from application phase authentications
637 provides additional protection when the inner secret is exported for
638 the purpose of generating additional keys for use outside of the TLS
639 exchange. If such an exported secret did not include keying material
640 from inner authentications, an eavesdropper who somehow knew the
641 server's private key could, in an RSA-based handshake, determine the
645 Paul Funk expires August 2005 [Page 11]
647 Internet-Draft February 2005
650 exported secret and hence would be able to compute the additional
651 keys that are based on it. When inner authentication keying material
652 is incorporated into the exported secret, such an attack becomes
655 2.4 Session Resumption
657 A TLS/IA initial handshake phase may be resumed using standard
658 mechanisms defined in [RFC2246]. When the TLS session is resumed,
659 client and server may not deem it necessary to exchange AVPs in one
660 or more additional application phases, as the resumption itself may
661 provide all the security needed.
663 The client indicates within the InnerApplicationExtension message in
664 ClientHello whether it requires AVP exchange when session resumption
665 occurs. If it indicates that it does not, then the server may at its
666 option omit application phases and the two parties proceed to upper
667 layer data communications immediately upon completion of the TLS
668 handshake. The server indicates whether application phases are to
669 follow the TLS handshake in its InnerApplication extension message
672 Note that [RFC3546] specifically states that when session resumption
673 is used, the server MUST ignore any extensions in the ClientHello.
674 However, it is not possible to comply with this requirement for the
675 Inner Application extension, since even in a resumed session it may
676 be necessary to include application phases, and whether they must be
677 included is negotiated in the extension message itself. Therefore,
678 the [RFC3546] provision is specifically overridden for the single
679 case of the Inner Application extension, which is considered an
680 exception to this rule.
682 A TLS/IA session MAY NOT be resumed if an application phase resulted
683 in failure, even though the TLS handshake itself succeeded. Both
684 client and server MUST NOT save session state for possible future
685 resumption unless the TLS handshake and all subsequent application
688 2.5 Error Termination
690 The TLS/IA handshake may be terminated by either party sending a
691 fatal alert, following standard TLS procedures.
693 2.6 Negotiating the Inner Application Extension
695 Use of the InnerApplication extension follows [RFC3546]. The client
696 proposes use of this extension by including the
697 InnerApplicationExtension message in the client_hello_extension_list
698 of the extended ClientHello. If this message is included in the
699 ClientHello, the server MAY accept the proposal by including the
700 InnerApplicationExtension message in the server_hello_extension_list
704 Paul Funk expires August 2005 [Page 12]
706 Internet-Draft February 2005
709 of the extended ServerHello. If use of this extension is either not
710 proposed by the client or not confirmed by the server, the
711 InnerApplication record type MUST NOT be used.
713 2.7 InnerApplication Protocol
715 All specifications of TLS/IA messages follow the usage defined in
718 2.7.1 InnerApplicationExtension
722 } AppPhaseOnResumption;
725 AppPhaseOnResumption app_phase_on_resumption;
726 } InnerApplicationExtension;
728 If the client wishes to propose use of the Inner Application
729 extension, it must include the InnerApplicationExtension message in
730 the extension_data vector in the Extension structure in its extended
733 If the server wishes to confirm use of the Inner Application
734 extension that has been proposed by the client, it must include the
735 InnerApplicationExtension message in the extension_data vector in
736 the Extension structure in its extended ServerHello message.
738 The AppPhaseOnResumption enumeration allow client and server to
739 negotiate an abbreviated, single-phase handshake when session
740 resumption is employed. If the client sets app_phase_on_resumption
741 to "no", and if the server resumes the previous session, then the
742 server MAY set app_phase_on_resumption to "no" in the
743 InnerApplication message it sends to the client. If the server sets
744 app_phase_on_resumption to "no", no application phases occur and the
745 TLS connection proceeds to upper layer data exchange immediately
746 upon conclusion of the TLS handshake.
748 The server MUST set app_phase_on_resumption to "yes" if the client
749 set app_phase_on_resumption to "yes" or if the server does not
750 resume the session. The server MAY set app_phase_on_resumption to
751 "yes" for a resumed session even if the client set
752 app_phase_on_resumption to "no", as the server may have reason to
753 proceed with one or more application phases.
755 If the server sets app_phase_on_resumption to "yes" for a resumed
756 session, then the client MUST initiate an application phase at the
757 conclusion of the TLS handshake.
763 Paul Funk expires August 2005 [Page 13]
765 Internet-Draft February 2005
768 The value of app_phase_on_resumption applies to the current
769 handshake only; that is, it is possible for app_phase_on_resumption
770 to have different values in two handshakes that are both resumed
771 from the same original TLS session.
773 2.7.2 InnerApplication Message
776 application_payload(0), intermediate_phase_finished(1),
777 final_phase_finished(2), (255)
778 } InnerApplicationType;
781 InnerApplicationType msg_type;
783 select (InnerApplicationType) {
784 case application_payload: ApplicationPayload;
785 case intermediate_phase_finished:
786 IntermediatePhaseFinished;
787 case final_phase_finished: FinalPhaseFinished;
791 The InnerApplication message carries any of the message types
792 defined for the InnerApplication protocol.
794 2.7.3 IntermediatePhaseFinished and FinalPhaseFinished Messages
797 opaque verify_data[12];
800 PhaseFinished IntermediatePhaseFinished;
802 PhaseFinished FinalPhaseFinished;
805 PRF(inner_secret, finished_label) [0..11];
808 when sent by the client, the string "client phase finished"
809 when sent by the server, the string "server phase finished"
811 The IntermediatePhaseFinished and FinalPhaseFinished messages have
812 the same structure and include verification data based on the
813 current inner secret. IntermediatePhaseFinished is sent by the
814 server and echoed by the client to conclude an intermediate
815 application phase, and FinalPhaseFinished is used in the same manner
816 to conclude the final application phase.
822 Paul Funk expires August 2005 [Page 14]
824 Internet-Draft February 2005
827 2.7.4 The ApplicationPayload Message
829 The ApplicationPayload message carries an AVP sequence during an
830 application handshake phase. It is defined as follows:
833 opaque avps[InnerApplication.length];
834 } ApplicationPayload;
837 The AVP sequence, treated as an opaque sequence of octets.
839 InnerApplication.length
840 The length field in the encapsulating InnerApplication
843 Note that the "avps" element has its length defined in square
844 bracket rather than angle bracket notation, implying a fixed rather
845 than variable length vector. This avoids having the length of the
846 AVP sequence specified redundantly both in the encapsulating
847 InnerApplication message and as a length prefix in the avps element
852 Two new alert codes are defined for use during an application phase.
853 The AlertLevel for either of these alert codes MUST be set to
856 InnerApplicationFailure
857 An InnerApplicationFailure error alert may be sent by either
858 party during an application phase. This indicates that the
859 sending party considers the negotiation to have failed due to an
860 application carried in the AVP sequences, for example, a failed
863 InnerApplicationVerification
864 An InnerApplicationVerification error alert is sent by either
865 party during an application phase to indicate that the received
866 IntermediatePhaseFinished or FinalPhaseFinished is invalid, that
867 is, contains verification data that does not match what is
870 Note that other alerts are possible during an application phase; for
871 example, decrypt_error. The InnerApplicationFailure alert relates
872 specifically to the failure of an application implemented via AVP
873 sequences; for example, failure of an EAP or other authentication
874 method, or information passed within the AVP sequence that is found
881 Paul Funk expires August 2005 [Page 15]
883 Internet-Draft February 2005
886 3 Encapsulation of AVPs within ApplicationPayload Messages
888 During application phases of the TLS handshake, information is
889 exchanged between client and server through the use of attribute-
890 value pairs (AVPs). This data is encrypted using the then-current
891 cipher state established during the preceding handshake phase.
893 The AVP format chosen for TLS/IA is compatible with the Diameter AVP
894 format. This does not in any way represent a requirement that
895 Diameter be supported by any of the devices or servers participating
896 in the TLS/IA conversation, whether directly as client or server or
897 indirectly as a backend authenticator. Use of this format is merely
898 a convenience. Diameter is a superset of RADIUS and includes the
899 RADIUS attribute namespace by definition, though it does not limit
900 the size of an AVP as does RADIUS. RADIUS, in turn, is a widely
901 deployed AAA protocol and attribute definitions exist for all
902 commonly used password authentication protocols, including EAP.
904 Thus, Diameter is not considered normative except as specified in
905 this document. Specifically, the AVP Codes used in TLS/IA are
906 semantically equivalent to those defined for Diameter, and, by
909 Use of the RADIUS/Diameter namespace allows a TLS/IA server to
910 easily translate between AVPs it uses to communicate with clients
911 and the protocol requirements of AAA servers that are widely
912 deployed. Plus, it provides a well-understood mechanism to allow
913 vendors to extend that namespace for their particular requirements.
917 The format of an AVP is shown below. All items are in network, or
918 big-endian, order; that is, they have most significant octet first.
921 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
922 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
924 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
925 |V M r r r r r r| AVP Length |
926 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
928 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
934 The AVP Code is four octets and, combined with the Vendor-ID
935 field if present, identifies the attribute uniquely. The first
940 Paul Funk expires August 2005 [Page 16]
942 Internet-Draft February 2005
945 256 AVP numbers represent attributes defined in RADIUS. AVP
946 numbers 256 and above are defined in Diameter.
950 The AVP Flags field is one octet, and provides the receiver with
951 information necessary to interpret the AVP.
953 The 'V' (Vendor-Specific) bit indicates whether the optional
954 Vendor-ID field is present. When set to 1, the Vendor-ID field is
955 present and the AVP Code is interpreted according to the
956 namespace defined by the vendor indicated in the Vendor-ID field.
958 The 'M' (Mandatory) bit indicates whether support of the AVP is
959 required. When set to 0, this indicates that the AVP may be
960 safely ignored if the receiving party does not understand or
961 support it. When set to 1, if the receiving party does not
962 understand or support the AVP it MUST fail the negotiation by
963 sending an InnerApplicationFailure error alert.
965 The 'r' (reserved) bits are unused and must be set to 0.
969 The AVP Length field is three octets, and indicates the length of
970 this AVP including the AVP Code, AVP Length, AVP Flags, Vendor-ID
971 (if present) and Data.
975 The Vendor-ID field is present if and only if the 'V' bit is set
976 in the AVP Flags field. It is four octets, and contains the
977 vendor's IANA-assigned "SMI Network Management Private Enterprise
978 Codes" [RFC1700] value. Vendors defining their own AVPs must
979 maintain a consistent namespace for use of those AVPs within
980 RADIUS, Diameter and TLS/IA.
982 A Vendor-ID value of zero is semantically equivalent to absence
983 of the Vendor-ID field altogether.
987 Data encapsulated within the TLS Record Layer must consist entirely
988 of a sequence of zero or more AVPs. Each AVP must begin on a 4-octet
989 boundary relative to the first AVP in the sequence. If an AVP is not
990 a multiple of 4 octets, it must be padded with 0s to the next 4-
993 Note that the AVP Length does not include the padding.
999 Paul Funk expires August 2005 [Page 17]
1001 Internet-Draft February 2005
1004 3.3 Guidelines for Maximum Compatibility with AAA Servers
1006 When maximum compatibility with AAA servers is desired, the
1007 following guidelines for AVP usage are suggested:
1009 - Non-vendor-specific AVPs should be selected from the set of
1010 attributes defined for RADIUS; that is, attributes with codes
1011 less than 256. This provides compatibility with both RADIUS and
1014 - Vendor-specific AVPs should be defined in terms of RADIUS.
1015 Vendor-specific RADIUS attributes translate to Diameter
1016 automatically; the reverse is not true. RADIUS vendor-specific
1017 attributes use RADIUS attribute 26 and include vendor ID, vendor-
1018 specific attribute code and length; see [RFC2865] for details.
1020 4 Tunneled Authentication within Application Phases
1022 TLS/IA permits user authentication information to be tunneled within
1023 an application phase between client and server, protecting the
1024 security of the authentication information against active and
1027 Any type of password or other authentication may be tunneled. Also,
1028 multiple tunneled authentications may be performed. Normally,
1029 tunneled authentication is used when the client has not been issued
1030 a certificate and the TLS handshake provides only one-way
1031 authentication of the server to the client; however, in certain
1032 cases it may be desired to perform certificate authentication of the
1033 client during the initial handshake phase as well as tunneled user
1034 authentication in a subsequent application phase.
1036 This section establishes rules for using common authentication
1037 mechanisms within TLS/IA. Any new authentication mechanism should in
1038 general be covered by these rules if it is defined as an EAP type.
1039 Authentication mechanisms whose use within TLS/IA is not covered
1040 within this specification may require separate standardization,
1041 preferably within the standard that describes the authentication
1042 mechanism in question.
1044 4.1 Implicit challenge
1046 Certain authentication protocols that use a challenge/response
1047 mechanism rely on challenge material that is not generated by the
1048 authentication server, and therefore require special handling.
1050 In PPP protocols such CHAP, MS-CHAP and MS-CHAP-V2, for example, the
1051 Network Access Server (NAS) issues a challenge to the client, the
1052 client then hashes the challenge with the password and forwards the
1053 response to the NAS. The NAS then forwards both challenge and
1054 response to a AAA server. But because the AAA server did not itself
1058 Paul Funk expires August 2005 [Page 18]
1060 Internet-Draft February 2005
1063 generate the challenge, such protocols are susceptible to replay
1066 If the client were able to create both challenge and response,
1067 anyone able to observe a CHAP or MS-CHAP exchange could pose as that
1068 user by replaying that challenge and response into a TLS/IA
1071 To make these protocols secure in TLS/IA, it is necessary to provide
1072 a mechanism to produce a challenge that the client cannot control or
1075 When a challenge-based authentication mechanism is used, both client
1076 and server use the TLS PRF function to generate as many octets as
1077 are required for the challenge, using the constant string "inner
1078 application challenge", based on the then-current master secret and
1079 random values established during the initial handshake phase:
1081 IA_challenge = PRF(final_inner_secret,
1082 "inner application challenge",
1083 SecurityParameters.server_random +
1084 SecurityParameters.client_random);
1086 4.2 Tunneled Authentication Protocols
1088 This section describes the rules for tunneling specific
1089 authentication protocols within TLS/IA.
1091 For each protocol, the RADIUS RFC that defines the relevant
1092 attribute formats is cited. Note that these attributes are
1093 encapsulated as described in section 3.1; that is, as Diameter
1094 attributes, not as RADIUS attributes. In other words, the AVP Code,
1095 Length, Flags and optional Vendor-ID are formatted as described in
1096 section 3.1, while the Data is formatted as described by the cited
1099 All tunneled authentication protocols except EAP must be initiated
1100 by the client in the first ApplicationPayload message of an
1101 application phase. EAP may be initiated by the client in the first
1102 ApplicationPayload message of an application phase; it may also be
1103 initiated by the server in any ApplicationPayload message.
1105 The authentication protocols described below may be performed
1106 directly by the TLS/IA server or may be forwarded to a backend AAA
1107 server. For authentication protocols that generate session keys, the
1108 backend server must return those session keys to the TLS/IA server
1109 in order to allow the protocol to succeed within TLS/IA. RADIUS or
1110 Diameter servers are suitable backend AAA servers for this purpose.
1111 RADIUS servers typically return session keys in MS-MPPE-Recv-Key and
1112 MS-MPPE-Send-Key attributes [RFC2548]; Diameter servers return
1113 session keys in the EAP-Master-Session-Key AVP [AAA-EAP].
1117 Paul Funk expires August 2005 [Page 19]
1119 Internet-Draft February 2005
1124 EAP is described in [RFC3784]; RADIUS attribute formats are
1125 described in [RFC3579].
1127 When EAP is the tunneled authentication protocol, each tunneled EAP
1128 packet between the client and server is encapsulated in an EAP-
1131 Either client or server may initiate EAP.
1133 The client is the first to transmit within any application phase,
1134 and it may include an EAP-Response/Identity AVP in its
1135 ApplicationPayload message to begin an EAP conversation.
1136 Alternatively, if the client does not initiate EAP the server may,
1137 by including an EAP-Request/Identity AVP in its ApplicationPayload
1140 The client's EAP-Response/Identity provides the actual username; the
1141 privacy of the user's identity is now guaranteed by the TLS
1142 encryption. This username must be a Network Access Identifier (NAI)
1143 [RFC2486]; that is, it must be in the following format:
1147 The @realm portion is optional, and is used to allow the server to
1148 forward the EAP message sequence to the appropriate server in the
1149 AAA infrastructure when necessary.
1151 The EAP authentication between client and server proceeds normally,
1152 as described in [RFC3784]. However, upon completion the server does
1153 not send an EAP-Success or EAP-Failure AVP. Instead, the server
1154 signals success when it concludes the application phase by issuing a
1155 Finished or PhaseFinished message, or it signals failure by issuing
1156 an InnerApplicationFailure alert.
1158 Note that the client may also issue an InnerApplicationFailure
1159 alert, for example, when authentication of the server fails in a
1160 method providing mutual authentication.
1164 The CHAP algorithm is described in [RFC1994]; RADIUS attribute
1165 formats are described in [RFC2865].
1167 Both client and server generate 17 octets of challenge material,
1168 using the constant string "inner application challenge" as described
1169 above. These octets are used as follows:
1171 CHAP-Challenge [16 octets]
1172 CHAP Identifier [1 octet]
1176 Paul Funk expires August 2005 [Page 20]
1178 Internet-Draft February 2005
1181 The client initiates CHAP by including User-Name, CHAP-Challenge and
1182 CHAP-Password AVPs in the first ApplicationPayload message in any
1183 application phase. The CHAP-Challenge value is taken from the
1184 challenge material. The CHAP-Password consists of CHAP Identifier,
1185 taken from the challenge material; and CHAP response, computed
1186 according to the CHAP algorithm.
1188 Upon receipt of these AVPs from the client, the server must verify
1189 that the value of the CHAP-Challenge AVP and the value of the CHAP
1190 Identifier in the CHAP-Password AVP are equal to the values
1191 generated as challenge material. If either item does not match
1192 exactly, the server must reject the client. Otherwise, it validates
1193 the CHAP-Challenge to determine the result of the authentication.
1197 The MS-CHAP algorithm is described in [RFC2433]; RADIUS attribute
1198 formats are described in [RFC2548].
1200 Both client and server generate 9 octets of challenge material,
1201 using the constant string "inner application challenge" as described
1202 above. These octets are used as follows:
1204 MS-CHAP-Challenge [8 octets]
1207 The client initiates MS-CHAP by including User-Name, MS-CHAP-
1208 Challenge and MS-CHAP-Response AVPs in the first ApplicationPayload
1209 message in any application phase. The MS-CHAP-Challenge value is
1210 taken from the challenge material. The MS-CHAP-Response consists of
1211 Ident, taken from the challenge material; Flags, set according the
1212 client preferences; and LM-Response and NT-Response, computed
1213 according to the MS-CHAP algorithm.
1215 Upon receipt of these AVPs from the client, the server must verify
1216 that the value of the MS-CHAP-Challenge AVP and the value of the
1217 Ident in the client's MS-CHAP-Response AVP are equal to the values
1218 generated as challenge material. If either item does not match
1219 exactly, the server must reject the client. Otherwise, it validates
1220 the MS-CHAP-Challenge to determine the result of the authentication.
1224 The MS-CHAP-V2 algorithm is described in [RFC2759]; RADIUS attribute
1225 formats are described in [RFC2548].
1227 Both client and server generate 17 octets of challenge material,
1228 using the constant string "inner application challenge" as described
1229 above. These octets are used as follows:
1235 Paul Funk expires August 2005 [Page 21]
1237 Internet-Draft February 2005
1240 MS-CHAP-Challenge [16 octets]
1243 The client initiates MS-CHAP-V2 by including User-Name, MS-CHAP-
1244 Challenge and MS-CHAP2-Response AVPs in the first ApplicationPayload
1245 message in any application phase. The MS-CHAP-Challenge value is
1246 taken from the challenge material. The MS-CHAP2-Response consists of
1247 Ident, taken from the challenge material; Flags, set to 0; Peer-
1248 Challenge, set to a random value; and Response, computed according
1249 to the MS-CHAP-V2 algorithm.
1251 Upon receipt of these AVPs from the client, the server must verify
1252 that the value of the MS-CHAP-Challenge AVP and the value of the
1253 Ident in the client's MS-CHAP2-Response AVP are equal to the values
1254 generated as challenge material. If either item does not match
1255 exactly, the server must reject the client. Otherwise, it validates
1256 the MS-CHAP2-Challenge.
1258 If the MS-CHAP2-Challenge received from the client is correct, the
1259 server tunnels the MS-CHAP2-Success AVP to the client.
1261 Upon receipt of the MS-CHAP2-Success AVP, the client is able to
1262 authenticate the server. In its next InnerApplicationPayload message
1263 to the server, the client does not include any MS-CHAP-V2 AVPs.
1264 (This may result in an empty InnerApplicationPayload if no other
1265 AVPs need to be sent.)
1267 If the MS-CHAP2-Challenge received from the client is not correct,
1268 the server tunnels an MS-CHAP2-Error AVP to the client. This AVP
1269 contains a new Ident and a string with additional information such
1270 as error reason and whether a retry is allowed. If the error reason
1271 is an expired password and a retry is allowed, the client may
1272 proceed to change the user's password. If the error reason is not an
1273 expired password or if the client does not wish to change the user's
1274 password, it issues an InnerApplicationFailure alert.
1276 If the client does wish to change the password, it tunnels MS-CHAP-
1277 NT-Enc-PW, MS-CHAP2-CPW, and MS-CHAP-Challenge AVPs to the server.
1278 The MS-CHAP2-CPW AVP is derived from the new Ident and Challenge
1279 received in the MS-CHAP2-Error AVP. The MS-CHAP-Challenge AVP simply
1280 echoes the new Challenge.
1282 Upon receipt of these AVPs from the client, the server must verify
1283 that the value of the MS-CHAP-Challenge AVP and the value of the
1284 Ident in the client's MS-CHAP2-CPW AVP match the values it sent in
1285 the MS-CHAP2-Error AVP. If either item does not match exactly, the
1286 server must reject the client. Otherwise, it validates the MS-CHAP2-
1289 If the MS-CHAP2-CPW AVP received from the client is correct, and the
1290 server is able to change the user's password, the server tunnels the
1294 Paul Funk expires August 2005 [Page 22]
1296 Internet-Draft February 2005
1299 MS-CHAP2-Success AVP to the client and the negotiation proceeds as
1302 Note that additional AVPs associated with MS-CHAP-V2 may be sent by
1303 the server; for example, MS-CHAP-Domain. The server must tunnel such
1304 authentication-related AVPs along with the MS-CHAP2-Success.
1308 PAP RADIUS attribute formats are described in [RFC2865].
1310 The client initiates PAP by including User-Name and User-Password
1311 AVPs in the first ApplicationPayload message in any application
1314 In RADIUS, User-Password is padded with nulls to a multiple of 16
1315 octets, then encrypted using a shared secret and other packet
1318 A TLS/IA, however, does not RADIUS-encrypt the password since all
1319 application phase data is already encrypted. The client SHOULD,
1320 however, null-pad the password to a multiple of 16 octets, to
1321 obfuscate its length.
1323 Upon receipt of these AVPs from the client, the server may be able
1324 to decide whether to authenticate the client immediately, or it may
1325 need to challenge the client for more information.
1327 If the server wishes to issue a challenge to the client, it MUST
1328 tunnel the Reply-Message AVP to the client; this AVP normally
1329 contains a challenge prompt of some kind. It may also tunnel
1330 additional AVPs if necessary, such the Prompt AVP. Upon receipt of
1331 the Reply-Message AVPs, the client tunnels User-Name and User-
1332 Password AVPs again, with the User-Password AVP containing new
1333 information in response to the challenge. This process continues
1334 until the server determines the authentication has succeeded or
1337 4.3 Performing Multiple Authentications
1339 In some cases, it is desirable to perform multiple user
1340 authentications. For example, a server may want first to
1341 authenticate the user by password, then by token card.
1343 The server may perform any number of additional user authentications
1344 using EAP, simply by issuing a EAP-Request with a new protocol type
1345 once the previous authentication has completed..
1347 For example, a server wishing to perform MD5-Challenge followed by
1348 Generic Token Card would first issue an EAP-Request/MD5-Challenge
1349 AVP and receive a response. If the response is satisfactory, it
1353 Paul Funk expires August 2005 [Page 23]
1355 Internet-Draft February 2005
1358 would then issue EAP-Request/Generic Token Card AVP and receive a
1359 response. If that response were also satisfactory, it would consider
1360 the user authenticated.
1362 5 Example Message Sequences
1364 This section presents a variety of possible TLS/IA message
1365 sequences. These examples do not attempt to exhaustively depict all
1368 Parentheses indicate optional TLS messages. Brackets indicate
1369 optional message exchanges. Ellipsis (. . .) indicates optional
1370 repetition of preceding messages.
1372 5.1 Full Initial Handshake with Multiple Application Phases
1374 The diagram below depicts a full initial handshake phase followed by
1375 two application phases.
1377 Note that the client concludes the intermediate phase and starts the
1378 final phase in an uninterrupted sequence of three messages:
1379 ChangeCipherSpec and PhaseFinished belong to the intermediate phase,
1380 and ApplicationPayload belongs to the final phase.
1386 ClientHello -------->
1390 (CertificateRequest)
1391 <-------- ServerHelloDone
1400 *** Intermediate Phase:
1401 ApplicationPayload -------->
1404 <-------- ApplicationPayload
1406 ApplicationPayload -------->
1412 Paul Funk expires August 2005 [Page 24]
1414 Internet-Draft February 2005
1420 IntermediatePhaseFinished
1421 IntermediatePhaseFinished
1423 ApplicationPayload -------->
1426 <-------- ApplicationPayload
1428 ApplicationPayload -------->
1432 <-------- FinalPhaseFinished
1434 FinalPhaseFinished -------->
1436 5.2 Resumed Session with Single Application Phase
1438 The diagram below depicts a resumed session followed by a single
1441 Note that the client concludes the initial phase and starts the
1442 final phase in an uninterrupted sequence of three messages:
1443 ChangeCipherSpec and PhaseFinished belong to the initial phase, and
1444 ApplicationPayload belongs to the final phase.
1450 ClientHello -------->
1457 ApplicationPayload -------->
1460 <-------- ApplicationPayload
1462 ApplicationPayload -------->
1466 <-------- FinalPhaseFinished
1471 Paul Funk expires August 2005 [Page 25]
1473 Internet-Draft February 2005
1476 FinalPhaseFinished -------->
1478 5.3 Resumed Session with No Application Phase
1480 The diagram below depicts a resumed session without any subsequent
1481 application phase. This will occur if the client indicates in its
1482 ClientInnerApplication message that no application phase is required
1483 and the server concurs.
1485 Note that this message sequence is identical to that of a standard
1486 TLS resumed session.
1492 ClientHello -------->
1499 6 Security Considerations
1501 This document introduces a new TLS extension called "Inner
1502 Application". When TLS is used with the Inner Application extension
1503 (TLS/IA), additional messages are exchanged during the TLS
1504 handshake. Hence a number of security issues need to be taken into
1505 consideration. Since the security heavily depends on the information
1506 (called "applications") which are exchanged between the TLS client
1507 and the TLS server as part of the TLS/IA extension we try to
1508 classify them into two categories: The first category considers the
1509 case where the exchange results in the generation of keying
1510 material. This is, for example, the case with many EAP methods. EAP
1511 is one of the envisioned main "applications". The second category
1512 focuses on cases where no session key is generated. The security
1513 treatment of the latter category is discouraged since it is
1514 vulnerability to man-in-the-middle attacks if the two sessions
1515 cannot be bound to each other as shown in [MITM].
1517 Subsequently, we investigate a number of security issues:
1519 - Architecture and Trust Model
1521 For many of the use cases in this document we assume that three
1522 functional entities participate in the protocol exchange: TLS
1523 client, TLS server and a AAA infrastructure (typically consisting
1524 of a AAA server and possibly a AAA broker). The protocol exchange
1525 described in this document takes place between the TLS client and
1526 the TLS server. The interaction between the AAA client (which
1530 Paul Funk expires August 2005 [Page 26]
1532 Internet-Draft February 2005
1535 corresponds to the TLS server) and the AAA server is described in
1536 the respective AAA protocol documents and therefore outside the
1537 scope of this document. The trust model behind this architecture
1538 with respect to the authentication, authorization, session key
1539 establishment and key transport within the AAA infrastructure is
1540 discussed in [KEYING].
1544 This document assumes that the TLS server is authenticated to the
1545 TLS client as part of the authentication procedure of the initial
1546 TLS Handshake. This approach is similar to the one chosen with
1547 the EAP support in IKEv2 (see [IKEv2]). Typically, public key
1548 based server authentication is used for this purpose. More
1549 interesting is the client authentication property whereby
1550 information exchanged as part of the Inner Application is used to
1551 authenticate (or authorize) the client. For example, if EAP is
1552 used as an inner application then EAP methods are used to perform
1553 authentication and key agreement between the EAP peer (most
1554 likely the TLS client) and the EAP server (i.e., AAA server).
1558 Throughout this document it is assumed that the TLS server can be
1559 authorized by the TLS client as a legitimate server as part of
1560 the authentication procedure of the initial TLS Handshake. The
1561 entity acting as TLS client can be authorized either by the TLS
1562 server or by the AAA server (if the authorization decision is
1563 offloaded). Typically, the authenticated identity is used to
1564 compute the authorization decision but credential-based
1565 authorization mechanisms may be used as well.
1567 - Man-in-the-Middle Attack
1569 Man-in-the-middle attacks have become a concern with tunneled
1570 authentication protocols because of the discovered
1571 vulnerabilities (see [MITM]) of a missing cryptographic binding
1572 between the independent protocol sessions. This document also
1573 proposes a tunneling protocol, namely individual inner
1574 application sessions are tunneled within a previously executed
1575 session. The first protocol session in this exchange is the
1576 initial TLS Handshake. To avoid man-in-the-middle attacks a
1577 number of sections address how to establish such a cryptographic
1578 binding (see Section 2.3 and Error! Reference source not found.).
1580 - User Identity Confidentiality
1582 The TLS/IA extension allows splitting the authentication of the
1583 TLS server from the TLS client into two separate sessions. As one
1584 of the advantages, this provides active user identity
1585 confidentiality since the TLS client is able to authenticate the
1589 Paul Funk expires August 2005 [Page 27]
1591 Internet-Draft February 2005
1594 TLS server and to establish a unilateral authenticated and
1595 confidentiality-protected channel prior to starting the client-
1596 side authentication.
1598 - Session Key Establishment
1600 TLS [RFC2246] defines how session key material produced during
1601 the TLS Handshake is generated with the help of a pseudo-random
1602 function to expand it to keying material of the desired length
1603 for later usage in the TLS Record Layer. Section 2.3 gives some
1604 guidelines with regard to the master key generation. Since the
1605 TLS/IA extension supports multiple exchanges whereby each phase
1606 concludes with a generated keying material. In addition to the
1607 keying material established as part of TLS itself, most inner
1608 applications will produce their keying material. For example,
1609 keying material established as part of an EAP method must be
1610 carried from the AAA server to the AAA client. Details are
1611 subject to the specific AAA protocol (for example, EAP usage in
1614 - Denial of Service Attacks
1616 This document does not modify the initial TLS Handshake and as
1617 such, does not introduce new vulnerabilities with regard to DoS
1618 attacks. Since the TLS/IA extension allows to postpone the
1619 client-side authentication to a later stage in the protocol
1620 phase. As such, it allows malicious TLS clients to initiate a
1621 number of exchanges while remaining anonymous. As a consequence,
1622 state at the server is allocated and computational efforts are
1623 required at the server side. Since the TLS client cannot be
1624 stateless this is not strictly a DoS attack.
1626 - Confidentiality Protection and Dictionary Attack Resistance
1628 Similar to the user identity confidentiality property the usage
1629 of the TLS/IA extension allows to establish a unilateral
1630 authenticated tunnel which is confidentiality protected. This
1631 tunnel protects the inner application information elements to be
1632 protected against active adversaries and therefore provides
1633 resistance against dictionary attacks when password-based
1634 authentication protocols are used inside the tunnel. In general,
1635 information exchanged inside the tunnel experiences
1636 confidentiality protection.
1638 - Downgrading Attacks
1640 This document defines a new extension. The TLS client and the TLS
1641 server indicate the capability to support the TLS/IA extension as
1642 part of the client_hello_extension_list and the
1643 server_hello_extension_list payload. More details can be found in
1644 Section 2.6. To avoid downgrading attacks whereby an adversary
1648 Paul Funk expires August 2005 [Page 28]
1650 Internet-Draft February 2005
1653 removes a capability from the list is avoided by the usage of the
1654 Finish or PhaseFinished message as described in Section Error!
1655 Reference source not found..
1659 7.1 Normative References
1661 [RFC1700] Reynolds, J., and J. Postel, "Assigned Numbers", RFC
1664 [RFC1994] Simpson, W., "PPP Challenge Handshake Authentication
1665 Protocol (CHAP)", RFC 1994, August 1996.
1667 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
1668 Requirement Levels", RFC 2119, March 1997.
1670 [RFC2246] Dierks, T., and C. Allen, "The TLS Protocol Version
1671 1.0", RFC 2246, November 1998.
1673 [RFC2433] Zorn, G., and S. Cobb, "Microsoft PPP CHAP Extensions",
1674 RFC 2433, October 1998.
1676 [RFC2486] Aboba, B., and M. Beadles, "The Network Access
1677 Identifier", RFC 2486, January 1999.
1679 [RFC2548] Zorn, G., "Microsoft Vendor-specific RADIUS Attributes",
1680 RFC 2548, March 1999.
1682 [RFC2759] Zorn, G., "Microsoft PPP CHAP Extensions, Version 2",
1683 RFC 2759, January 2000.
1685 [RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson,
1686 "Remote Authentication Dial In User Service (RADIUS)",
1687 RFC 2865, June 2000.
1689 [RFC3546] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen,
1690 J., and T. Wright, "Transport Layer Security (TLS)
1691 Extensions", RFC 3546, June 2003.
1693 [RFC3579] Aboba, B., and P.Calhoun, "RADIUS (Remote Authentication
1694 Dial In User Service) Support For Extensible
1695 Authentication Protocol (EAP)", RFC 3579, September
1698 [RFC3588] Calhoun, P., Loughney, J., Guttman, E., Zorn, G., and J.
1699 Arkko, "Diameter Base Protocol", RFC 3588, July 2003.
1701 [RFC3784] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and
1702 H. Levkowetz, "PPP Extensible Authentication Protocol
1703 (EAP)", RFC 3784, June 2004.
1707 Paul Funk expires August 2005 [Page 29]
1709 Internet-Draft February 2005
1713 7.2 Informative References
1715 [RFC1661] Simpson, W. (Editor), "The Point-to-Point Protocol
1716 (PPP)", STD 51, RFC 1661, July 1994.
1718 [RFC2716] Aboba, B., and D. Simon, "PPP EAP TLS Authentication
1719 Protocol", RFC 2716, October 1999.
1721 [EAP-TTLS] Funk, P., and S. Blake-Wilson, " EAP Tunneled TLS
1722 Authentication Protocol (EAP-TTLS)", draft-ietf-pppext-
1723 eap-ttls-05.txt, July 2004.
1725 [EAP-PEAP] Palekar, A., Simon, D., Salowey, J., Zhou, H., Zorn, G.,
1726 and S. Josefsson, "Protected EAP Protocol (PEAP) Version
1727 2", draft-josefsson-pppext-eap-tls-eap-08.txt, July
1730 [TLS-PSK] Eronen, P., and H. Tschofenig, "Pre-Shared Key
1731 Ciphersuites for Transport Layer Security (TLS)", draft-
1732 ietf-tls-psk-01.txt, August 2004.
1734 [802.1X] IEEE Standards for Local and Metropolitan Area Networks:
1735 Port based Network Access Control, IEEE Std 802.1X-2001,
1738 [MITM] Asokan, N., Niemi, V., and K. Nyberg, "Man-in-the-Middle
1739 in Tunneled Authentication",
1740 http://www.saunalahti.fi/~asokan/research/mitm.html,
1741 Nokia Research Center, Finland, October 24 2002.
1743 [KEYING] Aboba, B., Simon, D., Arkko, J. and H. Levkowetz, "EAP
1744 Key Management Framework", draft-ietf-eap-keying-01.txt
1745 (work in progress), October 2003.
1747 [IKEv2] C.Kaufman, "Internet Key Exchange (IKEv2) Protocol",
1748 draft-ietf-ipsec-ikev2-16.txt (work in progress),
1751 [AAA-EAP] Eronen, P., Hiller, T. and G. Zorn, "Diameter Extensible
1752 Authentication Protocol (EAP) Application", draft-ietf-
1753 aaa-eap-03.txt (work in progress), October 2003.
1755 8 Authors' Addresses
1757 Questions about this memo can be directed to:
1766 Paul Funk expires August 2005 [Page 30]
1768 Internet-Draft February 2005
1772 Phone: +1 617 497-6339
1773 E-mail: paul@funk.com
1776 Basic Commerce & Industries, Inc.
1777 96 Spadina Ave, Unit 606
1778 Toronto, Ontario M5V 2J6
1780 Phone: +1 416 214-5961
1781 E-mail: sblakewilson@bcisse.com
1789 Phone: +1 503 264-2692
1790 E-mail: ned.smith@intel.com
1795 Munich, Bayern 81739\
1797 Phone: +49 89 636 40390
1798 E-mail: Hannes.Tschofenig@siemens.com
1802 487 East Middlefield Road
1804 Mountain View, CA 94043
1806 Phone: +1 650 426-3204
1807 E-mail: thardjono@verisign.com
1809 9 Intellectual Property Statement
1811 The IETF takes no position regarding the validity or scope of any
1812 Intellectual Property Rights or other rights that might be claimed
1813 to pertain to the implementation or use of the technology described
1814 in this document or the extent to which any license under such
1815 rights might or might not be available; nor does it represent that
1816 it has made any independent effort to identify any such rights.
1817 Information on the procedures with respect to rights in RFC
1818 documents can be found in BCP 78 and BCP 79.
1820 Copies of IPR disclosures made to the IETF Secretariat and any
1821 assurances of licenses to be made available, or the result of an
1825 Paul Funk expires August 2005 [Page 31]
1827 Internet-Draft February 2005
1830 attempt made to obtain a general license or permission for the use
1831 of such proprietary rights by implementers or users of this
1832 specification can be obtained from the IETF on-line IPR repository
1833 at http://www.ietf.org/ipr.
1835 The IETF invites any interested party to bring to its attention any
1836 copyrights, patents or patent applications, or other proprietary
1837 rights that may cover technology that may be required to implement
1838 this standard. Please address the information to the IETF at ietf-
1841 Disclaimer of Validity
1843 This document and the information contained herein are provided on
1844 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
1845 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
1846 INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
1847 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
1848 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
1849 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1853 Copyright (C) The Internet Society (2001 - 2005). This document is
1854 subject to the rights, licenses and restrictions contained in BCP
1855 78, and except as set forth therein, the authors retain all their
1860 Funding for the RFC Editor function is currently provided by the
1884 Paul Funk expires August 2005 [Page 32]