Quantum reversible circuits for $\mathrm{GF}(2^{8})$ multiplicative inverse

Abstract The synthesis of quantum circuits for multiplicative inverse over $\operatorname{GF}(2^{8})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>8</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:math> are discussed in this paper. We first convert the multiplicative inverse operation in $\operatorname{GF}(2^{8})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>8</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:math> to arithmetic operations in the composite field $\operatorname{GF}((2^{4})^{2})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>4</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:mrow> <mml:mn>2</mml:mn> </mml:msup> <mml:mo>)</mml:mo> </mml:math> , and then discuss the expressions of the square calculation, the inversion calculation and the multiplication calculation separately in the finite field $\operatorname{GF}(2^{4})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>4</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:math> , where the expressions of multiplication calculation in $\operatorname{GF}(2^{4})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>4</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:math> are given directly in $\operatorname{GF}(2^{4})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>4</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:math> and given through being transformed into the composite field $\operatorname{GF}((2^{2})^{2})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:mrow> <mml:mn>2</mml:mn> </mml:msup> <mml:mo>)</mml:mo> </mml:math> . Then the quantum circuits of these calculations are realized one by one. Finally, two quantum circuits for multiplicative inverse over $\operatorname{GF}(2^{8})$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mo>GF</mml:mo> <mml:mo>(</mml:mo> <mml:msup> <mml:mrow> <mml:mn>2</mml:mn> </mml:mrow> <mml:mrow> <mml:mn>8</mml:mn> </mml:mrow> </mml:msup> <mml:mo>)</mml:mo> </mml:math> are synthesized. They both use 21 qubits, the first quantum circuit uses 55 Toffoli gates and 107 CNOT gates and the second one uses 37 Toffoli gates and 209 CNOT gates. As an example of the application of multiplication inverse, we apply these quantum circuits to the implementations of the S-box quantum circuit of the AES cryptographic algorithm. Two quantum circuits for implementing the S-box of the AES cryptographic algorithm are presented. The first quantum circuit uses 21 qubits, 55 Toffoli gates, 131 CNOT gates and 4 NOT gates and the second one uses 21 qubits, 37 Toffoli gates, 233 CNOT gates and 4 NOT gates. Through the evaluation of quantum cost, the two quantum circuits of the S-box of AES cryptographic algorithm use less quantum resources than the existing schemes.