Optimized Implementation and Analysis of CHAM in Quantum Computing
Abstract
:1. Introduction
Contribution
- 1.
- Optimization to the linear layer of the CHAM block cipher: To the best of our knowledge/understanding, this type of optimization has never been applied to this cipher before. We show how the optimization affects the quantum footprint, by comparing the benchmarks of the naïve versus the optimized implementation.
- 2.
- Optimization of CHAM’s quantum circuit: Unlike classical computers, quantum computers have limited resources. For this reason, it is essential to optimize the number of qubits in optimizing quantum circuits. In addition, since the depth of a quantum circuit is related to speed and time, not only the number of qubits, but also the depth of the circuit is considered an important factor in optimizing the circuit. We apply two linear layer optimization techniques to CHAM’s key schedule to reduce common unnecessary auxiliary qubits used for round key generation in existing structures. Moreover, we also reduce the number of CNOT gates and the depth of the circuit using the second improvement method, and so satisfied two important optimization factors.
- 3.
- Evaluation of post-quantum security about improved quantum circuit of CHAM: NIST provides criteria for evaluating the post-quantum security strength of existing codes in preparation for quantum computers. In order to evaluate the security strength, it is necessary to implement the cipher as a quantum circuit and estimate the cost of a Grover’s algorithm attack. We estimate the cost of a Grover’s algorithm attack about an improved quantum circuit of CHAM, compare it with the results of the previous one, and then evaluate the post-quantum security strength. Additionally, circuits are implemented for Revised CHAM, and security strength evaluations are conducted together.
2. Background
2.1. Description of CHAM
2.2. Quantum Gates
2.3. Linear Layer Optimization
2.3.1. PLU Factorization
2.3.2. FSE’20 (Xiang et al. [33])
2.4. Grover’s Algorithm (for Key Search)
- 1.
- In order to make the key of n-qubit superposition states , the Hadamard gates are applied to k of n-qubit. This ensures that all states of the qubits have the same amplitude:
- 2.
- The attack-target cipher is implemented as a quantum circuit and arranged in oracle . Encrypting the known plaintexts of the superpositioned key produces ciphertexts c for all key values. Afterwards, if the ciphertext matches the known ciphertext, and , so the sign of the solution key value is reversed.
- 3.
- In the final step, the diffusion operator amplifies the amplitude of the negative-signed solution key returned by the oracle. Usually, diffusion operators do not require special skills to implement because their design is general.
3. Quantum Implementation of CHAM
3.1. Binary Matrix in Key Schedule
3.2. PLU Factorization
Algorithm 1: Quantum implementation of factorization. |
|
Algorithm 2: Quantum implementation of CHAM-64/128 key-schedule with PLU factorization. |
|
3.3. FSE’20
Algorithm 3: Quantum implementation of CHAM-64/128 Key Schedule applying FSE’20. |
|
4. Performance
5. Cost Estimate for Grover Key Search
6. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Arute, F.; Arya, K.; Babbush, R.; Bacon, D.; Bardin, J.C.; Barends, R.; Biswas, R.; Boixo, S.; Brandao, F.G.; Buell, D.A.; et al. Quantum supremacy using a programmable superconducting processor. Nature 2019, 574, 505–510. [Google Scholar] [CrossRef] [PubMed]
- Suppressing quantum errors by scaling a surface code logical qubit. Nature 2023, 614, 676–681. [CrossRef]
- Zhu, Q.; Cao, S.; Chen, F.; Chen, M.C.; Chen, X.; Chung, T.H.; Deng, H.; Du, Y.; Fan, D.; Gong, M.; et al. Quantum computational advantage via 60-qubit 24-cycle random circuit sampling. Sci. Bull. 2022, 67, 240–245. [Google Scholar] [CrossRef] [PubMed]
- Madsen, L.S.; Laudenbach, F.; Askarani, M.F.; Rortais, F.; Vincent, T.; Bulmer, J.F.; Miatto, F.M.; Neuhaus, L.; Helt, L.G.; Collins, M.J.; et al. Quantum computational advantage with a programmable photonic processor. Nature 2022, 606, 75–81. [Google Scholar] [CrossRef] [PubMed]
- Grover, L.K. A fast quantum mechanical algorithm for database search. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, Philadelphia, PA, USA, 22–24 May 1996; pp. 212–219. [Google Scholar]
- Delfs, H.; Knebl, H.; Delfs, H.; Knebl, H. Symmetric-key encryption. In Introduction to Cryptography: Principles and Applications; Springer: Berlin/Heidelberg, Germany, 2007; pp. 11–31. [Google Scholar]
- Shor, P.W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 1999, 41, 303–332. [Google Scholar] [CrossRef]
- Simon, D.R. On the power of quantum computation. SIAM J. Comput. 1997, 26, 1474–1483. [Google Scholar] [CrossRef]
- Nayak, J.; Swapnarekha, H.; Naik, B.; Dhiman, G.; Vimal, S. 25 Years of Particle Swarm Optimization: Flourishing Voyage of Two Decades. Arch. Comput. Methods Eng. 2022, 30, 1663–1725. [Google Scholar] [CrossRef]
- Liu, G.; Chen, W.; Chen, H.; Xie, J. A quantum particle swarm optimization algorithm with teamwork evolutionary strategy. Math. Probl. Eng. 2019, 2019, 1805198. [Google Scholar] [CrossRef]
- Bergholm, V.; Izaac, J.; Schuld, M.; Gogolin, C.; Ahmed, S.; Ajith, V.; Alam, M.S.; Alonso-Linaje, G.; AkashNarayanan, B.; Asadi, A.; et al. Pennylane: Automatic differentiation of hybrid quantum-classical computations. arXiv 2018, arXiv:1811.04968. [Google Scholar]
- NIST. Submission Requirements and Evaluation Criteria for the Post-Quantum Cryptography Standardization Process. 2016. Available online: https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/call-for-proposals-final-dec-2016.pdf (accessed on 10 April 2023).
- Alagic, G.; Apon, D.; Cooper, D.; Dang, Q.; Dang, T.; Kelsey, J.; Lichtinger, J.; Liu, Y.-K.; Miller, C.A.; Moody, D.; et al. Status Report on the Third Round of the NIST Post-Quantum Cryptography Standardization Process; NIST Interagency/Internal Report (NISTIR); National Institute of Standards and Technology: Gaithersburg, MD, USA, 2022.
- Baksi, A.; Jang, K.; Song, G.; Seo, H.; Xiang, Z. Quantum Implementation and Resource Estimates for Rectangle and Knot. Quantum Inf. Process. 2021, 20, 395. [Google Scholar] [CrossRef]
- Jang, K.; Baksi, A.; Breier, J.; Seo, H.; Chattopadhyay, A. Quantum Implementation and Analysis of DEFAULT. Cryptology ePrint Archive, Paper 2022/647, 2022. Available online: https://eprint.iacr.org/2022/647 (accessed on 10 April 2023).
- Grassl, M.; Langenberg, B.; Roetteler, M.; Steinwandt, R. Applying Grover’s Algorithm to AES: Quantum Resource Estimates. In Post-Quantum Cryptography, Proceedings of the PQCrypto 2016, Fukuoka, Japan, 24–26 February 2016; Takagi, T., Ed.; Springer: Cham, Switzerland, 2016; pp. 29–43. [Google Scholar] [CrossRef]
- Langenberg, B.; Pham, H.; Steinwandt, R. Reducing the cost of implementing the advanced encryption standard as a quantum circuit. IEEE Trans. Quantum Eng. 2020, 1, 1808–2689. [Google Scholar] [CrossRef]
- Zhu, C.; Huang, Z. Optimizing the depth of quantum implementations of linear layers. In Proceedings of the International Conference on Information Security and Cryptology, Istanbul, Turkey, 16–17 October 2023; pp. 129–147. [Google Scholar]
- Huang, Z.; Sun, S. Synthesizing quantum circuits of AES with lower t-depth and less qubits. In Proceedings of the Advances in Cryptology—ASIACRYPT 2022: 28th International Conference on the Theory and Application of Cryptology and Information Security, Taipei, Taiwan, 5–9 December 2022; Proceedings, Part III. Springer: Berlin/Heidelberg, Germany, 2023; pp. 614–644. [Google Scholar]
- Jang, K.; Baksi, A.; Song, G.; Kim, H.; Seo, H.; Chattopadhyay, A. Quantum Analysis of AES. Cryptology ePrint Archive, Paper 2022/683, 2022. Available online: https://eprint.iacr.org/2022/683 (accessed on 10 April 2023).
- Hatzivasilis, G.; Fysarakis, K.; Papaefstathiou, I.; Manifavas, C. A review of lightweight block ciphers. J. Cryptogr. Eng. 2018, 8, 141–184. [Google Scholar] [CrossRef]
- Jaques, S.; Naehrig, M.; Roetteler, M.; Virdia, F. Implementing Grover Oracles for Quantum Key Search on AES and LowMC. In Lecture Notes in Computer Science, Proceedings of the Advances in Cryptology—EUROCRYPT 2020—39th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Zagreb, Croatia, 10–14 May 2020; Canteaut, A., Ishai, Y., Eds.; Springer: Berlin/Heidelberg, Germany, 2020; Volume 12106, pp. 280–310. [Google Scholar] [CrossRef]
- Van Hoof, I. Space-efficient quantum multiplication of polynomials for binary finite fields with sub-quadratic Toffoli gate count. arXiv 2019, arXiv:1910.02849. [Google Scholar]
- Jang, K.; Song, G.; Kim, H.; Kwon, H.; Kim, H.; Seo, H. Parallel quantum addition for Korean block ciphers. Quantum Inf. Process. 2022, 21, 1–25. [Google Scholar] [CrossRef]
- Koo, B.; Roh, D.; Kim, H.; Jung, Y.; Lee, D.G.; Kwon, D. CHAM: A family of lightweight block ciphers for resource-constrained devices. In Proceedings of the International Conference on Information Security and Cryptology, Seoul, Republic of Korea, 29 November–1 December 2017; pp. 3–25. [Google Scholar]
- Roh, D.; Koo, B.; Jung, Y.; Jeong, I.W.; Lee, D.G.; Kwon, D.; Kim, W.H. Revised version of block cipher CHAM. In Proceedings of the Information Security and Cryptology—ICISC 2019: 22nd International Conference, Seoul, Republic of Korea, 4–6 December 2019; Springer: Berlin/Heidelberg, Germany, 2020; pp. 1–19. [Google Scholar]
- Cuccaro, S.A.; Draper, T.G.; Kutin, S.A.; Moulton, D.P. A new quantum ripple-carry addition circuit. arXiv 2004, arXiv:quantph/0410184. [Google Scholar] [CrossRef]
- Jang, K.; Choi, S.; Kwon, H.; Kim, H.; Park, J.; Seo, H. Grover on Korean block ciphers. Appl. Sci. 2020, 10, 6407. [Google Scholar] [CrossRef]
- Jones, J. Nuclear magnetic resonance quantum computation. In Les Houches; Elsevier: Amsterdam, The Netherlands, 2004; Volume 79, pp. 357–400. [Google Scholar]
- Amy, M.; Maslov, D.; Mosca, M.; Roetteler, M.; Roetteler, M. A Meet-in-the-Middle Algorithm for Fast Synthesis of Depth-Optimal Quantum Circuits. IEEE Trans. -Comput.-Aided Des. Integr. Circuits Syst. 2013, 32, 818–830. [Google Scholar] [CrossRef]
- Zou, J.; Wei, Z.; Sun, S.; Liu, X.; Wu, W. Quantum Circuit Implementations of AES with Fewer Qubits. In Proceedings of the Advances in Cryptology—ASIACRYPT 2020, Online Event, 7–11 December 2020; Moriai, S., Wang, H., Eds.; Springer: Cham, Switzerland, 2020; pp. 697–726. [Google Scholar] [CrossRef]
- Banegas, G.; Bernstein, D.J.; van Hoof, I.; Lange, T. Concrete Quantum Cryptanalysis of Binary Elliptic Curves. Cryptology ePrint Archive, Paper2020/1296, 2020. Available online: https://eprint.iacr.org/2020/1296 (accessed on 1 April 2023).
- Xiang, Z.; Zeng, X.; Lin, D.; Bao, Z.; Zhang, S. Optimizing implementations of linear layers. IACR Trans. Symmetric Cryptol. 2020, 2022, 120–145. [Google Scholar] [CrossRef]
- Bijwe, S.; Chauhan, A.K.; Sanadhya, S.K. Quantum Search for Lightweight Block Ciphers: GIFT, SKINNY, SATURNIN. Cryptology ePrint Archive, Paper 2020/1485, 2020. Available online: https://eprint.iacr.org/2020/1485 (accessed on 10 April 2023).
- Boyer, M.; Brassard, G.; Høyer, P.; Tapp, A. Tight Bounds on Quantum Searching. Fortschr. Phys. 1998, 46, 493–505. [Google Scholar] [CrossRef]
Cipher | n | k | w | r |
---|---|---|---|---|
CHAM-64/128 | 64 | 128 | 16 | 80, 88 |
CHAM-128/128 | 128 | 128 | 32 | 80, 112 |
CHAM-128/256 | 128 | 256 | 32 | 96, 120 |
Cipher | #CNOT | #X | #Toffoli | #qubits | Depth |
---|---|---|---|---|---|
CHAM-64/128 | 13,200 | 2320 | 2320 | 204 | 2615 |
CHAM-128/128 | 28,760 | 4880 | 4880 | 292 | 5307 |
CHAM-128/256 | 34,944 | 5872 | 5856 | 420 | 6594 |
Method | Cipher | #CNOT | #X | #Toffoli | #qubits | Depth |
---|---|---|---|---|---|---|
PLU [23] (this work) | CHAM-64/128 | 21,360 | 2320 | 2320 | 195 | 2673 |
CHAM-128/128 | 52,000 | 4880 | 4880 | 259 | 6431 | |
CHAM-128/256 | 62,400 | 5872 | 5856 | 387 | 6356 | |
FSE’20 [33] (this work) | CHAM-64/128 | 13,040 | 2320 | 2320 | 195 | 2612 |
CHAM-128/128 | 28,800 | 4880 | 4880 | 259 | 5240 | |
CHAM-128/256 | 34,560 | 5872 | 5856 | 387 | 6249 |
CHAM | Methods | #CNOT | #1qCliff | #T | T-Depth | #qubits | Full Depth |
---|---|---|---|---|---|---|---|
64/128 | Previous [24] | 27,120 | 6960 | 16,240 | 9280 | 204 | 17,035 |
PLU [23] (this work) | 35,280 | 195 | 17,092 | ||||
FSE’20 [33] (this work) | 29,960 | 195 | 17,031 | ||||
128/128 | Previous [24] | 58,040 | 14,640 | 34,160 | 19,520 | 292 | 37,766 |
PLU [23] (this work) | 81,280 | 259 | 37,878 | ||||
FSE’20 [33] (this work) | 58,080 | 259 | 37,768 | ||||
128/256 | Previous [24] | 70,080 | 17,584 | 40,992 | 23,424 | 420 | 45,252 |
PLU [23] (this work) | 97,536 | 387 | 45,014 | ||||
FSE’20 [33] (this work) | 69,696 | 387 | 44,904 |
CHAM | Methods | Total Gates | Total Depth | Cost | Security [12] |
---|---|---|---|---|---|
64/128 | PLU | (Level 1) | |||
FSE’20 | |||||
PLU (revision) | |||||
FSE’20 (revision) | |||||
128/128 | PLU | (Level 1) | |||
FSE’20 | |||||
PLU (revision) | |||||
FSE’20 (revision) | |||||
128/256 | PLU | (Level 3) | |||
FSE’20 | |||||
PLU (revision) | |||||
FSE’20 (revision) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yang, Y.; Jang, K.; Baksi, A.; Seo, H. Optimized Implementation and Analysis of CHAM in Quantum Computing. Appl. Sci. 2023, 13, 5156. https://doi.org/10.3390/app13085156
Yang Y, Jang K, Baksi A, Seo H. Optimized Implementation and Analysis of CHAM in Quantum Computing. Applied Sciences. 2023; 13(8):5156. https://doi.org/10.3390/app13085156
Chicago/Turabian StyleYang, Yujin, Kyungbae Jang, Anubhab Baksi, and Hwajeong Seo. 2023. "Optimized Implementation and Analysis of CHAM in Quantum Computing" Applied Sciences 13, no. 8: 5156. https://doi.org/10.3390/app13085156
APA StyleYang, Y., Jang, K., Baksi, A., & Seo, H. (2023). Optimized Implementation and Analysis of CHAM in Quantum Computing. Applied Sciences, 13(8), 5156. https://doi.org/10.3390/app13085156