Full text
On Deploying Quantum-Resistant Cybersecurity in Intelligent Infrastructures Lukas Malina [email protected] Brno University of Technology Brno, Czech Republic Patrik Dobias [email protected] Brno University of Technology Brno, Czech Republic Jan Hajny [email protected] Brno University of Technology Brno, Czech Republic Kim-Kwang Raymond Choo [email protected] University of Texas at San Antonio San Antonio, Texas, USA ABSTRACT As quantum-safe algorithms are increasingly implemented in security protocols used in current and emerging digital services, there is also a corresponding need to map the current state of security protocols and applications and their preparedness for the post-quantum era. In this paper, we review current security recommendations, existing security libraries, and the support of Post-Quantum Cryptography (PQC) in widely-used security protocols. We also present a practical assessment of recently selected PQC algorithms by the National Institute of Standards and Technologies (NIST) PQC standardization on typical platforms that can be deployed in intelligent infrastructures (e.g., smartphones and single-boards), and recently recommended hash-based signatures for software/firmware signing. Finally, we discuss how incoming post-quantum migration affects selected areas in intelligent infrastructures. CCS CONCEPTS •Security and privacy → Public key (asymmetric) techniques; Security protocols. KEYWORDS Applied Cryptography, Assessment, Performance, Post-Quantum Cryptography, Security Protocols, Security Recommendations ACM Reference Format: Lukas Malina, Patrik Dobias, Jan Hajny, and Kim-Kwang Raymond Choo. 2023. On Deploying Quantum-Resistant Cybersecurity in Intelligent Infrastructures. In The 18th International Conference on Availability, Reliability and Security (ARES 2023), August 29–September 01, 2023, Benevento, Italy. ACM, New York, NY, USA, 10 pages. https://doi.org/10.1145/3600160.3605038 1 INTRODUCTION Advances in quantum computing reinforce the importance of designing new cryptographic algorithms that are resilient to quantum This work is licensed under a Creative Commons Attribution International 4.0 License. ARES 2023, August 29–September 01, 2023, Benevento, Italy ©2023 Copyright held by the owner/author(s). ACM ISBN 979-8-4007-0772-8/23/08. https://doi.org/10.1145/3600160.3605038 computing attacks, and such approaches are also commonly referred to as post-quantum cryptography (PQC). For example, NIST started a post-quantum (PQ) scheme standardization process in 2016, and several PQC algorithms were eventually selected for standardization in 2022 1 . There have also been calls for existing cybersecurity approaches based on asymmetric cryptography to prepare for a post-quantum migration in the next years, where PQC primitives substitute and/or combine with classic schemes such as RSA and ECC-based in hybrid solutions. In this work, we analyze recent US/EU security recommendations based on the NIST announcement from 2022 and the current state of PQC support in security protocols such as MACSec, IPSec, TLS, and SSH. Further, we evaluate key metrics of recommended PQC primitives and benchmark their performance on various platforms (iOS, Android, low-cost single-boards) and discuss their deployment in selected emerging services such as Internet of Vehicles (IoV) and smart grids. 1.1 Related Approaches Several works deal with practical implementations and the performance assessment of PQC in current services and on platforms such as IoT devices and smartphones. The feasibility of PQC on ARM-based devices was studied in [ 26 ] in 2018. The work presents the performance assessment of several chosen PQC KEM schemes such as SIDH, Frodo, BCNS, NTRU, New Hope, and McBits on 32-bit architectures. Nevertheless, the work does not include also recent NIST winners and PQC signature schemes. Further, Chikouche and Ghadbane [ 11 ] measured the performance of different PQC schemes on an Android smartphone. The work investigated both KEMs and PQ signatures but some NIST winners were not measured. Liu et al. [ 25 ] surveyed the suitability of PQ public-key cryptosystems for resource-constrained devices (8-bit and 32-bit platforms) used in IoT. They concluded that lattice-based schemes are promising but the focus on NIST finalists is missing. Roy and Kalita [ 32 ] also dealt with the applicability of PQC on constrained devices, and compared schemes such as BLISS, NTRU, Lamport, Rainbow, McElliece on Atmel ATxmege controllers. The recommended PQC schemes have not been validated. Chung et al. [ 14 ] evaluated PQC algorithms (BIKE, HQC, FrodoKEM, Kyber, NTRU, NTRU Prime, SABER, IKE.) on Raspberry Pi 3 and 4. Their empirical results showed that PQC algorithms cause affordable latency 1 https://csrc.nist.gov/Projects/post-quantum-cryptography/selected-algorithms- 2022
ARES 2023, August 29–September 01, 2023, Benevento, Italy Malina et al. in TLS. The performance is similar to ECDH and ECDSA. PQC schemes just cause higher packet overhead than classic schemes. There are also other similar works that evaluate PQC schemes on popular single-board low-power devices (i.e. Raspberry Pi 4) such as [ 4 , 33 ]. In 2022, Tasopoulos et al. [ 38 ] focused their study to NIST-selected algorithms for standardization and 4th round algorithms inside TLS 1.3 on embedded devices. They implemented and benchmarked PQ TLS 1.3 connections in their handshake phases on 32-bit ARM Cortex-M4. Recently, Bozhko et al. [ 9 ] have studied quantum-resistant TLS runnable on IoT devices. They compare TLS handshake delays with various combinations of PQC signatures and Kyber versions via different communication settings (BLE, Wifi, mutual auth.). The implementation runs on a laptop and Raspberry Pi 4. In our work, we measure recommended PQC on both main smartphone platforms (iOS and Android) and deal also with hashbased signatures. Another relevant work was done by Joseph et al. [ 23 ] who discussed transition timelines, leading protection strategies, and approaches for combining pre-quantum cryptography with PQC. Zeydan et al. [ 39 ] analyzed how digital technologies should plan to migrate to quantum-safe options. They discussed efforts, future challenges, and directions toward building PQC-based networking systems. The work surveyed other works but without any concrete assessment of PQC schemes in various scenarios. In this work, we provide an updated overview and practical evaluation of PQC on Android and iOS mobile platforms and single boards representing IoT devices. 1.2 Contributions and Paper Organization The contributions (and organization) of this work are as follows: • We summarize recent US/EU recommendations regarding the post-quantum era (Section 2). • We analyze the current state of security protocols and libraries and their support of PQC primitives (Section 3). • We present our performance benchmarks of recommended PQC primitives at various platforms (iOS, Android, and lesspower-full single-boards) (Sections 4). • We discuss the PQC deployment and future steps in the selected emerging digital services (Section 5). 2 PQC WINNERS AND RECOMMENDATIONS This section introduces the significant PQC schemes that have been selected by NIST for the standardization process and discusses some recent US/EU recommendations in the PQC deployment. 2.1 NIST PQC Selected Algorithms The process of NIST PQC competition is depicted in Figure 1. We briefly introduce NIST PQC selected algorithms (3 signature schemes, 4 KEM schemes) and main observations from the NIST report [1]: • Dilithium [ 17 ] is a signature scheme based on Module Learning with Errors (M-LWE) and Module Short Integer Solution (M-SIS) problems. Dilithium is designed to be highly flexible, allowing for a variety of security and performance trade-offs. With its strong theoretical foundation and cryptoanalytic history, Dilithium is an ideal choice for a wide range of cryptographic applications. NIST has selected Dilithium as the primary signature algorithm for standardization due to its high efficiency, simple implementation, and strong security compared to other PQ signatures. • SPHINCS + [ 5 ] is a stateless hash-based signature scheme. It is based on the Merkle tree construction and has been designed to provide high security against both classical and quantum attacks. Unlike stateful hash-based signature schemes, which require keeping track of the state between signatures, this scheme does not need to maintain states. However, it is slower and produces larger signatures compared to stateful schemes. SPHINCS + has a relatively high time and memory complexity compared to other signatures. • Falcon [ 20 ] is a lattice-based PQ signature scheme. Falcon is designed to be efficient, especially in resource-constrained environments such as embedded systems and IoT devices. Despite its complexity and potential implementation challenges, it was chosen for standardization by NIST due to its strong security assurance and its narrow bandwidth, which may be essential in certain applications. • Kyber [ 8 ] is a lattice-based PQ encryption scheme that is designed for use in key encapsulation mechanisms. It is built on the M-LWE problem and offers high flexibility with regard to security, allowing for changes in parameters without affecting the underlying operations. Kyber has a remarkable performance in software, hardware, and hybrid settings. • Classic McEliece [ 13 ] is a KEM scheme that is based on error-correcting codes. It has been around since the 1970s and is considered one of the oldest KEM scheme. Although the McEliece scheme is relatively simple and offers a fast key encapsulation process, its public key size is significant, making it less feasible for certain applications. Specifically, its public key size is a multiple of thousands compared to other candidates, as shown in Table 2. • BIKE [ 2 ] is a code-based public key encryption scheme. BIKE has the most competitive performance among the nonlattice-based KEM schemes. The quasi-cyclic structure of BIKE enables public key and ciphertext sizes comparable to the structured lattice KEM schemes. • HQC [ 27 ] is a code-based public key encryption scheme. HQC offers strong security assurances and a mature decryption failure rate analysis. However, despite its quasi-cyclic structure allowing for reasonable sizes of public keys and ciphertexts, HQC’s public keys and ciphertexts are larger than in other structured code- and lattice-based KEM schemes. • SIKE (https://sike.org/) was originally chosen by NIST for 4. round but the SIKE team acknowledged that SIKE and SIDH are insecure and should not be used2. 2.2 US Recommendations - Commercial National Security Algorithm Suite 2.0 In reaction to the deployment of cryptanalytically relevant quantum computers (CRQCs), NSA announced Commercial National Security Algorithm Suite 2.0 (CNSA 2.0) that lists quantum-resistant 2 https://csrc.nist.gov/csrc/media/Projects/post-quantum-cryptography/documents/ round-4/submissions/sike-team-note-insecure.pdf
On Deploying Quantum-Resistant Cybersecurity in Intelligent Infrastructures ARES 2023, August 29–September 01, 2023, Benevento, Italy KEM / Encryption (1 scheme) Digital signatures (3 schemes) Lattice-based Crystals-Kyber FrodoKEM LAC NewHope NTRU NTRU Prime Round 5 SABER Three Bears Code-based Classic McEliece NTS-KEM BIKE HQC LEDAcrypt Rollo RQC Isogeny-based SIKE Lattice-based Crystals-Dilithium FALCON qTesla Symmetric/hashbased SPHINCS+ Picnic Multivariatebased GeMSS LUOV MQDSS Rainbow NIST PQC competition 2. round - 26 semifinalists 3. round - 7 finalists (8 alternate candidates) 4. round - 4 selected alg. (4 KEMs tweaks) Figure 1: NIST PQC Competition (from 2. round to 4. round). algorithms for key establishment, digital signatures, and encryption. Table 1 summarizes algorithms CNSA 1.0 and CNSA 2.0. According to NSA, software and firmware signing should support and prefer CNSA 2.0 by 2025 and must use CNSA 2.0 by 2030. The web and cloud services (including web browsers/servers) should support and prefer CNSA 2.0 by 2025, and must use it by 2033. Networking equipment with services e.g., virtual private networks, should support and prefer CNSA 2.0 by 2026, and must use it by 2030. Operating systems should support and prefer CNSA 2.0 by 2027, and must use it by 2033. Other and niche equipment, e.g., constrained devices including smart meters, IoT, etc., should support and prefer CNSA 2.0 by 2030, and must use it by 2033. Custom applications and legacy equipment have to be updated or replaced by 2033. 2.3 European Recommendations - BSI, ANSSI, ENISA In 10/2021, BSI (Federal Office for Information Security in Germany) released the document[ 19 ] 3 with the overview of the developments in the field of quantum technologies, its influence to ICT security, and recommendations for quantum-safe cryptography. In the document, BSI comments on hybrid approaches for key agreement and digital signatures, and maps recent works dealing with PQC adoption in TLS and IKE protocols. In 03/2022, ANSSI (French National Agency for the Security of Information Systems) released a document 4 with views on the PQC transition. The document describes quantum threats, PQC, the transition process, cryptoagility, and recommendations. ANSSI recommends a 3-phase roadmap: Phase 1 - hybridization with additional post-quantum protection, Phase 3 https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/Brochure/ quantum-safe-cryptography.html?nn=916626 4 https://www.ssi.gouv.fr/uploads/2022/01/anssi-technical_position_papers- post_quantum_cryptography_transition.pdf 2 (from 2025) - hybridization with post-quantum security assurance, Phase 3 (from 2030) - standalone PQC. ANSSI’s and BSI’s views are very similar and both recommend hybrid approaches in the transition period. Both reports were written before announcing the 4 NIST PQC standardization candidates. Therefore, the reports do not pick concrete PQC algorithms but mention several NIST PQC finalists. In 10/2022 ENISA released the report called "Post-Quantum Cryptography-Integration study[ 6 ] as a follow-up report to ENISA’s 2021 Post-Quantum Cryptography: Current state and quantum mitigation study 5 . The document also reacts to the NIST PQC 4 candidates announcement 6 and discusses problems regarding the integration of PQC into existing protocols, doubleencryption/signing, security proofs, and current standardization initiatives. 3 PQC IMPLEMENTATIONS AND LIBRARIES The section provides an overview of recent practical studies, implementations, and libraries of PQC in Internet protocols. 3.1 PQC in Security Protocols In the following, we map recent activities and implementations of PQC in various security and communication protocols from the link layer to the application layer of ISO/OSI communication models. 3.1.1 MACsec. This IEEE standard protocol for Layer-2 security provides Ethernet frames encryption and their data integrity and authenticity by adding the Security TAG (SecTAG) and ICV (Integrity Check Value). To be quantum-safe, the key size for AES-GCM encryption should be set at least to 256 bits. The default MACsec Key Agreement (MKA) protocol establishes keys for MACsec by using pre-shared keys or by using an Extensible Authentication Protocol (EAP). Cho and Sergeev [ 12 ] proposed and evaluated a PQ MKA variant using the Classic McEliece public-key cryptosystem for KEM. The work also deals with the large message overhead of the PQ scheme that exceeds greatly the Ethernet MTU (ca 1500 bytes) by deploying a fragmentation strategy. Quantum-resistant MACsec and MKA were also studied by Gazdag et al. [ 21 ] who tested various exchanged schemes: Classic McEliece, NTRU, CRYSTALS-Kyber, and SABER, together with classical Diffie-Hellman key exchange. They observed that the PQ schemes did not significantly impact MACsec performance. 3.1.2 IPSec/Internet Key Exchange Version 2. IPSec is used for securing connections at the network layer by encrypting packets and ensuring their authenticity and integrity. These security properties are usually solved by symmetric cryptography that can be simply set to be quantum-safe. Further, Internet Key Exchange Version 2 (IKEv2) is a component of IPSec that provides mutual authentication and key exchange in order to set a secure channel represented by Secure Associations (SAs). Therefore, in order to have a quantumsafe IPSec configuration, IKEv2 must also support PQC schemes. The well-known open-source library strongswan implements PQ schemes in the strongSwan 6.0beta Post-Quantum IKEv2 Daemon. Implemented PQC KEM algorithms (Kyber, NTRU, Saber, Frodo, 5 https://www.enisa.europa.eu/publications/post-quantum-cryptography-current- state-and-quantum-mitigation 6https://csrc.nist.gov/News/2022/pqc-candidates-to-be-standardized-and-round-4
ARES 2023, August 29–September 01, 2023, Benevento, Italy Malina et al. Table 1: Algorithms CNSA 1.0 and CNSA 2.0. Function Algorithms CNSA 1.0 Algorithms CNSA 2.0 Symmetric encryption Advanced Encryption Standard (AES) with 256-bit keys Advanced Encryption Standard (AES) with 256-bit keys Key establishment RSA with min. 3072-bit modulus, ECDH P-384, DH 3072-bit modulus CRYSTALS-Kyber with sec. level V General digital signatures RSA with min. 3072-bit modulus, ECDSA P-384 CRYSTALS-Dilithium with sec. level V Digital signatures of FW/SW Not specified, could be RSA with 3072-bit modulus, ECDSA P-384 Leighton-Micali Signature (LMS) with SHA256, Xtended Merkle Signature Scheme (XMSS) Data hashing SHA-384 SHA-384 or SHA512 Table 2: Memory Requirements Comparison of NIST PQC digital signature and KEM schemes. Scheme NIST Level Private Key [𝐵] Public Key [𝐵] Signature/ Ciphertext [𝐵] Dilithium 2 2528 1312 2420 Dilithium 3 4000 1952 3293 Dilithium 5 4864 2592 4595 SPHINCS+1 64 32 17088/7856 SPHINCS+3 96 48 35664/16224 SPHINCS+5 128 64 49856/29792 Falcon 1 1281 897 690 Falcon 5 2305 1793 1330 Kyber 1 1632 800 768 Kyber 3 2400 1184 1088 Kyber 5 3168 1568 1568 McEliece 1 6452 261120 128 McEliece 3 13568 524160 188 McEliece 5 13892 1044992 240 BIKE 1 5223 1541 1573 BIKE 3 10105 3083 3115 BIKE 5 16494 5122 5144 HQC 1 2289 2249 4481 HQC 3 4562 4522 9026 HQC 5 7285 7245 14469 NIST level 1 equivalent to AES128, level 2 equivalent to SHA3-256, level 3 equivalent to AES192, level 5 equivalent to AES256 [29]. Table 3: Signature and Key Sizes for XMSS Variants. Hash [𝑏]Depth Private Key [𝐵] Public Key [𝐵] Signature [𝐵] 192 10 1053 48 1492 192 16 1403 48 1540 192 20 1973 48 1732 256 10 1373 64 2500 256 16 2093 64 2692 256 20 2573 64 2820 512 10 2653 128 9092 512 16 4045 128 9476 HQC) and PQC signatures (Dilithium, Falcon) are based on the liboqs. Classic McEliece is not supported due to huge public key sizes (more than 100 kB). Herzinger et al. [ 22 ] investigated hybrid and quantum-safe KEMs in IKEv2 and implemented these methods in a modified version of the OpenIKED. The work [ 3 ] integrated PQC implementations into the strongswan library and assessed the performance of IPsec/IKEv2 protocol. 3.1.3 TLS. TLS as an essential security protocol got the attention of many teams who investigate, implement, and test PQ KEMs and PQ signatures in TLS versions 1.2 and 1.3 on various platforms. In 2016, Braithwaite published on the Google security blog 7 his 7https://security.googleblog.com/2016/07/experimenting-with-post-quantum.html experiments with a hybrid KEM (New Hope combined with elliptic curves) and ECDSA certs in TLS 1.2 in Google Chrome. Later, Paquin et al. [ 31 ] assessed the performance of various PQ primitives on TLS connection establishment. They focused on hybrid elliptic curve/PQ key exchange methods, i.e., ECDH + SIKE/Kyber/Frodo, and PQ digital signatures, i.e., ECDSA, Dilithium, qTESLA, Picnic. They also investigated how the Maximum Transmission Unit (MTU) size imposed by the link layer (Ethernet) affects the TLS establishment. Using non-standard jumbo frames (from 1500 to 9000 B) may positively affect TLS performance when PQC schemes are deployed. Similarly, Sikeridis et al. [ 37 ] measured TLS handshake times for various NIST’s competition PQC signature algorithms. On the one hand, their results indicated that Dilithium and Falcon have similar performances as RSA-3072 and ECDSA algorithms during the handshakes. On the other hand, large signature and certificate chain sizes typical for PQC have still a crucial impact on the handshake times. Further, Schwabe et al. [ 34 ] presented KEMTLS which is an alternative TLS 1.3 handshake method based on key-encapsulation mechanisms (KEMs) instead of signatures. They investigated various combinations of TLS 1.3 with signed KEX and KEMTLS using PQC schemes such as SIKE, Kyber, NTRU, GeMSS, XMSS, Falcon, and Dilithium. Nowadays, there are already several TLS libraries (examples in Table 4) that are supporting PQC in various TLS cipher suites. Some recent works start to investigate PQC-based TLS on constrained devices, e.g., [ 9 , 35 , 38 ]. These studies conclude that quantum-resistant TLS 1.3 will be probably feasible on the majority of constrained nodes deployed in IoT. 3.1.4 SSH. SSH (v2) is similar to TLS with the following phases: an initial negotiation, session key establishment via key exchange methods supporting digital signatures, and symmetric encryption. SSH message lengths are defined by 4-byte fields which enable 2 32 - byte messages that are large enough for PQC algorithms. Nevertheless, OpenSSH has a packet size limit of 2 18 (262,144) bytes which is a complication for Classic McEliece with large public keys. The influence of PQC on SSH handshakes has been investigated in several works, e.g. [ 16 , 36 ]. For instance, Sikeridis et al.[ 36 ] measured the handshake of SSH PQC variant with Kyber512+SPHINCS128 taking 755 ms and compared it with the ECDH384+RSA2048 variant taking 584 ms on the identical testbed consisting of common servers and PCs that used the OQS-OpenSSH library. 3.1.5 X.509. Recommendation ITU-T X.509/ISO/IEC 9594-8 8 defines frameworks for Public-Key Infrastructure (PKI) and specifies public-key certificates. The size of X.509 certificates usually depends on the length of attributes, and extensions and mainly on the used algorithms’ signatures and their public keys stored inside 8https://www.itu.int/rec/T-REC-X.509/en
On Deploying Quantum-Resistant Cybersecurity in Intelligent Infrastructures ARES 2023, August 29–September 01, 2023, Benevento, Italy Version PQ Signature Algorithm Serial Number Issuer Validity Not before Not After Subject X509v3 Extensions Key Usage Subject Public Key Info PQ Public Key Algorithm PQ Public Key PQ Signature PQ Algorithm PQ Signature Figure 2: PQ X.509 Certificate Structure. the certificate. For instance, an RSA public key with a signature takes about 500 bytes. Then, typical certificate sizes vary from 500 to 1500 bytes. PKI is also based on the hierarchical chain of trust, where trusted root certificates and Intermediate Certification Authority (ICA) certificates are used. Certificate chains are often composed of two to four certificates with a total size of a few kilobytes (KB). As PQ signatures have usually larger sizes of public keys and signatures, deploying them into current X.509 and PKI standards has been already investigated by several works, e.g., [ 7 , 24 , 37 ]. An X.509 certificate structure with fields that will be affected by PQ signatures is shown in Fig. 2 (marked orange and red). The certificate with a PQ signature then would need more bits than common RSA/ECDSA certificates in the public key and signature fields (marked red). Sikerdis et al. [ 37 ] compared the certificate chains with one ICA. Certificate chains with single ICA encoded in Distinguished Encoding Rules (DER) (excluding the root CA cert) takes 1.63 kB with RSA-3076, 3.54 kB with Falcon-512, 6.90 kB with Dilithium-II, and 34.46 kB with SPHINCS+-SHA256-128f-si. Kampanakis et al. [ 24 ] dealt with PQ signatures in X.509 certificates and analyzed how large PQ signatures in X.509 affect various protocols (TLS, DTLS, IKEv2, QUIC) in authentication transmission overhead, handshake time and fragmentation/segmentation. They observed that some protocols and libraries (wolfSSL, Google’s proto-quic) with large certificates (large public keys, e.g. 16 kB) have problems (hitting buffer size limit, handshake failures). Nevertheless, the majority of tested protocols and settings work correctly with large certificates. Furthermore, X.509 standards have to be expanded by new IDs for new NIST PQC algorithms. Massimo et al. published the IETF Internet-draft 9 related to PQ algorithms in X.509 certificates and the IETF Internet-draft 10 that specifies the use of the Dilithium algorithm in Public Key Infrastructure X.509 (PKIX) certificates and Certificate Revocation Lists (CRLs). This 9https://datatracker.ietf.org/doc/html/draft-massimo-lamps-pq-sig-certificates 10https://www.ietf.org/id/draft-ietf-lamps-dilithium-certificates-01.html draft specifies how Dilithium public keys should be mapped in the PKIX. There are also initiatives supporting hybrid certificates such as the openssl-hybrid-certificates implementation 11 and the Java implementation of hybrid certificates using BouncyCastle 12 . This fork of OQS-OpenSSL_1_1_1-stable enables users to create a concatenated key from the quantum-safe key and the classical key and to establish TLS with hybrid ciphersuites, details in [7]. 3.1.6 DNS Security Extensions (DNSSEC). DNSSEC provides authenticity and integrity for the Domain Name System (DNS) messages. DNSSec deploys signatures, e.g., RSA, EdDSA-Ed22519, and ECDSA. Müller et al. [ 28 ] concluded that Falcon-512 with a signature size 700 B can meet DNSSEC’s requirements (a signature size < 1,232 bytes). Other compared PQ algorithms (Rainbow-Ia, RedGeMSS128) use large public keys. Some proof-of-concept implementations are available, e.g., DNSSEQ (PowerDNSSEC using FALCON signatures)13 and the work [28]’s implementation14. 3.1.7 SMIME/CMS. Secure/Multipurpose Internet Mail Extensions (S/MIME) standard, now in version 4 (RFC 8551), is commonly used in email applications where the sender can sign the message (for authentication, integrity, and non-repudiation) and/or encrypt its content. S/MIME protocol supports extended key sizes and encryption methods. Thus, the signature and key generation of the S/MIME protocol could be updated with PQC schemes. RFC 8551 also defines how to create a MIME body part that has been cryptographically enhanced according to the Cryptographic Message Syntax (CMS). CMS (RFC 5652 and RFC 8933) is derived from PKCS #7, and describes several cryptography content types. CMS is used as the key cryptographic component of many other cryptographic standards (S/MIME, PKCS #12). The Quantum Techniques in CMS report 15 describes general methods for how PQ schemes (key encapsulation, signatures) could be used in CMS. In 2020, Housley proposed the RFC 8708 document 16 that specifies the HSS/LMS hash-based signature algorithm with CMS in order to protect SW updates. 3.1.8 Other protocols. There are more protocols that would need to react and deploy PQC algorithms such as Password-Authenticated Key Exchange (PAKE), PGP/GPG, Over-the-Air Rekeying (OTAR), ZRTP (Secure VoIP Protocol D1). We can expect future work on PQ variants of these protocols. 3.2 Summary of Well-known PQC Libraries Table 4 summarizes well-known implementations and libraries providing or using PQC schemes. The most prominent is the Open Quantum Safe project 17 that provides software for prototyping quantum-resistant cryptography, namely, a core experimental library called liboqs. The provided overview of libraries indicates that PQC algorithms are widely available to security engineers and developers in various languages and wrappers. Besides libraries 11https://github.com/CROSSINGTUD/openssl-hybrid-certificates 12https://github.com/CROSSINGTUD/bc-hybrid-certificates 13https://github.com/nils-wisiol/dns-falcon 14https://github.com/SIDN/pqc-dnssec-measurement 15 https://x9.org/wp-content/uploads/2019/03/ASC-X9-TR-50-2019-Quantum- Techniques-in-Cryptographic-Message-Syntax-1.pdf 16https://datatracker.ietf.org/doc/html/rfc8708 17https://github.com/open-quantum-safe
ARES 2023, August 29–September 01, 2023, Benevento, Italy Malina et al. in Table 4, there are more libraries and implementations that are based on liboqs, e.g., libssh, boringssl, etc. 4 EXPERIMENTAL IMPLEMENTATION AND ASSESSMENT OF PQC ON USER DEVICES This section contains the assessments of PQC schemes on the singleboard, Android, and iOS platforms. To benchmark selected schemes in NIST standardization process we used the liboqs library. Additionally, we used LMS implementation from Cisco Systems 18 and XMSS reference implementation19. 4.1 Single-boards Setup The chosen single-board platform with the ARM Cortex-A53 platform (Raspberry PI Zero with 1 core, max 1GHz, and 512 MB RAM) represents low-cost and less-power-full devices. Benchmarking on the ARM Cortex-A53 single-board platform was straightforward, as all the chosen libraries support this platform. For liboqs and XMSS libraries, we used the benchmarks provided with the libraries, and for LMS we wrote our own benchmark extensions. Additionally, we benchmarked the LMS and XMSS libraries on a constrained device, concretely, ESP32 (Esp32Cam aithinker with 1 core, max 240 MHz, 520 KB RAM). As both libraries rely on openssl for hash functions, we used the alternative hash implementation provided in LMS. 4.2 Android Setup The implementation of the Android version took place in the .NET and C/C++ Microsoft Visual Studio 2022 Community environment, to which the .NET MAUI framework and the Android SDK software development kit package version 33.0.2 were added. The liboqs library was built using the build script from the Github repository. To use the liboqs library in C#, it is advisable to create a wrapper that implements its functions. For the purposes of this project, the official wrapper of the Open Quantum Safe project for the .NET framework was used with slight modifications. We incorporated the library sources and generated a custom CMakelists.txt file for the LMS and XMSS schemes, which were subsequently included during an apk compilation. Additionally, we utilized an android-compiled openssl library that was added to the jniLibs folder. The device used for benchmarking was Samsung A53 (CPU Samsung Exynos 1280, 8 cores, 2 - 2.4 GHz, 6 GB RAM). 4.3 iOS Setup For iOS implementation we used the Swift programming language, the development environment Xcode version 14.2, and for benchmarking of the schemes the XCTest framework. The liboqs was incorporated using CMake with toolchains for iOS and was linked to the application in the Xcode. As Swift supports integration with C, it was pretty straightforward. We had to add the bridging header, to make C functions visible for Swift code and also update the random numbers generation function to use iOS native. The sources of libraries for LMS and XMSS schemes were included in the Xcode project and linked with openssl for iOS library for hash functions. 18Available from: https://github.com/cisco/hash-sigs 19https://github.com/XMSS/xmss-reference The benchmarks were done on the iPhone 12 mini (CPU Apple A14 Bionic, 6 cores, max 3.1 GHz, 4 GB RAM) with iOS 16.1 device. 4.4 Performance Results With the liboqs library, 20 runs were evaluated for signature schemes, 100 runs were evaluated for KEM schemes on mobile platforms, and 5 runs for all schemes on ARM-Cortex-A53. With the LMS and XMSS libraries, 32 runs were evaluated for sign and verification phases, and 32B random data were used as messages for signing. The average computation times of individual schemes on different platforms over multiple runs are presented in Figs. 3, 4 and 5. From the signature schemes, Dilithium 2 AES demonstrated the fastest computation times with 96 𝜇𝑠 for key generation, 302 𝜇𝑠 for signing, and 65 𝜇𝑠 for verification on iOS. In contrast, SPHINCS + Haraka 192s exhibited the longest computation times with 173,576 𝜇𝑠 for key generation, 1,764,918 𝜇𝑠 for signing, and 1,727 𝜇𝑠 for verification on iOS. A similar difference was observed also on Android and ARM Cortex-A53 platforms. On Android, Dilithium 2 AES had measured times of 275 𝜇𝑠 for key generation, 667 𝜇𝑠 for signing, and 120 𝜇𝑠 for verification, while SPHINCS + Haraka 192s took 216 ms for key generation, 3,168 ms for signing, and 2.9 ms for verification. On ARM Cortex-A53, Dilithium 2 AES had measured times of 3.77 ms for key generation, 13.45 ms for signing, and 4.70 ms for verification, while SPHINCS + Haraka 192s took 11.63 s for key generation, 125 s for signing, and 116 ms for verification. From KEM schemes, Kyber 512 demonstrated the fastest computation times with 24 𝜇𝑠 for key generation, 30 𝜇𝑠 for key encapsulation, and 34 𝜇𝑠 for key decapsulation on iOS. In contrast, McEliece 8192128f exhibited the longest computation times with 298,277 𝜇𝑠 for key generation, 476 𝜇𝑠 for key encapsulation, and 330 𝜇𝑠 for key decapsulation on iOS. On Android, Kyber 512 had measured times of 172 𝜇𝑠 for key generation, 154 𝜇𝑠 for encapsulation, and 93 𝜇𝑠 for decapsulation, while McEliece 8192128f took 895 ms for key generation, 1.34 ms for encapsulation, and 9.69 ms for decapsulation. On ARM Cortex-A53, Kyber 512 had measured times of 5.66 ms for key generation, 7.16 ms for encapsulation, and 5.95 ms for decapsulation, while McEliece 8192128f took 30.99 s for key generation, 24.1 ms for encapsulation, and 20.76 ms for decapsulation. For LMS and XMSS the most demanding phase was the key generation. LMS took from 1.6 ms for tree depth 5 to 6,181 s for tree depth 25 on iOS, from 11.64 ms for tree depth 5 to 89.9 s for tree depth 15 on Android, from 59.01 ms for tree depth 5 to 773 s for tree depth 15 on ARM Cortex-A53, and from 881 ms for tree depth 5 to 10,657 s for tree depth 15 on ESP32. XMSS took from 373 ms for tree depth 10 with SHA-192 to 729 s for tree depth 20 with SHA-256 on iOS, from 2.60 s for tree depth 10 with SHA-192 to 419 s for tree depth 16 with SHA-512 on Android, from 12.80 s for tree depth 10 with SHA-192 to 4,282 s for tree depth 16 with SHAKE-256 on ARM Cortex-A53, and from 170.34 s for tree depth 10 with SHA-192 to 2,030 s for tree depth 10 with SHAKE-512 on ESP32. LMS was more efficient as it achieved lower times for bigger depth. The computation times during sign and verify phases were more linear ranging between 0.05 to 50 ms on iOS, 0.1 to 25 ms on Android, 1 to 1000 ms on ARM Cortex-A53, and up to 4.7 s on ESP32.
On Deploying Quantum-Resistant Cybersecurity in Intelligent Infrastructures ARES 2023, August 29–September 01, 2023, Benevento, Italy Table 4: Software Libraries of PQC (not exhaustive). Name PQC supported Platforms/licenses/languages Website liboqs Kyber, Classic McEliece, BIKE, HQC, FrodoKEM, NTRU- Prime, Dilithium, Falcon, SPHINCS+ open source C library for x86_64 and ARM architectures for prototyping; bindings/wrappers in Python, C#, C++, JAVA, Go, Rust https://openquantumsafe. org/liboqs/ libpqcrypto 19 PQC schemes (BIG QUAKE, Classic McEliece, DILITHIUM, KYBER, DAGS, FrodoKEM, Gui, KINDI, LUOV, MQDSS, NewHope, NTRU-HRSS-KEM, NTRU Prime, Picnic, qTESLA, Rainbow, Ramstake, SABER, SPHINCS+) Experimental C library for Debian/Ubuntu systems, Python/C API https://libpqcrypto.org/ CIRCL[18] Dilithium, Kyber, FrodoKEM, SIDH/SIKE Cloudflare Interoperable, Reusable Cryptographic Library written in Go https://github.com/ cloudflare/circl ISARA Radiate™ Quantum-safe Library Version 3.1 Classic McEliece, DILITHIUM, KYBER, HSS, XMSS, SPHINCS+ Multiplatform (Windows, Linux, macOS, iOS, Android) licensed C-based library via gcc or clang compilers https://www.isara.com/ toolkit/3/doc/library/index. html OpenSSH NTRU (hybrid mode with EC method), XMSS (only for experimental use) BSD-style licensed SSH library with the support of the LibreSSL library for some cryptography methods https://www.openssh.com/ OQS-OpenSSH alone or in hybrid mode with ECDH: BIKE, ClassicM- cEliece, FrodoKEM, HQC, Kyber; Dilithium, Falcon, SPHINCS- Haraka/SHA256/SHAKE256 A fork based on OpenSSH version 8.9 with liboqs, tested on Ubuntu 20.04.1 https://www.openssh.com/ OQS-OpenSSL BIKE, Kyber, HQC, FrodoKEM, Dilithium, Falcon, SPHINCS- Haraka/SHA256/SHAKE256 A fork of multi-platform robust OpenSSL library (1.1.1) written in C; PQC is provided via oqsprovider, depended on liboqs https://github.com/openquantum-safe/oqs-provider Wolf SSL Dilithium, FALCON, SPHINCS+, Kyber KEM Lightweight SSL/TLS library written in ANSI C for embedded, RTOS, and resource-constrained environments https://www.wolfssl.com/ Bouncy Castle Kyber, Dilithium, Falcon, SPHINCS+, BIKE, HQC, NTRU, NTRU Prime, Picnic, FrodoKEM, GeMSS, LMS, Newhope, Rainbow, Saber, XMSS, SIKE MIT licensed Java library with cryptographic algorithms and security protocols https://www.bouncycastle. org/releasenotes.html 10−2 102 106 CPU time [ms] ARM Cortex-A53 10−2 102 106 CPU time [ms] Android Dilithium 2 AES Dilithium 2 Dilithium 3 AES Dilithium 3 Dilithium 5 AES Dilithium 5 SPHINCS+ Haraka 128f SPHINCS+ Haraka 128s SPHINCS+ Haraka 192f SPHINCS+ Haraka 192s SPHINCS+ Haraka 256f SPHINCS+ SHA256 128f SPHINCS+ SHA256 128s SPHINCS+ SHA256 192f SPHINCS+ SHA256 192s SPHINCS+ SHA256 256f SPHINCS+ SHAKE256 128f SPHINCS+ SHAKE256 128s SPHINCS+ SHAKE256 192f SPHINCS+ SHAKE256 192s SPHINCS+ SHAKE256 256f Falcon-512 Falcon-1024 10−2 102 106 CPU time [ms] iOS Key Generation Signing Verification Figure 3: Computation Times of Signature Schemes on ARM Cortex-A53, Android and iOS.
ARES 2023, August 29–September 01, 2023, Benevento, Italy Malina et al. 100 105 CPU time [ms] ARM Cortex-A53 100 105 CPU time [ms] Android BIKE-L1 BIKE-L3 HQC-128 HQC-192 HQC-256 Kyber 1024 90s Kyber 1024 Kyber 512 90s Kyber 512 Kyber 768 90s Kyber 768 McEliece 348864 McEliece 348864f McEliece 460896 McEliece 460896f McEliece 6688128f McEliece 6960119f McEliece 8192128f 100 105 CPU time [ms] iOS Key Generation Key Encapsulation Key Decapsulation Figure 4: Computation Times of KEM Schemes on ARM Cortex-A53, Android and iOS. 5 POST-QUANTUM MIGRATION IN SELECTED AREAS: DISCUSSION AND FUTURE TRENDS This section discusses how a post-quantum migration affects selected intelligent infrastructure areas such as IoV services and smart grid services. 5.1 PQC in Internet of Vehicles Many IoV services, e.g., break alerts and platooning control, require real-time data processing. Currently, IoV technologies such as ETSI Cooperative Intelligent Transport Systems (C-ITS) deploy common digital signatures such as ECDSA for securing the authenticity and integrity of exchanged messages in Vehicle-to-Infrastructure and Vehicle-to-Vehicle connections. How C-ITS should deploy signatures and certificates is specified in the ETSI TS 103 097 V1.3.1 and ETSI TS 102 941 V1.3.1 standards. C-ITS protects privacy by a pseudonymity approach that changes certificates in the On-Board Units (OBUs). These pre-loaded certificates have short validity periods (e.g., one week or less), and can be overlapping (e.g. 100 certificates for one period). Certificate sets are usually distributed to OBUs from the Vehicle-PKI authorities. Migration to PQ signatures could be a challenge in IoV. Firstly, OBUs have to be prepared for large sets of certificates that will grow by switching ECC by PQ signatures. Deploying PQ signatures/certificates with a reasonable size will be probably one of the requirements of IoV/C-ITS services. Secondly, as C-ITS nodes (vehicles, RSUs) execute verification phases more often than signing phases due to broadcasting communication, efficient PQ signatures in the verify phase are preferred. Based on these two requirements, Falcon can be a suitable option for IoV but OBUs must employ processors with a floatingpoint number support. Dilithium could be also a suitable choice for IoV as it is providing good efficiency in the signing and verify phases. Nevertheless, the sizes of signatures/certificates are bigger than in Falcon. Recently, some studies dealing with PQ algorithms in C-ITS/IoV have been already published, e.g., [ 30 , 40 ]. Future works in quantum-safe IoV will probably aim at testing PQ variants and their simulation with various certificate chains in traffics with hundreds of signed messages. Another problem is the key establishment used prior to optional message encryption. Currently, IoV assumes to employ ECIES.Substituting ECIES by PQ variants based on PQC KEMs schemes could be also future work. 5.2 PQC in Smart Grids Smart grid services have to be prepared to provide quantum-safe authentication schemes in their Neighborhood Area Networks (NANs) and ensure PQ signatures of data. Replacing schemes such as RSA, DH, ECDH, ECDSA could be a challenge for constrained smart meter devices. There are already several academic proposals on how to deploy PQC inside smart grids. For instance, Cheng et al. [ 10 ] proposed NTRU encryption and lattice-based KEM for mutual authentication in smart grids. Zhu et al. [ 41 ] proposed a hash-based
On Deploying Quantum-Resistant Cybersecurity in Intelligent Infrastructures ARES 2023, August 29–September 01, 2023, Benevento, Italy 10−1 103 107 CPU time [ms] ESP32 10−1 103 107 CPU time [ms] ARM Cortex-A53 10−1 103 107 CPU time [ms] Android LMS-5-1 LMS-15-1 LMS-25-1 LMS-5-4 LMS-15-4 LMS-25-4 LMS-5-8 LMS-15-8 LMS-25-8 XMSS-SHA2-10-256 XMSS-SHA2-16-256 XMSS-SHA2-20-256 XMSS-SHA2-10-512 XMSS-SHA2-16-512 XMSS-SHAKE-10-256 XMSS-SHAKE-16-256 XMSS-SHAKE-10-512 XMSS-SHA2-10-192 XMSS-SHA2-16-192 XMSS-SHA2-20-192 XMSS-SHAKE256-10-256 XMSS-SHAKE256-16-256 XMSS-SHAKE256-10-192 XMSS-SHAKE256-16-192 10−1 103 107 CPU time [ms] iOS Key Generation Signing Verification Figure 5: Computation Times of Hash-based Schemes on ESP32, ARM Cortex-A53, Android and iOS. redactable signature for smart grid applications. Then the work [ 15 ] implemented FrodoKEM in a system-on-a-chip device that may fit into a smart meter. Future research will deal with post-quantum security in emerging use cases such as electric vehicle charging. 6 CONCLUSION In this paper, we focus on the current state of how current security protocols deploy PQ algorithms and on recent recommendations from authorities such as NIST, NSA, ENISA, ANSSI, BSI as a reaction to the NIST selection of future KEMs and signature standards. There is a consensus on the terms of migration to PQC methods from 2025. US and EU recommendations are less united on whether deploy hybrid methods (PQ with common schemes). Prominent protocols such as IPSec, TLS, SSH as public forks have been already supplemented by various PQC schemes and tested in several works, and X.509 has been expanded by PQC support in several IETF drafts. Some less common security protocols such as MACsec, DNSSec are still in the stage of proof-of-concept implementations. We also make benchmarks of recommended PQC schemes on various smartphone and single-board platforms. Especially we contribute by the assessment of LMS and XMSS schemes used for signing SW/FW in CNSA 2.0. Our results indicate that LMS/XMSS signatures with higher tree depths (from 15) are time-demanding mainly in the key generation phase. Nevertheless, their sign and verify phases on a less-power-full device (ARM A53) provide feasible times from 1 to 1000 ms, and on a constrained ESP32 device up to 4700 ms. Our future work focuses on experiments with PQC algorithms in DNSSEC, and in the C-ITS libraries with testing on real OBU units, and investigating PQC in smart grids on real smart meters. ACKNOWLEDGMENTS This work is supported by Ministry of the Interior of the Czech Republic under Grant VJ03030014.