计算机与现代化 ›› 2022, Vol. 0 ›› Issue (02): 13-18.

• 算法设计与分析 • 上一篇    下一篇

基于申威众核处理器的MD5解密算法优化

  

  1. (1.中原工学院计算机学院,河南郑州450007;2.中原工学院前沿信息技术研究院,河南郑州450007)
  • 出版日期:2022-03-31 发布日期:2022-03-31
  • 作者简介:张恒(1995—),男,河南滑县人,硕士研究生,研究方向:高性能计算,E-mail: m18790874085_1@163.com; 赵荣彩(1957—),男,教授,博士,研究方向:高性能计算,并行编译、反编译,E-mail: rczhao126@126.com; 董本松(1993—),男,硕士研究生,研究方向:高性能计算,E-mail: bensong118@163.com。
  • 基金资助:
    国家重点研发计划子课题(2016QY07X1503)

Optimization of MD5 Decryption Algorithm Based on Many-core Sunway Processor

  1. (1. School of Computer Science, Zhongyuan University of Technology, Zhengzhou 450007, China;
    2. Research Institute of Frontier Information Technology, Zhongyuan University of Technology, Zhengzhou 450007, China)
  • Online:2022-03-31 Published:2022-03-31

摘要: 当前的MD5解密算法无法适应申威架构,不能充分发挥申威26010众核处理器的性能优势。针对上述问题,采用散列初始化、循环展开、链接变量优化、61步优化和申请内存优化等优化方法在单核上进行优化,提高解密算法速度,并且将优化后的解密算法改写成主从模式,将计算任务分配到64个从核中并行执行,对主从核的访存方式进行优化,以减少访存对程序带来的时间开销。通过5组不同任务量的测试,实验结果显示在单核上优化后的平均加速比为12.28,在从核上优化后的平均加速比为44.84。实验结果表明在申威26010众核处理器上的MD5解密算法优化方法具有可行性和有效性。

关键词: MD5解密, 循环展开; 申威26010; 优化

Abstract: The current MD5 decryption algorithm cannot adapt to the Sunway architecture and cannot give full play to the performance advantage of SW26010 multi-core processor. Aiming at the above problems, optimization methods such as hashing initialization, loop unrolling, link variable optimization, 61-step optimization and application memory optimization are adopted to optimize the single core to improve the speed of the decryption algorithm. In addition, the optimized decryption algorithm is rewritten into the master-slave mode, and the computing tasks are assigned to 64 slave cores for parallel execution. The storage access mode of master-slave core is optimized to reduce the time overhead of memory access to the program. By the 5 groups of tests with different task loads, the experimental results show that the average acceleration ratio is 12.28 after optimization on the single core and 44.84 after optimization on the slave core. The experimental results show that the MD5 decryption algorithm optimization method based on SW26010 multi-core processor is feasible and effective.

Key words: MD5 decryption, loop unrolling, SW26010, optimization