Transactions on Cryptographic Hardware and Embedded Systems, Volume 2025
Optimized Software Implementation of Keccak, Kyber, and Dilithium on RV{32,64}IM{B}{V}
Jipeng Zhang
Nanjing University of Aeronautics and Astronautics, Nanjing, China
Yuxing Yan
Shanghai Aerospace Electronic Technology Institute, Shanghai, China
Junhao Huang
BNU-HKBU United International College, Zhuhai, China; Hong Kong Baptist University, Hong Kong, China
Çetin Kaya Koç
Nanjing University of Aeronautics and Astronautics, Nanjing, China; Iğdır University, Iğdır, Turkey; University of California Santa Barbara, Santa Barbara, USA
Keywords: SHA-3, Keccak, Kyber, Dilithium, RISC-V, RISC-V Vector, Plantard Arithmetic, NTT
Abstract
With the standardization of NIST post-quantum cryptographic (PQC) schemes, optimizing these PQC schemes across various platforms presents significant research value. While most existing software implementation efforts have concentrated on ARM platforms, research on PQC implementations utilizing various RISC-V instruction set architectures (ISAs) remains limited. In light of this gap, this paper proposes comprehensive and efficient optimizations of Keccak, Kyber, and Dilithium on RV{32,64}IM{B}{V}. We thoroughly optimize these implementations for dual-issue CPUs, believing that our work on various RISC-V ISAs will provide valuable insights for future PQC deployments.Specifically, for Keccak, we revisit a range of optimization techniques, including bit interleaving, lane complementing, in-place processing, and hybrid vector/scalar implementations. We construct an optimal combination of methods aimed at achieving peak performance on dual-issue CPUs for various RISC-V ISAs. For the NTT implementations of Kyber and Dilithium, we deliver optimized solutions based on Plantard and Montgomery arithmetic for diverse RISC-V ISAs, incorporating extensive dual-issue enhancements. Additionally, we improve the signed Plantard multiplication algorithm proposed by Akoi et al. Ultimately, our testing demonstrates that our implementations of Keccak and NTT across various ISAs achieve new performance records. More importantly, they significantly enrich the PQC software ecosystem for RISC-V.
Publication
Transactions of Cryptographic Hardware and Embedded Systems, Volume 2025, Issue 1
PaperArtifact
Artifact number
tches/2025/a4
Artifact published
March 6, 2025
Badge
✅ IACR CHES Artifacts Functional
License
This work is licensed under the MIT License.
Some files in this archive are licensed under a different license. See the contents of this archive for more information.
BibTeX How to cite
Zhang, J., Yan, Y., Huang, J., & Koç, Çetin K. (2024). Optimized Software Implementation of Keccak, Kyber, and Dilithium on RV{32,64}IM{B}{V}. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025(1), 632-655. https://doi.org/10.46586/tches.v2025.i1.632-655. Artifact available at https://artifacts.iacr.org/tches/2025/a4