idnits 2.17.1 draft-campagna-tls-bike-sike-hybrid-06.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 == Line 458 has weird spacing: '...blicKey publi...' == Line 487 has weird spacing: '...MParams pq_k...' == Line 576 has weird spacing: '...nPublic ecd...' -- The document date (March 9, 2021) is 1137 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Missing Reference: 'ChangeCipherSpec' is mentioned on line 202, but not defined == Missing Reference: 'KEM' is mentioned on line 597, but not defined -- Looks like a reference, but probably isn't: '32' on line 496 -- Looks like a reference, but probably isn't: '48' on line 616 == Missing Reference: 'DRAFT' is mentioned on line 666, but not defined == Unused Reference: 'BIKEr3' is defined on line 711, but no explicit reference was found in the text == Unused Reference: 'KYBERr3' is defined on line 723, but no explicit reference was found in the text == Unused Reference: 'RFC2119' is defined on line 730, but no explicit reference was found in the text == Unused Reference: 'RFC5288' is defined on line 740, but no explicit reference was found in the text == Unused Reference: 'RFC5289' is defined on line 745, but no explicit reference was found in the text == Unused Reference: 'RFC8422' is defined on line 750, but no explicit reference was found in the text == Unused Reference: 'SIKEr3' is defined on line 756, but no explicit reference was found in the text ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) Summary: 1 error (**), 0 flaws (~~), 14 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force M. Campagna 3 Internet-Draft E. Crockett 4 Intended status: Experimental AWS 5 Expires: September 10, 2021 March 9, 2021 7 Hybrid Post-Quantum Key Encapsulation Methods (PQ KEM) for Transport 8 Layer Security 1.2 (TLS) 9 draft-campagna-tls-bike-sike-hybrid-06 11 Abstract 13 Hybrid key exchange refers to executing two independent key exchanges 14 and feeding the two resulting shared secrets into a Pseudo Random 15 Function (PRF), with the goal of deriving a secret which is as secure 16 as the stronger of the two key exchanges. This document describes 17 new hybrid key exchange schemes for the Transport Layer Security 1.2 18 (TLS) protocol. The key exchange schemes are based on combining 19 Elliptic Curve Diffie-Hellman (ECDH) with a post-quantum key 20 encapsulation method (PQ KEM) using the existing TLS PRF. 22 Context 24 This draft is experimental. It is intended to define hybrid key 25 exchanges in sufficient detail to allow independent experimentations 26 to interoperate. While the NIST standardization process is still a 27 few years away from being complete, we know that many TLS users have 28 highly sensitive workloads that would benefit from the speculative 29 additional protections provided by quantum-safe key exchanges. These 30 key exchanges are likely to change through the standardization 31 process. Early experiments serve to understand the real-world 32 performance characteristics of these quantum-safe schemes as well as 33 provide speculative additional confidentiality assurances against a 34 future adversary with a large-scale quantum computer. 36 Comments are solicited and can be sent to the authors. 38 Status of This Memo 40 This Internet-Draft is submitted in full conformance with the 41 provisions of BCP 78 and BCP 79. 43 Internet-Drafts are working documents of the Internet Engineering 44 Task Force (IETF). Note that other groups may also distribute 45 working documents as Internet-Drafts. The list of current Internet- 46 Drafts is at https://datatracker.ietf.org/drafts/current/. 48 Internet-Drafts are draft documents valid for a maximum of six months 49 and may be updated, replaced, or obsoleted by other documents at any 50 time. It is inappropriate to use Internet-Drafts as reference 51 material or to cite them other than as "work in progress." 53 This Internet-Draft will expire on September 10, 2021. 55 Copyright Notice 57 Copyright (c) 2021 IETF Trust and the persons identified as the 58 document authors. All rights reserved. 60 This document is subject to BCP 78 and the IETF Trust's Legal 61 Provisions Relating to IETF Documents 62 (https://trustee.ietf.org/license-info) in effect on the date of 63 publication of this document. Please review these documents 64 carefully, as they describe your rights and restrictions with respect 65 to this document. Code Components extracted from this document must 66 include Simplified BSD License text as described in Section 4.e of 67 the Trust Legal Provisions and are provided without warranty as 68 described in the Simplified BSD License. 70 Table of Contents 72 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 73 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 74 2. Key Exchange Algorithms . . . . . . . . . . . . . . . . . . . 4 75 2.1. Key Encapsulation Method (KEM) . . . . . . . . . . . . . 5 76 2.2. ECDHE_[KEM] . . . . . . . . . . . . . . . . . . . . . . . 6 77 3. Hybrid Premaster Secret . . . . . . . . . . . . . . . . . . . 6 78 4. TLS Extension for Supported PQ KEM Parameters . . . . . . . . 7 79 5. Data Structures and Computations . . . . . . . . . . . . . . 7 80 5.1. Client Hello Extensions . . . . . . . . . . . . . . . . . 8 81 5.1.1. When these extensions are sent . . . . . . . . . . . 8 82 5.1.2. Meaning of these extensions . . . . . . . . . . . . . 8 83 5.1.3. Structure of these extensions . . . . . . . . . . . . 8 84 5.1.4. Actions of the sender . . . . . . . . . . . . . . . . 8 85 5.1.5. Actions of the receiver . . . . . . . . . . . . . . . 8 86 5.1.6. Supported PQ KEM Parameters Extension . . . . . . . . 9 87 5.2. Server Key Exchange . . . . . . . . . . . . . . . . . . . 10 88 5.2.1. When this message is sent . . . . . . . . . . . . . . 10 89 5.2.2. Meaning of this message . . . . . . . . . . . . . . . 10 90 5.2.3. Structure of this message . . . . . . . . . . . . . . 10 91 5.2.4. Actions of the sender . . . . . . . . . . . . . . . . 11 92 5.2.5. Actions of the receiver . . . . . . . . . . . . . . . 12 93 5.3. Client Key Exchange . . . . . . . . . . . . . . . . . . . 12 94 5.3.1. When this message is sent . . . . . . . . . . . . . . 12 95 5.3.2. Meaning of the message . . . . . . . . . . . . . . . 12 96 5.3.3. Structure of this message . . . . . . . . . . . . . . 12 97 5.3.4. Actions of the sender . . . . . . . . . . . . . . . . 13 98 5.3.5. Actions of the receiver . . . . . . . . . . . . . . . 13 99 5.4. Derivation of the master secret for hybrid key agreement 13 100 6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 14 101 7. Security Considerations [DRAFT] . . . . . . . . . . . . . . . 15 102 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 103 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 15 104 10. Normative References . . . . . . . . . . . . . . . . . . . . 15 105 Appendix A. Additional Stuff . . . . . . . . . . . . . . . . . . 17 106 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 108 1. Introduction 110 Quantum-safe (or post-quantum) key exchanges are being developed in 111 order to provide secure key establishment against an adversary with 112 access to a quantum computer. Under such a threat model, the current 113 key exchange mechanisms would be vulnerable. BIKE, Kyber and SIKE 114 are post-quantum candidates which were submitted to the NIST Call for 115 Proposals for Post-Quantum Cryptographic Schemes. While these 116 schemes are still being analyzed as part of that process, there is 117 already a need to protect the confidentiality of today's TLS 118 connections against a future adversary with a quantum computer. 119 Hybrid key exchanges are designed to provide two parallel key 120 exchanges: one which is classical (e.g., ECDHE) and the other which 121 is quantum-safe (e.g., SIKE). The hybrid schemes we propose are at 122 least as secure as ECDH against a classical adversary, and at least 123 as secure as the PQ KEM against a quantum adversary. This strategy 124 is emerging as a method to speculatively provide additional security 125 to existing protocols. 127 This document describes additions to TLS to support PQ Hybrid Key 128 Exchanges, applicable to TLS Version 1.2 [RFC5246]. These additions 129 are designed to support most of the third-round candidates in the 130 NIST Call for Proposals, but this document only defines cipher suites 131 for a small subset of possible hybrid key agreement methods. In 132 particular, it defines the use of the ECDHE together with BIKE, Kyber 133 or SIKE, as a hybrid key agreement method. 135 The remainder of this document is organized as follows. Section 2 136 provides an overview of PQ KEM-based key exchange algorithms for TLS. 137 Section 3 describes how a PQ KEM can be combined with ECDHE to form a 138 premaster secret. In Section 4, we present a TLS extension that 139 allow a client to negotiate the use of specific PQ schemes and 140 parameters. Section 5 specifies various data structures needed for a 141 BIKE-, Kyber- or SIKE-based hybrid key exchange handshake, their 142 encoding in TLS messages, and the processing of those messages. 143 Section 6 defines two new PQ KEM hybrid-based cipher suites and 144 identifies a small subset of these as recommended for all 145 implementations of this specification. Section 7 discusses some 146 security considerations. Section 8 describes IANA considerations for 147 the name spaces created by this document. Section 9 gives 148 acknowledgments. 150 Implementation of this specification requires familiarity with TLS 151 [RFC5246], BIKE, Kyber, and SIKE. 153 1.1. Requirements Language 155 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 156 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 157 document are to be interpreted as described in RFC 2119. 159 2. Key Exchange Algorithms 161 This document introduces two new hybrid-based key exchange methods 162 for TLS. They use ECDHE with either BIKE, Kyber or SIKE in order to 163 compute the TLS premaster secret. The master secret derivation is 164 augmented to include the ClientKeyExchange message. The derivation 165 of the encryption/MAC keys and initialization vectors is independent 166 of the key exchange algorithm and not impacted by the introduction of 167 these hybrid key exchanges. While this specification only defines 168 the use of a PQ KEM hybrid key exchange with BIKE, Kyber or SIKE, it 169 is specifically designed so that it can be easily extended to include 170 additional PQ KEM methods. 172 The table below summarizes the new hybrid key exchange schemes. 174 +---------------------------------+------------------+ 175 | Hybrid Key Exchange Scheme Name | Description | 176 +---------------------------------+------------------+ 177 | ECDHE_BIKE | ECDHE and BIKE. | 178 | | | 179 | ECDHE_KYBER | ECDHE and Kyber. | 180 | | | 181 | ECDHE_SIKE | ECDHE and SIKE. | 182 +---------------------------------+------------------+ 184 Table 1: Hybrid Key Exchange Schemes 186 These schemes are intended to provide quantum-safe forward secrecy. 188 Client Server 189 ------ ------ 191 ClientHello --------> 192 ServerHello 193 Certificate 194 ServerKeyExchange 195 CertificateRequest*+ 196 <-------- ServerHelloDone 197 Certificate*+ 198 ClientKeyExchange 199 CertificateVerify*+ 200 [ChangeCipherSpec] 201 Finished --------> 202 [ChangeCipherSpec] 203 <-------- Finished 205 Application Data <-------> Application Data 207 * message is not sent under some conditions 208 + message is not sent unless client authentication 209 is desired 211 Figure 1: Message flow in a hybrid TLS handshake 213 Figure 1 shows the messages involved in the TLS key establishment 214 protocol (aka full handshake). The addition of hybrid key exchanges 215 has direct impact on the ClientHello, the ServerHello, the 216 ServerKeyExchange, and the ClientKeyExchange messages. Next, we 217 describe each hybrid key exchange scheme in greater detail in terms 218 of the content and processing of these messages. For ease of 219 exposition, we defer discussion of the optional extension for 220 specifying the parameters supported by an implementation until 221 Section 4. 223 2.1. Key Encapsulation Method (KEM) 225 A key encapsulation mechanism (KEM) is a set of three algorithms 227 o key generation (KeyGen) 229 o encapsulation (Encaps) 231 o decapsulation (Decaps) 233 and a defined key space, where 235 o "KeyGen()": returns a public and a secret key (pk, sk). 237 o "Encaps(pk)": takes pk as input and outputs ciphertext c and a key 238 K from the key space. 240 o "Decaps(sk, c)": takes sk and c as input, and returns a key K or 241 ERROR. K is called the session key. 243 The security of a KEM is discussed in Section 7. BIKE, Kyber and 244 SIKE are KEMs. 246 2.2. ECDHE_[KEM] 248 This section describes the nearly identical hybrid key exchanges 249 ECDHE_BIKE, ECDHE_KYBER and ECDHE_SIKE. For the remainder of this 250 section [KEM] refers to either BIKE, Kyber or SIKE. The server sends 251 its ephemeral ECDH public key and an ephemeral [KEM] public key 252 generated using the corresponding curve and [KEM] parameters in the 253 ServerKeyExchange message. This specification requires that these 254 parameters MUST be signed using a signature algorithm corresponding 255 to the public key in the server's certificate. 257 The client generates an ECDHE key pair on the same curve as the 258 server's ephemeral ECDH key, and computes a ciphertext value based on 259 the [KEM] public key provided by the server, and sends them in the 260 ClientKeyExchange message. The client computes and holds the PQ KEM- 261 encapsulated key (K) as a contribution to the premaster secret. 263 Both client and server perform an ECDH operation and use the 264 resultant shared secret (Z) as part of the premaster secret. The 265 server computes the PQ KEM decapsulation routine to compute the 266 encapsulated key (K), or to produce an error message in case the 267 decapsulation fails. 269 3. Hybrid Premaster Secret 271 This section defines the mechanism for combining the ECDHE and [KEM] 272 secrets into a TLS 1.2 [RFC5246] pre-master secret. In the hybrid 273 key exchange, both the server and the client compute two shared 274 secrets: the previously defined ECDHE shared secret Z from RFC 8422, 275 and another shared secret K from the underlying PQ key encapsulation 276 method. 278 Form the premaster secret for ECDHE_[KEM] hybrid key exchanges as the 279 concatenation of the ECDHE shared secret Z with the KEM key K to form 280 the opaque data value "premaster_secret = Z || K". 282 4. TLS Extension for Supported PQ KEM Parameters 284 A new TLS extension for post-quantum key encapsulation methods is 285 defined in this specification. 287 This allows negotiating the use of specific PQ KEM parameter sets 288 during a handshake starting a new session. The extension is 289 especially relevant for constrained clients that may only support a 290 limited number of PQ KEM parameter sets. They follow the general 291 approach outlined in RFC 5246; message details are specified in 292 Section 5. The client enumerates the BIKE, Kyber and SIKE parameters 293 it supports by including the PQ KEM extension in its ClientHello 294 message. 296 A TLS client that proposes PQ KEM cipher suites in its ClientHello 297 message SHOULD include this extension. Servers implementing a PQ KEM 298 cipher suite MUST support this extension, and when a client uses this 299 extension, servers MUST NOT negotiate the use of a PQ KEM parameter 300 set unless they can complete the handshake while respecting the 301 choice of parameters specified by the client. This eliminates the 302 possibility that a negotiated hybrid handshake will be subsequently 303 aborted due to a client's inability to deal with the server's PQ KEM 304 key. 306 The client MUST NOT include the PQ KEM extension in the ClientHello 307 message if it does not propose any PQ KEM cipher suites. 308 Additionally, the client MUST NOT include parameters in the PQ KEM 309 extension for PQ KEM cipher suites it does not propose. That is, if 310 a client does not support BIKE, it must not include the BIKE 311 parameters in the extension, similarly for Kyber and SIKE. A client 312 that proposes a PQ KEM scheme may choose not to include this 313 extension. In this case, the server is free to choose any one of the 314 parameter sets listed in Section 5. That section also describes the 315 structure and processing of this extension in greater detail. 317 In the case of session resumption, the server simply ignores the 318 Supported PQ KEM Parameters extension appearing in the current 319 ClientHello message. These extensions only play a role during 320 handshakes negotiating a new session. 322 5. Data Structures and Computations 324 This section specifies the data structures and computations used by 325 PQ KEM hybrid-key agreement mechanisms specified in Sections 2, 3, 326 and 4. The presentation language used here is the same as that used 327 in TLS 1.2 [RFC5246]. 329 5.1. Client Hello Extensions 331 This section specifies the Supported PQ KEM Parameters extension that 332 can be included with the ClientHello message as described in 333 RFC 5246. 335 5.1.1. When these extensions are sent 337 The extensions SHOULD be sent along with any ClientHello message that 338 proposes the associated PQ KEM cipher suites. 340 5.1.2. Meaning of these extensions 342 These extensions allow a client to enumerate the PQ KEM parameters 343 sets it supports for any supported PQ KEM. 345 5.1.3. Structure of these extensions 347 The general structure of TLS extensions is described in RFC 5246, and 348 this specification adds a new type to ExtensionType. 350 enum { 351 pq_kem_parameters(0xFE01) 352 } ExtensionType; 354 where 356 o "pq_kem_parameters" (Supported PQ KEM Parameters extension): 357 Indicates the set of post-quantum KEM parameters supported by the 358 client. For this extension, the opaque extension_data field 359 contains PQKEMParametersExtension. See Section 5.1.6 for details. 361 5.1.4. Actions of the sender 363 A client that proposes PQ KEM hybrid key exchange cipher suites in 364 its ClientHello message appends these extensions (along with any 365 others), enumerating the parameters it supports. Clients SHOULD send 366 the PQ KEM parameter sets it supports if it supports PQ KEM hybrid 367 key exchange cipher suites. 369 5.1.5. Actions of the receiver 371 A server that receives a ClientHello containing this extension MUST 372 use the client's enumerated capabilities to guide its selection of an 373 appropriate cipher suite. One of the proposed PQ KEM cipher suites 374 must be negotiated only if the server can successfully complete the 375 handshake while using the PQ KEM parameters supported by the client 376 (cf. Section 5.1.6.) 377 If a server does not understand the Supported PQ KEM Parameters 378 extension, or is unable to complete the PQ KEM handshake while 379 restricting itself to the enumerated parameters, it MUST NOT 380 negotiate the use of the corresponding PQ KEM cipher suite. 381 Depending on what other cipher suites are proposed by the client and 382 supported by the server, this may result in a fatal handshake failure 383 alert due to the lack of common cipher suites. 385 5.1.6. Supported PQ KEM Parameters Extension 387 This section defines the contents of the Supported PQ KEM Parameters 388 extension. In the language of RFC 5246, the "extension_data" is the 389 "PQKEMParametersExtension" type defined below. 391 enum { 392 SIKE-P434-R3 (19), 393 SIKE-P503-R3 (20), 394 SIKE-P610-R3 (21), 395 SIKE-P751-R3 (22), 396 BIKE-L1-R3(25), 397 BIKE-L3-R3(26), 398 BIKE-L5-R3(27), 399 KYBER-512-R3 (28), 400 KYBER-512-90s-R3 (29) 401 } NamedPQKEM (2^16-1); 403 "BIKE-L1-R3", etc: Indicates support of the corresponding BIKE 404 parameters defined in BIKE, the round 3 candidate submitted to NIST 405 PQC. 407 "SIKE1-P434-R3", etc: Indicates support of the corresponding SIKE 408 parameters defined in SIKE, the round 3 candidate submitted to NIST 409 PQC. 411 "KYBER-512-R3", etc: Indicates support of the corresponding KYBER 412 parameters defined in Kyber, the round 3 candidate to NIST PQC. 414 struct { 415 NamedPQKEM pq_kem_parameters_list <1..2^16-1> 416 } PQKEMParametersExtension; 418 Items in "pq_kem_parameters_list" are ordered according to the 419 client's preferences (favorite choice first). 421 As an example, a client that only supports BIKE-L1-R3 ( value 25 = 422 0x0019), BIKE-L3-R3 ( value 26 = 0x0020) and SIKE-P434-R3 ( value 19 423 = 0x0013) and prefers to use SIKE-P434-R3 would include a TLS 424 extension consisting of the following octets: 426 FE 01 00 08 00 06 00 13 00 19 00 20 428 Note that the first two octets (FE 01) indicate the extension type 429 (Supported PQ KEM Parameters extension), the next two octets 430 indicates the length of the extension in bytes (00 08), and the next 431 two octets indicate the length of enumerated values in bytes (00 06). 433 5.2. Server Key Exchange 435 5.2.1. When this message is sent 437 This message is sent when using an ECDHE_[KEM] hybrid key exchange 438 algorithms. 440 5.2.2. Meaning of this message 442 This message is used to convey the server's ephemeral ECDH and [KEM] 443 public keys to the client. 445 5.2.3. Structure of this message 447 struct { 448 opaque public_key <1,...,2^24 - 1>; 449 } PQKEMPublicKey; 451 public_key: This is a byte string representation of the [KEM] public 452 key following the conversion defined by the [KEM] implementation. 453 This specification supports only uncompressed formats of post-quantum 454 public keys. 456 struct { 457 NamedPQKEM named_params; 458 PQKEMPublicKey public; 459 } ServerPQKEMParams; 461 The ServerKeyExchange message is extended as follows: 463 struct { 464 ServerECDHParams ecdh_params; 465 ServerPQKEMParams pq_kem_params; 466 Signature signed_params; 467 } ServerKeyExchange; 469 where 471 o "ecdh_params": Specifies the ECDHE public key and associated 472 domain parameters. 474 o "pq_kem_params": Specifies the [KEM] public key and associated 475 parameters. 477 o "signed_params": a signature over the server's key exchange 478 parameters. Note that only cipher suites which include a 479 signature algorithm are supported; see Section 6. The private key 480 corresponding to the certified public key in the server's 481 Certificate message is used for signing. 483 digitally-signed struct { 484 opaque client_random[32]; 485 opaque server_random[32]; 486 ServerDHParams ecdh_params; 487 ServerPQKEMParams pq_kem_params; 488 } Signature; 490 The parameters are hashed as part of the signing algorithm as 491 follows, where H is the hash function used for generating the 492 signature: 494 For ECDHE_[KEM]: 496 "H( client_random[32] + server_random[32] + ecdh_params + 497 pq_kem_params)." 499 NOTE: This specification only defines hybrid cipher suites with RSA 500 and ECDSA signatures. See [RFC5246] and RFC 8422, respectively, for 501 details on their use in TLS 1.2. 503 5.2.4. Actions of the sender 505 The server selects elliptic curve domain parameters and an ephemeral 506 ECDH public key corresponding to these parameters according to 507 RFC 8422. The server SHOULD generate a fresh ephemeral ECDH key for 508 each key exchange so that the hybrid key exchange scheme provides 509 forward secrecy. The server selects a PQ KEM parameter set, and uses 510 "KeyGen()" for the corresponding parameters of BIKE, Kyber, or SIKE 511 to generate an ephemeral public key pair. The server MUST generate a 512 fresh PQ KEM key for each key exchange. A server that receives a 513 Supported PQ KEM Parameters extension MUST use the client's 514 enumerated capabilities to guide its selection of an appropriate 515 cipher suite. The server MUST NOT negotiate the use of a PQ KEM 516 parameter set unless they can complete the handshake while respecting 517 the choice of parameters specified by the client (cf. 518 Section 5.1.6). If the client does not include the PQ KEM Parameters 519 extension, the server is free to choose any one of the parameters 520 listed in Section 5.1.6. 522 If a server is unable to complete the PQ KEM handshake while 523 restricting itself to the enumerated parameters, it MUST NOT 524 negotiate the use of the corresponding PQ KEM cipher suite. 525 Depending on what other cipher suites are proposed by the client and 526 supported by the server, this may result in a fatal handshake failure 527 alert due to the lack of common cipher suites. 529 After selecting a cipher suite and appropriate parameters, the server 530 conveys this information to the client in the ServerKeyExchange 531 message using the format defined above. 533 5.2.5. Actions of the receiver 535 The client verifies the signature and retrieves the server's elliptic 536 curve domain parameters and ephemeral ECDH public key and the [KEM] 537 parameter set and public key from the ServerKeyExchange message. 539 A possible reason for a fatal handshake failure is that the client's 540 capabilities for handling elliptic curves and point formats are 541 exceeded (see RFC 8422), the PQ KEM parameters are not supported (see 542 Section 5.1), or the signature does not verify. 544 5.3. Client Key Exchange 546 5.3.1. When this message is sent 548 This message is sent in all key exchange algorithms. In the key 549 exchanges defined in this document, it contains the client's 550 ephemeral ECDH public key and the [KEM] ciphertext value. 552 5.3.2. Meaning of the message 554 This message is used to convey ephemeral data relating to the key 555 exchange belonging to the client (such as its ephemeral ECDH public 556 key and the [KEM] ciphertext value). 558 5.3.3. Structure of this message 560 The TLS ClientKeyExchange message is extended as follows. 562 struct { 563 opaque ciphertext <1,..., 2^24 - 1>; 564 } PQKEMCiphertext; 566 where 568 o "ciphertext": This is a byte string representation of the PQ 569 ciphertext of the KEM construction. Since the underlying calling 570 convention of the KEM API handles the ciphertext byte string 571 directly it is sufficient to pass this as single byte string array 572 in the protocol. This specification supports only uncompressed 573 formats of post-quantum public keys. 575 struct { 576 ClientECDiffieHellmanPublic ecdh_public; 577 PQKEMCiphertext ciphertext; 578 } ClientKeyExchange; 580 5.3.4. Actions of the sender 582 The client selects an ephemeral ECDH public key corresponding to the 583 parameters it received from the server according to RFC 8422. The 584 client SHOULD generate a fresh ephemeral ECDH key for each key 585 exchange so that the hybrid key exchange scheme provides forward 586 secrecy. Using the "Encaps(pk)" function corresponding to the PQ KEM 587 and named parameters in ServerKeyExchange message, the client 588 computes a [KEM] ciphertext. It conveys this information to the 589 server in the ClientKeyExchange message using the format defined 590 above. 592 5.3.5. Actions of the receiver 594 The server retrieves the client's ephemeral ECDH public key and the 595 [KEM] ciphertext from the ClientKeyExchange message and checks that 596 it is on the same elliptic curve as the server's ECDHE key, and that 597 the [KEM] ciphertexts conform to the domain parameters selected by 598 the server. The server uses the "Decaps(pk)" function corresponding 599 to the PQ KEM and named parameters in ServerKeyExchange message to 600 compute the KEM shared secret. 602 In the case of BIKE and Kyber there is a decapsulation failure rate 603 no greater than 10^(-7). In the case of a decapsulation failure, an 604 implementation MUST abort the handshake. 606 5.4. Derivation of the master secret for hybrid key agreement 608 This section defines a new hybrid master secret derivation. It is 609 defined under the assumption that we use the concatenated premaster 610 secret defined in Section 3.1 (Section 3). Recall in this case the 611 premaster_secret = Z || K, where Z it the ECDHE shared secret, and K 612 is the KEM shared secret. 614 We define the master secret as follows: 616 master_secret[48] = TLS-PRF(secret, label, seed) 617 where 619 o "secret": the premaster_secret, 621 o "label": the string "hybrid master secret", and 623 o "seed": the concatenation of "ClientHello.random || 624 ServerHello.random || ClientKeyExchange" 626 6. Cipher Suites 628 The table below defines new hybrid key exchange cipher suites that 629 use the key exchange algorithms specified in Section 2 (Section 2). 631 +----------------------------------------------------------------+ 632 | Ciphersuite | 633 +----------------------------------------------------------------+ 634 | TLS_ECDHE_BIKE_ECDSA_WITH_AES_128_GCM_SHA256 = { 0xFF, 0x01 } | 635 | | 636 | TLS_ECDHE_BIKE_ECDSA_WITH_AES_256_GCM_SHA384 = { 0xFF, 0x02 } | 637 | | 638 | TLS_ECDHE_BIKE_RSA_WITH_AES_128_GCM_SHA256 = { 0xFF, 0x03 } | 639 | | 640 | TLS_ECDHE_BIKE_RSA_WITH_AES_256_GCM_SHA384 = { 0xFF, 0x04 } | 641 | | 642 | TLS_ECDHE_SIKE_ECDSA_WITH_AES_128_GCM_SHA256 = { 0xFF, 0x05 } | 643 | | 644 | TLS_ECDHE_SIKE_ECDSA_WITH_AES_256_GCM_SHA384 = { 0xFF, 0x06 } | 645 | | 646 | TLS_ECDHE_SIKE_RSA_WITH_AES_128_GCM_SHA256 = { 0xFF, 0x07 } | 647 | | 648 | TLS_ECDHE_SIKE_RSA_WITH_AES_256_GCM_SHA384 = { 0xFF, 0x08 } | 649 | | 650 | TLS_ECDHE_KYBER_ECDSA_WITH_AES_128_GCM_SHA256 = { 0xFF, 0x09 } | 651 | | 652 | TLS_ECDHE_KYBER_ECDSA_WITH_AES_256_GCM_SHA384 = { 0xFF, 0x0A } | 653 | | 654 | TLS_ECDHE_KYBER_RSA_WITH_AES_128_GCM_SHA256 = { 0xFF, 0x0B } | 655 | | 656 | TLS_ECDHE_KYBER_RSA_WITH_AES_256_GCM_SHA384 = { 0xFF, 0x0C } | 657 +----------------------------------------------------------------+ 659 Table 2: TLS hybrid key exchange cipher suites 661 The key exchange method, signature algorithm, cipher, and hash 662 algorithm for each of these cipher suites are easily determined by 663 examining the name. Ciphers and hash algorithms are defined in 664 RFC 5288. 666 7. Security Considerations [DRAFT] 668 The security considerations in TLS 1.2 [RFC5246] and RFC 8422 apply 669 to this document as well. In addition, as described in RFC 5288 and 670 RFC 5289, these cipher suites may only be used with TLS 1.2 or 671 greater. 673 The description of a KEM is provided in Section 2.1. The security of 674 the KEM is defined through the indistinguishability against a chosen- 675 plaintext (IND-CPA) and against a chosen-ciphertext (IND-CCA) 676 adversary. We are focused here on the IND-CPA security of the KEM. 677 As a result, implementations MUST NOT use a KEM key more than once, 678 as reusing keys with IND-CPA KEMs can result in chosen ciphertext 679 attacks like the GJS attack against BIKE [GJS]. 681 In the IND-CPA experiment of KEMs, an oracle generates keys (sk, pk) 682 with "KeyGen()", computes (c, K) with "Encaps(pk)", and draws 683 uniformly at random a value R from the key space, and a random bit b. 684 The adversary is an algorithm A that is given (pk, c, K) if b=1, and 685 (pk, c, R) if b=0. Algorithm A outputs a bit b' as a guess for b, 686 and wins if b' = b. 688 All of the cipher suites described in this document are intended to 689 provide forward secrecy. The hybrid key exchange mechanism described 690 in this specification achieves forward secrecy when all ephemeral 691 keys are single-use. This specification requires single-use PQ KEM 692 keys, so ephemeral ECDH keys SHOULD also be single-use so that 693 forward secrecy is achieved. 695 8. IANA Considerations 697 This document describes three new name spaces for use with the TLS 698 protocol: 700 9. Acknowledgements 702 This specification is based on ideas discussed with Ian Goldberg, 703 Michele Mosca, Douglas Stebila and William Whyte during preparations 704 for the first ETSI-IQC Quantum Safe Cryptography Workshop in 2013. 705 The specification was developed through collaboration on the open 706 source s2n project with Nicholas Allen, Nir Drucker, Shay Gueron, 707 Andrew Hopkins, Colm MacCarthaigh and Alex Weibel. 709 10. Normative References 711 [BIKEr3] Misoczki, R., Aragon, N., Barreto, P., Bettaieb, S., 712 Bidoux, L., Blazy, O., Deneuville, J., Gaborit, P., Ghosh, 713 S., Gueron, S., Guneysu, T., Melchor, C., Persichetti, E., 714 Sendrier, N., Tillich, J., Vasseur, V., and G. Zemor, 715 "BIKE: Bit Flipping Key Encapsulation, version 4.1", 716 October 2020, . 719 [GJS] Guo, Q., Johansson, T., and P. Stankovski, "A Key Recovery 720 Attack on MDPC with CCA Security Using Decoding Failures", 721 2016, . 723 [KYBERr3] Avanzi, R., Bos, J., Ducas, L., Kiltz, E., Lepoint, T., 724 Lyubashevsky, V., Schanck, J., Schwabe, P., Seiler, G., 725 and D. Stehle, "CRYSTALS-Kyber", October 2020, 726 . 730 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 731 Requirement Levels", BCP 14, RFC 2119, 732 DOI 10.17487/RFC2119, March 1997, 733 . 735 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 736 (TLS) Protocol Version 1.2", RFC 5246, 737 DOI 10.17487/RFC5246, August 2008, 738 . 740 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 741 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 742 DOI 10.17487/RFC5288, August 2008, 743 . 745 [RFC5289] Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA- 746 256/384 and AES Galois Counter Mode (GCM)", RFC 5289, 747 DOI 10.17487/RFC5289, August 2008, 748 . 750 [RFC8422] Nir, Y., Josefsson, S., and M. Pegourie-Gonnard, "Elliptic 751 Curve Cryptography (ECC) Cipher Suites for Transport Layer 752 Security (TLS) Versions 1.2 and Earlier", RFC 8422, 753 DOI 10.17487/RFC8422, August 2018, 754 . 756 [SIKEr3] Jao, D., Azarderakhsh, R., Campagna, M., Costello, C., De 757 Feo, L., Hutchinson, A., Hess, B., Jalali, A., Karabina, 758 K., Koziel, B., LaMacchia, B., Longa, P., Naehrig, M., 759 Pereira, G., Renes, J., Soukharev, V., and D. Urbanik, 760 "Supersingular Isogeny Key Encapsulation", October 2020, 761 . 765 Appendix A. Additional Stuff 767 This becomes an Appendix. 769 Authors' Addresses 771 Matt Campagna 772 AWS 774 Email: campagna@amazon.com 776 Eric Crockett 777 AWS 779 Email: ericcro@amazon.com