idnits 2.17.1 draft-ietf-tls-exported-authenticator-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (December 13, 2017) is 2319 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) == Outdated reference: A later version (-28) exists of draft-ietf-tls-tls13-22 Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS N. Sullivan 3 Internet-Draft Cloudflare Inc. 4 Intended status: Standards Track December 13, 2017 5 Expires: June 16, 2018 7 Exported Authenticators in TLS 8 draft-ietf-tls-exported-authenticator-05 10 Abstract 12 This document describes a mechanism in Transport Layer Security (TLS) 13 to provide an exportable proof of ownership of a certificate that can 14 be transmitted out of band and verified by the other party. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on June 16, 2018. 33 Copyright Notice 35 Copyright (c) 2017 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 52 3. Authenticator Request . . . . . . . . . . . . . . . . . . . . 3 53 4. Authenticator . . . . . . . . . . . . . . . . . . . . . . . . 4 54 5. API considerations . . . . . . . . . . . . . . . . . . . . . 6 55 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 56 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 57 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 58 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 59 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 60 9.2. Informative References . . . . . . . . . . . . . . . . . 9 61 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 63 1. Introduction 65 This document provides a way to authenticate one party of a Transport 66 Layer Security (TLS) communication to another using a certificate 67 after the session has been established. This allows both the client 68 and server to prove ownership of additional identities at any time 69 after the handshake has completed. This proof of authentication can 70 be exported and transmitted out of band from one party to be 71 validated by the other party. 73 This mechanism provides two advantages over the authentication that 74 TLS natively provides: 76 multiple identities - Endpoints that are authoritative for multiple 77 identities - but do not have a single certificate that includes 78 all of the identities - can authenticate with those identities 79 over a single connection. 81 spontaneous authentication - Endpoints can authenticate after a 82 connection is established, in response to events in a higher-layer 83 protocol, as well as integrating more context. 85 This document intends to replace much of the functionality of 86 renegotiation in previous versions of TLS. It has the advantages 87 over renegotiation of not requiring additional on-the-wire changes 88 during a connection. For simplicity, only TLS 1.2 and later are 89 supported. 91 Post-handshake authentication is defined in TLS 1.3, but it has the 92 disadvantage of requiring additional state to be stored in the TLS 93 state machine and it composes poorly with multiplexed connection 94 protocols like HTTP/2. It is also only available for client 95 authentication. This mechanism is intended to be used as part of a 96 replacement for post-handshake authentication in applications. 98 2. Conventions and Terminology 100 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 101 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 102 "OPTIONAL" in this document are to be interpreted as described in RFC 103 2119 [RFC2119]. 105 3. Authenticator Request 107 The authenticator request is a structured message that can be 108 exported from either party of a TLS connection. It can be 109 transmitted to the other party of the TLS connection at the 110 application layer. The application layer protocol used to send the 111 authenticator SHOULD use TLS as its underlying transport to keep the 112 request confidential. 114 An authenticator request message can be constructed by either the 115 client or the server. This authenticator request uses the 116 CertificateRequest message structure from Section 4.3.2 of [TLS13]. 117 This message does not include the TLS record layer and is therefore 118 not encrypted with a handshake key. 120 CertificateRequest This message is used to define the parameters in 121 a request for an authenticator. 123 struct { 124 opaque certificate_request_context<0..2^8-1>; 125 Extension extensions<2..2^16-1>; 126 } CertificateRequest; 128 certificate_request_context An opaque string which identifies the 129 certificate request and which will be echoed in the authenticator 130 message. The certificate_request_context MUST be unique within 131 the scope of this connection (thus preventing replay of 132 authenticators). The certificate_request_context SHOULD be chosen 133 to be unpredictable to the peer (e.g., by randomly generating it) 134 in order to prevent an attacker who has temporary access to the 135 peer's private key from pre-computing valid authenticators. 137 extensions The extensions that are allowed in this structure include 138 the extensions defined for CertificateRequest messages defined in 139 Section 4.2. of [TLS13] and the server_name [RFC6066] extension, 140 which is allowed for client-generated authenticator requests. 142 4. Authenticator 144 The authenticator is a structured message that can be exported from 145 either party of a TLS connection. It can be transmitted to the other 146 party of the TLS connection at the application layer. The 147 application layer protocol used to send the authenticator SHOULD use 148 TLS as its underlying transport to keep the certificate confidential. 150 An authenticator message can be constructed by either the client or 151 the server given an established TLS connection, a certificate, and a 152 corresponding private key. For clients, an authenticator request is 153 required; for servers an authenticator request is optional. The 154 authenticator uses the message structures from Section 4.4 of 155 [TLS13], but different parameters. These messages do not include the 156 TLS record layer and are therefore not encrypted with a handshake 157 key. 159 Each authenticator is computed using a Handshake Context and Finished 160 MAC Key derived from the TLS session. These values are derived using 161 an exporter as described in [RFC5705] (for TLS 1.2) or [TLS13] (for 162 TLS 1.3). These values use different labels depending on the role of 163 the sender: 165 o The Handshake Context is an exporter value that is derived using 166 the label "EXPORTER-client authenticator handshake context" or 167 "EXPORTER-server authenticator handshake context" for 168 authenticators sent by the client and server respectively. 170 o The Finished MAC Key is an exporter value derived using the label 171 "EXPORTER-client authenticator finished key" or "EXPORTER-server 172 authenticator finished key" for authenticators sent by the client 173 and server respectively. 175 The context_value used for the exporter is absent (length zero) for 176 all four values. The length of the exported value is equal to the 177 length of the output of the hash function selected in TLS for the 178 pseudorandom function (PRF). Cipher suites that do not use the TLS 179 PRF MUST define a hash function that can be used for this purpose or 180 they cannot be used. 182 If the connection is TLS 1.2, the master secret MUST have been 183 computed with the extended master secret [RFC7627] to avoid key 184 synchronization attacks. 186 Certificate The certificate to be used for authentication and any 187 supporting certificates in the chain. This structure is defined 188 in [TLS13], Section 4.4.2. 190 The certificate message contains an opaque string called 191 certificate_request_context, which is extracted from the 192 authenticator request if present. If no authenticator request is 193 provided, it is zero-length. 195 CertificateVerify This message is used to provide explicit proof 196 that an endpoint possesses the private key corresponding to its 197 certificate. 199 struct { 200 SignatureScheme algorithm; 201 opaque signature<0..2^16-1>; 202 } CertificateVerify; 204 The algorithm field specifies the signature algorithm used (see 205 Section 4.2.3 of [TLS13] for the definition of this field). The 206 signature is a digital signature using that algorithm. The signature 207 scheme MUST be a valid signature scheme for TLS 1.3. This excludes 208 all RSASSA-PKCS1-v1_5 algorithms and ECDSA algorithms that are not 209 supported in TLS 1.3. If an authenticator request is present, the 210 signature algorithm MUST be chosen from one of the signature schemes 211 in the authenticator request. Otherwise, the signature algorithm 212 used should be chosen from the "signature_algorithms" extension of 213 the ClientHello used in the connection handshake. 215 The signature is computed using the over the concatenation of: 217 o A string that consists of octet 32 (0x20) repeated 64 times 219 o The context string "Exported Authenticator" (which is not NULL- 220 terminated) 222 o A single 0 byte which serves as the separator 224 o If the authenticator request is present, the value "Hash(Handshake 225 Context || authenticator request || Certificate)" 227 o If an authenticator request is not present, the value 228 "Hash(Handshake Context || Certificate)" 230 where Hash is the hash function for the handshake. 232 Finished A HMAC over the value Hash(Handshake Context || 233 Certificate || CertificateVerify) if an authenticator is present, 234 or Hash(Handshake Context || authenticator request || 235 Certificate || CertificateVerify) where Hash is the hash function 236 for the handshake, and the HMAC is computed using the hash 237 function from the handshake and the Finished MAC Key as a key. 239 The certificates chosen in the Certificate message MUST conform to 240 the requirements of a Certificate message in the version of TLS 241 negotiated. If an authenticator request is present, the signature 242 algorithms used to choose the algorithm are taken from the 243 "signature_algorithms" in the from the authenticator. If there is no 244 authenticator request, the signature algorithms are chosen from the 245 "signature_algorithms" extension from the ClientHello used in the 246 connection. This is described in Section 4.2.3 of [TLS13] and 247 Sections 7.4.2 and 7.4.6 of [RFC5246]. Alternative certificate 248 formats such as [RFC7250] Raw Public Keys are not supported. The 249 "server_name" [RFC6066], "certificate_authorities" (Section 4.2.4. of 250 [TLS13]), or "oid_filters" (Section 4.2.5. of [TLS13]) extensions are 251 used to guide certificate selection, with the extensions provided in 252 the authenticator request taking precedence over the extensions 253 provided in the connection handshake. 255 If an authenticator request was provided, the Certificate message 256 MUST contain only extensions present in the authenticator request. 257 Otherwise, the Certificate message MUST contain only extensions 258 present in the ClientHello. 260 The authenticator message is the concatenation of messages: 261 Certificate || CertificateVerify || Finished 263 A given authenticator can be validated by checking the validity of 264 the CertificateVerify message given the authenticator request (if 265 used) and recomputing the Finished message to see if it matches. 267 5. API considerations 269 The creation and validation of both authenticator requests and 270 authenticators SHOULD be implemented inside the TLS library even if 271 it is possible to implement it at the application layer. TLS 272 implementations supporting the use of exported authenticators MUST 273 provide application programming interfaces by which clients and 274 servers may request and verify exported authenticator messages. 276 Given an established connection, the application SHOULD be able to 277 call the following APIs: 279 "request", which takes as input: 281 o certificate_request_context (from 0 to 255 bytes) 283 o set of extensions to include (this MUST include 284 signature_algorithms) 286 It returns an authenticator request, which is a sequence of octets 287 that includes a CertificateRequest message. 289 "get context", which takes as input 291 o authenticator 293 It returns the certificate_request_context. 295 "authenticate", which takes as input: 297 o a set of certificate chains and associated extensions (OCSP, SCT, 298 etc.) 300 o a signer (either the private key associated with the certificate, 301 or interface to perform private key operation) for each chain 303 o an optional authenticator request 305 It returns the exported authenticator as output. It is RECOMMENDED 306 that the logic for selecting the certificates and extensions to 307 include in the exporter is implemented in the TLS library. 308 Implementing this in the TLS library lets the implementer take 309 advantage of existing extension and certificate selection logic. 311 It is also possible to implement this API outside of the TLS library 312 using TLS exporters. This may be preferable in cases where the 313 application does not have access to a TLS library with these APIs or 314 when TLS is handled independently of the application layer protocol. 316 "validate", which takes as input: * an optional authenticator request 317 * an authenticator 319 It returns the certificate chain and extensions. 321 6. IANA Considerations 323 This document has no IANA actions. 325 7. Security Considerations 327 The Certificate/Verify/Finished pattern intentionally looks like the 328 TLS 1.3 pattern which now has been analyzed several times. In the 329 case where the client presents an authenticator to a server, [SIGMAC] 330 presents a relevant framework for analysis. 332 Authenticators are independent and unidirectional. There is no 333 explicit state change inside TLS when an authenticator is either 334 created or validated. 336 o This property makes it difficult to formally prove that a server 337 is jointly authoritative over multiple certificates, rather than 338 individually authoritative over each. 340 o There is no indication in the TLS layer about which point in time 341 an authenticator was computed. Any feedback about the time of 342 creation or validation of the authenticator should be tracked as 343 part of the application layer semantics if required. 345 The signatures generated with this API cover the context string 346 "Exported Authenticator" and therefore cannot be transplanted into 347 other protocols. 349 8. Acknowledgements 351 Comments on this proposal were provided by Martin Thomson. 352 Suggestions for Section 7 were provided by Karthikeyan Bhargavan. 354 9. References 356 9.1. Normative References 358 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 359 Requirement Levels", BCP 14, RFC 2119, 360 DOI 10.17487/RFC2119, March 1997, . 363 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 364 (TLS) Protocol Version 1.2", RFC 5246, 365 DOI 10.17487/RFC5246, August 2008, . 368 [RFC5705] Rescorla, E., "Keying Material Exporters for Transport 369 Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, 370 March 2010, . 372 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 373 Extensions: Extension Definitions", RFC 6066, 374 DOI 10.17487/RFC6066, January 2011, . 377 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 378 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 379 Transport Layer Security (TLS) and Datagram Transport 380 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 381 June 2014, . 383 [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., 384 Langley, A., and M. Ray, "Transport Layer Security (TLS) 385 Session Hash and Extended Master Secret Extension", 386 RFC 7627, DOI 10.17487/RFC7627, September 2015, 387 . 389 [TLS13] Rescorla, E., "The Transport Layer Security (TLS) Protocol 390 Version 1.3", draft-ietf-tls-tls13-22 (work in progress), 391 November 2017. 393 9.2. Informative References 395 [SIGMAC] Krawczyk, H., "A Unilateral-to-Mutual Authentication 396 Compiler for Key Exchange (with Applications to Client 397 Authentication in TLS 1.3)", 2016, 398 . 400 Author's Address 402 Nick Sullivan 403 Cloudflare Inc. 405 Email: nick@cloudflare.com