Optimized Hardware-Software Co-Design for Kyber and Dilithium on RISC-V SoC FPGA

Tengfei Wang, Chi Zhang, Xiaolin Zhang, Dawu Gu, Pei Cao
{"title":"Optimized Hardware-Software Co-Design for Kyber and Dilithium on RISC-V SoC FPGA","authors":"Tengfei Wang, Chi Zhang, Xiaolin Zhang, Dawu Gu, Pei Cao","doi":"10.46586/tches.v2024.i3.99-135","DOIUrl":null,"url":null,"abstract":"Kyber and Dilithium are both lattice-based post-quantum cryptography (PQC) algorithms that have been selected for standardization by the American National Institute of Standards and Technology (NIST). NIST recommends them as two primary algorithms to be implemented for most use cases. As the applications of RISC-V processors move from specialized scenarios to general scenarios, efficient implementations of PQC algorithms on general-purpose RISC-V platforms are required. In this work, we present an optimized hardware-software co-design for Kyber and Dilithium on the industry’s first RISC-V System-on-Chip (SoC) Field Programmable Gate Array (FPGA) platform. The performance of both algorithms is enhanced through the utilization of hardware acceleration and software optimization, while a certain level of flexibility is still maintained. The polynomial arithmetic operations in Kyber and Dilithium are accelerated by the customized accelerators. We employ a unified high-level architecture to depict their shared characteristics and design dedicated underlying modular multipliers to explore their distinctive features. The hashing functions are optimized using RISC-V assembly instructions, resulting in improved performance and reduced code size without additional hardware resources. For other operations involving matrices and vectors, we present a multi-core acceleration scheme based on the multi-core RISC-V Microprocessor Sub-System (MSS). Combining these acceleration and optimization methods, experimental results show that the overall performance of Kyber and Dilithium across different security levels improves by 3 to 5 times, while the utilized FPGA resources account for less than 5% of the total resources provided by the platform.","PeriodicalId":321490,"journal":{"name":"IACR Transactions on Cryptographic Hardware and Embedded Systems","volume":" 20","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IACR Transactions on Cryptographic Hardware and Embedded Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.46586/tches.v2024.i3.99-135","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Kyber and Dilithium are both lattice-based post-quantum cryptography (PQC) algorithms that have been selected for standardization by the American National Institute of Standards and Technology (NIST). NIST recommends them as two primary algorithms to be implemented for most use cases. As the applications of RISC-V processors move from specialized scenarios to general scenarios, efficient implementations of PQC algorithms on general-purpose RISC-V platforms are required. In this work, we present an optimized hardware-software co-design for Kyber and Dilithium on the industry’s first RISC-V System-on-Chip (SoC) Field Programmable Gate Array (FPGA) platform. The performance of both algorithms is enhanced through the utilization of hardware acceleration and software optimization, while a certain level of flexibility is still maintained. The polynomial arithmetic operations in Kyber and Dilithium are accelerated by the customized accelerators. We employ a unified high-level architecture to depict their shared characteristics and design dedicated underlying modular multipliers to explore their distinctive features. The hashing functions are optimized using RISC-V assembly instructions, resulting in improved performance and reduced code size without additional hardware resources. For other operations involving matrices and vectors, we present a multi-core acceleration scheme based on the multi-core RISC-V Microprocessor Sub-System (MSS). Combining these acceleration and optimization methods, experimental results show that the overall performance of Kyber and Dilithium across different security levels improves by 3 to 5 times, while the utilized FPGA resources account for less than 5% of the total resources provided by the platform.
在 RISC-V SoC FPGA 上为 Kyber 和 Dilithium 优化硬件-软件协同设计
Kyber 和 Dilithium 都是基于晶格的后量子加密 (PQC) 算法,已被美国国家标准与技术研究院 (NIST) 选为标准化算法。NIST 推荐将它们作为大多数用例中的两种主要算法。随着 RISC-V 处理器的应用从专用场景转向通用场景,需要在通用 RISC-V 平台上高效实现 PQC 算法。在这项工作中,我们在业界首个 RISC-V 片上系统 (SoC) 现场可编程门阵列 (FPGA) 平台上为 Kyber 和 Dilithium 提出了优化的软硬件协同设计。通过利用硬件加速和软件优化,这两种算法的性能都得到了提高,同时还保持了一定的灵活性。Kyber 和 Dilithium 中的多项式算术运算由定制加速器加速。我们采用统一的高级架构来描述它们的共同特征,并设计专用的底层模块化乘法器来探索它们的独特功能。哈希函数使用 RISC-V 汇编指令进行优化,从而在不增加硬件资源的情况下提高了性能并缩小了代码大小。对于涉及矩阵和矢量的其他运算,我们提出了一种基于多核 RISC-V 微处理器子系统(MSS)的多核加速方案。结合这些加速和优化方法,实验结果表明,Kyber 和 Dilithium 在不同安全等级下的整体性能提高了 3 到 5 倍,而所使用的 FPGA 资源只占平台总资源的不到 5%。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信