留言板

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

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

基于指令扩展的RISC-V可配置故障注入检测方法

刘强 李一可

刘强,李一可. 基于指令扩展的RISC-V可配置故障注入检测方法[J]. 北京航空航天大学学报,2025,51(1):43-52 doi: 10.13700/j.bh.1001-5965.2022.0995
引用本文: 刘强,李一可. 基于指令扩展的RISC-V可配置故障注入检测方法[J]. 北京航空航天大学学报,2025,51(1):43-52 doi: 10.13700/j.bh.1001-5965.2022.0995
LIU Q,LI Y K. Configurable fault injection detection method for RISC-V based on instruction extension[J]. Journal of Beijing University of Aeronautics and Astronautics,2025,51(1):43-52 (in Chinese) doi: 10.13700/j.bh.1001-5965.2022.0995
Citation: LIU Q,LI Y K. Configurable fault injection detection method for RISC-V based on instruction extension[J]. Journal of Beijing University of Aeronautics and Astronautics,2025,51(1):43-52 (in Chinese) doi: 10.13700/j.bh.1001-5965.2022.0995

基于指令扩展的RISC-V可配置故障注入检测方法

doi: 10.13700/j.bh.1001-5965.2022.0995
基金项目: 

国家自然科学基金(61974102) 

详细信息
    通讯作者:

    E-mail:qiangliu@tju.edu.cn

  • 中图分类号: TN407

Configurable fault injection detection method for RISC-V based on instruction extension

Funds: 

National Natural Science Foundation of China (61974102) 

