Grover on PIPO
Abstract
:1. Introduction
Contribution
- The first optimized implementation of the PIPO block cipher in quantum circuits: This paper is the first work that implements and optimizes the PIPO block cipher in quantum gates. We efficiently implement the PIPO block cipher as a quantum circuit, which was optimized in terms of qubits, quantum gates, and circuit depth.
- Compact design of substitution layer for quantum computers: When implementing SPN-structured block ciphers as quantum circuits, it is important to optimize the substitution layer. In this paper, we implemented the 8-bit wise substitution layer of the PIPO block cipher to the optimal number of qubits and quantum gates.
- Quantum resource estimation of Grover search algorithm on PIPO block cipher: The quantum programming tool IBM ProjectQ [16] is utilized to implement the PIPO block cipher in quantum circuits. Based on this, we evaluate quantum resources for using the Grover search algorithm to the PIPO block cipher.
2. Related Work
2.1. PIPO Block Cipher
2.1.1. Encryption of PIPO Block Cipher
2.1.2. AddRoundkey and Keyschedule of PIPO Block Cipher
2.1.3. Substitution Layer of PIPO Block Cipher
Algorithm 1 Bitslicing implementation of PIPO Sbox. |
Input: 8-bit |
Output: 8-bit |
1: 5-bit Sbox1: |
2: |
3: |
4: |
5: |
6: |
7: |
8: |
9: 3-bit Sbox: |
10: |
11: |
12: |
13: |
14: Extend XOR: |
15: |
16: |
17: |
18: 5-bit Sbox2: |
19: ,, |
20: |
21: |
22: |
23: |
24: |
25: |
26: Truncate XOR and Swap: |
27: , , , |
28: , , |
29: , , |
30: return |
2.1.4. Permutation Layer of PIPO Block Cipher
2.2. Quantum Computer and Programming
2.3. Grover’s Algorithm
3. Proposed Method
3.1. Quantum Circuit Design for PIPO Block Cipher
3.2. AddRoundKey of PIPO Block Cipher
Algorithm 2 AddRoundkey in quantum circuits. |
Input: 64-qubit block 64-qubit round key ) |
Output: 64-qubit block |
1: for to 63 do |
2: CNOT |
3: end for |
4: return ) |
3.3. Keyschedule of PIPO Block Cipher
3.4. Substitution of PIPO Block Cipher
3.4.1. Quantum Circuit Design for 3-Qubit Sbox and 5-Qubit Sbox1
Algorithm 3 5-qubit Sbox1 in quantum circuits. |
Input: 5-qubit |
Output: 5-qubit |
1: Toffoli () |
2: Toffoli () |
3: CNOT () |
4: CNOT () |
5: X () |
6: X () |
7: Toffoli () |
8: X () |
9: X () //reverse |
10: X () //reverse |
11: CNOT () |
12: Toffoli () |
13: return |
Algorithm 4 The 3-qubit Sbox in quantum circuits. |
Input: 3-qubit |
Output: 3-qubit |
1: Toffoli () |
2: X () |
3: X () |
4: Toffoli ( |
5: X () |
6: X () //reverse |
7: X () //reverse |
8: X () |
9: X () |
10: Toffoli () |
11: X () |
12: X () //reverse |
13: X () //reverse |
14: X () |
15: return |
3.4.2. Quantum Circuit Design for 5-Qubit Sbox2
Algorithm 5 Sboxnew1 in quantum circuits. |
Input: 5-qubit |
Output: 3-qubit |
1: Toffoli () |
2: CNOT () |
3: CNOT () |
4: Toffoli () |
5: return |
Algorithm 6 Sboxnew2 in quantum circuits. |
Input: 5-qubit |
Output: 5-qubit |
1: Toffoli () |
2: X () |
3: X () |
4: Toffoli () |
5: X () |
6: X () //reverse |
7: X () //reverse |
8: X () |
9: X () |
10: Toffoli () |
11: X () |
12: X () //reverse |
13: X () //reverse |
14: return |
3.4.3. Quantum Circuit Design for PIPO Sbox
3.5. Permutation of PIPO Block Cipher
Algorithm 7 Relabeling qubits for block B. |
Input: 64-qubit block |
Output: 64-qubit block |
1: |
2: |
3: |
4: |
5: |
6: |
7: |
8: return |
4. Evaluation
4.1. Analysis of Quantum Resources for PIPO and Other Block Ciphers
4.2. Resource Estimation for Using the Grover Search Algorithm to PIPO
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Grover, L.K. A fast quantum mechanical algorithm for database search. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing; ACM: New York, NY, USA, 1996; pp. 212–219. [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]
- Bogdanov, A.; Khovratovich, D.; Rechberger, C. Biclique cryptanalysis of the full AES. In International Conference on the Theory and Application of Cryptology and Information Security; Springer: Berlin/Heidelberg, Germany, 2011; pp. 344–371. [Google Scholar]
- Tao, B.; Wu, H. Improving the biclique cryptanalysis of AES. In Australasian Conference on Information Security and Privacy; Springer: Cham, Switzerland, 2015; pp. 39–56. [Google Scholar]
- Grassl, M.; Langenberg, B.; Roetteler, M.; Steinwandt, R. Applying Grover’s algorithm to AES: Quantum resource estimates. In Post-Quantum Cryptography; Springer: Cham, Switzerland, 2016; pp. 29–43. [Google Scholar]
- Langenberg, B.; Pham, H.; Steinwandt, R. Reducing the Cost of Implementing AES as a Quantum Circuit. IEEE Trans. Quantum Eng. 2020, 1, 1–12. [Google Scholar] [CrossRef]
- Jaques, S.; Naehrig, M.; Roetteler, M.; Virdia, F. Implementing Grover oracles for quantum key search on AES and LowMC. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Cham, Switzerland, 2020; pp. 280–310. [Google Scholar]
- Anand, R.; Maitra, A.; Mukhopadhyay, S. Grover on SIMON. Quantum Inf. Process. 2020, 19, 1–17. [Google Scholar] [CrossRef]
- Schlieper, L. In-place implementation of Quantum-Gimli. arXiv 2020, arXiv:2007.06319. [Google Scholar]
- 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]
- Jang, K.; Choi, S.; Kwon, H.; Seo, H. Grover on SPECK: Quantum Resource Estimates. Cryptology ePrint Archive, Report 2020/640, 2020. Available online: https://eprint.iacr.org/2020/640 (accessed on 13 May 2021).
- Jang, K.; Kim, H.; Eum, S.; Seo, H. Grover on GIFT. Cryptology ePrint Archive, Report 2020/1405, 2020. Available online: https://eprint.iacr.org/2020/1405 (accessed on 13 May 2021).
- Kim, H.; Jeon, Y.; Kim, G.; Kim, J.; Sim, B.Y.; Han, D.G.; Seo, H.; Kim, S.; Hong, S.; Sung, J.; et al. PIPO: A Lightweight Block Cipher with Efficient Higher-Order Masking Software Implementations. In International Conference on Information Security and Cryptology; Springer: Cham, Switzerland, 2020; pp. 99–122. [Google Scholar]
- Dasu, V.A.; Baksi, A.; Sarkar, S.; Chattopadhyay, A. LIGHTER-R: Optimized Reversible Circuit Implementation For SBoxes. In Proceedings of the 2019 32nd IEEE International System-on-Chip Conference (SOCC), Singapore, 3–6 September 2019; pp. 260–265. [Google Scholar] [CrossRef]
- Jean, J.; Peyrin, T.; Sim, S.M.; Tourteaux, J. Optimizing Implementations of Lightweight Building Blocks. IACR Trans. Symmetric Cryptol. 2017, 2017, 130–168. [Google Scholar] [CrossRef]
- Steiger, D.S.; Häner, T.; Troyer, M. ProjectQ: An open source software framework for quantum computing. Quantum 2018, 2, 49. [Google Scholar] [CrossRef] [Green Version]
- Garcia-Escartin, J.C.; Chamorro-Posada, P. A SWAP gate for qudits. Quantum Inf. Process. 2013, 12, 3625–3631. [Google Scholar] [CrossRef] [Green Version]
- Znidaric, M.; Giraud, O.; Georgeot, B. How many CNOT gates does it take to generate a three-qubit state? arXiv 2007, arXiv:0711.4021. [Google Scholar]
- Bhattacharjee, D.; Chattopadhyay, A. Depth-Optimal Quantum Circuit Placement for Arbitrary Topologies. arXiv 2017, arXiv:1703.08540. [Google Scholar]
- Amento-Adelmann, B.; Grassl, M.; Langenberg, B.; Liu, Y.K.; Schoute, E.; Steinwandt, R. Quantum cryptanalysis of block ciphers: A case study. In Proceedings of the Poster at Quantum Information Processing QIP, Delft, The Netherlands, 15–19 January 2018; pp. 235–243. [Google Scholar]
Notation | Explanation |
---|---|
⊕ | XOR operation |
& | AND operation |
∨ | OR operation |
¬ | NOT operation |
Rotation left operation by i-bit |
Quantum Circuit | Qubits | Toffoli Gates | CNOT Gates | X Gates | Depth |
---|---|---|---|---|---|
PIPO-64/128 | 192 | 1248 | 2248 | 1477 | 248 |
PIPO-64/256 | 320 | 1632 | 2920 | 1930 | 324 |
SIMON-64/128 [8] | 192 | 1408 | 7396 | 1216 | 2643 |
SPECK-64/128 [11] | 193 | 3286 | 9238 | 57 | - |
CHAM-64/128 [10] | 196 | 2400 | 12,285 | 240 | - |
HIGHT-64/128 [10] | 201 | 6272 | 20,523 | 4 | - |
GIFT-64/128 [12] | 192 | 1792 | 1792 | 3261 | 308 |
Block Cipher | r | Qubits | Toffoli Gates | CNOT Gates | X Gates |
---|---|---|---|---|---|
PIPO-64/128 | 2 | 385 | 4992 | 9248 | 5908 |
PIPO-64/256 | 4 | 1281 | 130,562 | 24,896 | 15,440 |
SPECK-64/128 (Extrapolation) [11] | 2 | 387 | 13,144 | 37,208 | 228 |
GIFT-64/128 [12] | 2 | 385 | 7168 | 7424 | 13,044 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Jang, K.; Song, G.; Kwon, H.; Uhm, S.; Kim, H.; Lee, W.-K.; Seo, H. Grover on PIPO. Electronics 2021, 10, 1194. https://doi.org/10.3390/electronics10101194
Jang K, Song G, Kwon H, Uhm S, Kim H, Lee W-K, Seo H. Grover on PIPO. Electronics. 2021; 10(10):1194. https://doi.org/10.3390/electronics10101194
Chicago/Turabian StyleJang, Kyungbae, Gyeongju Song, Hyeokdong Kwon, Siwoo Uhm, Hyunji Kim, Wai-Kong Lee, and Hwajeong Seo. 2021. "Grover on PIPO" Electronics 10, no. 10: 1194. https://doi.org/10.3390/electronics10101194
APA StyleJang, K., Song, G., Kwon, H., Uhm, S., Kim, H., Lee, W.-K., & Seo, H. (2021). Grover on PIPO. Electronics, 10(10), 1194. https://doi.org/10.3390/electronics10101194