Full text
Received 19 January 2024, accepted 29 January 2024, date of publication 8 February 2024, date of current version 16 February 2024. Digital Object Identifier 10.1109/ACCESS.2024.3364520 Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography SARA RICCI, PATRIK DOBIAS , LUKAS MALINA , JAN HAJNY, AND PETR JEDLICKA Department of Telecommunications, Brno University of Technology, 61600 Brno, Czech Republic Corresponding author: Lukas Malina ([email protected]) This work was supported by the Ministry of the Interior, Czech Republic, under Grant VJ01010008. ABSTRACT Currently, with the threat of quantum computer attacks, the idea of combining several same-type primitives has reemerged. This is also the case for cryptographic keys where a hybrid quantum key exchange combination allows for preserving the security guarantees of pre-quantum schemes and achieving quantum resistance of post-quantum schemes. In this article, we present a concrete 3-key combiner system implemented on a Field Programmable Gate Arrays (FPGA) platform. Our system involves a pre-quantum Key EXchange scheme (KEX), a post-quantum key encapsulation mechanism, and a Quantum Key Distribution (QKD) algorithm. The proposed 3-key combiner is proven to be secure in the quantum standard model and it is INDistinguishable under a Chosen-Ciphertext Attack (IND-CCA). Our combiner can run in small FPGA platforms due to its relatively low resources usage. In particular, the key combiner without QKD is able to output up to 1 624 keys per second and the key combiner with QKD is able to output up to 9.2 keys per second. INDEX TERMS Authentication, cryptography, key establishment, post-quantum cryptography, security, quantum key distribution (QKD), dual-PRF, key combiner. I. INTRODUCTION The idea of combining several same-type primitives, so that the resulting scheme is secure as long as one of the components remains secure, goes back to Even and Goldreich [1]. With the threat of quantum computer attacks, this concept has reemerged. Classical cryptographic methods, based on the hardness of mathematical assumptions such as Integer Factorization (IF) problem, Discrete Logarithm Problem (EC), and Elliptic Curve (EC)DLP, have long provided the foundation for securing communication and information. With the advent of quantum computers, the run of quantum-based algorithms could be used to break traditional public-key cryptography schemes. For instance, Shor’s algorithm [2] allows attackers to solve DLP and IF problem and, therefore, breaks the most commonly used cryptographic protocols such as RSA, Diffie-Hellman scheme, and EC Digital Signature Algorithm (DSA), that are based on the aforementioned mathematical assumptions. Hybrid schemes permit mitigating the risk of The associate editor coordinating the review of this manuscript and approving it for publication was Cong Pu . quantum attacks and preserving common security guarantees by combining classically secure and quantum-resistant schemes. For instance, the National Cybersecurity Agency of France (ANSSI) [3] considers the role of hybridization in the cryptographic security crucial and mandatory for the next phases. An efficient way to achieve hybridization involves a scheme combiner where parallelization of the combined schemes can be provided. In this way, the slower Key EXchange (KEX) or Key Exchange Mechanism (KEM) scheme bounds the key generation speed. The combiners are designed to be fast and achieve an equal level of security to the involved schemes. Reinforcing this idea, the Federal Office for Information Security - Germany (BSI) report [4] suggests not using post-quantum cryptography in isolation, as it has not been equally well studied. At the same time, the report emphasizes the need to switch to quantum-safe schemes by combining post- and pre-quantum schemes. In fact, the usage of new algorithms can be a long and difficult process, where backward compatibility has to be maintained without introducing the risk of downgrade attacks [5]. Moreover, there is uncertainty about the hardness 23206 2024 The Authors. This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ VOLUME 12, 2024
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography of post-quantum assumption where new (even classical) attacks may show them to be vulnerable and, furthermore, the parameters choices not yet reliable [6]. Therefore, we are in a situation where there is a demand to protect assets from quantum computer threats, but not sufficient confidence in the security of post-quantum schemes. A hybrid approach facilitates the smooth transition to Post-Quantum (PQ) cryptography, retaining the time-tested trust on pre-quantum algorithms while incorporating the quantum resistance of PQ schemes [7]. Recently, several ways to combine either KEX protocols or KEMs into a secure hybrid system have been proposed [5], [7],[8],[9],[10]. A study from the European Network and Information Security Agency (ENISA) [11] suggests deploying post-quantum cryptography as an extra layer to pre-quantum cryptography. This is in accordance with Agence nationale de la sécurité des systèmes d’information (ANSSI) and the Federal Office for Information Security (BSI) specifications of hibridization. Specifically, ENISA proposes that the selected pre- and post-quantum scheme output keys are combined to generate the encryption key used, for example, as input in the AES-256-GCM scheme. It is important to notice that the Elliptic-Curve Diffie-Hellman (ECDH) is considered a candidate for the pre-quantum scheme whereas the Kyber scheme is one of the possible postquantum KEMs. Furthermore, the first Internet Engineering Task Force (IETF) drafts have appeared that define and discuss hybrid approaches in various protocols, e.g., hybrid approach terminology,1hybrid key exchange methods in Transport Layer Security (TLS) 1.32[12], and a combiner function for hybrid key encapsulation mechanisms.3 It is worth noting that Quantum Key Distribution (QKD) promises information-theoretic security [13], whereas classical and post-quantum schemes security is based on the intractability of selected computationally hard problems. This means that QKD can provide long-term security and that does not impose limits on the adversary’s computational power [14]. Therefore, since they are based on different principles, QKD and post-quantum cryptography can be viewed as complementary methods that can be both deployed [4]. Accordingly, a hybrid system involving prequantum, post-quantum, and quantum schemes guarantees a smooth transaction to PQ cryptography, where QKD and post-quantum complement each other to strengthen the system. Nevertheless, it is essential to consider limitations of QKD, such as its limited range and associated costs.. A. CONTRIBUTION Seeking to contribute to the knowledge gaps, we will focus on both a quantum-secure theoretically-proven combination of keys and its practical deployment. Specifically, we seek to answer the following Research Questions (RQ): RQ1) How securely and effectively can be combined 3 different key 1https://datatracker.ietf.org/doc/draft-driscoll-pqt-hybrid-terminology/ 2https://datatracker.ietf.org/doc/draft-ietf-tls-hybrid-design/ 3https://datatracker.ietf.org/doc/draft-ounsworth-cfrg-kem-combiners/ establishment methods to get a hybrid key? RQ2) How can a 3-key combiner be implemented in practice and how many hardware resources will be required at FPGA? Specifically,wepresent a3-keycombinersystem involving a pre-quantum KEX, a post-post quantum KEM, and a Quantum Key Distribution (QKD) algorithm. In particular, our work provides the following contributions: 1) Extensive analysis of existing KEX and KEM combiners. Our scheme requires combining 1 KEM and 2 KEXs. Therefore, we sought solutions in both domains and surveyed several works that provide theoretical and practical designs of either KEX or KEM combiners. 2) Extension of the dual-PRF combiner to work with three keys as input. One of the possible KEX candidates is dual-PRF [15] which is designed to have either 2 KEM output keys [5] or 2 KEX output keys [8] as input. Our system stems from the proposed dual- PRF, taking 2 KEX keys and 1 KEM key as input. 3) Security proof of our system directly derived from the dual-PRF, i.e., the proposed 3-key combiner is proven to be secure in the quantum standard model and it is indistinguishable under Chosen-Ciphertext Attack (IND-CCA). 4) Concrete implementation of the proposed 3-key combiner in a Field Programmable Gate Arrays (FPGA) platform. Most of the existing combiners remain theoretically described whereas we present a concrete deployment of our 3-key combiner. Our combiner can run in small FPGA platforms due to its relatively low resource usage (i.e., 4 532 LUT and 3 363 FF). In particular, the key combiner without QKD is able to output up to 1 624 keys per second and the key combiner with QKD is able to output up to 9.2 keys per second. Furthermore, the dual-PRF is closely related to the key schedule used in TLS 1.3 [15] allowing our system to be smoothly integrated into TLS 1.3 and increasing its applicability. Our system is designed to be agile, i.e., easy and fast replacement of cryptographic components, and accessible, i.e., the quantum component can be easily not deployed. In fact, our combiner can be switched to either use or not the QKD algorithm. This allows the FPGA platform to be deployed with and without the quantum component and makes the solution more accessible from a market point of view. Note that Points 1, 2, and 3 help to answer to RQ1, while Point 4 and the above paragraph to RQ2. The rest of this article is organized as follows. Section II extensively reviews the state-of-the-art for KEMs and KEXs combiners. Section III discusses some preliminaries. Section IV states the motivation of our selection and the design goal, presents the basic structure of the proposed key combiner, and lists the selected parameters and the implementation practical aspects. Section Vprovides the security analysis of the scheme. Section VI reports the experimental VOLUME 12, 2024 23207
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography TABLE 1. Existing KEM combiners. ‘‘SM’’ states for standard model, ‘‘ROM’’ for random oracle model, ‘‘Q-SM’’ and ‘‘Q-ROM’’ for quantum-variant of SM and ROM, and ‘‘Impl.’’ for implementation. results. Section VII discusses potential use cases of the proposed hybrid system and sums up some open problems and potential extensions of our key combiner. The final section contains the conclusions. II. RELATED WORK The possibility to combine more KEMs has been independently explored in the so-called KEM combiners. Table 1 provides an overview of the existing KEM combiners along with their main features. Note that only one article offers a concrete implementation of a proposed KEM combiner, nevertheless, no security proofs are given. Giacon et al. [9] proposed KEM combiners with the main purpose of developing generic methods that allow combining more KEMs in a way that security of any implies security of their combination. Their proposals focus on minimizing overhead with respect to the deployed KEMs and, therefore, achieving their easy adoption. The proposed solutions vary based on security requirements, i.e., whether they prioritize IND-CCA or INDistinguishability under Chosen-Plaintext Attacks (IND-CPA), and performance characteristics. In particular, their constructions combine hashing, Pseudo-Random Function (PRF), and XOR-ing of key and ciphertext pairs. A total of 6 combiners are introduced: G1) a simple hashing of the KEMs keys and ciphertexts; G2) an optimization of the previous one, namely XOR-then-PRF, involving the XOR-ing of the keys and the concatenation of the ciphertexts; G3) a BLOCK-then-PRF, where BLOCK stands for a secure block cipher, i.e., a chain of block cipher invocations is applied with inputs 0 and keys derived from the KEMs; G4) a PRF-then-XOR, where each KEM key and the concatenation of all ciphertexts pass through a PRF and the results are then XOR-ed; G5) a slight improvement of the previous one with the reduction of the ciphertext input; at last G6) a combiner based on a split-key pseudorandom function. Their combiners are proven to be secure either in the standard model or in the random oracle model, taking two IND-CCA KEM and outputing another IND-CCA KEM. In our case, we would like to combine one KEM and two KEX protocols. Note that the KEXs have not encapsulated keys and, therefore, the aforementioned combiners do not permit a straightforward combination of pre-shared keys, e.g., KEX schemes. Furthermore, within the cryptography literature, there have been several articles [5],[7],[12] exploring the coupling of pre-quantum and post-quantum cryptography through KEM combiners. Bindel et al. [5] focused on hybrid KEM combiners and authenticated key exchange. They propose a new KEM combiner, introduce new security models for KEM combiners that account for quantum-capable adversaries and, through the new definitions, analyze the security of three KEM combiners. Specifically, the analyzed methods consist of B1) an XOR-then-MAC combiner derived from XOR- then-PRF proposed in [9]; B2) a dual-PRF which follows the TLS 1.3 construction proposed in [15]; and B3) a nested dual-PRF developed from [16]. Accordingly, these combiners are quantum-secure if at least one of the selected KEM is quantum resistant [5]. While previous works focused on the theoretical design of robust combiners, others considered the applicability and practicability these hybrid solutions. Stebila et al. [12] propose an evaluation of the applicability of the dual-PRF combiner proposed by [9]. They list the scope, goals, benefits, and drawbacks that a combiner should have in the post-quantum era. In particular, the dual-PRF was chosen due to its features: 1) backward compatibility, i.e., endpoints and middle-boxes need to remain compatible with clients and servers even if they are not aware of the hybrid combiner; 2) high performance, i.e. the use of hybrid key exchange should not be prohibitive on the performance terms; 3) low latency, i.e., the use of hybrid KEXs should not significantly increase the connection latency; 4) no extra round trips in the negotiationofthe KEX; and 5) minimal duplicate information in the negotiation communication. Aviram et al. [8] focuses on the practical (implementation-wise) construction of the dual-PRF combiner [12]. In this work, a proven-secure method to combine KEXs is presented by deploying the dual- PRF. They also compare several key-combiners currently used in practice. Finally, Poettering and Rastikian [17] explore the use of KEMs beyond their typical application in constructing public key encryption and secure channels. Notably, they employ combiners suggested by [5] and [9], supporting the relevance of a dual-PRF combiner. Furthermore, Azarderakhsh et al. [7] and Huguenin- Dumittan and Vaudenay [10] take another direction. In [7], the authors propose a quantum-secure combiner that couples ECDH and Supersingular Isogeny Key Encapsulation (SIKE) [18] protocols. It is important to notice that SIKE is an isogeny-based protocol and, therefore, it runs on elliptic curves as well as ECDH protocol making the merging more effective. They implemented their proposal on a FPGA platform. In [10], the authors propose a solution that does not require extra primitives such as special types of PRFs or MACs. They focus on bypassing the intermediate KEM constructions by involving much higher-level primitives, i.e. Fujisaki-Okamoto (FO) transform-like primitives, with respect to the previous proposals. However, their work is proven to be secure only in the Quantum-Random Oracle Model (Q-ROM). 23208 VOLUME 12, 2024
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography On the other hand, several articles focused on providing post-quantum security proofs for existing KEX protocols, such as Signal [19] and TLS. In case of TLS, the literature includes draft standards [12],[20], theoretical articles [5],[21],[22] and industry experiments [23],[24]. From the industry perspective, Google and Cloudfare jointly experimented with the integration of two post-quantum KEXs, namely isogeny-based SIKE and lattice-based HRSS, in TLS [23]. However, all these works rely on the fact that the key-combiner needs to be modeled as a dual-PRF [8]. In a study conducted by Giron et al. [25], various hybrid KEX combiners are surveyed and classified on their efficiency and security. They suggest that the compared combiners have acceptable performance for important applications, making them fundamental for secure network communications. From a security perspective, they report that the PRF-based combiners are the only one proven secure in the standard model against a quantum adversary as we also mentioned. They also highlight that, conventionally, most studies use only two KEXs, emphasizing the need to explore the potential of hybrid designs involving more than two algorithms. Finally, they mention that there has been no exploration of ‘‘PQ-PQ combiners,’’ where two or more post-quantum algorithms are combined in a new scheme. This area is left as an open research problem. III. PRELIMINARIES In this section, at first, we outline the used notation. Then, we recall the definition of ϵ-regular, PRF, dual-PRF, KEM combiner and briefly review the primitives on which our protocol is based. From now on, the symbol ‘‘:’’ means ‘‘such that’’, ‘‘|x|’’ is the bitlength of xand ‘‘∥’’ denotes the concatenation of two binary strings. A secure hash function is denoted as H: {0,1}∗→ {0,1}κ, where κis a security parameter. We write x← $Uwhen xis sampled uniformly at random from U. A. PRELIMINARY DEFINITIONS In this section, we review the definitions of ϵ-Regular function, PRF, dual-PRF, and computational extractor [8]. These definitions are necessary to understand our construction and prove its security. Definition 1 (ϵ-Regular): Let Uℓbe the uniform distribution over n bits. A function H: {0,1}n→ {0,1}mis ϵ-regular if 1 2X x |Pr[H(Un)=x]−Pr[Um=x]|≤ ϵ Definition 2 (Pseudorandom Function (PRF)): Let F= {fλ:Kλ×Xλ→Yλ}λ∈Nbe a function family ensemble and let G= {Gλ}λ∈N= {gλ:Xλ→Yλ}λ∈Nbe the set of all functions mapping Xλto Yλ. We say that Fis a (t, ϵ)-pseudorandom function family (PRF) if no t-size adversary can distinguish fλ(k,·)from gλ(·)for k chosen uniformly from the set Kλand where gλis chosen uniformly from Gλwith probability better than ϵ. More precisely, for an adversary A = {Aλ}λ∈N, we define Advprf f,A(λ)=Pr k←Kλ [Afλ(k,·) λ(1λ)=1] −Pr gλ←Gλ [Agλ(·) λ(1λ)=1]. The family Fis a (t, ϵ)-PRF if for every size-s adversary A it holds that Advprf f,A(λ)≤ϵ(λ). Definition 3 (Dual-PRF): Let F= {fλ:X0 λ×X1 λ→ Yλ}λ∈Nbe an ensemble of functions. Let ¯ F= {¯ fλ:X0 λ× X1 λ→Yλ}λ∈Nbe the ensemble of dual functions such that each ¯ f∈¯ Fis defined as ¯ f(y,x)=f(x,y)We say Fis a (t, ϵ)-dual-PRF if both Fand ¯ Fare (t, ϵ)-PRFs. Definition 4 (Computational Extractor): We say that a function F :Kλ→Yλis a (t, ϵ)-computational extractor with respect to a (leakage) function g :Kλ→ {0,1}mif for any circuit A of size at most t it holds that |Pr k←Kλ [A(g(k),F(k))] −Pr k←Kλ,R←Yλ [A(g(k),R]|≤ ϵ Note that a computational extractor takes as input a random kin Kλand outputs an element yin Yλthat is computationally indistinguishable from a random element in Yλ. Moreover, the extractor is secure even in the presence of a leakage (one-way) function g, i.e., given g(k), an adversary Acannot distinguish between the output of the extractor and a random element in Yλ. B. HASH-BASED MESSAGE AUTHENTICATION CODE Hash-based Message Authentication Code (HMAC) [26] is a cryptographic hash-function-based PRF with HMAC(K,m)=H(K′⊕opad ∥H(K′⊕ipad ∥m)), where mis some message, opad is the byte-string 0 ×5CL, and ipad is the byte-string 0×36L. Note that Lrepresents the block size of Hand 0×5CLmeans 0×5Crepeated Ltimes. Moreover, K′=H(K) if |K|>Land K′=Kotherwise. Proofs of HMAC security are given in [27] and [28]. C. KEY ENCAPSULATION MECHANISM (KEM) COMBINER In this section, we briefly review the structure of a KEM. A KEM can be split into three algorithms K= (K.Gen,K.Enc,K.Dec), where •(pk,sk)←K.Gen(1κ): on the input of the system security parameter κ, the algorithm generates a public key pk and a secret key sk. •(k,c)←K.Enc(pk): on the input of the public key pk, thealgorithm producesa sessionkey kand a ciphertextc. •(k,⊥)←K.Dec(sk,c): on the input of the secret key sk and the ciphertext c, the algorithm outputs either a session key kor a rejection value ⊥. A KEM combiner is a mechanism specifying how a set of existing KEMs can be joined to generate a new KEM, i.e. a new session key k. Note that a KEM combiner should be at least as secure as any of its input KEMs. Normally, a parallel combination is suggested for KEM, i.e., one component per input KEM [9]. This follows the IND-CCA VOLUME 12, 2024 23209
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography model that is considered as a standard security notion for KEM protocols [29] and stronger than IND-CPA. D. A PRACTICAL DUAL-PRF DESIGN Aviram et al. [8] provides a provable-secure practical construction for a dual-PRF. Informally a dual-PRF(k,c) is a PRF where at least one input value between kand cneeds to be random. Moreover, dual-PRF(k,c) is equal to dual- PRF(c,k). In order to have a dual-PRF, a combiner needs the involvement of a practical one-way function gand a computational extractor F. Let exp be an expansion factor, and Bifixed public values, where |Bi|is equal to Hblock size. Let xbe an input value, we define Hi(x)=H(x||Bi).(1) Therefore, Algorithm 1gives a way on how to compute g. Note that Algorithm 1, Line 1 is applied only if the size of K is bigger than Hblock size. Algorithm 1 g(K,exp) 1: k1,k2,...,kn←SplitToBlocks(K) 2: u←Empty 3: for j=1to ndo 4: u←u∥H1(kj)∥ · · · ∥ Hexp−1(kj) 5: end for 6: return u Moreover, a computational extractor F(K) with respect to gcan be designed as follows: F(K,salt)=HMAC(salt,K), where the input value Kis used as a message and the salt as a key. Note that the default value of salt is set to be all zero bytes. Algorithm 2shows a construction of a dual-PRF (please see [8] for more details). Let Kibe the output key of KEMi, exp the expansion factor for g, and salt the salt needed for HMAC, then Algorithm 2 Dual-PRF(K1,K2,exp,salt) 1: k1←F(K1,salt), k2←F(K2,salt) 2: u1←g(K1,exp), u2←g(K2,exp) 3: K←H(HMAC(k1,1∥u2)⊕HMAC(k2,2∥u1)) 4: return K IV. PROPOSED ARCHITECTURE In this section, we present the cryptographic architecture of our hybrid key establishment system. We also describe our design goals, selection of cryptographic primitives and related parameters. A. MOTIVATION FOR THE SELECTION It is worth mentioning that the main issue with Random Oracles (ROs) is that it is very difficult to build a truly ‘‘random’’ oracle. Canetti et al. [30] proved that there exist signature and encryption schemes that are secure in the ROM, but for which any implementation of the RO, i.e., hash functions, results in insecure schemes. Therefore, being a secure hash function does not imply that this function is a RO. This leads us to move our attention to combiners that are secure in the Standard Model (SM) rather than in the RO Model (ROM). Moreover, our combiner has hybrid inputs not only in the sense that considers quantum-resistant and pre-quantum schemes but also that combines schemes with different structures, i.e., one KEM and two KEX protocols. Note that Aviram et al. [31] prove that concatenating secrets and hashing them is, in general, vulnerable to the (Authenticated Post Office Protocol) APOP attack [32]. Accordingly, the Concatenate-then-Hashing (i.e. G1) in Table 1) is a secure KEM combiner, but this does not imply that is also a secure KEX combiner. Therefore, we need to consider hybrid combiners that are proven secure for KEX protocols in the SM model. In Table 1, only three KEM combiners are proven secure in the Quantum SM (Q-SM), and, among them, the dual-PRF combiner [12] presents a construction proven secure for KEXs as inputs [8]. Finally, the dual-PRF architecture directly stems from the TLS 1.3 KEX combiner, allowing it to be integrated into TLS 1.3 more smoothly and increasing its applicability. B. DESIGN GOALS During the creation of cryptographic architecture, we considered mainly these design goals: •Security: our approach combines classically secure and quantum-resistant schemes retaining the time-tested trust on pre-quantum primitives and mitigating the risk of quantum attacks. Moreover, we deployed only cryptographic primitives that have no known vulnerabilities and considered secure for medium-term future. •Post-quantum security: our combiner achieves IND-CCA and Quantum IND-CCA, i.e., IND-CCA against quantum adversaries. •Compliance: we considered only primitives that comply with the recommendations of renowned authorities, such as (National Institute of Standards and Technology) NIST [33], ANSSI [3], BSI [4], and National Cyber Security Center (NCSC) [34]. •High performance: primitives and their composition were chosen considering low computational and space complexity so that implementation on constrained devices is possible and practical. In particular, we were aiming at small space for the implementation on FPGAs, i.e., a solution with less than 100k LUTs and 100 FFs for all cryptographic components at the platform. •Cryptographic flexibility (agility): cryptographic flexibility (in terms of BSI: agility) means easy and fast replacement of cryptographic components in case some weaknesses arise. In case any algorithm becomes 23210 VOLUME 12, 2024
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography vulnerable, it must be easy to replace it without affecting the remaining components in the resulting system. C. SELECTED PRIMITIVES We list all necessary components of the hybrid key establishment system. Our system is composed of: •Classical Cryptography Key Source: we selected the Elliptic-Curve Diffie Hellman (ECDH) protocol [35] as it represents today’s standard for classical key establishment schemes. ECDH is recommended by all major authorities, including NIST, ANSSI, BSI, and NCSC. •Quantum Key Distribution (QKD) Key Source: the ID Quantique CLAVIS 3 QKD system [36] has been selected as the source of keys generated and agreed by quantum devices. The selection is rather pragmatic (as this QKD system is present in our lab [37]) and motivated by the fact, that ID Quantique is one of very few companies currently delivering full-fledged commercial QKD systems to customers. •PQC Key Source: CRYSTALS-Kyber [38] was selected as the post-quantum source of keys, as this algorithm is, at the time of writing this article, the only key-establishment mechanisms approved for the standardization by NIST [33] and recommended by security agencies,including theNational SecurityAgency(NSA) [39] in the USA. We used the Kyber.AKE version that ensures mutual authentication of communicating parties. This version requires 3x Encaps and 3x Decaps operations. Further, both parties have to use longterm pre-shared public keys (side A knows B’s public key, side B knows A’s public key). The Kyber.AKE version is more complex and secure than a simple non-authenticated Kyber version. •Key Derivation Function: the current standard for hash function, the SHA-3 based on the Keccak algorithm, was selected as the fundamental construction for the key-derivation function. SHA-3 is recommended by all major authorities, including NIST, ANSSI, BSI and NCSC. •Symmetric Block Cipher: we selected the today’s de-facto standard for fast encryption of high amounts of data, the Advanced Encryption Standard (AES) algorithm. The algorithm, in its 256 bits variant, is considered quantum safe by major authorities, e.g. NSA [39]. We used the algorithm in the Galois-Counter Mode (GCM) which provides both confidentiality and integrity of transferred data. •Key Management System: the Key Management System (KMS) provides the logics for the derivation and updating of encryption and decryption keys. Its functionality is given by the requirements of relevant cryptographic components, particularly of the GCM mode of AES and its requirements on periodic key updates after a certain amount of data encrypted. D. CRYPTOGRAPHIC ARCHITECTURE In our system, we need to combine a post-quantum secure KEM, namely Kyber, with two KEXs, namely ECDH and QKD. Our solution follows the architecture presented by Aviram et al. [8], where their proposal practically combines two KEXs using a dual-PRF as proposed by Bindel et al. [5]. The proposed construction needs the involvement of a practical one-way function gwhich is sketched in Algorithm 3. Please see Section III for more details. In our case, His SHA3-512 that needs input in bitrate instead of blocksize. Therefore, we slightly change the gconstruction to work with bitrates. Let Kbe a session key generated by either a KEM or a KEX scheme that we want to combine and pp some public values related to Kgeneration. Algorithm 3 g(K,pp) 1: l←bitrate of H 2: pp1,pp2,pp3←SplitToBits(pp) with |ppi| = l 3: u←u∥H(K∥pp1)∥H(K∥pp2)∥H(K∥pp3) 4: return u Let K1,K2, and K3be the session keys generated by Kyber, ECDH, and QKD schemes, respectively. Moreover, let c1be the Kyber ciphertext, and p2and p3the public parameters of ECDH and QKD schemes, respectively. Our construction uses c1,p2and p3as fixed public values for expansion function g. The exp value shown in Algorithm 1 is fixed to 3 as suggested by the authors [8]. Note that the bitrate of SHA3-512 is 576 bits and therefore, we need that |pp| ≥ 3∗676 =1728 bits. This causes to SHA3-512 to be ‘‘expanding’’ from 512 bits to 1536. The proposed hybrid combiner, namely 3-key Combiner, is depicted in Algorithm 4. Note that our 3-key Combiner is a component of the key management system that produces the private values for AES. In our case, we need to combine three keys. Therefore, we modified the input of HMAC (Algorithm 4, Line 5, highlighted in red) to involve results computed from each key. For instance, in order to retrieve u2∥u3∥1 in HMAC(k1,u2∥u3∥1), an attacker would need to know both K2and K3and, accordingly, break both ECDH and QKD. This technique was already proposed by Bindel et al. [5]. Furthermore, for performance purposes, we changed the order of the concatenated elements in HMAC (Algorithm 4, Lines 5 and 7). For instance, 1 ∥u2∥u3becomes u2∥u3∥1. We refer to Section VI for more details. Note that HMAC(salt,K) is a computational extractor with respect to g, where default value salt is set to be all zero bytes. In fact, HMAC is proven to be a good extractor if the compression function underlying the hash function is a PRF and the dual of the compression function is a good extractor [8],[40]. Our 3-key Combiner can be easily switched to either use or not use the QKD algorithm. This allows the FPGA platform to be used with and without the quantum component VOLUME 12, 2024 23211
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography Algorithm 4 3-Key Combiner(K1,K2,K3,c1,p2,p3, salt) 1: k1←HMAC(salt,K1), u1←g(K1,c1) 2: k2←HMAC(salt,K2), u2←g(K2,p2) 3: if QKD then 4: k3←HMAC(salt,K3), u3←g(K3,p3) 5: K←H(HMAC(k1,u2∥u3∥1)⊕ HMAC(k2,u1∥u3∥2)⊕HMAC(k3,u1∥u2∥3)) 6: else 7: K←H(HMAC(k1,u2∥1)⊕HMAC(k2,u1∥2)) 8: end if 9: return K and makes the solution more accessible from a market point of view. In Figure 1, we illustrate the high-level cryptographic architecture of our quantum-safe encryption system designed for high-speed network interfaces. Our system architecture is deployed on both sides, labelled as Side A and Side B, utilizing programmable FPGA network cards equipped with four 100 GbE interfaces, collectively referred as the trust zone. Each FGPA card allows a pre- and a post-quantum encryption capabilities, employing high-speed encryption, ECDH and Authenticated Key Exchange (AKE)-Kyber exchange methods, and a dedicated key combiner. Note that Algorithm 4describes the keys combination which has XOR-ing, hashing and HMAC as main primitives. The trust zone interfaces serve distinct purposes: one interface connects the internal network, managing upstream and downstream data for two logical sessions, while another interfaces with the external network (Side B in a peer-to-peer configuration). The third interface establishes a connection to the external source responsible for quantum-generated keys (a QKD-KEM system) that uses its own optical connection lines between Side A and Side B. All key-generation blocks (ECDH, Kyber, and QKD) independently generate 256-bit keys. These keys are then fed into the 3-key combiner. The 3-key combiner combines the keys and outputs the 256 bits hybrid encryption and decryption keys. These hybrid keys, along with the randomly generated 32-bit salt, serves as inputs for the AES encrypted and decrypted blocks. These blocks, emplying AES in the GCM mode, are used to encrypt (resp. decrypt) traffic on the LAN (resp. WAN) interfaces. Note that the 32-bit salt values are also generated by the 3-key combiner. E. SELECTION OF PARAMETERS, IMPLEMENTATION ASPECTS Our architecture is not only theoretical, it was also used in a concrete implementation of our quantum-safe encryptor on the FPGA platform. For the practical implementation, the concrete parameters for cryptographic components and key management approach had to be selected. To balance the security and speed of our implementation, we selected NIST Security Strength Category 3 [41] as the baseline. TABLE 2. Values used in the 3-Key Combiner. ‘‘Param’’ states for parameter. The selected Level 3 is suggested for standard security applications according to [42]. The selected parameters are: •Classical Cryptography: we selected ECDH-512 (precisely the sect571k1 curve), as it exceeds Level 3 according to [43]. •Post-Quantum Cryptography: we selected KYBER-768, as it directly complies with NIST Security Level 3. •Quantum Cryptography: we used the default QKD protocol for key distribution: the Coherent One Way (COW) protocol for establishing 256-bit keys. •Block Cipher: we selected the highest security parameter of AES, i.e. 256-bit keys. For the 3-key Combiner system, we selected SHA3-512 as the hash function due to its security strength [21] and bitrate. We have to consider that SHA3-512 will be used as a component of gand HMAC. With this choice, function gneeds that pp has a bitlength of (at least) 3∗576 =1728 bits. We refer to Section IV-D for more details. Table 2lists the input values information used in our 3-key Combiner, where c1,p2, and p3are the public values needed in g. Therefore, the first 1728 bits of c1,p2, and p3are Algorithm 3inputs. In ECDH, Qa,Qband Qpresent the communication points that SIDE A and SIDE B exchange, and the generator of the curve, respectively. Their size is 1142 bits each. Note that keyID is the value of size 256 bits transmitted with the generated key. In case of QKD, three possible solutions as input values were found: •Option 1: keyID ∥SHAKE(certificate), where 256 bits are from keyID and the remaining 1472 bits are generated by applying SHAKE-512 to the QKD certificate that each device owns. However, certificates are static and less universal. •Option 2: keyID ∥SHAKE(session settings info), where the input of SHAKE changes to the information about session settings. Note that these data are unique (i.e., dynamic), and with proper length between 1500 and 1800 bits per key. However, they depend on the length of the generated key. •Option 3: keyID ∥SHAKE(service channel messages/‘‘Logtail qkd’’). This option has larger spaces than session settings in Option 2, and the data should be also dynamic since they contain encoded information unique for session settings. For our setting, Option 3 presents more compliant characteristics, i.e., dynamicity and right bit length. 23212 VOLUME 12, 2024
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography FIGURE 1. Basic system architecture. The 3-key Combiner system must be able to update encryption and decryption keys before their lifetime expires. The maximum key lifetime is given by the maximum amount of data that are encrypted using the same key and salt. For the GCM mode, 232 messages can be encrypted using the same key and salt [44]. Considering using IP packets of length 1500 bytes as messages and the line speed of 100 Gbps, the expected key lifetime is around 500 seconds,4a bit above 8 minutes. To have some security margin, we selected to update the encryption and decryption keys every minute. Furthermore, our system is easily adaptable either to the involvement of a quantum component or not. Therefore, depending on the user demand, we have that the 3-key Combiner uses: 1) Two-methods: Kyber +ECDH. 48∗1500 ∗232/1011=515,39 s. 2) Three-methods: Kyber +ECDH +QKD. V. SECURITY ANALYSIS Bellare and Lysyanskaya [45] proved the IND-CCA security of dual-PRFs in the SM. Moreover, Aviram et al. [8] present a concrete construction of a dual-PRF. The IND-CCA security of our 3-key Combiner follows the same proof technique of [8]. In other words, we prove that our 3-key Combiner outputs a key Kthat is indistinguishable from random. We omit the public value inputs c1,p2,p3in gfor brevity. Note that c1,p2,p3are public values and, therefore, an adversary Aknows them. Lemma 1: Assume that g is an injective (t, ϵ)-one way function, that F is a (t, ϵ)-computational-extractor with respect to g, that HMAC is a standard (t, ϵ)-PRF, and that His ϵ-regular. Then, the following construction is a (t,3ϵ)-dual- PRF. On input K1,K2compute the following VOLUME 12, 2024 23213
S. Ricci et al.: Hybrid Keys in Practice: Combining Classical, Quantum and Post-Quantum Cryptography 1) k1←F(K1), u1←g(K1) 2) k2←F(K2), u2←g(K2) 3) Output: K ←H(HMAC(k1,u2∥1) ⊕HMAC(k2,u1∥ 2)) Proof: This construction is equivalent to the one proposed by Aviram et al. Therefore, the proof follows straightforward from Theorem 1,[8].□ Lemma 2: Assume that g is an injective (t, ϵ)-one way function, that F is a (t, ϵ)-computational-extractor with respect to g, that HMAC is a standard (t, ϵ)-PRF, and that His ϵ-regular. Then, the following construction is a (t,3ϵ)-dual- PRF. On input K1,K2,K3compute the following 1) k1←F(K1), u1←g(K1) 2) k2←F(K2), u2←g(K2) 3) k3←F(K3), u3←g(K3), 4) Output: K ←H(HMAC(k1,u2∥u3∥1)⊕ HMAC(k2,u1∥u3∥2) ⊕HMAC(k3,u1∥u2∥3)). Proof: We need to show that if K1is uniform at random, and K2and K3are malicious, then an adversary Ais not able to distinguish the output from a uniform value. This needs to be valid also for the cases 1) K2uniform, and K2and K3malicious, and 2) K3uniform, and K1and K3malicious which follow the same proof structure. We assume that K1is chosen uniformly at random and A performs queries while choosing values for K2and K3. Let ϵ0and ϵibe the advantage Ain the original construction, namely Construction 0, and in Construction i, respectively. Let Abe an adversary that runs in time t. For each construction the difference from the previous construction is marked in red. We bound the differences between ϵiand ϵi+1 for i=0,1,2,3. Construction 1: 1) k1← $U,u1←g(K1), 2) k2←F(K2), u2←g(K2) 3) k3←F(K3), u3←g(K3), 4) Output: K←H(HMAC(k1,u2∥u3∥1)⊕ HMAC(k2,u1∥u3∥2) ⊕HMAC(k3,u1∥u2∥3)). Claim: |ϵ0−ϵ1|≤ ϵ This follows directly from the definition of (t, ϵ)- computational extractor with respect to the function g. For g, Agets as input u1←g(K1) and k1, where k1is either random, i.e., k1← $U, or k1←F(K1). Therefore, Acan simulate the rest: 1) sample K2and K3, 2) compute k2←F(K2), u2←g(K2) 3) compute k3←F(K3), u3←g(K3), 4) compute K←H(HMAC(k1,u2∥u3∥1)⊕ HMAC(k2,u1∥u3∥2) ⊕HMAC(k3,u1∥u2∥3)). Accordingly, the probability of distinguishing between Construction 0 and Construction 1 is equivalent to the probability of distinguishing in the PRF game (Definition 4), i.e., ϵ. Construction 2: 1) k1← $U,u1←g(K1), 2) k2←F(K2), u2←g(K2) 3) k3←F(K3), u3←g(K3), 4) Output: K←H(U⊕HMAC(k2,u1∥u3∥2) ⊕ HMAC(k3,u1∥u2∥3)). Claim: |ϵ1−ϵ2|≤ ϵ We can assume without loss of generality that Aperforms unique queries q1,...,qt. Since gis injective and qi= qjfor all i,j=1,...,tand i= j, then y1=g(q1),...,yt=g(qt) are distinct. The claim follows from the fact that HMAC is a PRF. Note that k1can be input only for HMAC. Therefore, since HMAC is queried only with distinct inputs, the probability of distinguishing between Construction 1 and Construction 2 is equivalent to the probability of distinguishing in the PRF game (Definition 4). Construction 3: 1) k1← $U,u1←g(K1), 2) k2←F(K2), u2←g(K2) 3) k3←F(K3), u3←g(K3), 4) Output: K←U. Claim: |ϵ2−ϵ3|= 0 Since Uis uniform at random for each query of A, we have that Uis distributed exactly as U⊕HMAC(k2,2∥u1∥u3)⊕ HMAC(k3,3∥u1∥u2). Construction 4: 1) k1← $U,u1←g(K1), 2) k2←F(K2), u2←g(K2) 3) k3←F(K3), u3←g(K3), 4) Output: K←H(U). Claim: |ϵ3−ϵ4|≤ ϵ This follows directly from the fact that His ϵ-regular (Definition 1). Therefore, the distance between Construction O and Construction 4 is |ϵ0−ϵ4|=| (ϵ0−ϵ1)+(ϵ1−ϵ2)+(ϵ2−ϵ3)+(ϵ3−ϵ4)|≤ 3ϵ. Note that Construction 4 is a random oracle and, therefore, ϵ4is equal to 0. Accordingly, ϵ0≤3ϵ.□ Theorem 1: Algorithm 4is a (t,3ϵ)-dual-PRF. Proof: We demonstrate this theorem using Lemmas 1 and 2that prove that both the combiners in our construction are dual-PRF with the right selection of primitives. To do so, we need to have that: •gis an injective (t, ϵ)-one way function. This is proven in Section 5.1, [8]. •His ϵ-regular. In our case, we consider SHA3-512 which is safe to consider ϵ-regular since if it is applied to uniformly random inputs, then it outputs (very close to) hash uniformly distributed hash digests. •HMAC(K,salt)isa(t, ϵ)-computational-extractor with respect to g(K). This is proven in [40]. •HMAC is a standard (t, ϵ)-PRF. This is proven in [27]. □ Note that both HMAC and ginvolve SHA3-512 in out system. This also allows reducing the implemented primitives. In Bindel et al. [5], the dual-PRF is proven to be a robust KEM combiner, i.e., the resulting KEM has the security of the 23214 VOLUME 12, 2024