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