高级搜索

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于循环架构的全局掩码SM4抗功耗攻击设计与实现

张剑锋,  曾聘,  袁梦,  廖湘龙,  杨乾明

张剑锋, 曾聘, 袁梦, 廖湘龙, 杨乾明. 基于循环架构的全局掩码SM4抗功耗攻击设计与实现[J]. 电子与信息学报. doi: 10.11999/JEIT260782
引用本文: 张剑锋, 曾聘, 袁梦, 廖湘龙, 杨乾明. 基于循环架构的全局掩码SM4抗功耗攻击设计与实现[J]. 电子与信息学报. doi: 10.11999/JEIT260782
ZHANG Jianfeng, ZENG Pin, YUAN Meng, LIAO Xianglong, YANG Qianming. Design and Implementation of a Global Masked SM4 Against Power Analysis Attacks Based on a Loop Architecture[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260782
Citation: ZHANG Jianfeng, ZENG Pin, YUAN Meng, LIAO Xianglong, YANG Qianming. Design and Implementation of a Global Masked SM4 Against Power Analysis Attacks Based on a Loop Architecture[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260782

基于循环架构的全局掩码SM4抗功耗攻击设计与实现

doi: 10.11999/JEIT260782 cstr: 32379.14.JEIT260782
详细信息
    作者简介:

    张剑锋:男,助理研究员,研究方向为微处理器设计和集成电路

    曾聘:女,中级工程师,研究方向为计算机系统结构、安全集成电路

    袁梦:男,硕士生,研究方向为计算机体系结构和集成电路

    廖湘龙:男,硕士生,研究方向为计算机体系结构和集成电路

    杨乾明:男,助理研究员,研究方向为计算机系统结构、微处理器设计和集成电路

    通讯作者:

    张剑锋 jianfengzhang@nudt.edu.cn

  • 中图分类号: TN492

Design and Implementation of a Global Masked SM4 Against Power Analysis Attacks Based on a Loop Architecture

  • 摘要: 信息时代下,安全芯片是硬件防护的核心载体,SM4国密算法作为安全芯片主流加密算法之一,发挥着关键的底层安全防护作用。针对SM4在硬件实现中面积开销与安全防护难以兼顾的问题,该文实现一种循环结构的全局掩码SM4硬件方案。首先,基于组合逻辑优化技术实现一种低面积开销的掩码S盒,为电路安全防护提供基础支撑;同时采用全局掩码对明文和密钥全过程进行防护,在可接受的面积开销内提升电路的抗侧信道攻击能力;为实现面积与性能之间的平衡,该文采用循环架构,通过密钥扩展与加密模块并行执行的方式实现电路稳定吞吐率与低延迟分组加密。基于硅前仿真生成的波形记录文件对第一轮S盒单输出份额进行单点采样,在汉明重量功耗模型下,采集10000条功耗迹并实施一阶相关功耗攻击,实验结果表明所提方案在该攻击条件下无法恢复密钥,与基于复合域实现的掩码S盒相比实现了更优的面积开销。在密钥动态更新的安全加密场景下,与相同工艺(SMIC 0.18um)的紧凑型掩码SM4方案对比,加密延迟周期降低了55.1%,吞吐率提升至2.43倍。
  • 图  1  S盒三层结构

    图  2  S盒掩码

    图  3  循环架构的掩码SM4算法结构图

    图  4  加密单元掩码轮函数结构图

    图  5  掩码S盒双份额异或门结构

    图  6  掩码S盒安全与门结构

    图  7  加密开始仿真状态图

    图  8  加密结束仿真状态图

    图  9  无掩码S盒一阶相关功耗攻击

    图  10  掩码S盒一阶相关功耗攻击

    图  11  密钥随功耗迹线数目变化的相关性曲线

    图  12  100次一阶CPA下正确密钥排名分布图

    图  13  全局掩码电路一阶TVLA检验结果

    图  14  跨S盒TVLA检验结果

    表  1  S盒综合资源分析

    方法工艺时延(ns)等效门(gate)随机数消耗安全模型
    无掩码查找表S盒Smic 0.18/TT5.017604//
    Liu等人无掩码复合域S盒[15]Smic 0.184.180368//
    本文无掩码S盒Smic 0.18/FF3.317305//
    Smic 0.18/TT5.217305//
    Tang等人掩码S盒[9]///60安全与门(180bit)二阶CPA
    Liu等人掩码S盒[15]Smic 0.18/1.8V/1240/一阶DPA
    Bu掩码S盒[17]Smic 0.186.1001089/一阶DPA
    本文掩码S盒Smic 0.18/FF4.895105134安全与门(34bit)一阶CPA
    Smic 0.18/TT7.3041052
    下载: 导出CSV

    表  2  SM4电路综合资源分析

    方法工艺时钟
    (MHz)
    吞吐
    (Mb/s)
    分组加密延迟
    (cycle)
    面积(um2)等效门
    (GE·103)
    单位面积吞吐率
    (Mb·s-1·gates-1)
    防护阶数
    Liu等人[15]Smic 0.18/1.8V///16242216.3/1
    Bu[17]Smic 0.18110180.77811177411.20.01611
    本文掩码Smic 0.18/FF165603.43521614321.70.02781
    Smic 0.18/TT120438.8622252322.30.0196(不含随机数)
    26880027.00.0162(包含随机数)
    下载: 导出CSV
  • [1] 龚锐, 石伟, 刘威, 等. 基于NAND Flash的CPU安全启动设计与实现[J]. 计算机工程与科学, 2022, 44(6): 971–978. doi: 10.3969/j.issn.1007-130X.2022.06.003.

    GONG Rui, SHI Wei, LIU Wei, et al. Design and implementation of CPU secure boot based on NAND Flash[J]. Computer Engineering & Science, 2022, 44(6): 971–978. doi: 10.3969/j.issn.1007-130X.2022.06.003.
    [2] 石伟, 刘威, 龚锐, 等. 微处理器内安全子系统的安全增强技术[J]. 计算机工程与科学, 2021, 43(8): 1353–1359. doi: 10.3969/j.issn.1007-130X.2021.08.003.

    SHI Wei, LIU Wei, GONG Rui, et al. Security enhancement technologies of security subsystem in microprocessors[J]. Computer Engineering & Science, 2021, 43(8): 1353–1359. doi: 10.3969/j.issn.1007-130X.2021.08.003.
    [3] 付杰, 张肖强, 林信南, 等. 面向SM4侧信道攻击的高效方案的设计与实现[J]. 青岛大学学报: 工程技术版, 2026, 41(1): 93–101. doi: 10.13306/j.1006-9798.2026.01.012.

    FU Jie, ZHANG Xiaoqiang, LIN Xinnan, et al. Design and implementation of an efficient scheme for SM4 side-channel attacks[J]. Journal of Qingdao University: Engineering & Technology Edition, 2026, 41(1): 93–101. doi: 10.13306/j.1006-9798.2026.01.012.
    [4] 赵毅强, 闫明凯, 张启智, 等. 基于多阶段相关功耗分析的SM4-XTS侧信道分析方法[J]. 电子与信息学报, 2024, 46(11): 4161–4169. doi: 10.11999/JEIT240183.

    ZHAO Yiqiang, YAN Mingkai, ZHANG Qizhi, et al. SM4-XTS side channel analysis method based on multi-stage CPA[J]. Journal of Electronics & Information Technology, 2024, 46(11): 4161–4169. doi: 10.11999/JEIT240183.
    [5] 陈华, 习伟, 范丽敏, 等. 密码产品的侧信道分析与评估[J]. 电子与信息学报, 2020, 42(8): 1836–1845. doi: 10.11999/JEIT190853.

    CHEN Hua, XI Wei, FAN Limin, et al. Side channel analysis and evaluation on cryptographic products[J]. Journal of Electronics & Information Technology, 2020, 42(8): 1836–1845. doi: 10.11999/JEIT190853.
    [6] 沈炜, 刘诗宇, 杨光, 等. 面向密码芯片设计阶段的仿真侧信道安全性分析方法研究[J]. 电子技术应用, 2024, 50(10): 98–104. doi: 10.16157/j.issn.0258-7998.245035.

    SHEN Wei, LIU Shiyu, YANG Guang, et al. Research on side channel security analysis technology of cryptographic chip based on simulation[J]. Application of Electronic Technique, 2024, 50(10): 98–104. doi: 10.16157/j.issn.0258-7998.245035.
    [7] 严迎建, 汪晶, 刘燕江. 基于塔域的通用循环移位掩码设计方法[J]. 电子与信息学报, 2021, 43(9): 2489–2497. doi: 10.11999/JEIT210588.

    YAN Yingjian, WANG Jing, and LIU Yanjiang. Design method of generic cyclic shift mask based on tower field[J]. Journal of Electronics & Information Technology, 2021, 43(9): 2489–2497. doi: 10.11999/JEIT210588.
    [8] 裴超. 一种SM4掩码方法和抗DPA攻击分析[J]. 密码学报, 2016, 3(1): 79–90. doi: 10.13868/j.cnki.jcr.000111.

    PEI Chao. A method of masking SM4 and analysis against DPA attacks[J]. Journal of Cryptologic Research, 2016, 3(1): 79–90. doi: 10.13868/j.cnki.jcr.000111.
    [9] 唐啸霖, 冯燕, 李明达, 等. 秘密共享: 高阶掩码S盒和有限域安全乘法设计[J]. 电子与信息学报, 2024, 46(8): 3400–3409. doi: 10.11999/JEIT231272.

    TANG Xiaolin, FENG Yan, LI Mingda, et al. Secret sharing: Design of higher-order masking S-box and secure multiplication in galois field[J]. Journal of Electronics & Information Technology, 2024, 46(8): 3400–3409. doi: 10.11999/JEIT231272.
    [10] BOYAR J and PERALTA R. A new combinational logic minimization technique with applications to cryptology[C]. 9th International Symposium on Experimental Algorithms, Ischia Island, Italy, 2010: 178–189. doi: 10.1007/978-3-642-13193-6_16.
    [11] SAARINEN M J O. A lightweight ISA extension for AES and SM4[EB/OL]. https://arxiv.org/abs/2002.07041v1, 2020. doi: 10.48550/arXiv.2002.07041.
    [12] 隋谦, 周佳运, 祝一豪, 等. 一种非常紧凑的掩码AES的硬件设计与实现[J]. 密码学报, 2024, 11(3): 662–680. doi: 10.13868/j.cnki.jcr.000701.

    SUI Qian, ZHOU Jiayun, ZHU Yihao, et al. A compact implementation of masked AES encryption[J]. Journal of Cryptologic Research, 2024, 11(3): 662–680. doi: 10.13868/j.cnki.jcr.000701.
    [13] 朱麒瑾, 陈小文, 鲁建壮. 可变流水级SM4加解密算法硬件设计及FPGA实现[J]. 计算机工程与科学, 2024, 46(4): 606–614. doi: 10.3969/j.issn.1007-130X.2024.04.005.

    ZHU Qijin, CHEN Xiaowen, and LU Jianzhuang. Hardware design and FPGA implementation of a variable pipeline stage SM4 encryption and decryption algorithm[J]. Computer Engineering & Science, 2024, 46(4): 606–614. doi: 10.3969/j.issn.1007-130X.2024.04.005.
    [14] 张宏科, 袁浩楠, 丁文秀, 等. 基于FPGA的SM4算法高效实现方案[J]. 通信学报, 2024, 45(5): 140–150. doi: 10.11959/j.issn.1000-436x.2024053.

    ZHANG Hongke, YUAN Haonan, DING Wenxiu, et al. Efficient implementation scheme of SM4 algorithm based on FPGA[J]. Journal on Communications, 2024, 45(5): 140–150. doi: 10.11959/j.issn.1000-436x.2024053.
    [15] LIU Yaoping and ZHAO Huichao. Hardware implementation of compact reconfigurable AES/SM4 encryption circuit against differential power attact[C]. Proceedings of the 2nd International Conference on Information Economy, Data Modeling and Cloud Computing, Nanchang, China, 2023. doi: 10.4108/eai.2-6-2023.2334594.
    [16] BOYAR J and PERALTA R. A small depth-16 circuit for the AES S-box[C]. 27th IFIP TC 11 Information Security and Privacy Conference on Information Security and Privacy Research, Heraklion, Greece, 2012: 287–298. doi: 10.1007/978-3-642-30436-1_24.
    [17] 卜祥利. 抗旁路攻击的紧凑型SM4加解密电路研究与设计[D]. [硕士论文], 南京航空航天大学, 2020. doi: 10.27239/d.cnki.gnhhu.2020.000041.

    BU Xiangli. Research and design of compact SM4 encryption and decryption circuit resisting bypass attack[D]. [Master dissertation], Nanjing University of Aeronautics and Astronautics, 2020. doi: 10.27239/d.cnki.gnhhu.2020.000041.
    [18] ISHAI Y, SAHAI A, and WAGNER D. Private circuits: Securing hardware against probing attacks[C]. 23rd Annual International Cryptology Conference on Advances in Cryptology -- CRYPTO 2003, Santa Barbara, USA, 2003: 463–481. doi: 10.1007/978-3-540-45146-4_27.
    [19] SUSANTI B H, JIMMY J, and ARDYANI M W. ENT randomness test on DM-PRESENT-80 and DM-PRESENT-128-based pseudorandom number generator[C]. 2021 4th International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), Yogyakarta, Indonesia, 2021: 324–328. doi: 10.1109/ISRITI54043.2021.9702862.
    [20] 唐啸霖, 冯燕, 李志强, 等. 针对SM4的选择明文攻击: 线性运算带来的难题与对策[J]. 电子与信息学报, 2025, 47(8): 2791–2799. doi: 10.11999/JEIT250014.

    TANG Xiaolin, FENG Yan, LI Zhiqiang, et al. A chosen-plaintext method on SM4: Linear operation challenges and the countermeasures[J]. Journal of Electronics & Information Technology, 2025, 47(8): 2791–2799. doi: 10.11999/JEIT250014.
    [21] SHARMA A and WEN Shaofang. An evidence-based framework for hardware security evaluation using side-channel analysis: Leakage detection, key-recovery validation, and robustness assessment[J]. Electronics, 2026, 15(18): 4324. doi: 10.3390/electronics15184324.
    [22] SCHNEIDER T and MORADI A. Leakage assessment methodology: A clear roadmap for side-channel evaluations[C]. 17th International Workshop on Cryptographic Hardware and Embedded Systems -- CHES 2015, Saint-Malo, France, 2015: 495–513. doi: 10.1007/978-3-662-48324-4_25.
    [23] Opensource-toolkit. Download of SMIC180 process library resources[DB/OL]. https://gitcode.com/open-source-toolkit/c06a4, 2026.(查阅网上资料,未找到本条文献作者及英文信息,请确认).
    [24] GIGERL B, KLUG F, MANGARD S, et al. Smooth passage with the guards: Second-order hardware masking of the AES with low randomness and low latency[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2024(1): 309–335. doi: 10.46586/tches.v2024.i1.309-335.
  • 加载中
图(14) / 表(2)
计量
  • 文章访问数:  19
  • HTML全文浏览量:  2
  • PDF下载量:  5
  • 被引次数: 0
出版历程
  • 收稿日期:  2026-06-10
  • 修回日期:  2026-11-25
  • 录用日期:  2026-11-27
  • 网络出版日期:  2026-12-05

目录

    /

    返回文章
    返回