• 中国精品科技期刊
  • CCF推荐A类中文期刊
  • 计算领域高质量科技期刊T1类
Advanced Search
Wang Chuang, Ding Yan, Huang Chenlin, Song Liantao. Bitsliced Optimization of SM4 Algorithm with the SIMD Instruction Set[J]. Journal of Computer Research and Development, 2024, 61(8): 2097-2109. DOI: 10.7544/issn1000-1239.202220531
Citation: Wang Chuang, Ding Yan, Huang Chenlin, Song Liantao. Bitsliced Optimization of SM4 Algorithm with the SIMD Instruction Set[J]. Journal of Computer Research and Development, 2024, 61(8): 2097-2109. DOI: 10.7544/issn1000-1239.202220531

Bitsliced Optimization of SM4 Algorithm with the SIMD Instruction Set

Funds: This work was supported by the Joint Funds of the National Natural Science Foundation of China (U19A2060), the National Natural Science Foundation of China (62172431), the National Defense Science and Technology Foundation Strengthening Project of China (2019-XXX-ZD-188-00), and the Hunan Provincial Innovation Foundation for Postgraduate (CX20220056).
More Information
  • Author Bio:

    Wang Chuang: born in 1997. Master. His main research interests include smart contract of blockchain and cryptography algorithm optimization

    Ding Yan: born in 1977. PhD, associate professor. Distinguished member of CCF. Her main research interests include operating system, system security, and trusted cloud computing

    Huang Chenlin: born in 1976. PhD, professor. Member of CCF. His main research interests include operating system, system security, and smart security. (clhuang@nudt.edu.cn)

    Song Liantao: born in 1998. PhD candidate. His main research interests include system security and trusted computing. ( songliantao@nudt.edu.cn)

  • Received Date: June 10, 2022
  • Revised Date: November 09, 2023
  • Available Online: March 13, 2024
  • SM4 algorithm is a commercial block cipher algorithm independently designed by China, and its encryption and decryption performance has become one of the critical factors affecting the data confidentiality of the information system. The existing optimizations mainly focus on hardware designs and software look-up tables, which have problems such as dependence on specific hardware environments, low efficiency, and vulnerability to side-channel attacks. Bit slicing technology efficiently processes block ciphers in parallel by reorganizing input data, and can resist side-channel attacks against caches. However, the existing researches on bitsliced block ciphers are highly dependent on the hardware platforms and only support a single processor architecture, and the parallel processing pipeline starts slowly. It is difficult for the encryption and decryption operations for small-scale data to give full play to the advantages of advanced instruction sets such as SIMD (single instruction multiple data) instructions. To resolve the above problems, we firstly propose a cross-platform general bitsliced block cipher algorithm model, which supports a general data slicing method that provides consistent data slicing for different processor instructions. Based on that, a fine-grained bitsliced SM4 optimization algorithm for SIMD instructions is proposed, which can effectively shorten the startup time of the algorithm through fine-grained plaintext slicing reorganization and linear transformation optimization. The experiments show that, compared with the look-up table-based SM4 algorithm, the encryption rate can reach up to 438.0 MBps. The clock cycles required for encrypting a byte are up to 7.0 CPB (cycle/B), and the encryption performance is improved by an average of 80.4% to 430.3%.

  • [1]
    Schuster F, Costa M, Fournet C, et al. VC3: Trustworthy data analytics in the cloud using SGX[C]//Proc of the 31st IEEE Symp on Security and Privacy. Piscataway, NJ: IEEE, 2015: 38−54
    [2]
    Dinh T T A, Saxena P, Chang E C, et al. M2R: Enabling stronger privacy in MapReduce computation[C]//Proc of the 24th USENIX Security Symp. Berkeley, CA: USENIX Association , 2015: 447−462
    [3]
    曹珍富,董晓蕾,周俊,等. 大数据安全与隐私保护研究进展[J]. 计算机研究与发展,2016,53(10):2137−2151

    Cao Zhenfu, Dong Xiaolei, Zhou Jun, et al. Research advances on big data security and privacy preserving[J]. Journal of Computer Research and Development, 2016, 53(10): 2137−2151(in Chinese)
    [4]
    吕述望,李大为,张超,等. GM/T0002—2012 SM4 分组密码算法[S]. 北京:中国标准出版社,2012

    Lü Shuwang, Li Dawei, Zhang Chao, et al. GM/T0002—2012 SM4 block cipher algorithm[S]. Beijing: China Standard Press, 2012 (in Chinese)
    [5]
    Gao Xianwei, Lu Erhong, Xian Liqin, et al. FPGA implementation of the SMS4 block cipher in the Chinese WAPI standard[C]//Proc of the 4th Int Conf on Embedded Software and Systems Symp. Piscataway, NJ: IEEE, 2008: 104−106
    [6]
    Jin Yier, Shen Haibin, You Rongquan. Implementation of SMS4 block cipher on FPGA[C]//Proc of the 1st Int Conf on Communications and Networking in China. Piscataway, NJ: IEEE, 2006: 1−4
    [7]
    Guan Zhenyu, Li Yunhao, Shang Tao, et al. Implementation of SM4 on FPGA: Trade-off analysis between area and speed[C]//Proc of the 1st IEEE Int Conf on Intelligence and Safety for Robotics. Piscataway, NJ: IEEE, 2018: 192−197
    [8]
    何诗洋,李晖,李凤华. SM4算法的FPGA优化实现方法[J]. 西安电子科技大学学报,2021,48(3):155−162

    He Shiyang, Li Hui, Li Fenghua. Optimization and implementation of the SM4 on FPGA[J]. Journal of Xidian University, 2021, 48(3): 155−162 (in Chinese)
    [9]
    郎欢,张蕾,吴文玲. SM4的快速软件实现技术[J]. 中国科学院大学学报,2018,35(2):180−187

    Lang Huan, Zhang Lei, Wu Wenling. Fast software implementation of SM4[J]. Journal of University of Chinese Academy of Sciences, 2018, 35(2): 180−187 (in Chinese)
    [10]
    Kwon H, Kim H, Eum S, et al. Optimized implementation of SM4 on AVR microcontrollers, RISC-V mrocessors, and ARM processors[J]. IEEE Access, 2022, 10: 80225−80233 doi: 10.1109/ACCESS.2022.3195217
    [11]
    Biham E. A fast new DES implementation in software[C]//Proc of the 4th Int Workshop on Fast Software Encryption. Berlin: Springer, 1997: 260−272
    [12]
    Rebeiro C, Selvakumar D, Devi A S L. Bitslice implementation of AES[C]//Proc of the 5th Int Conf on Cryptology and Network Security. Berlin: Springer, 2006: 203−212
    [13]
    Könighofer R. A fast and cache-timing resistant implementation of the AES[C]//Proc of the 8th Cryptographers’ Track at the RSA Conf. Berlin: Springer, 2008: 187−202
    [14]
    Käsper E, Schwabe P. Faster and timing-attack resistant AES-GCM[C/OL]//Proc of the 11th Int Workshop on Cryptographic Hardware and Embedded Systems. Berlin: Springer, 2009[2022-11-09].https://dl-acm-org-s.libyc.nudt.edu.cn/doi/10.1007/978-3-642-04138-9_1
    [15]
    Scheibelhofer K. A bit-slice implementation of the whirlpool Hash function[C]//Proc of the 7th Cryptographers’ Track at the RSA Conf. Berlin: Springer, 2007: 385−401
    [16]
    Matsui M, Nakajima J. On the power of bitslice implementation on Intel Core2 processor[C]//Proc of the 9th Int Workshop on Cryptographic Hardware and Embedded Systems. Berlin: Springer, 2007: 121−134
    [17]
    Zhang Jingbin, Ma Meng, Wang Ping. Fast implementation for SM4 cipher algorithm based on bit-slice technology[C]//Proc of the 3rd Int Conf on Smart Computing and Communication. Berlin: Springer, 2018: 104−113
    [18]
    张笑从,郭华,张习勇,等. SM4 算法快速软件实现[J]. 密码学报,2020,7(6):799−811

    Zhang Xiaocong, Guo Hua, Zhang Xiyong, et al. Fast software implementation of SM4[J]. Journal of Cryptologic Research, 2020, 7(6): 799−811(in Chinese)
    [19]
    Gaubatz G, Sunar B. Leveraging the multiprocessing capabilities of modern network processors for cryptographic acceleration[C]//Proc of the 4th IEEE Int Symp on Network Computing and Applications. Piscataway, NJ: IEEE, 2005: 235−238
    [20]
    Liu Fen, Ji Wen, Hu Lei, et al. Analysis of the SMS4 block cipher[C]//Proc of the 12th Australasian Conf on Information Security and Privacy. Berlin: Springer, 2007: 158−170
    [21]
    Canright D, Batina L. A very compact “perfectly masked” S-box for AES[C]//Proc of the 6th Int Conf on Applied Cryptography and Network Security. Berlin: Springer, 2008: 446−459
  • Related Articles

    [1]Peng Yingtao, Meng Xiaofeng, Du Zhijuan. Survey on Diversified Recommendation[J]. Journal of Computer Research and Development, 2025, 62(2): 285-313. DOI: 10.7544/issn1000-1239.202330600
    [2]MB-HGCN: A Hierarchical Graph Convolutional Network for Multi-behavior Recommendation“CCIR 2024推荐”[J]. Journal of Computer Research and Development. DOI: 10.7544/issn1000-1239.202440770
    [3]Zeng Weixin, Zhao Xiang, Tang Jiuyang, Tan Zhen, Wang Wei. Iterative Entity Alignment via Re-Ranking[J]. Journal of Computer Research and Development, 2020, 57(7): 1460-1471. DOI: 10.7544/issn1000-1239.2020.20190643
    [4]Dai Chenchao, Wang Hongyuan, Ni Tongguang, Chen Shoubing. Person Re-Identification Based on Deep Convolutional Generative Adversarial Network and Expanded Neighbor Reranking[J]. Journal of Computer Research and Development, 2019, 56(8): 1632-1641. DOI: 10.7544/issn1000-1239.2019.20190195
    [5]Gu Liang, Yang Peng, Dong Yongqiang. A Diversified Recommendation Method for UCL in Broadcast-Storage Network[J]. Journal of Computer Research and Development, 2017, 54(8): 1631-1643. DOI: 10.7544/issn1000-1239.2017.20170128
    [6]Meng Xiangfu, Bi Chongchun, Zhang Xiaoyan, Tang Xiaoliang, Tang Yanhuan. Web Database top-k Diverse Keyword Query Suggestion Approach[J]. Journal of Computer Research and Development, 2017, 54(7): 1577-1591. DOI: 10.7544/issn1000-1239.2017.20160005
    [7]Yu Wenzhe, Sha Chaofeng, He Xiaofeng, Zhang Rong. Review Selection Considering Opinion Diversity[J]. Journal of Computer Research and Development, 2015, 52(5): 1050-1060. DOI: 10.7544/issn1000-1239.2015.20131932
    [8]Wang Xianghai, Cong Zhihuan, Fang Lingling, Song Chuanming. HMM Training Model Using Blending Population Diversity Based Aaptive Genetic Algorithm Title[J]. Journal of Computer Research and Development, 2014, 51(8): 1833-1844. DOI: 10.7544/issn1000-1239.2014.20121211
    [9]Zhang Weiguo, Yin Xia, and Wu Jianping. A Computation Method of Path Diversity Based on AS Relationships[J]. Journal of Computer Research and Development, 2012, 49(1): 167-173.
    [10]Han Jianmin, Yu Juan, Yu Huiqun, Jia Jiong. A Multi-Level l-Diversity Model for Numerical Sensitive Attributes[J]. Journal of Computer Research and Development, 2011, 48(1): 147-158.
  • Cited by

    Periodical cited type(7)

    1. 罗宇哲,李玲,侯朋朋,于佳耕,程丽敏,张常有,武延军,赵琛. 面向AIoT的协同智能综述. 计算机研究与发展. 2025(01): 179-206 . 本站查看
    2. 王蕴,林霄,楼芝兰,李军,孙卫强. 面向边缘光算力网络的上行链路资源协同调度算法. 光通信技术. 2024(03): 45-51 .
    3. 王铭源,王正国,李济顺,薛玉君. 层级式机械装备健康指数模型及管理系统构建. 金属矿山. 2024(09): 198-206 .
    4. 王睿,王岩,尹朴,齐建鹏,孙叶桃,李倩,张易达,张梅奎. 面向边缘智能的协同训练研究进展. 工程科学学报. 2023(08): 1400-1416 .
    5. 薛建强,史彦军,李波. 面向无人集群的边缘计算技术综述. 兵工学报. 2023(09): 2546-2555 .
    6. 阴彦磊,王立华,廖伟智,张万达. 融合GRU-Attention与鲸鱼算法的流程制造工艺参数云边联动优化. 计算机集成制造系统. 2023(09): 2991-3005 .
    7. 许浩,朱晓娟. SDN中基于模型划分的云边协同推理算法. 兰州工业学院学报. 2023(06): 31-37 .

    Other cited types(20)

Catalog

    Article views (182) PDF downloads (91) Cited by(27)

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return