首页|基于Verilog HDL的SM3算法硬件架构仿真设计

基于Verilog HDL的SM3算法硬件架构仿真设计

扫码查看
哈希函数由于其不可逆与碰撞约束的特点,可以很好地完成对信息的加密,但算法硬件吞吐率有待提高。该研究首先根据SM3杂凑密码哈希算法,结合Merkle-Damgard结构深入研究密码杂凑原理,分析得出硬件实现方案;其次结合静态时序分析,针对关键路径进行分析,优化得到最终硬件电路实现方案;最后利用CSA结构优化加法器结构,采用二合一结构以提高算法硬件的吞吐率。使用Stratix Ⅱ芯片通过Modelsim进行仿真,在Quartus平台下完成FPGA的功能验证。经过功能验证、时序分析、逻辑综合、时序验证后,计算出最高吞吐率可达到1。07 Gb/s。实现了较高吞吐率,以及面积与速度的相对平衡。
Design and simulation of SM3 algorithm hardware architecture based on Verilog hardware description language
[Objective]With the rapid development of the Internet of Things and network communication technology,cryptography has advanced significantly.Current hash function software can process multiple messages in parallel,making hash functions widely applicable for file tamper-proofing and software installation verification on mobile phones.However,existing hash function software often suffers from low speed and throughput,which hinders the processing of large-scale data in Internet of Things applications.Algorithm hardware can efficiently process large-scale data through algorithm adaptation and path optimization.Consequently,this experiment designs a hardware circuit for the SM3 cryptographic hash algorithm using Verilog hardware description language(HDL)to enhance the speed and throughput of the algorithm,thereby addressing the demand for high-speed hashing algorithms in Internet of Things applications.[Methods]This paper examines the speed and throughput of hash algorithm hardware using various optimization technologies and loop expansion methods.By comparing different techniques,the experiment presents an optimized SM3 hash algorithm.The Verilog HDL code implements the hardware circuit for the SM3 cryptographic hash algorithm,which is simulated using ModelSim by Mentor Graphics Corporation.According to the simulation results from the static sequence,the experiment identifies the critical path of the hardware.Leveraging this static sequence analysis,the study employs loop expansion technology and the conditional-select adder(CSA)to enhance processing speed and shorten the critical path.Furthermore,the FPGA is used to implement the hardware system experimentally and conduct a sequence test to evaluate throughput.According to the experimental results,the hardware incorporates the two-in-one structure loop expansion technology,which reduces two-step calculations to one step.As a result,the number of iterations for compression decreases from 64 to 32.This structure significantly improves calculation efficiency and reduces processing time.Additionally,this experiment proposes a CSA tree topology in the critical path to minimize logic delay without compromising accuracy.[Results]The experimental results for the hardware circuit of the SM3 cryptographic hash algorithm indicated that:1)The initial and optimized delays were 6.006 ns and 5.525 ns,respectively,according to the simulation results from ModelSim.This represents a reduction in delay of 0.481 ns for the hardware circuit.2)The proposed CSA tree topology in the optimized hardware system reduced logic delay by 8.01%experimentally,further enhancing overall calculation speed and efficiency.3)The two-in-one loop expansion technology implemented in the optimized hardware system increased throughput from 822.4 Mb/s to 1 069.5 Mb/s,achieving an improvement rate of 30%.[Conclusions]By incorporating the two-in-one structure loop expansion technology and the CSA tree topology,the hardware circuit for the SM3 cryptographic hash algorithm in this experiment shortens the critical path and reduces logic delay.As a result,calculation speed and efficiency are greatly enhanced.The presented hardware circuit achieves high speed and throughput,enabling the processing of large-scale data without time expansion.Overall,this study significantly contributes to the processing of large-scale data in the Internet of Things and network communication technology.

hash algorithmSM3hardware implementationFPGAhigh throughput

方硕、姜博、王立晶、刘云涛、邵雷

展开 >

哈尔滨工程大学信息与通信工程学院,先进船舶通信与信息技术工信部重点实验室,黑龙江哈尔滨 150001

杂凑算法 SM3 硬件实现 FPGA 高吞吐率

国家自然科学基金项目

62104054

2024

实验技术与管理
清华大学

实验技术与管理

CSTPCD北大核心
影响因子:1.651
ISSN:1002-4956
年,卷(期):2024.41(10)