More Information
  • 摘要:

    针对处理器运行时受到故障攻击出现的数据流错误,提出了一种面向RISC-V处理器微架构的模式可配置故障注入检测方法。该方法基于RISC-V指令集架构,利用其可扩展性添加带模式配置的自定义算术逻辑运算指令和控制与状态寄存器,以软硬件结合的方式同时实现算术逻辑运算和故障注入检测。在软件层面,通过写寄存器指令将配置信息写入自定义的控制与状态寄存器,配置自定义指令的故障注入检测模式,包括信息冗余和时间冗余2种故障注入检测模式及其参数;在硬件层面,实现了支持模式可配置故障注入检测方法的RISC-V处理器微架构。采用仿真器命令模拟故障注入,验证扩展后的RISC-V处理器的功能正确性与故障注入检测能力。实验结果表明:当信息冗余模式和时间冗余模式的应用频率相同时,模式可配置方法相较于单信息冗余方法,平均故障检测率提高13.34%,引入4.4%的平均资源开销;相较于单时间冗余方法,降低了8.24%的平均时间开销,故障检测率降低了13.33%。所提模式可配置方法可以实现故障检测率和时间开销的折中,适用于不同安全性和性能需求的应用场景。

     

  • 图 1  RISC-V自定义指令扩展流程

    Figure 1.  Customized instruction extension flow of RISC-V

    图 2  基于信息冗余的故障注入检测方法

    Figure 2.  Fault injection detection method based on information redundancy

    图 3  基于时间冗余的故障注入检测方法

    Figure 3.  Fault injection detection method based on temporal redundancy

    图 4  模式可配置故障注入检测方法示意图

    Figure 4.  Mode configurable fault injection detection method

    图 5  自定义寄存器类型32位整数指令

    Figure 5.  Customized register-type 32-bit integer instruction

    图 6  自定义立即数类型32位整数指令

    Figure 6.  Customized immediate-type 32-bit integer instruction

    图 7  故障注入检测模式可配置RISC-V处理器微架构

    Figure 7.  Microarchitecture of RISC-V processor with configurable fault injection detection mode

    图 8  信息冗余模式实现

    Figure 8.  Information redundancy mode implementation

    图 9  时间冗余模式实现

    Figure 9.  Temporal redundancy mode implementation

    图 10  添加复算控制的取指单元

    Figure 10.  Instruction fetch unit with re-fetch control

    图 11  故障注入模拟测试程序示意图

    Figure 11.  Fault injection simulation test procedure

    图 12  故障注入时序示意图

    Figure 12.  Fault injection timing

    图 13  模拟故障注入实验结果

    Figure 13.  Experimental results of simulated fault injection

    表  1  不同故障注入检测方法时间开销

    Table  1.   Time overhead for different fault injection detection methods

    方法 时间开销/时钟周期数
    User
    PIN 1
    User
    PIN 2
    User
    PIN 3
    User
    PIN 4
    信息冗余 83 128 179 236
    时间冗余(复算单次) 82 142 199 247
    时间冗余(复算双次) 96 159 228 300
    模式可配置(MREPLY = 01) 78 135 186 235
    模式可配置(MREPLY = 10) 86 143 203 263
    模式可配置(MREPLY = 11) 82 145 211 277
    下载: 导出CSV

    表  2  不同故障注入检测方法资源开销

    Table  2.   Resource overhead for different fault injection detection methods

    方法 LUT FF 数字信号
    处理器
    总可编程
    逻辑资源
    zero-riscy处理器 3250 1930 1 5180
    信息冗余(g = 32) 4004 2038 1 6042
    信息冗余(g = 16) 4098 2065 1 6163
    信息冗余(g = 8) 4035 2138 1 6173
    时间冗余(复算单次) 3598 2033 1 5631
    时间冗余(复算双次) 3530 2034 1 5564
    模式可配置(g = 32) 4261 2080 1 6341
    模式可配置(g = 16) 4313 2112 1 6425
    模式可配置(g = 8) 4246 2175 1 6421
    下载: 导出CSV
  • [1] 王省欣, 胡伟, 谭静, 等. AES相关故障注入攻击[J]. 西安电子科技大学学报, 2021, 48(4): 192-199.

    WANG X X, HU W, TAN J, et al. Correlation fault attack on AES[J]. Journal of Xidian University, 2021, 48(4): 192-199(in Chinese).
    [2] TROUCHKINE T, BUKASA S K, ESCOUTELOUP M, et al. Electromagnetic fault injection against a complex CPU, toward new micro-architectural fault models[J]. Journal of Cryptographic Engineering, 2021, 11(4): 353-367. doi: 10.1007/s13389-021-00259-6
    [3] 姜会龙, 朱翔, 李悦, 等. 基于微控制器的AES激光注入攻击研究[J]. 电子与信息学报, 2021, 43(5): 1357-1364. doi: 10.11999/JEIT200163

    JIANG H L, ZHU X, LI Y, et al. Research on laser injection attack for AES based on micro-controller unit[J]. Journal of Electronics & Information Technology, 2021, 43(5): 1357-1364(in Chinese). doi: 10.11999/JEIT200163
    [4] VASSELLE A, THIEBEAULD H, MAOUHOUB Q, et al. Laser-induced fault injection on smartphone bypassing the secure boot[C]//Proceedings of the Workshop on Fault Diagnosis and Tolerance in Cryptography. Piscataway: IEEE Press, 2017: 41-48.
    [5] NASHIMOTO S, SUZUKI D, UENO R, et al. Bypassing isolated execution on RISC-V using side-channel-assisted fault-injection and its countermeasure[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2021, 2022(1): 28-68.
    [6] YUCE B, GHALATY N F, DESHPANDE C, et al. FAME: Fault-attack aware microprocessor extensions for hardware fault detection and software fault response[C]//Proceedings of the Hardware and Architectural Support for Security and Privacy. New York: ACM, 2016: 1-8.
    [7] BREIER J, BHASIN S, HE W. An electromagnetic fault injection sensor using Hogge phase-detector[C]//Proceedings of the 18th International Symposium on Quality Electronic Design. Piscataway: IEEE Press, 2017: 307-312.
    [8] DESHPANDE C, YUCE B, GHALATY N F, et al. A configurable and lightweight timing monitor for fault attack detection[C]//Proceedings of the IEEE Computer Society Annual Symposium on VLSI. Piscataway: IEEE Press, 2016: 461-466.
    [9] 王沛晶, 刘强. 一种混合粒度奇偶校验故障注入检测方法[J]. 北京航空航天大学学报, 2019, 45(4): 821-826.

    WANG P J, LIU Q. Mixed-grain parity-code-based fault detection method against fault injection[J]. Journal of Beijing University of Aeronautics and Astronautics, 2019, 45(4): 821-826(in Chinese).
    [10] MANSSOUR N A, LAPÔTRE V, GOGNIAT G, et al. Processor extensions for hardware instruction replay against fault injection attacks[C]//Proceedings of the 25th International Symposium on Design and Diagnostics of Electronic Circuits and Systems. Piscataway: IEEE Press, 2022: 26-31.

    MANSSOUR N A, LAPÔTRE V, GOGNIAT G, et al. Processor extensions for hardware instruction replay against fault injection attacks[C]//Proceedings of the 25th International Symposium on Design and Diagnostics of Electronic Circuits and Systems. Piscataway: IEEE Press, 2022: 26-31.
    [11] 邓丁, 郭阳. 面向RISC-V内核的标记指令复算与纠错机制的设计[J]. 国防科技大学学报, 2020, 42(6): 90-97.

    DENG D, GUO Y. Recomputation and correction mechanism design for tagged instructions of the RISC-V core[J]. Journal of National University of Defense Technology, 2020, 42(6): 90-97(in Chinese).
    [12] WATERMAN A S. Design of the RISC-V instruction set architecture[D]. Berkeley: University of California, Berkeley, 2016.
    [13] PARHAMI B. Computer arithmetic: Algorithms and hardware designs[M]. New York: Oxford University Press, 2000.
    [14] DESHPANDE C, YUCE B, NAZHANDALI L, et al. Employing dual-complementary flip-flops to detect EMFI attacks[C]//Proceedings of the Asian Hardware Oriented Security and Trust Symposium. Piscataway: IEEE Press, 2017: 109-114.
    [15] NICOLAIDIS M. Carry checking/parity prediction adders and ALUs[J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2003, 11(1): 121-128. doi: 10.1109/TVLSI.2002.800526
    [16] NAHIYAN A, FARAHMANDI F, MISHRA P, et al. Security-aware FSM design flow for identifying and mitigating vulnerabilities to fault attacks[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2019, 38(6): 1003-1016. doi: 10.1109/TCAD.2018.2834396
    [17] DUREUIL L, PETIOT G, POTET M L, et al. FISSC: A fault injection and simulation secure collection[C]//Proceedings of the International Conference on Computer Safety, Reliability, and Security. Berlin: Springer, 2016: 3-11.
  • 加载中
图(13) / 表(2)
计量
  • 文章访问数:  621
  • HTML全文浏览量:  199
  • PDF下载量:  16
  • 被引次数: 0
出版历程
  • 收稿日期:  2022-12-15
  • 录用日期:  2023-02-24
  • 网络出版日期:  2023-03-09
  • 整期出版日期:  2025-01-31

目录

    /

    返回文章
    返回
    常见问答