Post-quantum cryptographic algorithms capable of resisting quantum computing attacks have received increasing attention in recent years, especially lattice-based cryptographic algorithms have become mainstream. Since their specialization and complex computation, the cryptographic computation is inefficient on general-purpose processors. In order to improve the performance of the processor in post-quantum cryptography computing, we have extended a set of cryptographic and vector instruction sets for the CRYSTALS-Kyber algorithm, and implemented support for custom cryptographic and vector instructions based on the open-source toolchain. These efforts can realize the compilation and disassembly of the CRYSTALS-Kyber encryption/decryption algorithm programs, and optimized the performance of the compilation. This paper mainly introduces how to design an extended instruction set based on the target algorithm and enable the compiler to support these instructions. Compared to the situation before extending custom instructions, the total number of instructions for key generation, encryption, and decryption assembly programs has decreased by 3651 times, and the total number of execution cycles has decreased by 2195 times.
Vasileios TitopoulosGeorge AlexakisChrysostomos NicopoulosGiorgos Dimitrakopoulos
Ajay Kumar MVineet KumarDeepu JohnShanker Shreejith
Gongjin SunSeongyoung KangJijiang HeSe-Min LimSang-Woo Jun
Gustavo LeiteCarlos E. C. BarbosaHervé YviquelSandro Rigo