Abstract:
SM4 cryptographic algorithm is a block cipher algorithm for WAPI published by China's state cryptography administration in 2006. It was published as an international standard in June 2021. As the only nonlinear component, the security of S-box directly affects the security of SM4 algorithm. In this paper, the quantum circuit implementation of S-box for SM4 cryptographic algorithm is given for the first time. According to the algebraic expression of S-box, firstly, the affine transformation quantum circuit is given by Gaussian elimination method, then the inverse element operation is converted to the 254 power of the corresponding element, and then the corresponding quantum circuits for square calculation and multiplication calculation are given respectively. Finally, the quantum circuit of S-box is given by using improved Itoh-Tsujii algorithm. The complexity analysis shows that the given S-box quantum circuit uses 48 qubits, 592 quantum gates and the circuit depth is 289, which has high efficiency. The research of this paper will lay a foundation for the security analysis of SM4 cryptographic algorithm in quantum environment.