Accelerating Cryptographic Algorithms on RISC-V cores using Carryless Multiplication

Authors

  • Simi Sukumaran CarS Lab, Department of Electronics, CUSAT
  • Tripti S Warrier CarS Lab, Department of Electronics, CUSAT
  • Babu P S Incore Semiconductors
  • Neel Gala Incore Semiconductors

Keywords:

Cryptography, Galois Field Arithmetic, RISC-V, AES

Abstract

Edge computing emerges as a critical paradigm in the wake of Internet of Things (IoT) and 5G New Radio (5GNR). It catalyzes the demand for energy-efficient devices that have resilient CPUs with lean physical footprints. Mitigating the security challenges in these networked devices necessitates Bit Manipulation Instruction (BMI) inclusive architectures to improve Galois Field (GF) arithmetic, which is a fundamental step for most cryptographic algorithms. All major Instruction Set Architectures (ISA), including RISC-V incorporate dedicated instructions for carryless multiplication, recognizing its significant contribution in cryptographic applications. Acknowledging the fact, this paper introduces a novel approach to enhance the performance of GF arithmetic using carryless multiplication. The approach presents a promising avenue by improving the execution cycle counts of a real-world cryptographic application like the Advanced Encryption Scheme (AES) and can be scaled to all GF-based cryptographic algorithms. The proposed GF algorithm effectively maps the Carryless Multiplication Instruction of the ratified RISC-V Zbc extension. Evaluations indicate about 4.5x performance improvement for multiple schemes of AES using an open-source RISC-V core (SweRV-EL2TM 1.3) without incurring any additional overhead in terms of area as well as compiler support.

References

L. Tan and N. Wang, “Future internet: The internet of things,” in 2010 3rd international conference on advanced computer theory and engineering (ICACTE), vol. 5, pp. V5–376, IEEE, 2010.

T. Huang, W. Yang, J. Wu, J. Ma, X. Zhang, and D. Zhang, “A survey on green 6g network: Architecture and technologies,” IEEE access, vol. 7, pp. 175758–175768, 2019.

R. International, “Risc-v bit-manipulation isa-extensions.” https://github. com/riscv/riscv-bitmanip/blob/main/bitmanip/bitmanip.adoc, 2022.

Y. Chen, S. Lu, C. Fu, D. Blaauw, R. Dreslinski Jr, T. Mudge, and H.-S. Kim, “A programmable galois field processor for the internet of things,” in Proceedings of the 44th Annual International Symposium on Computer Architecture, pp. 55–68, 2017.

W.-M. Lim and M. Benaissa, “Design space exploration of a hardware-software co-designed gf (2m) galois field processor for forward error correction and cryptography,” in Proceedings of the 1st IEEE/ACM/IFIP international conference on Hardware/software codesign and system synthesis, pp. 53–58, 2003.

Y.-M. Kuo, F. Garcia-Herrero, O. Ruano, and J. A. Maestro, “Riscv galois field isa extension for non-binary error-correction codes and classical and post-quantum cryptography,” IEEE Transactions on Computers, vol. 72, no. 3, pp. 682–692, 2023.

X. Zhang, VLSI architectures for modern error-correcting codes. Crc Press, 2017.

S. Gueron and M. Kounavis, “Efficient implementation of the galois counter mode using a carry-less multiplier and a fast reduction algorithm,” Information Processing Letters, vol. 110, no. 14-15, pp. 549–553, 2010.

W. D. Corporation, “Risc-v swerv-el2 github repository.” https://github. com/chipsalliance/Cores-SweRV-EL2, 2020.

Downloads

Published

2024-08-20

How to Cite

Sukumaran, S., S Warrier, T., P S, B., & Gala, N. (2024). Accelerating Cryptographic Algorithms on RISC-V cores using Carryless Multiplication. WiPiEC Journal - Works in Progress in Embedded Computing Journal, 10(2). Retrieved from https://wipiec.digitalheritage.me/index.php/wipiecjournal/article/view/57