Paper 2024/565 Original: eprint.iacr.org/2024/565 ↗

On the construction of quantum circuits for S-boxes with different criteria based on the SAT solver

Da Lin
Chunli Yang
Shengyuan Xu
Shizhu Tian
Bing Sun
Abstract

The substitution box (S-box) is often used as the only nonlinear component in symmetric-key ciphers, leading to a significant impact on the implementation performance of ciphers in both classical and quantum application scenarios by S-box circuits. Taking the Pauli-X gate, the CNOT gate, and the Toffoli gate (i.e., the NCT gate set) as the underlying logic gates, this work investigates the quantum circuit implementation of S-boxes based on the SAT solver. Firstly, we propose encoding methods of the logic gates and the NCT-based circuit, based on which we construct STP models for implementing S-boxes. By applying the proposed models to the S-boxes of several well-known cryptographic algorithms, we construct optimal implementations with different criteria for the 4-bit S-boxes and provide the implementation bounds of different criteria for the 5-bit S-boxes. Since S-boxes in the same affine equivalence class share most of the important properties, we then build STP models to further investigate optimizing S-box circuits based on affine equivalence. According to the applications, for almost all the tested 4-bit S-boxes, there always exists an equivalent S-box that can be implemented with half the number of logic gates. Besides, we encode some important cryptographic properties and construct STP models to design S-boxes with given criteria configurations on implementation and properties. As an application, we find an S-box with the same cryptographic properties as the S-box of KECCAK that can be implemented with only 5 NCT gates, even though the application of our models indicates that implementing the KECCAK S-box requires more than 9 NCT gates. Notably, the inputs of the proposed models are tweakable, which makes the models possess some functions not currently available in the public tools for constructing optimized NCT-based circuits for S-boxes.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint.
History
2026-01-27: last updated
2024-04-12: published
Short URL
https://ia.cr/2024/565
License
https://creativecommons.org/licenses/by/4.0/

BibTeX

@misc{cryptoeprint:2024/565,
      author = {Da Lin and Chunli Yang and Shengyuan Xu and Shizhu Tian and Bing Sun},
      title = {On the construction of quantum circuits for S-boxes with different criteria based on the SAT solver},
      howpublished = {Cryptology {ePrint} Archive, Paper 2024/565},
      year = {2024},
      url = {https://eprint.iacr.org/2024/565}
}
Note: In order to protect the privacy of readers, this archive does not use cookies or embedded third party content.