[go: up one dir, main page]

CN115146265A - Security system - Google Patents

Security system Download PDF

Info

Publication number
CN115146265A
CN115146265A CN202210319845.1A CN202210319845A CN115146265A CN 115146265 A CN115146265 A CN 115146265A CN 202210319845 A CN202210319845 A CN 202210319845A CN 115146265 A CN115146265 A CN 115146265A
Authority
CN
China
Prior art keywords
sensitivity level
fault injection
sensitivity
chip
functional module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210319845.1A
Other languages
Chinese (zh)
Inventor
伊兰·马格利特
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nuvoton Technology Corp
Original Assignee
Nuvoton Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US17/217,472 external-priority patent/US12182260B2/en
Application filed by Nuvoton Technology Corp filed Critical Nuvoton Technology Corp
Publication of CN115146265A publication Critical patent/CN115146265A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Virology (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)
  • Alarm Systems (AREA)
  • Air Bags (AREA)
  • Burglar Alarm Systems (AREA)

Abstract

本发明提供了一种配置在待保护芯片上的安全系统,该系统包括配置在芯片上的故障注入检测子系统,每一故障注入检测子系统具有多个实时可选灵敏度级别且包括部署在芯片上的至少一硬件故障注入检测器电路,及/或与硬件故障注入检测器电路耦接的灵敏度级别控制逻辑,可部署在芯片上且可实时操作以将故障注入检测子系统从多个可选灵敏度级别中的目前灵敏度级别转移到多个可选灵敏度级别中的下一灵敏度级别,例如通过产生灵敏度控制信号(也称为灵敏度级别选择)及/或将灵敏度控制信号发送到故障注入检测子系统中的至少一个硬件故障注入检测器电路。动态地取决于处理器核心的执行流程,控制故障注入对策电路操作以保护处理器免受故障注入攻击。

Figure 202210319845

The present invention provides a security system configured on a chip to be protected, the system includes a fault injection detection subsystem configured on the chip, each fault injection detection subsystem has multiple real-time selectable sensitivity levels and includes At least one hardware fault injection detector circuit, and/or sensitivity level control logic coupled with the hardware fault injection detector circuit, may be deployed on-chip and operable in real-time to switch the fault injection detection subsystem from a plurality of selectable The current sensitivity level of the sensitivity levels is transferred to the next sensitivity level of a plurality of selectable sensitivity levels, such as by generating a sensitivity control signal (also known as sensitivity level selection) and/or sending a sensitivity control signal to the fault injection detection subsystem At least one of the hardware faults is injected into the detector circuit. Dynamically depending on the execution flow of the processor core, the fault injection countermeasure circuit operation is controlled to protect the processor from fault injection attacks.

Figure 202210319845

Description

安全系统security system

技术领域technical field

本发明是有关于装置的安全性,特别是有关于检测故障注入攻击(faultinjection attack)。The present invention is related to device security, and in particular to detecting fault injection attacks.

背景技术Background technique

共同拥有的美国专利9,523,736及其现有技术描述了用于识别故障注入尝试的现有技术方法。Commonly owned US Patent 9,523,736 and its prior art describe prior art methods for identifying fault injection attempts.

灵敏度级别可调节的对抗机制可以是已知的突波检测器(glitch detectors),其已知并描述于例如在以下http www链接中:invia.fr/detectors/voltage-glitch-detector. aspx。这些被描述为具有“可配置的检测临限值”;以及以下https链接:hal.inria.f r/emse-01099006/document以及Josep Balasch、Benedikt Gierlichs与Ingrid Verbau whede所撰写的“An In-depth and Black-box Characterization of theEffects of Cloc k Glitches on 8-bit MCUs”是一份描述故障注入研究的白皮书,可从IEEE获得。Countermeasures with adjustable sensitivity levels may be known glitch detectors, which are known and described for example in the following http www link: invia.fr/detectors/voltage-glitch-detector.aspx. These are described as having "configurable detection thresholds"; and the following https links: hal.inria.f r/emse-01099006/document and "An In-depth and Black-box Characterization of the Effects of Clock Glitches on 8-bit MCUs" is a white paper describing fault injection research, available from IEEE.

Martin S.Kelly等人撰写的“Characterizing a CPU Fault Attack Model viaRu n-Time Data Analysis”是一份描述故障注入研究的白皮书,可从IEEE获得。"Characterizing a CPU Fault Attack Model via Run-Time Data Analysis" by Martin S. Kelly et al. is a white paper describing fault injection research, available from IEEE.

Nicolas Moro等人撰写的“Experimental evaluation of two softwarecountermea sures against fault attacks”是一份用于评估软件对策的白皮书,可从IEEE获得。"Experimental evaluation of two software countermeasures against fault attacks" by Nicolas Moro et al. is a white paper for evaluating software countermeasures, available from IEEE.

Nicolas Moro等人撰写的“Electromagnetic fault injection:towards afault mod el on a 32-bit microcontroller”是一份描述故障注入研究的白皮书,可从IEEE获得。"Electromagnetic fault injection: towards afault mod el on a 32-bit microcontroller" by Nicolas Moro et al. is a white paper describing fault injection research, available from IEEE.

NCC Group于2015年11月发表的“Implementing Practical Electrical Glitching Attacks”中描述了有关突波攻击的最新知识,可通过网际网络存取以下https ww w链接:blackhat.com/docs/eu-15/materials/eu-15-Giller-Implementing-Electrical-Glitc hing-Attacks.pdf。软件中的对策,例如重复的指令,描述于可通过网际网络在以下h ttps链接中:hal-cea.archives-ouvertes.fr/cea-01296572/document所获得的由Thierno Barry、Damien Couroussé以及Bruno Robisson所撰写的“Compilation of aCounterm easure against Instruction-Skip Fault Attacks”以及可通过网际网络于网址为http://eu ler.ecs.umass.edu/research/bpbk-WESS-2010.pdf提取的“Low-CostSoftware Counterme asures Against Fault Attacks:Implementation andPerformances Trade Offs”。The latest knowledge on surge attacks is described in "Implementing Practical Electrical Glitching Attacks" by the NCC Group, November 2015, available on the Internet at the following https www link: blackhat.com/docs/eu-15/materials /eu-15-Giller-Implementing-Electrical-Glitching-Attacks.pdf. Countermeasures in software, such as repeated instructions, are described by Thierno Barry, Damien Couroussé and Bruno Robisson, available via the Internet at the following https link: hal-cea.archives-ouvertes.fr/cea-01296572/document Written "Compilation of aCounterm easure against Instruction-Skip Fault Attacks" and "Low- CostSoftware Counterme asures Against Fault Attacks: Implementation and Performances Trade Offs".

存在基于跟踪CPU的执行流程而运行的身份验证机制,例如共同拥有的美国专 利号9703945。Authentication mechanisms exist that operate based on tracking the execution flow of the CPU, such as commonly owned U.S. Patent No. 9,703,945.

现有技术的图1取自Mike McDonald和Tony Jacobs所撰写的“DLX机器的 基本操作”,可在以下https www链接中获得:cs.umd.edu/class/fall2001/cmsc411/p rojects/DLX/proj.html。Figure 1 of the prior art is taken from "Basic Operation of a DLX Machine" by Mike McDonald and Tony Jacobs, available at the following https www link: cs.umd.edu/class/fall2001/cmsc411/projects/DLX/ proj.html.

这篇文章https://www.nuvoton.com/support/technical-support/technical-articles/TS NuvotonTechBlog-000154/介绍了“运行进程顺序的随机延迟和随机变化”,两者都 会产生不可预测的系统执行时间,作为对抗故障注入攻击的对策。This article https://www.nuvoton.com/support/technical-support/technical-articles/TS NuvotonTechBlog-000154/ describes "random delays and random changes in the order of running processes", both of which produce unpredictable systems Execution time as a countermeasure against fault injection attacks.

一般突波检测器在题为“Glitch detection...”的美国专利9729988B2、https://www.chipestimate.com/log.php?from=%2FInvia%2FVoltage-Glitch-Detector%2Fdatashe et%2Fip%2F30894&logerr=1、https://www.design-reuse.com/sip/glitch-detector-tsmc-n5- ip-48440/以及https://hal.archives-ouvertes.fr/lirmm-01096047/之中有所描述。A generic glitch detector is described in US Patent 9,729,988B2 entitled "Glitch detection...", https://www.chipestimate.com/log.php?id=2 from=%2FInvia%2FVoltage-Glitch-Detector%2Fdatashe et%2Fip%2F30894&logerr=1, https://www.design-reuse.com/sip/glitch-detector-tsmc-n5-ip-48440/ and https://www.design-reuse.com/sip/glitch-detector-tsmc-n5-ip-48440/ It is described in /hal.archives-ouvertes.fr/lirmm-01096047/.

说明书中提及的所有出版物和专利文件的公开内容以及其中直接或间接引用的出版物和专利文件的公开内容均通过引用并入本文。在此并不承认此类出版物和专利 文件对可专利性的重要性。The disclosures of all publications and patent documents mentioned in the specification, as well as the disclosures of publications and patent documents directly or indirectly cited therein, are hereby incorporated by reference. The importance of such publications and patent documents to patentability is not hereby acknowledged.

发明内容SUMMARY OF THE INVENTION

故障注入是一种广泛使用且非常有效(从黑客的角度来看)的技术。某些实施例寻求提供针对故障注入攻击或指令跳过(instruction-skip)故障攻击的改进保护。Fault injection is a widely used and very effective (from a hacker's point of view) technique. Certain embodiments seek to provide improved protection against fault injection attacks or instruction-skip fault attacks.

安全系统的衡量标准是为假阳性(false positive)率(又称误报(false alarm)率) 以及它们提供的安全级别。本发明的某些实施例试图提供一种系统,该系统利用通常在100%的系统操作时间中存在较低安全风险的时段的事实,例如但不限于根据经 验已经观察到不太受黑客攻击的时期,并且存在较高安全风险的时期,例如但不限于 根据经验观察到更易受黑客攻击的时期。然后系统将系统对安全威胁更敏感的时间限 制在第二类时间段内,从而总体上降低系统对误报的感受性,使系统更加安全且同时 不影响相对于将系统设置在100%的时间内对故障注入具有最高灵敏度的可用性和 使用性。Security systems are measured by false positive rates (aka false alarm rates) and the level of security they provide. Certain embodiments of the present invention seek to provide a system that takes advantage of the fact that typically 100% of the system's operating time is during periods of lower security risk, such as, but not limited to, those that have been empirically observed to be less vulnerable to hacking periods, and periods of higher security risk, such as, but not limited to, periods when greater vulnerability to hacking has been observed empirically. The system then limits the times when the system is more sensitive to security threats to the second type of time period, thereby reducing the system's overall susceptibility to false positives, making the system more secure and at the same time not affecting the time relative to setting the system at 100% Availability and usability with the highest sensitivity to fault injection.

某些实施例寻求提供一种具有动态的例如实时操作的灵敏度级别的实时调整且具有比由故障注入检测器保护的CPU的单个指令的解码-执行 (decode-through-execution)周期更短的响应时间的错误注入检测器。通常,检测是 连续的,而不是间隔的。Certain embodiments seek to provide a real-time adjustment of sensitivity levels with dynamic, eg, real-time operation, and with a response that is shorter than the decode-through-execution cycle of a single instruction of a CPU protected by a fault injection detector. Time error injection detector. Typically, detections are continuous, not intermittent.

根据芯片状态而打开以及关闭对策,例如取决于芯片是处于活动状态还是处于睡眠状态,在本领域中可能已知也可能未知。在此显示和描述的某些实施例寻求实时调 整灵敏度级别,以便微调装置中提供攻击保护以及以一些误报为代价的固有的权衡。 通常,对策的控制是以单个操作码的分辨率提供,例如因为可以在检测到第一个操作 码时提供可能是低灵敏度级别的第一个灵敏度级别,产生提供较低级别的检测并遭受 较低级别的误报的第一个权衡,而可能是在检测到紧随第一个操作码之后即将到来的 第二个操作码时提供可能是更高的灵敏度级别的第二个灵敏度级别,产生提供更高级 别的检测以及以更高级别的误报为代价的第二个权衡。Turning countermeasures on and off depending on the chip state, eg depending on whether the chip is active or sleeping, may or may not be known in the art. Certain embodiments shown and described herein seek to adjust sensitivity levels in real-time in order to provide protection against attacks in fine-tuned devices as well as the inherent trade-off at the cost of some false positives. Often, control of countermeasures is provided at the resolution of a single opcode, for example because a first sensitivity level, which may be a low sensitivity level, can be provided when the first opcode is detected, resulting in a detection that provides a lower level and suffers from a higher level of sensitivity. The first trade-off for a low level of false positives, while possibly providing a second sensitivity level that may be a higher sensitivity level upon detection of a second opcode imminent after the first opcode, yields Provides a higher level of detection and a second trade-off at the expense of a higher level of false positives.

本发明的某些实施例寻求提供一种安全系统及/或方法及/或电脑程序产品,其根据CPU的执行流程动态地控制故障注入对策电路以保护CPU免受故障注入攻击。例 如,可以提供CPU或处理器核心,在其使用时实时生成将将要执行的至少一个条件分 支的输出指示。通常,如果至少有一条指令除了一个条件分支即将被处理器核心执行, 响应于将要执行的条件分支的输出指示,灵敏度级别配置模块可操作以选择下一个灵 敏度级别,该灵敏度级别高于灵敏度级别配置模块所选择的至少一个灵敏度级别。Certain embodiments of the present invention seek to provide a security system and/or method and/or computer program product that dynamically controls a fault injection countermeasure circuit according to the execution flow of the CPU to protect the CPU from fault injection attacks. For example, a CPU or processor core may be provided which, when in use, generates in real-time an output indication of at least one conditional branch to be executed. Generally, the sensitivity level configuration module is operable to select the next sensitivity level higher than the sensitivity level configuration in response to the output indication of the conditional branch to be executed if at least one instruction other than a conditional branch is to be executed by the processor core At least one sensitivity level selected by the module.

还至少提供了以下实施例:At least the following embodiments are also provided:

实施例1.一种安全系统,根据处理器核心的执行流程动态地控制故障注入对策电路,以保护处理器核心免受故障注入攻击,该系统包括:Embodiment 1. A security system that dynamically controls a fault injection countermeasure circuit according to an execution flow of a processor core to protect the processor core from fault injection attacks, the system comprising:

i.处理器核心在使用时执行指令并同时实时生成至少一些将要执行的指令的输出指示;i. The processor core executes instructions when in use and simultaneously generates in real-time output indications of at least some of the instructions to be executed;

ii.具有多个可选灵敏度级别的故障注入检测器;以及ii. Fault injection detectors with multiple selectable sensitivity levels; and

iii.灵敏度级别控制模块实时运行,iii. The sensitivity level control module operates in real time,

以接收输出指示,to receive output indications,

使用至少接收输出指示作为输入的灵敏度级别选择逻辑从多个可选灵敏度级别中选择下一个灵敏度级别,并且selects the next sensitivity level from a plurality of selectable sensitivity levels using sensitivity level selection logic that receives at least an output indication as input, and

将故障注入检测器设置为下一个灵敏度级别,Set the fault injection detector to the next sensitivity level,

从而提供差异敏感的故障注入对策电路,当保护处理器核心免受故障注入攻击时,取决于至少一些指令的输出指示,避免如果处理器核心保护被提供为与至少一些 指令的输出指示无关的灵敏度级别时所导致的至少一个误报。Thereby a differential sensitive fault injection countermeasure circuit is provided that, when protecting processor cores from fault injection attacks, depends on the output indications of at least some instructions, avoiding if processor core protection is provided as sensitive independent of the output indications of at least some instructions at least one false positive caused by the level.

实施例2.根据前述实施例中任一项所述的系统,其中当上述灵敏度级别控制模块接收到与风险级别R相关联的单个指令的输出指示时,上述灵敏度级别控制模块响 应地选择下一个灵敏度级别,其中上述下一个灵敏度级别高于与具有风险级别低于 R相关的至少一个指令的灵敏度级别。Embodiment 2. The system of any one of the preceding embodiments, wherein the sensitivity level control module responsively selects the next A sensitivity level, where the next sensitivity level above is higher than the sensitivity level of at least one instruction associated with having a risk level lower than R.

实施例3.根据前述实施例中任一项所述的系统,其中当上述灵敏度级别控制模块接收到确定从中断处理程序返回的处理器核心的个别指令的输出指示时,上述灵敏 度级别控制模块响应地选择下一个灵敏度级别,上述下一灵敏度级别为高于上述个别 指令之外的至少一个指令所选择的灵敏度级别。Embodiment 3. The system of any one of the preceding embodiments, wherein the sensitivity level control module responds when the sensitivity level control module receives an output indication that determines an individual instruction of the processor core returned from the interrupt handler to select the next sensitivity level, which is higher than the sensitivity level selected by at least one command other than the individual command.

通常,当CPU执行完if语句时,除非即将到来的操作码表明即将由处理器核 心执行的即将到来的指令是另一个条件分支或灵敏度级别配置模块会选择高灵敏度 级别的其他操作码,灵敏度恢复到较低级别。通常,输出指示用以指示目前处理器核 心将要执行什么以及由灵敏度级别配置模块需相应地设置的灵敏度级别的信号。当下 一个或即将到来的操作码的输出指示出现时,灵敏度级别将再次相应的调整,因此可 保持不变或有所改变,这取决于后面来的操作码是否与前一个操作码相同(或在逻辑 上对应,以灵敏度级别而言恰好与对应于前一个操作码的灵敏度级别相同)。Typically, when the CPU finishes executing the if statement, unless the upcoming opcode indicates that the upcoming instruction to be executed by the processor core is another conditional branch or the sensitivity level configuration module selects another opcode with a high sensitivity level, sensitivity resumes to a lower level. Typically, a signal is output indicating what the processor core is currently about to execute and the sensitivity level to be set accordingly by the sensitivity level configuration module. When the output indication of the next or upcoming opcode appears, the sensitivity level will again be adjusted accordingly, so it can remain the same or change, depending on whether the following opcode is the same as the previous one (or in logically corresponds, in terms of sensitivity level, which is exactly the same as the sensitivity level corresponding to the previous opcode).

实施例4.根据前述实施例中任一项所述的系统,其中当灵敏度级别控制模块接收到确定例程返回位址的个别指令的输出指示时,灵敏度级别控制模块响应地选择的 下一个灵敏度级别是高于为除个别指令之外的至少一项指令所选择的灵敏度级别。Embodiment 4. The system of any preceding embodiment, wherein the sensitivity level control module responsively selects the next sensitivity The level is higher than the sensitivity level selected for at least one command other than the individual command.

实施例5.根据前述实施例中任一项所述的系统,其中当上述灵敏度级别控制模块接收到确定循环的停止条件的个别指令的输出指示时,上述灵敏度级别控制模块响 应地选择之下一个灵敏度级别是高于为除个别指令之外的至少一个指令所选择的灵 敏度级别。Embodiment 5. The system of any one of the preceding embodiments, wherein the sensitivity level control module responsively selects the next The sensitivity level is higher than the sensitivity level selected for at least one command other than the individual command.

实施例6.根据前述实施例中任一项所述的系统,其中当上述灵敏度级别控制模块接收到确定处理器核心执行模式改变的个别指令的输出指示时,上述灵敏度级别控 制模块响应地选择之下一个灵敏度级别是高于为个别指令之外的至少一个指令所选 择的灵敏度级别。Embodiment 6. The system of any one of the preceding embodiments, wherein the sensitivity level control module responsively selects an output indication of an individual instruction that determines a change in execution mode of the processor core when the sensitivity level control module receives an output indication. The next sensitivity level is higher than the sensitivity level selected for at least one command other than the individual command.

例如,执行模式更改可以包括在特权模式(其中程序代码有权访问某些限制资源(例如某些存储器区域、某些硬件功能或其他特定资源))以及非特权模式(其中程 序代码无权存取限制资源)之间进行更改。For example, execution mode changes may include in privileged mode (in which program code has access to certain restricted resources (eg, certain memory regions, certain hardware functions, or other specific resources)) and unprivileged mode (in which program code does not have access to certain resources) limit resources).

实施例7.根据前述实施例中任一项所述的系统,其中当灵敏度级别控制模块接收从存储器读取数据的个别指令的输出指示时,灵敏度级别控制模块响应地选择之下 一个灵敏度级别是低于为个别指令之外的至少一指令所选择的灵敏度级别。Embodiment 7. The system of any preceding embodiment, wherein when the sensitivity level control module receives an output indication of an individual instruction to read data from memory, the sensitivity level control module responsively selects the next sensitivity level to be Below the sensitivity level selected for at least one command other than the individual command.

实施例8.根据前述实施例中任一项所述的系统,其中处理器核心包括存储器, 并且当灵敏度级别控制模块接收到从存储器将数据读入本地储存装置(例如快取存储 器或暂存器)的个别指令的输出指示时,灵敏度级别控制模块响应地选择之下一个灵 敏度级别是低于为个别指令之外的至少一个指令选择的灵敏度级别。Embodiment 8. The system of any of the preceding embodiments, wherein the processor core includes a memory, and when the sensitivity level control module receives data from the memory to read the data into a local storage device (eg, a cache or scratchpad) ), the sensitivity level control module responsively selects the next sensitivity level to be lower than the sensitivity level selected for at least one command other than the individual command when the output of the individual command is indicated.

实施例9.根据前述实施例中任一项所述的系统,其中当灵敏度级别控制模块接收到包括条件分支的个别指令的输出指示时,灵敏度级别控制模块响应地选择之下一 个灵敏度级别是高于为个别指令之外的至少一项指令所选择的灵敏度级别。Embodiment 9. The system of any preceding embodiment, wherein when the sensitivity level control module receives an output indication of an individual instruction that includes a conditional branch, the sensitivity level control module responsively selects that the next sensitivity level is high On the sensitivity level selected for at least one command other than the individual command.

应当理解的是,因为条件分支对于在给定程序代码中寻找有价值目标以进行攻击的黑客来说可能是有吸引力的目标,因此条件分支可与高风险级别相关联。例如,由 于该分支可能会将程序代码流导到授予终端用户机密信息的第一个选项,或者将其导 到认为终端用户不被认证的第二个选项而不提供秘密信息,因此条件分支对于黑客来 说可能是一个有吸引力的目标。It should be appreciated that because conditional branches may be attractive targets for hackers looking for valuable targets to attack in a given program code, conditional branches may be associated with a high level of risk. For example, since the branch might lead the program code flow to the first option that grants the end-user secret, or to the second option that assumes the end-user is not authenticated without providing the secret, the conditional branch is very important for Could be an attractive target for hackers.

实施例10.根据前述实施例中任一项所述的系统,其中当处理器核心将要执行 指令I时,产生与指令I有关的至少一个输出指示,从而在指令I被执行之前提供 指令I将被执行的输出指示。Embodiment 10. The system of any one of the preceding embodiments, wherein when the processor core is about to execute instruction 1, at least one output indication related to instruction 1 is generated, thereby providing that instruction 1 will be executed before instruction 1 is executed. The output indication being executed.

实施例11.根据前述实施例中任一项所述的系统,其中处理器核心包括适配的 解码逻辑,该解码逻辑至少一次解码从程序存储器中所提取的个别指令,从而导出至 少一个CPU内部信号,该信号随后操作CPU的至少一个单元从而执行个别指令,其 中解码逻辑还适用于在至少一个单元响应于从程序存储器中提取的个别指令导出的 至少一个CPU内部信号而进行操作之前,提供个别指令的输出指示,从而允许在个别 指令执行之前,而非之后,将故障注入检测器设置为下一灵敏度级别。Embodiment 11. The system of any of the preceding embodiments, wherein the processor core includes adapted decoding logic that decodes individual instructions fetched from program memory at least once to derive at least one CPU internal signal that subsequently operates at least one unit of the CPU to execute the individual instruction, wherein the decoding logic is further adapted to provide the individual instruction prior to operation of the at least one unit in response to the at least one CPU internal signal derived from the individual instruction fetched from the program memory The output of the instruction indicates, allowing the fault injection detector to be set to the next sensitivity level before, rather than after, the execution of the individual instruction.

实施例12.根据前述实施例中任一项所述的系统,其中处理器核心对操作码进行解码从而产生包括到处理器核心的执行单元的指令的信号以及包括从处理器核心输 出的信号的输出指示,从处理器核心输出的信号指示自操作码解码的指令,从而向灵 敏度级别选择逻辑提供处理器核心尚未执行的指令的预览。Embodiment 12. The system of any of the preceding embodiments, wherein the processor core decodes the opcodes to generate signals including instructions to execution units of the processor core and signals including signals output from the processor core. The output indication, the signal output from the processor core, is indicative of the instruction decoded from the opcode, thereby providing the sensitivity level selection logic with a preview of the instruction not yet executed by the processor core.

实施例13.根据前述实施例中任一项所述的系统,其中从处理器核心输出的信号包括从操作码解码的指令。Embodiment 13. The system of any preceding embodiment, wherein the signal output from the processor core comprises an instruction decoded from an opcode.

实施例14.根据前述实施例中任一个的系统,其中故障注入检测器包括具有分别对应于多个灵敏度级别的多个调整选项的模拟电路(analog circuit)。Embodiment 14. The system of any of the preceding embodiments, wherein the fault injection detector includes an analog circuit having a plurality of adjustment options corresponding to a plurality of sensitivity levels, respectively.

实施例15.根据前述实施例中任一项所述的系统,其中处理器核心包括适配的 解码逻辑,该解码逻辑至少一次解码从程序存储器中提取的个别指令,从而导出至少 一个CPU内部信号,该信号随后操作至少一个单元CPU从而执行个别指令,其中对 于由解码逻辑解码的所有指令,解码逻辑还用于在至少一个单元响应于从程序存储器 中提取的个别指令所导出的上述至少一个CPU内部信号之前提供操作个别指令的输 出指示,从而在执行灵敏度级别逻辑用以选择特定灵敏度级别的指令之前,而不是之 后,确保故障注入检测器始终设置为每个特定灵敏度级别。Embodiment 15. The system of any of the preceding embodiments, wherein the processor core includes adapted decode logic that decodes individual instructions fetched from program memory at least once to derive at least one CPU internal signal , this signal then operates at least one unit CPU to execute the individual instructions, wherein for all instructions decoded by the decode logic, the decode logic is also used in the at least one unit in response to the individual instructions fetched from the program memory. Internal signals are preceded to provide output indications to operate individual instructions, ensuring that the fault injection detector is always set to each specific sensitivity level before, rather than after, the instruction that executes the sensitivity level logic to select the specific sensitivity level.

实施例16.一种安全方法,根据处理器核心执行流程动态地控制故障注入对策电路,以保护处理器核心免受故障注入攻击,该方法包括:Embodiment 16. A security method for dynamically controlling a fault injection countermeasure circuit according to a processor core execution flow to protect the processor core from fault injection attacks, the method comprising:

i.提供处理器核心,在使用时,该处理器核心执行指令并同时实时产生至少一些将要执行的指令的输出指示;i. Provide a processor core that, when in use, executes instructions and simultaneously generates in real-time output indications of at least some of the instructions to be executed;

ii.提供具有多个可控灵敏度级别的故障注入检测器;以及ii. Provide fault injection detectors with multiple controllable sensitivity levels; and

iii.实时地使用灵敏度级别控制模块,iii. use the sensitivity level control module in real time,

接收输出指示,receive output indication,

使用至少接收输出指示作为输入的灵敏度级别选择逻辑从多个可控灵敏度级别中选择下一灵敏度级别,并且selects a next sensitivity level from a plurality of controllable sensitivity levels using sensitivity level selection logic that receives at least an output indication as input, and

将故障注入检测器设置为下一个灵敏度级别,Set the fault injection detector to the next sensitivity level,

从而当保护处理器核心免受故障注入攻击时,取决于至少一些指令的输出指示,提供差异敏感的故障注入对策电路,以避免如果CPU被保护的灵敏度级别与至少一些 指令的输出指示无关所导致的至少一个误报。Thus, when protecting the processor core from fault injection attacks, depending on the output indications of at least some instructions, a differential sensitive fault injection countermeasure circuit is provided to avoid problems if the CPU is protected at a sensitivity level that is independent of the output indications of at least some instructions. of at least one false positive.

实施例17.根据前述实施例中的任一个的系统并且还包括故障注入改善电路,故障注入改善电路用以响应于检测器对故障注入的检测而执行至少一个故障注入改善 操作。Embodiment 17. The system of any of the preceding embodiments and further comprising a fault injection amelioration circuit to perform at least one fault injection amelioration operation in response to detection of the fault injection by the detector.

实施例18.根据前述实施例中任一项所述的方法,其中处理器核心包括适配的解码逻辑,该解码逻辑至少一次解码从程序存储器中所提取的个别指令,从而导出至少 一个CPU内部信号,该信号随后操作CPU的至少一个单元从而执行个别指令,其中 在至少一个单元响应于从程序存储器中提取的个别指令而导出的至少一个CPU内部 信而进行号操作之前,解码逻辑还用于提供该个别指令的输出指示,从而在个别指令 执行之前,而非之后,允许将故障注入检测器设置为下一个灵敏度级别。Embodiment 18. The method of any of the preceding embodiments, wherein the processor core includes adapted decoding logic that decodes individual instructions fetched from program memory at least once to derive at least one CPU internal Signals that subsequently operate at least one unit of the CPU to execute individual instructions, wherein the decoding logic is also used to perform signal operations before at least one unit performs signal operations in response to at least one CPU internal signal derived from the individual instructions fetched from program memory An output indication of the individual instruction is provided, allowing the fault injection detector to be set to the next sensitivity level before, rather than after, execution of the individual instruction.

实施例19.根据前述实施例中任一项所述的方法,其中上述处理器核心通过使用组合逻辑来解码操作码,从而产生包括至处理器核心的执行单元的指令的信号以及包 括从处理器核心导出用以指示从操作码中解码的指令的信号的输出指示,从而向灵敏 度级别选择逻辑提供处理器核心尚未执行的指令的预览。Embodiment 19. The method of any one of the preceding embodiments, wherein the processor core decodes the opcodes using combinatorial logic to generate signals comprising instructions to execution units of the processor core and signals from the processor core. The core derives an output indication of a signal indicative of an instruction decoded from the opcode, thereby providing the sensitivity level selection logic with a preview of the instruction not yet executed by the processor core.

实施例20.根据前述实施例中任一项所述的系统,其中处理器核心包括执行管线,该执行管线包括具有至少一重叠阶段的多个连续指令,其中灵敏度级别选择逻辑 根据独立地与多个灵敏度级别中的最高故障检测灵敏度级别相关联的至少一个指令 I,向故障注入检测器提供用于选择灵敏度级别的指示。Embodiment 20. The system of any one of the preceding embodiments, wherein the processor core includes an execution pipeline including a plurality of sequential instructions having at least one overlapping stage, wherein the sensitivity level selection logic is based on an independent At least one instruction I, associated with the highest fault detection sensitivity level of the sensitivity levels, provides an indication to the fault injection detector for selecting the sensitivity level.

重叠阶段可以包括解码阶段及/或执行阶段。Overlapping stages may include decoding stages and/or execution stages.

实施例21.根据前述实施例中任一项所述的系统,其中由于最高检测灵敏度级别是设置在指令I解码后立即开始,仅在指令I完全执行后结束,而不管其他正在解 码的指令以及其他将要执行的指令,因此上述至少一个指令I一旦被解码,优先于所 有其他被解码的指令并且优先于所有其他将被执行的指令。Embodiment 21. The system of any one of the preceding embodiments, wherein since the highest detection sensitivity level is set to begin immediately after instruction 1 is decoded, it ends only after instruction 1 is fully executed, regardless of other instructions being decoded and Other instructions to be executed, so the at least one instruction I above, once decoded, takes precedence over all other instructions that are decoded and takes precedence over all other instructions to be executed.

实施例22.根据前述实施例中任一个的系统,其中处理器核心输出指示包括将要执行哪个操作码的输出指示。Embodiment 22. The system of any of the preceding embodiments, wherein the processor core output indication comprises an output indication of which opcode is to be executed.

实施例23.根据前述实施例中任一项所述的系统,其中上述故障注入检测器可操作以保护CPU免受故障注入攻击,CPU的个别指令的解码-执行周期是为T个时间单 位长,并且其中故障注入检测器具有比T短的响应时间。Embodiment 23. The system of any one of the preceding embodiments, wherein the fault injection detector described above is operable to protect the CPU from fault injection attacks, the decode-execution cycle of individual instructions of the CPU being T time units long , and where the fault injection detector has a response time shorter than T.

实施例24.根据前述实施例中任一个的系统,其中故障注入检测器包括分别部署在多个处理器核心位置的多个故障注入检测器单元,从而检测在所有多个位置处的故 障注入攻击。Embodiment 24. The system of any of the preceding embodiments, wherein the fault injection detector comprises a plurality of fault injection detector units deployed at a plurality of processor core locations, respectively, to detect fault injection attacks at all of the plurality of locations .

实施例25.根据前述实施例中任一项所述的系统,其中如果部署在位置L处的检测器单元中的至少一个检测到位置L处的故障注入攻击,则故障注入检测器发出警报。Embodiment 25. The system of any preceding embodiment, wherein the fault injection detector sounds an alarm if at least one of the detector units deployed at location L detects a fault injection attack at location L.

实施例101.一种安全系统,配置为部署在待保护的芯片上,该系统包括:Embodiment 101. A security system configured to be deployed on a chip to be protected, the system comprising:

至少一个故障注入检测子系统部署在芯片上,每个故障注入检测子系统具有多个实时可选的灵敏度级别,包括:At least one fault injection detection subsystem is deployed on the chip, each fault injection detection subsystem has multiple real-time selectable sensitivity levels, including:

至少一个硬件故障注入检测器电路,部署在芯片上,at least one hardware fault injection detector circuit, deployed on the chip,

并且,与硬件故障注入检测器电路耦接的灵敏度级别控制逻辑,被部署在芯片上并实时操作通过生成灵敏度控制信号(又称为灵敏度级别选择)且将灵敏度控制信号 发送到故障注入检测子系统中的至少一个硬件故障注入检测器电路,以将故障注入检 测子系统从多个可选灵敏度级别中的目前灵敏度级别转换到多个可选灵敏度级别中 的下一个灵敏度级别。Also, sensitivity level control logic coupled to the hardware fault injection detector circuit is deployed on the chip and operates in real time by generating sensitivity control signals (aka sensitivity level selection) and sending the sensitivity control signals to the fault injection detection subsystem at least one hardware fault injection detector circuit in the fault injection detection subsystem to transition the fault injection detection subsystem from a current sensitivity level of the plurality of selectable sensitivity levels to a next sensitivity level of the plurality of selectable sensitivity levels.

故障注入检测子系统可以包括被配置用于故障注入攻击检测的任何逻辑,通常包括实时识别篡改芯片电路的尝试,并且实时警告该尝试作为响应。检测器的位置通常 表示最有可能受到攻击的芯片电路的位置,并且检测器的性质通常表示攻击的类型, 例如突波(glitch)、温度或其他。The fault injection detection subsystem may include any logic configured for fault injection attack detection, typically including identifying, in real-time, an attempt to tamper with a chip circuit, and warning of the attempt in real-time in response. The location of the detector generally indicates the location of the chip circuitry most likely to be attacked, and the nature of the detector generally indicates the type of attack, such as glitch, temperature, or others.

实施例102.根据前述实施例中任一项所述的系统,并且其中上述至少一个故障注入检测子系统还包括至少一个功能模块,上述功能模块被配置为部署在芯片上,用 以实时产生输出信号,并发送输出信号到灵敏度级别控制逻辑,从而为灵敏度级别控 制逻辑提供关于要从多个可选灵敏度级别中选择的下一个灵敏度级别的指示。Embodiment 102. The system of any one of the preceding embodiments, and wherein the at least one fault injection detection subsystem further comprises at least one functional module configured to be deployed on a chip to generate output in real time signal, and sends an output signal to the sensitivity level control logic, thereby providing the sensitivity level control logic with an indication of the next sensitivity level to select from among a plurality of selectable sensitivity levels.

实施例103.根据前述实施例中任一项所述的系统,其中上述至少一个功能模块可操作以产生至少一个输出信号并将其发送到灵敏度级别控制逻辑,上述至少一个输 出信号包括状态指示,上述状态指示用以指示功能模块是否是活动的,并且其中灵敏 度级别控制逻辑至少部分地根据状态指示来选择下一个级别。Embodiment 103. The system of any preceding embodiment, wherein said at least one functional module is operable to generate and send at least one output signal to sensitivity level control logic, said at least one output signal comprising a status indication, The above status indication is used to indicate whether the functional module is active, and wherein the sensitivity level control logic selects the next level based at least in part on the status indication.

实施例104.根据前述实施例中任一项所述的系统,其中上述逻辑灵敏度级别控制逻辑至少一次响应于多个功能模块中的至少一个别功能模块变得活跃,而选择更高 的下一灵敏度级别。Embodiment 104. The system of any one of the preceding embodiments, wherein the logic sensitivity level control logic selects a next higher next function at least once in response to at least one individual function module of the plurality of function modules becoming active. Sensitivity level.

实施例105.根据前述实施例中任一项所述的系统,其中上述至少一个输出信号表示与上述至少一功能模块的目前活动相关联的风险级别,其中上述灵敏度级别控制 逻辑至少部分地自上述风险级别导出灵敏度级别而作为下一灵敏度级别。Embodiment 105. The system of any preceding embodiment, wherein the at least one output signal represents a risk level associated with the current activity of the at least one functional module, wherein the sensitivity level control logic is derived at least in part from the The risk level derives the sensitivity level as the next sensitivity level.

实施例106.根据前述实施例中任一项所述的系统,其中如果功能模块是活动的且具有第一风险级别,则灵敏度级别控制逻辑选择第一灵敏度级别作为下一灵敏度级 别,如果功能模块处于活动状态并具有低于第一级风险的第二级风险,则灵敏度级别 控制逻辑选择第二灵敏度级别作为下一灵敏度级别,如果功能模块处于不活动状态, 则灵敏度级别控制逻辑选择第三灵敏度级别作为下一个灵敏度级别。Embodiment 106. The system of any preceding embodiment, wherein if the functional module is active and has a first risk level, the sensitivity level control logic selects the first sensitivity level as the next sensitivity level, if the functional module is active and has a second level of risk lower than the first level of risk, the sensitivity level control logic selects the second sensitivity level as the next sensitivity level, and if the functional module is inactive, the sensitivity level control logic selects the third sensitivity level level as the next sensitivity level.

实施例107.根据前述实施例中任一项所述的系统,其中上述芯片具有多个可能的功率状态,功率状态包括至少一闲置状态和至少一唤醒状态,并且其中上述灵敏度 级别控制逻辑响应于芯片的新状态而选择下一个灵敏度级别,芯片的新状态包括多个 可能状态的一者。Embodiment 107. The system of any preceding embodiment, wherein the chip has a plurality of possible power states, the power states including at least one idle state and at least one awake state, and wherein the sensitivity level control logic is responsive to The next sensitivity level is selected based on the new state of the chip, which includes one of a number of possible states.

实施例108.根据前述实施例中任一项所述的系统,其中功能模块包括固件(firmware),固件用以触发可能的功率状态之间的转变,从而使灵敏度级别控制逻 辑知道目前状态。Embodiment 108. The system of any of the preceding embodiments, wherein the functional module includes firmware to trigger transitions between possible power states so that the sensitivity level control logic is aware of the current state.

实施例109.根据前述实施例中任一项所述的系统,其中在芯片的功率状态转变到新状态之前,选择下一灵敏度级别。Embodiment 109. The system of any preceding embodiment, wherein the next sensitivity level is selected before the power state of the chip transitions to the new state.

实施例110.根据前述实施例中任一项所述的系统,其中在芯片的功率状态转变到新状态之前,将检测器设置为下一灵敏度级别。Embodiment 110. The system of any preceding embodiment, wherein the detector is set to the next sensitivity level before the power state of the chip transitions to the new state.

实施例111.根据前述实施例中任一项所述的系统,其中在芯片的功率状态已经转变到新状态之后,选择下一灵敏度级别。Embodiment 111. The system of any preceding embodiment, wherein the next sensitivity level is selected after the power state of the chip has transitioned to the new state.

实施例112.根据前述实施例中任一项所述的系统,其中在芯片的功率状态已经转变到新状态之后,将硬件故障注入检测器电路设置为下一灵敏度级别。Embodiment 112. The system of any preceding embodiment, wherein the hardware fault injection detector circuit is set to the next sensitivity level after the power state of the chip has transitioned to the new state.

实施例113.根据前述实施例中任一项所述的系统,其中上述系统被部署于待保护的芯片上。Embodiment 113. The system of any preceding embodiment, wherein the system is deployed on a chip to be protected.

实施例114.根据前述实施例中任一项所述的系统,其中上述至少一个故障注入检测子系统包括多个故障注入检测子系统,每个故障注入检测子系统被配置为部署在 芯片上并且每个故障注入检测子系统包括硬件故障注入检测器电路以及与故障注入 检测子系统耦合的灵敏度级别控制逻辑。Embodiment 114. The system of any preceding embodiment, wherein the at least one fault injection detection subsystem comprises a plurality of fault injection detection subsystems, each fault injection detection subsystem configured to be deployed on a chip and Each fault injection detection subsystem includes a hardware fault injection detector circuit and sensitivity level control logic coupled with the fault injection detection subsystem.

实施例115.根据前述实施例中任一项所述的系统,其中上述系统部署在要保护的芯片上,其中上述至少一个功能模块至少包括第一功能模块以及第二功能模块,并 且其中上述多个故障注入检测子系统包括第一故障注入检测子系统以及第二故障注 入检测子系统,用以分别保护第一功能模块以及第二功能模块,其中第一模块比第二 模块更靠近第一故障注入检测子系统,第二模块比第一模块更靠近第二故障注入检测 子系统。Embodiment 115. The system of any one of the preceding embodiments, wherein the system is deployed on a chip to be protected, wherein the at least one functional module includes at least a first functional module and a second functional module, and wherein the multiple Each fault injection detection subsystem includes a first fault injection detection subsystem and a second fault injection detection subsystem for protecting the first functional module and the second functional module respectively, wherein the first module is closer to the first fault than the second module An injection detection subsystem, the second module is closer to the second fault injection detection subsystem than the first module.

实施例116.根据前述实施例中任一项所述的系统,并且其中多个故障注入检测子系统中的至少一故障注入检测子系统S保护芯片上的至少一个功能模块,其中多个 故障注入检测子系统的每一者的相应硬件故障注入检测器电路具有由受硬件故障注 入检测器电路保护的至少一功能模块所实时选择的灵敏度级别。Embodiment 116. The system of any preceding embodiment, and wherein at least one fault injection detection subsystem S of the plurality of fault injection detection subsystems protects at least one functional module on a chip, wherein the plurality of fault injection detection subsystems The respective hardware fault injection detector circuit of each of the detection subsystems has a sensitivity level selected in real time by at least one functional module protected by the hardware fault injection detector circuit.

实施例117.根据前述实施例中任一项所述的系统,并且其中每个硬件故障注入检测器电路具有多个实时可选择的灵敏度级别。Embodiment 117. The system of any of the preceding Embodiments, and wherein each hardware fault injection detector circuit has a plurality of sensitivity levels selectable in real time.

实施例118.根据前述实施例中任一项所述的系统,并且其中故障注入检测子系统包括多个硬件故障注入检测器电路,并且其中故障注入检测子系统在时间点t的灵 敏度级别被实现为多个硬件故障注入检测器电路中的一数量的硬件故障注入检测器 电路在时间点t被致能(enable),其中灵敏度级别控制逻辑确定在时间点t致能多个硬 件故障注入检测器电路中的多少个,从而提供具有实时可配置灵敏度级别的对策,因 而通过较少数量的致能的硬件故障注入检测器电路实现较低的灵敏度级别,更高的灵 敏度级别是通过更多的致能的硬件故障注入检测器电路所实现。Embodiment 118. The system of any preceding embodiment, and wherein the fault injection detection subsystem includes a plurality of hardware fault injection detector circuits, and wherein the fault injection detection subsystem is implemented at a sensitivity level at time point t enabling a number of hardware fault injection detector circuits for a plurality of hardware fault injection detector circuits at time point t, wherein the sensitivity level control logic determines to enable the plurality of hardware fault injection detector circuits at time point t how many in the circuit, thus providing countermeasures with real-time configurable sensitivity levels, thus lower sensitivity levels are achieved by a smaller number of enabled hardware fault injection detector circuits, and higher sensitivity levels are achieved by more The hardware fault injection detector circuit can be implemented.

实施例119.根据前述实施例中任一项所述的系统,其中上述至少一功能模块包括多个功能模块,并且其中上述灵敏度级别控制逻辑通过组合来自每个功能模块的输 出指示而导出将被选为下一灵敏度级别的灵敏度级别,并组成一组灵敏度控制信号。Embodiment 119. The system of any preceding embodiment, wherein the at least one functional module includes a plurality of functional modules, and wherein the sensitivity level control logic derives by combining output indications from each functional module to be The sensitivity level selected as the next sensitivity level and forms a set of sensitivity control signals.

实施例120.根据前述实施例中任一项所述的系统,其中上述灵敏度级别控制逻辑至少一次响应于至少个别功能模块变得不活动而将灵敏度级别释放到低于更高的 下一灵敏度级别。Embodiment 120. The system of any of the preceding embodiments, wherein the sensitivity level control logic releases the sensitivity level to a next higher sensitivity level lower than at least once in response to at least an individual functional module becoming inactive .

实施例121.根据前述实施例中任一项所述的系统,其中上述功能模块包括与高风险级别相关联的加密模块。Embodiment 121. The system of any one of the preceding embodiments, wherein the functional module includes an encryption module associated with a high risk level.

可以理解的是,如果需要,某些实施例可以实现为电脑程序驱动的CM灵敏度控 制产品,该产品包括电脑程序,该电脑程序通常比待保护的处理器核心的执行更实时。 因此提供了一种电脑程序产品,包括其中包含电脑可读程序代码的非暂时性有形电脑 可读介质,该电脑可读程序代码适于被执行以实现安全方法,该安全方法动态地取决 于处理器核心的执行流程,控制故障注入对策电路操作以保护处理器免受故障注入攻 击,该方法包括:It will be appreciated that, if desired, certain embodiments may be implemented as a computer program driven CM sensitivity control product comprising a computer program that is typically more real-time than the execution of the processor core to be protected. There is thus provided a computer program product comprising a non-transitory tangible computer readable medium having computer readable program code embodied therein, the computer readable program code being adapted to be executed to implement a security method dynamically dependent on the processing The execution flow of the processor core is controlled to control the operation of the fault injection countermeasure circuit to protect the processor from fault injection attacks, and the method includes:

i.提供处理器核心,该处理器核心在使用时执行指令并同时实时产生至少一些将要执行的指令的输出指示;i. providing a processor core that, when in use, executes instructions and simultaneously generates in real-time output indications of at least some of the instructions to be executed;

ii.提供具有多个可控灵敏度级别的故障注入检测器;以及ii. Provide fault injection detectors with multiple controllable sensitivity levels; and

iii.实时地使用灵敏度级别控制模块,iii. use the sensitivity level control module in real time,

接收输出指示,receive output indication,

使用至少接收输出指示作为输入的灵敏度级别选择逻辑从多个可控灵敏度级别中选择下一灵敏度级别,并将故障注入检测器设置为下一个灵敏度级别,selects the next sensitivity level from a number of controllable sensitivity levels using sensitivity level selection logic that receives at least an output indication as input, and sets the fault injection detector to the next sensitivity level,

从而当保护CPU免受故障注入攻击时,提供故障注入对策电路对至少一些指令的输出指示做出响应,以避免如果在提供CPU保护的灵敏度级别与至少一些指令的输出 指示无关时所导致的至少一个误报。此外,如果将灵敏度级别设置为完全避免误报, 则故障注入对策电路可以检测到如果在提供CPU保护的灵敏度级别与至少一些指 令的输出指示无关时所不会检测到的至少一故障注入。Thus, when protecting the CPU from fault injection attacks, fault injection countermeasure circuitry is provided to respond to the output indications of at least some of the instructions to avoid at least some of the instructions if the sensitivity level at which the CPU protection is provided is independent of the output indications of at least some of the instructions. A false positive. Furthermore, if the sensitivity level is set to avoid false positives entirely, the fault injection countermeasure circuit can detect at least one fault injection that would not have been detected if the sensitivity level providing CPU protection was independent of the output indications of at least some instructions.

上面提到的实施例和其他实施例将在下一段落中详细描述。The above-mentioned embodiments and other embodiments will be described in detail in the next paragraphs.

出现在文本或附图中的任何商标是其所有者的财产,并且在此所示仅用于解释或说明可以如何实施本发明的实施例的一个示例。Any trademarks appearing in the text or drawings are the property of their owners and are shown here only to explain or illustrate one example of how an embodiment of the invention may be practiced.

除非另外特别说明,从以下讨论中显而易见,在整个说明书讨论中,应当理解, 使用诸如“处理”、“计算”、“估计”、“选择”、“排序”、“分级”、“计算”、“确定”、 “生成”、“重新评估”、“分类”、“产生”、“生成”、“立体匹配”、“注册”、“检测”、 “关联”、“迭加”、“获得”等,是指至少一台或多台电脑或计算系统、或处理器或类 似电子计算装置的操作及/或转换表示为物理的数据的动作及/或过程,例如计算系统 的暂存器及/或存储器内的电子量,转换成类似地表示为计算系统的存储器、寄存器 或其他此类信息储存、传输或显示装置内的物理量的其他数据。术语“电脑”应广义 地解释为涵盖具有数据处理能力的任何类型的电子装置,包括但不限于个人电脑、服 务器、嵌入式核心、计算系统、通信装置、处理器(例如数字信号处理器(DSP)、 微控制器、现场可编程门阵列(FPGA)、专用集成电路(ASIC)等)和其他电子计 算装置。Unless specifically stated otherwise, as will be apparent from the following discussion, throughout the discussion of the specification, it should be understood that the use of terms such as "processing," "calculating," "estimating," "selecting," "ranking," "ranking," "calculating," "determine", "generate", "re-evaluate", "classify", "generate", "generate", "stereomatch", "register", "detect", "associate", "superpose", "obtain" etc., means the operation and/or the action and/or process of converting data represented as physical by at least one or more computers or computing systems, or processors or similar electronic computing devices, such as registers and/or processes of computing systems or electronic quantities within a memory, converted to other data similarly represented as physical quantities within a memory, register or other such information storage, transmission or display device of a computing system. The term "computer" should be construed broadly to encompass any type of electronic device having data processing capabilities, including but not limited to personal computers, servers, embedded cores, computing systems, communication devices, processors (such as digital signal processors (DSPs) ), microcontrollers, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs, etc.) and other electronic computing devices.

在此单独列出的元件不必是不同的元件,或者可以是相同的结构。元件或特征可能存在的声明旨在包括(a)元件或特征存在于其中的实施例;(b)元件或特征不存 在的实施例;(c)元件或特征可选择地存在的实施例,例如用户可以配置或选择元件 或特征是否存在。Elements listed individually herein are not necessarily different elements, or may be of the same structure. A statement that an element or feature may be present is intended to include (a) embodiments in which the element or feature is present; (b) embodiments in which the element or feature is absent; (c) embodiments in which the element or feature is alternatively present, e.g. The user can configure or select the presence or absence of components or features.

本安全系统动态地取决于处理器核心的执行流程,控制故障注入对策电路操作以保护处理器免受故障注入攻击。The present security system dynamically depends on the execution flow of the processor core, and controls the operation of the fault injection countermeasure circuit to protect the processor from fault injection attacks.

附图说明Description of drawings

本发明的一些实施例是于以下图式中显示:Some embodiments of the present invention are shown in the following figures:

图1是显示一般CPU操作周期的现有技术,其特别包括提取过程,其后是解码, 再其后是执行。Figure 1 is a prior art showing a typical CPU operating cycle, which in particular includes a process of extraction, followed by decoding, followed by execution.

图2是根据一些实施例显示用于构建系统的方法的简化流程图。2 is a simplified flowchart showing a method for building a system, according to some embodiments.

图3是根据一些实施例显示安全系统的简化方块图,其典型特征在于由处理器核心或CPU执行的指令成为用于调整保护该核心免受一些攻击(例如执行被认为有被黑 客入侵的高风险的条件分支或程序代码的其他部分)的故障注入攻击检测器的触发 器,且该触发器可能会实时触发检测器的调整,使其更加敏感。FIG. 3 is a simplified block diagram showing a security system, typically characterized in that instructions executed by a processor core or CPU are used to adjust the protection of the core from some attacks (such as executing high-level security systems believed to be hacked), according to some embodiments. Risky conditional branches or other parts of program code) are injected into a trigger that attacks the detector, and that trigger may trigger adjustments to the detector in real time, making it more sensitive.

图4是根据一些实施例显示用于动态灵敏度级别调整系统的实时操作的方法的简化流程图。4 is a simplified flowchart showing a method for real-time operation of a dynamic sensitivity level adjustment system in accordance with some embodiments.

图5是显示根据本发明的一些实施例所述的动态灵敏度级别调整系统的示意图,其显示了3级灵敏度,包括定义为预设级别的最低灵敏度级别以及两个均高于预设级 别的附加级别。5 is a schematic diagram showing a dynamic sensitivity level adjustment system according to some embodiments of the present invention, showing 3 levels of sensitivity, including a lowest sensitivity level defined as a preset level and two additional sensitivity levels above the preset level level.

图6是显示图5的故障检测器的一实施例。FIG. 6 shows an embodiment of the fault detector of FIG. 5 .

图7是显示指令解码信号、组合风险等级(例如低、中或高)即选择的灵敏度级 别(例如保守、中或激进/高度敏感)的3级波形图;可以理解的是,可替代地采用除 3之外的任何数量的级别。FIG. 7 is a 3-level waveform diagram showing the instruction decode signal, combined risk level (eg, low, medium, or high), ie, a selected sensitivity level (eg, conservative, medium, or aggressive/highly sensitive); it will be appreciated that alternatively, Any number of levels except 3.

图8是显示根据本发明的一些实施例所述的多个检测器单元的简化示意图。Figure 8 is a simplified schematic diagram showing a plurality of detector cells according to some embodiments of the present invention.

图9是显示根据本发明的一些实施例所述的单-单-单的简化图。Figure 9 is a simplified diagram showing a single-single-single according to some embodiments of the present invention.

图10是显示根据本发明的一些实施例所述的多-单-单的简化图。Figure 10 is a simplified diagram showing multiple-single-single according to some embodiments of the present invention.

图11是显示根据本发明的一些实施例所述的多单多实施例的简化图。Figure 11 is a simplified diagram showing a multiple single multiple embodiment according to some embodiments of the present invention.

图12是显示根据本发明的另一些实施例所述的构造以及操作的包括多个多单单组件的实施例的简化图。Figure 12 is a simplified diagram of an embodiment comprising multiple single-unit assemblies showing construction and operation in accordance with further embodiments of the present invention.

在本发明范围内所涵盖的方法和系统可以任何合适的顺序(例如,如图所示)包括一些(例如任何合适的子集合)或在具体说明的实现中示出的功能区块。Methods and systems encompassed within the scope of the invention may include some (eg, any suitable subset) of the functional blocks shown in any suitable order (eg, as shown in the figures) or in a specifically described implementation.

此处描述和说明的计算、功能或逻辑组件可以以各种形式实现,例如,作为硬件电路,例如但不限于客制化VLSI电路或门阵列,或可编程硬件装置,例如但不限 于FPGA,或作为软件程序代码储存在至少一种有形或无形的电脑可读介质上并且可 由至少一个处理器或其任何合适的组合所执行。特定功能源件可以由软件程序代码的 一个特定序列或由多个这样的软件程序代码所形成,这些软件程序代码共同作用或表 现或如本文参考所讨论的功能源件所描述的那样起作用。例如,元件可以分布在多个 程序代码序列上,例如但不限于对象、过程、函数、例程(routine)以及程序,并且 可以源自一般协同操作的多个电脑文件。The computations, functions or logic components described and illustrated herein can be implemented in various forms, for example, as hardware circuits, such as, but not limited to, customized VLSI circuits or gate arrays, or programmable hardware devices, such as, but not limited to, FPGAs, Or as software program code stored on at least one tangible or intangible computer readable medium and executable by at least one processor or any suitable combination thereof. A specified source of functionality may be formed from a particular sequence of software program code or from a plurality of such software program codes that act together or behave or function as described herein with reference to the source of functionality discussed. For example, elements may be distributed over multiple sequences of program code, such as, but not limited to, objects, procedures, functions, routines, and programs, and may be derived from multiple computer files that generally operate in conjunction.

在此描述的任何逻辑功能可以在适当情况下实现为实时应用,并且可以采用任何合适的架构选项,例如但不限于ASIC或DSP或其任何合适的组合。这里提到的任何 硬件元件实际上都可以包括一个或多个硬件装置,例如芯片,它们可以位于同一位置, 也可以彼此远离。Any of the logic functions described herein may be implemented as a real-time application, where appropriate, and may employ any suitable architectural option, such as, but not limited to, an ASIC or a DSP, or any suitable combination thereof. Any hardware elements mentioned herein may actually include one or more hardware devices, such as chips, which may be co-located or remote from each other.

附图标号:Reference number:

301:处理器核心301: processor core

302:故障注入检测器302: Fault Injection Detector

303:故障注入改善电路303: Fault Injection Improvement Circuit

91,91a,91b,91c:功能模块91, 91a, 91b, 91c: Functional modules

92:灵敏度级别控制逻辑92: Sensitivity level control logic

93,93a,93b:硬件错误注入检测器93, 93a, 93b: Hardware Error Injection Detector

21~24,310~350:步骤流程21~24, 310~350: Step flow

具体实施方式Detailed ways

以下说明为本发明的实施例。其目的是要举例说明本发明一般性的原则,不应视为本发明的限制,本发明的范围当以权利要求书为准。The following descriptions are examples of the present invention. Its purpose is to illustrate the general principles of the present invention, and should not be regarded as a limitation of the present invention, and the scope of the present invention should be governed by the claims.

能理解的是,虽然在此可使用用语“第一”、“第二”、“第三”等来叙述各种 元件、组成成分、区域、层、及/或部分,这些元件、组成成分、区域、层、及/或部 分不应被这些用语限定,且这些用语仅是用来区别不同的元件、组成成分、区域、层、 及/或部分。因此,以下讨论的一第一元件、组成成分、区域、层、及/或部分可在不 偏离本揭露一些实施例的教示的情况下被称为一第二元件、组成成分、区域、层、及 /或部分。It will be understood that although the terms "first," "second," "third," etc. may be used herein to describe various elements, components, regions, layers, and/or sections, these elements, components, Regions, layers, and/or sections should not be limited by these terms, and these terms are only used to distinguish between different elements, components, regions, layers, and/or sections. Thus, a first element, component, region, layer, and/or section discussed below could be termed a second element, component, region, layer, and/or section without departing from the teachings of some embodiments of the present disclosure. and/or parts.

值得注意的是,以下所揭露的内容可提供多个用以实践本发明的不同特点的实施例或范例。以下所述的特殊的元件范例与安排仅用以简单扼要地阐述本发明的精神, 并非用以限定本发明的范围。此外,以下说明书可能在多个范例中重复使用相同的元 件符号或文字。然而,重复使用的目的仅为了提供简化并清楚的说明,并非用以限定 多个以下所讨论的实施例以及/或配置之间的关系。此外,以下说明书所述的一个特 征连接至、耦接至以及/或形成于另一特征之上等的描述,实际可包含多个不同的实 施例,包括该等特征直接接触,或者包含其它额外的特征形成于该等特征之间等等, 使得该等特征并非直接接触。Notably, the following disclosure may provide multiple embodiments or examples for practicing various features of the present invention. The specific component examples and arrangements described below are only used to briefly and briefly illustrate the spirit of the present invention, and are not intended to limit the scope of the present invention. In addition, the following description may reuse the same symbols or words in multiple instances. However, the purpose of re-use is merely to provide a simplified and clear illustration, and not to limit the relationship between the various embodiments and/or configurations discussed below. Furthermore, descriptions in the following description of a feature being connected to, coupled to and/or formed on another feature, etc., may actually encompass a number of different embodiments, including direct contact of the feature, or including other additional The features are formed between the features, etc., such that the features are not in direct contact.

“DLX机器的基本操作”由Mike McDonald和Tony Jacobs所撰写,可在以 下httpswww互联网链接中线上获得,带有html后缀: cs.umd.edu/class/fall2001/cmsc411/projects/DLX/proj。上述文件描述了DLX架构中的五 个执行阶段:指令提取(InstructionFetch,IF)、指令解码(Instruction Decode,ID)、 执行(Execution,EX)、存储器(Memory,MEM)以及回写(Write-Back,WB)。 每个阶段都需要与最慢的阶段一样多的时间,即使它不需要这么多时间来完成。这个 时间段是一个时钟周期。因此,每条指令从开始到结束执行总共需要5个时钟周期。 每个执行阶段都对应于CPU中的硬件。数据路径上硬件的每个“部分”都可以同时 运行,流水线利用这些优势来获得巨大的性能优势。每个阶段都进行非常特定的操作。"Basic Operation of a DLX Machine" by Mike McDonald and Tony Jacobs, available online at the following httpswww internet link with html suffix: cs.umd.edu/class/fall2001/cmsc411/projects/DLX/proj. The above document describes five execution stages in the DLX architecture: Instruction Fetch (IF), Instruction Decode (ID), Execution (EX), Memory (MEM), and Write-Back (Write-Back) , WB). Each stage takes as much time as the slowest stage, even if it doesn't take that much time to complete. This time period is one clock cycle. Therefore, each instruction takes a total of 5 clock cycles to execute from start to finish. Each execution stage corresponds to the hardware in the CPU. Every "part" of the hardware on the data path can run concurrently, and pipelines take advantage of these to gain huge performance benefits. Each stage does very specific actions.

1.指令提取(Instruction Fetch,IF):从存储器中读取指令并将其放入指令寄存器(instruction register,IR)。更新新程序计数器(new program counter,NPC),使 其指向下一条指令(PC+4,或存储器中的下一个字)。1. Instruction Fetch (IF): An instruction is read from memory and placed into an instruction register (IR). The new program counter (NPC) is updated to point to the next instruction (PC+4, or the next word in memory).

2.执行(Execution,EX):对指令进行解码(基于操作码(opcode))。来自 暂存器文件的暂存器的输出被放置到临时暂存器中。符号扩展可能是立即数值的指令 部分,并将该数值放入临时暂存器。2. Execution (EX): Decode the instruction (based on the opcode). The scratchpad output from the scratchpad file is placed into the scratchpad. Sign-extending may be the instruction part of an immediate value and placing the value in a scratchpad.

3.执行(Execution,EX):这里发生的事情取决于将要执行的指令类型。ALU 在此周期中运行,以执行所需的操作。3. Execution (EX): What happens here depends on the type of instruction that will be executed. The ALU runs during this cycle to perform the required operations.

图1是显示一般CPU操作周期的现有技术,其特别包括提取过程,其后是解码, 再其后是执行。Figure 1 is a prior art showing a typical CPU operating cycle, which in particular includes a process of extraction, followed by decoding, followed by execution.

现在将详细描述用于故障注入对策(countermeasure)灵敏度调整的系统。A system for sensitivity adjustment of fault injection countermeasures will now be described in detail.

“If”语句或条件分支是CPU指令的示例,它们可能容易受到故障注入即“故障 注入攻击(fault injection attack)”的影响,例如可以作为故障注入的目标,例如程 序流可能被故意破坏的点。例如,条件分支可以被配置为基于先前的操作,跳转到向 用户提供一些秘密信息的程序代码部分。例如,以用户之前的操作成功提供用户认证 为条件,或者跳转到其他地方,或者根本不跳转,这两种情况都不会向用户提供请求 的信息(如果用户在之前的操作中没有成功提供用户认证)。在后一种情况下,黑客 (hacker)可能会在某个时间尝试注入一个“错误”,试图欺骗条件分支指令跳转到 提供秘密信息的程序代码,即使在之前的操作中该用户没有提供必要的用户身份验 证。"If" statements or conditional branches are examples of CPU instructions that may be vulnerable to fault injection or "fault injection attacks", such as can be the target of fault injection, such as the point where program flow may be intentionally broken . For example, a conditional branch can be configured to jump to a portion of program code that provides some secret information to the user, based on a previous operation. For example, conditional on the user's previous operation successfully providing user authentication, or jumping elsewhere, or not jumping at all, in both cases the requested information is not provided to the user (if the user did not succeed in the previous operation). provide user authentication). In the latter case, a hacker may at some point attempt to inject a "bug" in an attempt to trick the conditional branch instruction to jump to program code that provides secret information, even though the user did not provide the necessary information in the previous operation user authentication.

根据一些实施例,提供了一种安全系统,其中处理器核心在使用时(例如,实时)指示即将执行的操作码/指令。例如,CPU在从程序存储器中提取指令时,通常首先 对指令进行解码。指令的解码通常包括将操作码作为输入的逻辑功能,通常以二进制 形式(指令操作码通常包括通常作为相应程序的二进制程序代码顺序储存的数字,其 可以与指令操作数交错)以及应用逻辑功能(又名“解码逻辑”)产生用以操作CPU 的各种单元以执行各自的功能的CPU内部信号,例如操作CPU的ALU以执行算术运 算,等等。根据一些实施例,解码逻辑可用于将解码信号输出到CPU外部的子系统(例 如,灵敏度级别控制模块),以使该子系统尽管在CPU外部响应于表征CPU在给定时 间即将执行的操作的预先通知(advanceknowledge)而采取的行动(例如选择灵敏度 级别)。According to some embodiments, a security system is provided wherein a processor core indicates an opcode/instruction to be executed when in use (eg, in real time). For example, when a CPU fetches an instruction from program memory, it typically decodes the instruction first. Decoding of an instruction typically involves logic functions that take an opcode as input, usually in binary form (an instruction opcode typically consists of numbers stored in sequence, usually as the binary program code of the corresponding program, which may be interleaved with the instruction operands) and an application logic function ( Also known as "decoding logic") generates the CPU internal signals used to operate the various units of the CPU to perform their respective functions, such as operating the ALU of the CPU to perform arithmetic operations, and so on. According to some embodiments, decoding logic may be used to output decoded signals to a sub-system (eg, a sensitivity level control module) external to the CPU, so that the sub-system, although external to the CPU, responds to a Actions to be taken with advance knowledge (eg selecting a sensitivity level).

可以理解的是,通常,内置的CPU解码逻辑是专门设计来控制CPU的操作单元的,例如ALU,根据正在处理的指令,CPU并不“知道”在任何给定时间将要执行哪条指 令。相反的,根据一些实施例,解码逻辑输出通常指示现在将要执行哪个指令。此外, CPU指令内部可能有重叠的控制状态。例如,一个家族的两个(或N个)不同指令 可能具有一些相同的内部控制,因为这两个不同的指令操作相同的CPU区块。It will be appreciated that in general, the built-in CPU decode logic is specifically designed to control a CPU's operational unit, such as the ALU, and the CPU does not "know" which instruction is going to be executed at any given time, based on the instruction being processed. Conversely, according to some embodiments, the decode logic output generally indicates which instruction will now be executed. Additionally, there may be overlapping control states within CPU instructions. For example, two (or N) different instructions of a family may have some of the same internal control because the two different instructions operate on the same CPU block.

调整解码逻辑以与外部子系统通信的一个特殊优势可能是,由于解码先于相关CPU单元(例如ALU)解码指令的实际执行,因此外部子系统可以预览CPU尚未实际 执行的指令。A particular advantage of adapting decoding logic to communicate with external subsystems may be that since decoding precedes actual execution of the decoded instructions by the relevant CPU unit (e.g. ALU), external subsystems can preview instructions that have not yet been actually executed by the CPU.

可以理解的是,一些集成电路实现了低功率模式。例如,当检测到内核正在执行某些特定的预定义指令时,集成电路可能会进入低功耗模式,例如,在某些CPU中, WAIT指令或某些其他类型的HALT指令,或Wait-For-Interrupt,所有这些通常都会使 CPU的内核处于保持状态,在这种状态下,内核通常会保留,等待触发内核退出该保 持状态的事件。这将涉及将要执行哪个操作码/指令的实时指示。It will be appreciated that some integrated circuits implement a low power mode. For example, the integrated circuit may enter a low power mode when it is detected that the core is executing some specific predefined instruction, for example, in some CPUs, a WAIT instruction or some other type of HALT instruction, or a Wait-For -Interrupt, all of which usually leave the CPU's cores in a holdover state, where the cores are usually held on hold, waiting for an event that triggers the core to exit that holdover state. This would involve a real-time indication of which opcode/instruction will be executed.

存在基于追踪CPU的执行流程而运行的身份验证机制,例如共同拥有的美国专利号9703945。当执行一组特定指令时,可能会暂停执行流程以验证程序代码。具体而 言,美国专利9703945描述了基于跟踪CPU的执行流程运行的认证机制。美国专利 9703945描述了特定的操作或指令(例如,存取存储器映射I/O位址的特定空间)。 根据系统设计者的决定,这些操作或指令被认为在程序代码验证方面需要更高级别的 安全性。因此,在检测到此类指令时,例如对该I/O地址空间的写操作,执行流程会 暂时停止,直到某个程序代码验证序列完成。完成此操作后,假设相应程序代码已通 过身份验证,则将恢复执行流程并执行操作。因此,该方法由某些指令触发,改变程 序流程以采取一些预定义的操作,即程序代码验证。There are authentication mechanisms that operate based on tracking the execution flow of the CPU, such as commonly owned US Pat. No. 9,703,945. When a specific set of instructions is executed, execution flow may be paused to verify program code. Specifically, U.S. Patent 9,703,945 describes an authentication mechanism based on tracking the execution of a CPU's execution flow. U.S. Patent 9,703,945 describes specific operations or instructions (eg, accessing a specific space of memory-mapped I/O addresses). At the discretion of the system designer, these operations or instructions are considered to require a higher level of security in terms of program code verification. Therefore, when such an instruction is detected, such as a write to this I/O address space, the flow of execution is temporarily halted until a program code verification sequence completes. Once this is done, assuming the corresponding program code is authenticated, the execution flow will resume and the action will be executed. Therefore, the method is triggered by some instructions, changing the program flow to take some predefined action, i.e. program code verification.

此外,美国专利9703945描述了一种处理核心,其耦合以从输入桥接收程序指令并执行这些程序指令,其中程序指令包括能够通过输出桥输出信号的程序指令以及不 向一个或多个系统输出发送数据的程序指令,并且其中当输出桥处于第一状态时以及 当输出桥处于第二状态时,处理核心都可以执行不向一个或多个系统输出发送数据的 程序指令。Additionally, US Patent 9,703,945 describes a processing core coupled to receive program instructions from an input bridge and execute those program instructions, wherein the program instructions include program instructions capable of outputting a signal through an output bridge and not sent to one or more system outputs program instructions for data, and wherein the processing core may execute program instructions that do not send data to one or more system outputs both when the output bridge is in the first state and when the output bridge is in the second state.

术语“灵敏度级别(sensitivity level)”旨在包括任何截止点或临限值,由故障注入检测器应用于故障注入的任何规范或触发特性或与故障注入相关的任何规范或 触发特性,使得故障注入检测器可以对其作出反应,且由故障注入检测器的逻辑所使 用来区分故障和非故障。通常,故障注入检测器会努力检测预期和实际情况之间的差 异,并且每次检测到差异时,都会提供“故障”警报。The term "sensitivity level" is intended to include any cut-off point or threshold value, any specification or trigger characteristic applied by the fault injection detector to fault injection or any specification or trigger characteristic related to fault injection such that fault injection The detector can react to it and is used by the logic of the fault injection detector to distinguish faults from non-faults. Typically, fault injection detectors strive to detect discrepancies between expected and actual conditions, and each time a discrepancy is detected, a "fault" alert is provided.

由于不同类型的故障注入检测器是使用不同的机制来实现,因此可以采用各种灵敏度控制机制来实现灵敏度级别,例如但不限于以下:Since different types of fault injection detectors are implemented using different mechanisms, various sensitivity control mechanisms can be employed to achieve sensitivity levels, such as but not limited to the following:

a.故障注入检测器可以识别突然的变化,即电源电压或芯片中的接地位准的突波(glitch)。在这种情况下,可以将检测器设置为在实际情况(实际检测到的电压) 与预期电压相差50mV、100mV或300mV时识别异常情况。a. The fault injection detector can identify sudden changes, ie glitches in the supply voltage or ground level in the chip. In this case, the detector can be set to identify anomalies when the actual condition (actually detected voltage) differs from the expected voltage by 50mV, 100mV or 300mV.

b.可以在同一逻辑网络上的不同位置之间进行电压电平(voltage level)比较以检测局部的差异,因为预期上是所有位置都处于相同状态。b. Voltage level comparisons can be made between different locations on the same logic network to detect local differences, since all locations are expected to be in the same state.

c.光检测器可操作用于尝试使用光能识别故障注入,基于对应于光强度的电压电平所得的故障注入检测。c. The light detector is operable to attempt to identify fault injection using light energy, based on the resulting fault injection detection of a voltage level corresponding to the light intensity.

可以理解的是,可以在任何给定时间比较的数字信号的电压电平(假定处于相同逻辑状态(无论是1还是0))。在这样的比较中,触发电压差可以定义为X、Y或Z。It is understood that the voltage levels of digital signals (assuming the same logic state (whether 1 or 0)) can be compared at any given time. In such a comparison, the trigger voltage difference can be defined as X, Y or Z.

此外,灵敏度根本不需要基于电压电平。例如,具有非基于电压灵敏度级别的检测器可能包括:Also, the sensitivity need not be based on voltage level at all. For example, detectors with non-voltage-based sensitivity levels might include:

第一种为,设计用于直接检测光(例如激光、能量)的探测器。如果检测器将 光能转换为与吸收的光能成正比的电压电平,则可以检测分别对应于光能级别X、Y 和Z的电压电平A、B或C。The first is a detector designed to directly detect light (eg, laser, energy). If the detector converts the light energy to a voltage level proportional to the absorbed light energy, voltage levels A, B or C corresponding to light energy levels X, Y and Z, respectively, can be detected.

第二种为,设计用于直接检测除光以外的电磁能的检测器。如果检测器将电磁能转换成与吸收的电磁能成正比的电压电平,则可以检测分别对应于电磁能级别X、Y 和Z的电压电平A、B或C。The second is a detector designed to directly detect electromagnetic energy other than light. Voltage levels A, B or C corresponding to electromagnetic energy levels X, Y and Z, respectively, can be detected if the detector converts the electromagnetic energy into a voltage level proportional to the absorbed electromagnetic energy.

具有不实时操作的非基于电压的灵敏度级别的检测器的示例是频率偏差检测器,其在与预期频率的频率偏差的幅度方面可以具有多个灵敏度级别。应当理解的是,在 这种情况下,故障注入的目标可以包括通常具有既定频率(也称为“预期频率”)的芯 片时脉。例如,如果给定芯片的时脉具有250MHz的预期频率,并且与该值的瞬时偏 差,例如检测到比预期更接近的两个时脉脉冲,这可能表示发生故障注入。An example of a detector with a non-voltage-based sensitivity level that does not operate in real time is a frequency deviation detector, which may have multiple sensitivity levels in the magnitude of the frequency deviation from the expected frequency. It should be understood that, in this case, the target of fault injection may include a chip clock that typically has a predetermined frequency (also referred to as "expected frequency"). For example, if a given chip's clock has an expected frequency of 250MHz, and an instantaneous deviation from this value, such as two clock pulses detected closer than expected, could indicate fault injection.

一些故障检测器(glitch detector)可以被设计为具有多个灵敏度级别,这些灵敏 度级别通过配置选择并且根据系统架构决定被预先定义并且被预先配置(与在本发明的实施例中动态配置相反)。Some glitch detectors may be designed with multiple sensitivity levels selected by configuration and pre-defined and pre-configured according to system architectural decisions (as opposed to dynamic configuration in embodiments of the present invention).

图2是根据本发明的一些实施例描述了一种构建系统的方法,该系统可以从处理器内核或CPU接收操作码指标,实时做出相应的灵敏度级别决定,尽管其他因素也可 能影响该决定,接着将灵敏度级别控制提供制对策电路。Figure 2 illustrates a method of building a system that can receive opcode metrics from a processor core or CPU and make a corresponding sensitivity level decision in real-time, although other factors may also affect this decision, according to some embodiments of the present invention , and then the sensitivity level control is provided to the countermeasure circuit.

如上所述,可能存在安全开发人员可能认为引入硬件故障注入的更高风险的情况或条件,例如但不限于条件分支的执行。As mentioned above, there may be situations or conditions that security developers may deem to introduce a higher risk of hardware fault injection, such as, but not limited to, the execution of conditional branches.

一般而言,注入的故障最终会转化为集成电路的电气事件,该事件会干扰集成电路硬件的一致性以及连贯操作。例如,在MCU/CPU执行程序代码的情况下,试图干 扰集成电路硬件的一致性以及连贯操作的故障注入通常会试图干扰程序代码的执行 流程,攻击集成电路的硬件以干扰集成电路软件的执行及/或固件。In general, injected faults eventually translate into electrical events in the integrated circuit that interfere with the consistent and coherent operation of the integrated circuit hardware. For example, in the case of MCU/CPU executing program code, fault injection that attempts to interfere with the consistency and coherent operation of the integrated circuit hardware usually attempts to interfere with the execution flow of the program code, attacking the hardware of the integrated circuit to interfere with the execution of the integrated circuit software and / or firmware.

在这种情况下,安全开发人员可能希望在安全级别和误报之间动态使用不同的权衡。In this case, security developers may want to dynamically use a different trade-off between security level and false positives.

安全开发人员在配置逻辑时可以遵循任何合适的程序。例如,设计人员可以首先在预期的正常现实生活场景和允许的操作条件下模拟及/或操作装置,以确保在允许 的操作条件下,该机制永远不会(或仅以可接受的稀有性)触发错误警报。然后,设 计者可以操作装置,给定装置旨在承受的故障注入,并确定正确触发所有或几乎所有 故障注入的故障注入检测级别,例如在可接受的可靠性级别。然后,设计人员可以将 此“适当级别”定义为用于检测故障注入的预设检测级别。然后,设计者可以调整逻 辑,从而响应于CPU将要执行设计者认为与更高的故障攻击风险相关联的指令的输出 指示,实时致能选定的更高灵敏度级别(对应于稍微更积极的检测)。Security developers can follow any suitable procedure when configuring logic. For example, the designer could first simulate and/or operate the device under expected normal real-life scenarios and permissible operating conditions to ensure that under permissive operating conditions the mechanism will never (or only with acceptable rarity) Trigger false alarms. The designer can then operate the device, given the fault injection the device is designed to withstand, and determine the level of fault injection detection that correctly triggers all or nearly all of the fault injection, e.g., at an acceptable reliability level. The designer can then define this "appropriate level" as a preset detection level for detecting fault injection. The designer can then adjust the logic to enable the selected higher sensitivity level (corresponding to slightly more aggressive detection in real time) in response to an output indication that the CPU is about to execute an instruction that the designer believes is associated with a higher risk of fault attack ).

通常,开发人员会调整检测级别,以便在操作条件确实可能导致硬件操作不正确时触发(检测到发生攻击)。此类级别可由开发人员在多个装置变形上标注,以确保 在正常操作期间很少或没有检测到故障注入。Often, developers adjust the detection level to trigger (detection of an attack occurring) when operating conditions are indeed likely to cause the hardware to operate incorrectly. Such levels can be marked by developers on multiple device variants to ensure that little or no fault injection is detected during normal operation.

通常,希望提供一种能够在超过一个设计者定义的级别进行检测的电路,例如至少两个检测级别,其中两个级别之一,而不是另一个,以非必要地干扰装置正常运行 的风险之下拦截轻度故障注入。这些级别可能包括:In general, it would be desirable to provide a circuit capable of detection at more than one designer-defined level, such as at least two detection levels, one of the two levels, but not the other, to risk unnecessarily interfering with the normal operation of the device. The next intercepts mild fault injection. These levels may include:

第一级:检测导致异常情况(例如,产生装置故障风险的情况)的侵略性故障注入;以及Level 1: Detect aggressive fault injection leading to abnormal conditions (eg, conditions that create a risk of device failure); and

第二级:不仅可以检测攻击性故障注入,还可以检测非攻击性(也称为轻度)故 障注入,这会导致出现意外情况,但装置可以在没有故障的情况下仍维持运作。Level 2: Detects not only aggressive fault injections, but also non-aggressive (also known as mild) fault injections, which cause unexpected conditions but the device can remain operational without a fault.

请参考图2,通常提供处理器,其产生指示在每个既定时刻将要执行哪个指令/ 操作码或操作码族/组的信号。例如,从处理器的解码单元识别主指令/命令(subjectinstruction/command)的时间到执行单元指示指令/命令的执行是完成的,信号会指示处理器即将要执行给定指令。在该实施例中,该指示包括定指令的“解码”和“执行” 阶段,然而情况并非必须如此。或者,信号可以指示给定指令将要在给定指令的“执 行”阶段期间执行,而非在给定指令的解码阶段期间执行。另一个可能的实施例是为, 使指示从(并包括)一主指令的“解码”阶段开始,直到(但不包括)下一指令(在 处理器执行指令前一之后所执行的指令)的“解码”阶段保持活动状态。Referring to Figure 2, a processor is typically provided that generates a signal that indicates which instruction/opcode or family/group of opcodes is to be executed at each given moment in time. For example, from the time the processor's decoding unit identifies a subject instruction/command to the execution unit indicating that execution of the instruction/command is complete, a signal would indicate that the processor is about to execute a given instruction. In this embodiment, the indication includes the "decode" and "execute" phases of a given instruction, although this need not be the case. Alternatively, the signal may indicate that the given instruction is to be executed during the "execute" phase of the given instruction, rather than during the decode phase of the given instruction. Another possible embodiment is for the instruction to start from (and include) the "decode" stage of a host instruction until (but not including) the next instruction (an instruction executed after the processor executes the instruction preceding it). The "decode" stage remains active.

可以理解的是,控制上述周期的某些控制信号(也称为CPU内部信号)是CPU内 部设计的一部分,但对所有或许多的CPU来说都是平常的,例如:It will be appreciated that certain control signals (also known as CPU internal signals) that control the above cycle are part of the CPU's internal design, but are common to all or many CPUs, such as:

(a)通知信号,用以通知提取单元从存储器中提取指令并将指令储存在本地某处,以及(a) a notification signal to notify the fetch unit to fetch the instruction from memory and store the instruction locally somewhere, and

(b)由解码单元所产生的信号,指派或告知其他CPU单元操作以及执行指令。(b) Signals generated by the decoding unit that assign or inform other CPU units to operate and execute instructions.

此外,仍然如图2所示,系统设计者通常将至少一个操作码或一组操作码与相关的安全风险相关联。一般来说,条件分支操作码与高风险R(R可为标量)相关联, 是相对于某些或所有操作码并非与风险低于R相关联的条件分支操作码。这是因为条 件分支指令控制程序的流程,因此是故障注入可以使程序偏离正确且有序的流程的节 点。Furthermore, still as shown in Figure 2, system designers typically associate at least one opcode or set of opcodes with an associated security risk. In general, a conditional branch opcode is associated with a high risk R (R may be a scalar), relative to some or all opcodes that are not associated with a lower risk than R. This is because conditional branch instructions control the flow of the program and are therefore nodes where fault injection can divert the program from a correct and orderly flow.

替代地或另外地,根据某些实施例,可以使用详细的风险分析来理解各种不同操作码相关联的相对风险。Alternatively or additionally, according to certain embodiments, a detailed risk analysis may be used to understand the relative risks associated with various different opcodes.

为了进行风险分析,设计人员可能会研究处理器的指令集。指令集(ARM Cortex-M0)的示例描述可在网络上获得,其位于以下http链接且带有html后缀:infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0432c/CHDCICDF。For risk analysis, designers may study the processor's instruction set. An example description of the instruction set (ARM Cortex-M0) is available on the web at the following http link with html suffix: infocenter.arm.com/help/index.jsp?id=2 topic=/com.arm.doc.ddi0432c/CHDCICDF.

至少,由于指令集在处理器之间趋于相似,至少在相似类型的处理器之间,例如在RISC处理器之间或在CISC处理器之间,因此在某种程度上,这种分析可以在处理 器之间推广。例如,许多处理器可能具有以下全部或大部分指令类型或指令组:At least, since instruction sets tend to be similar between processors, at least between similar types of processors, such as between RISC processors or between CISC processors, to some extent this analysis can be Spread between processors. For example, many processors may have all or most of the following instruction types or groups:

1.存储器以及暂存器处理:通常包括载入指令、储存指令以及移动指令。1. Memory and scratchpad processing: usually include load instructions, store instructions, and move instructions.

2.算术和逻辑操作:通常包括加法、减法、有时是乘法和除法或算术移位,以及 逻辑运算,如或、与、异或。2. Arithmetic and logical operations: usually include addition, subtraction, sometimes multiplication and division or arithmetic shifts, and logical operations such as OR, AND, XOR.

3.堆栈(stack)管理:通常是push/pop。3. Stack management: usually push/pop.

4.分支(branch):有条件的以及无条件的。4. Branch: Conditional and unconditional.

5.控制:例如但可能不限于状态管理、中断管理。5. Control: such as but possibly not limited to state management, interrupt management.

尽管如此,由于每个特定处理器确实倾向于具有与其他处理器至少有些不同的指令集,因此最终可以进行一些处理器的个别风险分析。Nonetheless, since each particular processor does tend to have at least a somewhat different instruction set from the others, some individual risk analysis of processors is eventually possible.

设计人员还可以审查应用程序及其实现方式(包括对应用程序代码的分析),并可以相应地量化特定指令或指令类型的风险。例如:Designers can also review the application and how it is implemented (including analysis of the application code) and can quantify the risk of a specific instruction or instruction type accordingly. E.g:

a.一堆栈管理指令相对于堆栈管理指令以外的至少一条指令(及/或相对于与上述指令组3-5中的至少一个指令组中的至少一个指令相关联的风险级别及/或相对于 被视为低风险的操作码),可被视为高风险。例如因为堆栈也可能在程序流程中起作 用,特别是在涉及子程序调用时;堆栈通常会保留返回位址,因此通过故障注入操作 它们也可能会使程序偏离有序的执行流程。a. a stack management instruction relative to at least one instruction other than the stack management instruction (and/or relative to the risk level associated with at least one instruction in at least one instruction group of at least one of the above instruction groups 3-5 and/or relative to opcodes considered low risk), can be considered high risk. For example, because stacks may also play a role in program flow, especially when subroutine calls are involved; stacks typically hold return addresses, so operating them through fault injection may also deviate a program from an orderly flow of execution.

b.在算术/逻辑操作的指令组(上述第2组)中,基于对程序代码的分析,系统设 计人员可能会发现特定算术指令用于程序代码中“关键”位置会影响程序流程及/或 程序代码的“决策”。这些特定指令可能与高风险相关,例如该风险高于程序代码中 不在此类关键位置的算术指令或高于与上述指令组3-5中至少一个指令组中的至少一 条指令相关的风险级别及/或高于视为低风险的操作码。b. In the instruction group for arithmetic/logical operations (Group 2 above), based on analysis of the program code, the system designer may find that the use of specific arithmetic instructions in "critical" locations in the program code affects program flow and/or The "decision" of the program code. These particular instructions may be associated with a high risk, eg higher than an arithmetic instruction in the program code that is not in such a critical location or higher than the risk level associated with at least one instruction in at least one of the above instruction groups 3-5 and / or higher than opcodes considered low risk.

此外,仍然如图2所示,有一个故障注入检测器具有至少两个灵敏度级别(L>=2),其中之一较宽松(具有较低的灵敏度级别),另一灵敏度级别较灵敏(具有更高的灵 敏度级别)。Furthermore, still as shown in Figure 2, there is a fault injection detector with at least two sensitivity levels (L>=2), one of which is looser (with a lower sensitivity level) and the other is more sensitive (with a lower sensitivity level) higher sensitivity levels).

此外,仍然如图2所示,可以以任何合适的方式实施动态灵敏度级别调整(例如 实时的选择L个级别之一)。例如,可以提供从处理器接收这些信号的解码逻辑,且 根据操作码的安全风险等级,基于宽松或更灵敏的检测级别,在任何时间产生相应的 信号以向故障注入检测器指示它是否应该被触发。图5显示了一个实施例,显示了3 级别灵敏度,其包括定义为预设级别的最低灵敏度级别以及两个均高于预设级别的附 加级别。Furthermore, still as shown in Figure 2, dynamic sensitivity level adjustment may be implemented in any suitable manner (e.g. selecting one of the L levels in real-time). For example, decoding logic may be provided that receives these signals from the processor and, depending on the security risk level of the opcode, generates a corresponding signal at any time to indicate to the fault injection detector whether it should be trigger. Figure 5 shows an embodiment showing a 3-level sensitivity comprising a minimum sensitivity level defined as a preset level and two additional levels both above the preset level.

根据某些实施例,对检测器的指示在解码指令之后立即或立即消失,使得检测器在核心开始执行该指令之前获得信号。检测电路本身通常不会“拒绝”或吸收或以其 他方式处理故障注入。然而,电路确实会产生一个旗标(flag)以指示发生故障注入, 允许其他模块以任何合适的方式回应,例如但不限于将装置(例如CPU或处理器)恢 复到已知状态以及将程序恢复至流程中的一个已知节点。这种恢复可以相对缓慢地发 生,例如只有在发生故障注入之后。然而,由于故障注入造成的损害不会立即发生因 此这是可以接受的,除非只有在到达程序代码中本不应该到达且实际上若不是故障注 入也不会到达的某个地方时,恢复发生在到达程序代码中的这个位置之前。According to some embodiments, the indication to the detector disappears immediately or immediately after decoding the instruction, so that the detector gets the signal before the core starts executing the instruction. The detection circuit itself generally does not "reject" or absorb or otherwise handle fault injection. However, the circuit does generate a flag to indicate that fault injection has occurred, allowing other modules to respond in any suitable manner, such as, but not limited to, restoring the device (such as a CPU or processor) to a known state and resuming the program to a known node in the process. This recovery can occur relatively slowly, for example only after fault injection occurs. However, since the damage from fault injection does not happen immediately, this is acceptable, unless recovery occurs only when it reaches a place in the program code that should not have been reached, and would not have actually reached if it were not for fault injection. before reaching this position in the program code.

图2的方法通常包括一些或所有以下操作,适当排序如下:The method of Figure 2 typically includes some or all of the following operations, appropriately ordered as follows:

步骤21.将何者易受故障注入影响以及何者产生用以指示在任何给定的时间执行哪个指令/操作码或操作码族/组的信号,提供至处理器核心/CPU。Step 21. Provide to the processor core/CPU which is susceptible to fault injection and which generates a signal indicating which instruction/opcode or family/group of opcodes to execute at any given time.

步骤22.进行风险分析:系统设计者将安全风险(例如,错误注入的风险)与 操作码或操作码组的列表相关联,并相应地生成灵敏度级别决策/选择逻辑。例如: 条件分支操作码是为高风险;所有其他操作码是为低风险。Step 22. Perform risk analysis: The system designer associates security risks (eg, risk of error injection) with a list of opcodes or opcode groups and generates sensitivity level decision/selection logic accordingly. For example: Conditional branch opcodes are high risk; all other opcodes are low risk.

步骤23.提供具有至少两个灵敏度级别的故障注入检测器。Step 23. Provide a fault injection detector with at least two sensitivity levels.

步骤24.实现CM电路的灵敏度级别调整,例如提供可实时调节灵敏度级别的CM 电路,例如通过动态选择至少两个级别之一。一般来说,故障注入检测器支持动态调 整,例如实时调整灵敏度级别且其响应时间短于由故障注入检测器进行保护的处理器 或CPU的单个指令的解码执行周期。Step 24. Implement sensitivity level adjustment of the CM circuit, eg, provide a CM circuit that can adjust the sensitivity level in real time, eg, by dynamically selecting one of at least two levels. In general, fault injection detectors support dynamic adjustments, such as adjusting the sensitivity level in real-time and with a response time shorter than the decode execution cycle of a single instruction of the processor or CPU protected by the fault injection detector.

如上所述,由于通常希望控制信号通过灵敏度控制单元传播到检测器的时间段留出足够的时间让检测器做出反应,因此响应时间通常较短。例如:如果指令周期是40ns 长,那么从操作码的指示到检测器被设置在所需的灵敏度级别所经过的时间是,比如 说最多10ns而留下一个30ns的时间窗口,其中检测器可于时间窗口内反应。As mentioned above, the response time is generally short since the time period during which the control signal propagates through the sensitivity control unit to the detector is generally desired to allow sufficient time for the detector to react. For example: if the instruction cycle is 40ns long, then the time elapsed from the indication of the opcode until the detector is set at the desired sensitivity level is, say at most 10ns leaving a 30ns time window where the detector can be response within the time window.

现在参考图3,可以理解的是,条件执行和条件分支,即软件决策点,被视为安 全程序代码中的弱点,即易于发生故障注入攻击的节点。图3是显示根据某些实施例 所述的安全系统的简化方块图,其可如根据图2的方法所提供。图3的系统通常包括:Referring now to Figure 3, it can be understood that conditional execution and conditional branching, ie, software decision points, are considered weaknesses in secure program code, ie, nodes prone to fault injection attacks. FIG. 3 is a simplified block diagram showing a security system according to some embodiments, which may be provided according to the method of FIG. 2 . The system of Figure 3 typically includes:

具有操作码或其他程序代码的指示的处理器核心301或CPU,指示特定指令或指令类别的执行,例如但不限于条件分支、特定比较等;以及a processor core 301 or CPU with an indication of an opcode or other program code that directs the execution of a particular instruction or class of instructions, such as, but not limited to, conditional branches, particular comparisons, etc.; and

对策(countermeasure,CM)电路,例如包括一个设计有多个可控的灵敏度级别的故障注入检测器302。该CM电路可包括与具有可调灵敏度的故障注入检测器相结合的 故障注入改善(amelioration)电路303。如果故障注入检测器检测到故障注入,则故 障注入改善电路被启动。例如,每次故障注入检测器检测到故障注入时,触发故障注 入改善电路。A countermeasure (CM) circuit, for example, includes a fault injection detector 302 designed with multiple controllable sensitivity levels. The CM circuit may include a fault injection amelioration circuit 303 in combination with a fault injection detector with adjustable sensitivity. If the fault injection detector detects fault injection, the fault injection improvement circuit is activated. For example, each time a fault injection detector detects a fault injection, the fault injection improvement circuit is triggered.

例如,有关此类电路的某些示例的设计问题在以下白皮书中进行了描述,均可在网络上获得:For example, design issues on some examples of such circuits are described in the following white papers, all available on the web:

Compilation of a Countermeasure Against Instruction-Skip FaultAttacksCompilation of a Countermeasure Against Instruction-Skip FaultAttacks

Thierno Barry,Damien Courouss_e,Bruno RobissonThierno Barry, Damien Courouss_e, Bruno Robisson

以及:as well as:

Low-Cost Software Countermeasures Against Fault Attacks:Implementation and Performances Trade OffsLow-Cost Software Countermeasures Against Fault Attacks: Implementation and Performances Trade Offs

应当理解的是,术语“对策(countermeasure)”通常用于指用于改善(例如, 防止或纠正)故障注入攻击的不良影响的检测器及/或模块。在图3的上下文中,CM 电路检测此类攻击并触发任何合适的模块以防止或纠正此类攻击的不良影响。It should be understood that the term "countermeasure" is generally used to refer to detectors and/or modules used to ameliorate (eg, prevent or correct) the ill effects of fault injection attacks. In the context of Figure 3, the CM circuitry detects such attacks and triggers any suitable modules to prevent or correct the ill effects of such attacks.

根据一个实施例,已经识别出条件分支的执行的安全系统将相应电路的检测级别调整为更加敏感的级别。According to one embodiment, the safety system that has identified the execution of the conditional branch adjusts the detection level of the corresponding circuit to a more sensitive level.

可以理解的是,与不被如此考虑的指令相比,各种指令或其类别可以被认为引入更高的故障注入风险。举一些非限制性的例子,任何或所有以下操作码可能被认为引 入了更高的故障注入风险,其可能导致系统设计决策将以下任何或所有操作码与高安 全性风险相关联(例如,故障注入的风险很高),即风险级别高于与操作码(而非以 下内容及/或在遇到此类指令时增加故障注入检测器的灵敏度级别所提供的逻辑)相 关的风险级别,例如以下操作码:It will be appreciated that various instructions or classes thereof may be considered to introduce a higher risk of fault injection than instructions that are not so considered. To give some non-limiting examples, any or all of the following opcodes may be considered to introduce a higher risk of fault injection, which may lead to system design decisions that associate any or all of the following opcodes with a high security risk (e.g., a fault high risk of injection), i.e., the risk level is higher than that associated with the opcode (rather than the following and/or logic provided by increasing the sensitivity level of the fault injection detector when such an instruction is encountered), such as the following Opcode:

a.指示条件分支的操作码,例如,基于条件分支之前的两个操作数之间的比较 并产生条件分支随后使用的“结果”分支来决定是分支还是按顺序继续的RISC CPU 的分支指令的branch-if-equal、branch-if-not-equal。a. An opcode that indicates a conditional branch, e.g., a branch instruction of a RISC CPU that decides whether to branch or continue in order based on a comparison between the two operands preceding the conditional branch and producing a "result" branch that the conditional branch then uses branch-if-equal, branch-if-not-equal.

b.执行比较或其他“测试”的操作码,导致设置各种标志,然后由“决定”是 否采用给定条件分支的逻辑所使用。例如,比较指令可用于比较两个操作数并在两者 相等的情况下(或在两者不相等的情况下)设置标志。在结果为负或非零的情况下, 减法操作可以设置一个标志以比较操作数(operand),例如数字。b. Opcodes that perform comparisons or other "tests" that cause various flags to be set, which are then used by logic that "decides" whether to take a given conditional branch. For example, compare instructions can be used to compare two operands and set a flag if they are equal (or if they are not). A subtraction operation can set a flag to compare operands, such as numbers, in the case that the result is negative or non-zero.

c.操作码将特定类型的信息推送到处理器堆栈中,例如稍后用于条件操作的关键或敏感信息或数据或CPU子系统旗帜的返回地址。c. Opcodes push specific types of information onto the processor stack, such as critical or sensitive information or data or return addresses for CPU subsystem flags that are later used for conditional operations.

d.操作码的特点是用作实现循环(loop)的停止条件。例如,循环在以下https www链接所提供的档案中进行了描述,该链接具有htm后缀:tutorialspoint.com/assem bly_programming/assembly_loops。d. The opcode is characterized as a stop condition for implementing a loop. For example, loops are described in the archive provided by the following https www link, which has the htm suffix: tutorialspoint.com/assem bly_programming/assembly_loops.

所述的循环(loop)指令是假定循环计数器保存于预定的CPU暂存器中。当CPU 遇到“循环”指令时,CPU可能会递减循环计数器,将循环计数器与零进行比较,且 若计数器大于或等于零时返回到循环的起点,从而实现循环停止条件。The described loop instruction assumes that the loop counter is stored in a predetermined CPU register. When the CPU encounters a "loop" instruction, the CPU may decrement the loop counter, compare the loop counter to zero, and return to the start of the loop if the counter is greater than or equal to zero, thereby implementing a loop stop condition.

在某些情况下,可能事先不知道使用了哪些指令,例如因为使用的指令可能取决于不同的CPU的编译器的选择。例如,CPU可能有一个用于循环的内置指令,用以处 理指定的暂存器或变量,自动增加与减少该暂存器或变量,接着若循环计数器如此规 定则跳回到循环的起点,或者若循环计数器已过则让程序按顺序继续。In some cases, it may not be known in advance which instructions are used, for example because the instructions used may depend on the choice of compiler for different CPUs. For example, a CPU might have a built-in instruction for a loop that handles a specified register or variable, automatically incrementing and decrementing that register or variable, and then jumping back to the beginning of the loop if the loop counter so dictates, or If the loop counter has elapsed let the program continue in sequence.

应当理解的是,相对于不被如此考虑的各种指令或其类别,相较于被如此考虑者具有特别低的故障注入风险。为了给出一些非限定的实施例,以下任何或所有皆可能 被认为引入了特别低的故障注入风险(这可能肇因于系统设计决策而将以下任何或所 有操作码与低安全风险相关联,即风险级别低于与除以下操作码以外的操作码相关联 的风险级别,及/或提供在遇到此类指令时降低故障注入检测器的灵敏度级别的逻辑, 从而减少误报而几乎没有或没有不利影响):It should be appreciated that with respect to various instructions or categories thereof that are not so considered, there is a particularly low risk of fault injection compared to those that are so considered. To give some non-limiting examples, any or all of the following may be considered to introduce a particularly low risk of fault injection (which may result from system design decisions that associate any or all of the following opcodes with a low security risk, That is, the risk level is lower than the risk level associated with opcodes other than the following, and/or provide logic that reduces the sensitivity level of the fault injection detector when such instructions are encountered, thereby reducing false positives with little or no No adverse effects):

a.载入仅从存储器中读取数据的操作码或a. Load opcodes that only read data from memory or

b.储存仅在存储器中储存数据的操作码b. Store opcodes that only store data in memory

虽然故障注入可能会导致上述问题而导致误动作,但黑客根据干扰特定的储存/加载指令来定义有效的攻击被认为实际上是不可能的。While fault injection can cause the above problems to cause misbehavior, it is considered practically impossible for a hacker to define an effective attack based on interfering with specific store/load instructions.

图4是显示根据某些实施例所述的操作方法;例如根据图2的方法及/或图3的系统的操作方法。FIG. 4 is a diagram illustrating a method of operation according to certain embodiments; eg, according to the method of FIG. 2 and/or the system of FIG. 3 .

图4的方法通常结合核心执行指令操作,其中指令是被实时地提供、解码以及使用,以选择故障注入检测器的灵敏度级别。通常,给定的灵敏度级别与多个指令或指 令族/组中的每一者相关联。通常,系统的设计者根据设计者的风险评估而将更高的 灵敏度级别与认为会遭受更高风险级别的指令相关联,例如从黑客为故障注入攻击寻 找合适的目标位置的角度来看,它们被认为是有吸引力的目标,相反的,较低的灵敏 度级别与被认为具有较低风险级别的指令。使用图4的方法的系统通常被建构成使得 指令被实时地解码和响应。指令被设置为与刚刚解码并即将执行的指令相关联或对应 的灵敏度级别。接着,在指令的解码及其由核心执行之间的时间窗口中,进行设置灵 敏度级别。The method of FIG. 4 typically operates in conjunction with core execution instructions, where the instructions are provided, decoded, and used in real-time to select the sensitivity level of the fault injection detector. Typically, a given sensitivity level is associated with each of multiple instructions or instruction families/groups. Often, the designer of a system associates a higher sensitivity level with instructions that are believed to be subject to a higher level of risk, based on the designer's risk assessment, such as from the point of view of a hacker finding a suitable target location for a fault injection attack. Targets that are considered attractive, conversely, lower sensitivity levels are associated with directives that are considered to have lower risk levels. Systems using the method of Figure 4 are typically constructed such that instructions are decoded and responded to in real-time. Instructions are set to the sensitivity level associated with or corresponding to the instruction that has just been decoded and is about to be executed. Next, in the time window between the decoding of the instruction and its execution by the core, setting the sensitivity level takes place.

图4的方法通常包括以下操作中的一些或全部,适当排序,例如:如图所示:The method of Figure 4 typically includes some or all of the following operations, ordered appropriately, for example: as shown:

在步骤310,CPU向灵敏度级别控制模块所采用的灵敏度级别决策逻辑(又称灵 敏度级别选择逻辑)提供操作码指标I。At step 310, the CPU provides the opcode index I to the sensitivity level decision logic (also known as the sensitivity level selection logic) employed by the sensitivity level control module.

在步骤320,灵敏度级别决策逻辑产生一个决定:CM电路的灵敏度级别应为L_I。At step 320, the sensitivity level decision logic makes a decision that the sensitivity level of the CM circuit should be L_I.

在步骤330,灵敏度级别控制模块对灵敏度级别控制模块发出信号(或命令), 将CM电路的灵敏度级别调整为L_I。In step 330, the sensitivity level control module sends a signal (or command) to the sensitivity level control module to adjust the sensitivity level of the CM circuit to L_I.

在步骤340,灵敏度级别控制模块向CM电路发出灵敏度级别控制信号。At step 340, the sensitivity level control module sends a sensitivity level control signal to the CM circuit.

在步骤350,CM电路将其灵敏度及别调整为L_I。例如,可以使用合适的选择 器单元来调整该级别,该选择器单元的控制包括(或源自)指示将要执行哪个操作码 的灵敏度级别控制命令。At step 350, the CM circuit adjusts its sensitivity to L_I. For example, this level may be adjusted using a suitable selector unit whose control includes (or derives from) a sensitivity level control command indicating which opcode is to be executed.

图5-图6是根据某些实施例所述的动态灵敏度级别调整系统的3级实施例。预先分析装置的设计,包括风险分类,接着在操作过程中,探测器根据先前所进行的风险分 类实时回应。5-6 are a 3-stage embodiment of a dynamic sensitivity level adjustment system according to certain embodiments. The design of the device is pre-analyzed, including the risk classification, and then during operation, the detector responds in real-time based on the previously made risk classification.

具体来说,图5是显示具有3级灵敏度动态灵敏度级别调整系统的示意图,其中3级灵敏度包括被定义为预设级别的最低灵敏度级别以及均高于预设级别的两个附加 级别。图6是为图5的故障检测器的方块图。Specifically, FIG. 5 is a schematic diagram showing a dynamic sensitivity level adjustment system with 3 levels of sensitivity including the lowest sensitivity level defined as a preset level and two additional levels both above the preset level. FIG. 6 is a block diagram of the fault detector of FIG. 5 .

图7是显示根据一些实施例所述的指令解码信号、组合风险等级(例如低、中或高)和选择的灵敏度级别(例如保守、中等或激进/高度敏感)的3级波形图;应当理 解的是,可以替代地采用3以外的任何数量的级别,并且不需要如图所示的预设级别。7 is a 3-level waveform diagram showing instruction decode signals, combined risk levels (eg, low, medium, or high) and selected sensitivity levels (eg, conservative, medium, or aggressive/highly sensitive), according to some embodiments; it should be understood However, any number of levels other than 3 can be used instead, and the preset levels as shown are not required.

在CPU的实施例执行管线(execution pipeline)中,如图所示,如果管线正在处理一条“低风险”指令以及一条“高风险”指令时,一旦高风险指令被解码,将优先 设置检测器的灵敏度等级。例如,在“中等风险”提取发生的点上,一旦指令被解码, (紧接着)灵敏度就会增加。类似地,当“高风险”提取发生时,一旦指令被解码, 灵敏度立即进一步增加。更一般地,当图7的系统识别出比当前所设置的指令具有更 高风险的指令时,新解码的具有(更高的)风险优先权,直到CPU完成处理高风险指 令,然后恢复到之前的指令处理。In an embodiment execution pipeline of a CPU, as shown, if the pipeline is processing a "low risk" instruction as well as a "high risk" instruction, once the high risk instruction is decoded, the detector's Sensitivity level. For example, at the point where a "medium risk" fetch occurs, once the instruction is decoded, the (immediately) sensitivity increases. Similarly, when a "high risk" fetch occurs, the sensitivity increases further once the instruction is decoded. More generally, when the system of Figure 7 identifies a higher risk instruction than the one currently set, the newly decoded one has a (higher) risk priority until the CPU finishes processing the high risk instruction, then reverts to the previous command processing.

要知道的是“提取(fetch)”如图7中所示,是包括“解码”,为简洁起见,因 此图中所示的“提取(fetch)”可以解释为“提取以及解码”。It should be known that "fetch" as shown in Fig. 7 includes "decoding", and for the sake of brevity, "fetch" shown in the figure can be interpreted as "fetching and decoding".

参考图8。根据某些实施例,故障注入检测器包括分别部署在处理器核心中的多个位置中的多个故障注入检测器单元,如图8的实施例中所示,从而在考虑到某些一 般故障注入检测器的位置相关性的同时检测所有多个位置处的故障注入攻击。如果部 署在第一位置的至少一个检测器单元检测到第一位置处的故障注入攻击时,则故障注 入检测器可以发出警报(及/或可以触发应用于位置L的故障注入改善操作)。因此, OR函数(或任何其他合适的逻辑函数)可用于组合由多个单元的各个单元所做出的 故障注入检测确定。可以提供任何合适数量的单元且其间具有任何合适的距离,通常 根据以下因素中的至少一个来确定:每个单元占用的集成电路芯片(die)面积、被 保护的集成电路的物理特性以及预期故障注入攻击的空间特征。Refer to Figure 8. According to some embodiments, the fault injection detector includes multiple fault injection detector units respectively deployed in multiple locations in the processor core, as shown in the embodiment of FIG. 8, so that certain general faults are considered The location-dependent injection detector detects fault injection attacks at all multiple locations simultaneously. If at least one detector unit deployed at the first location detects a fault injection attack at the first location, the fault injection detector may issue an alarm (and/or may trigger fault injection amelioration actions applied to location L). Thus, an OR function (or any other suitable logical function) can be used to combine fault injection detection determinations made by individual cells of a plurality of cells. Any suitable number of cells may be provided with any suitable distance therebetween, generally determined by at least one of the following factors: the integrated circuit die area occupied by each cell, the physical characteristics of the integrated circuit being protected, and the expected failure Spatial features of injection attacks.

图8是根据本发明的某些实施例所述的部署在处理器核心中各个位置并分别占据多个集成电路芯片区域的多个故障注入检测器单元的简化示意图。8 is a simplified schematic diagram of multiple fault injection detector cells deployed at various locations in a processor core and occupying multiple integrated circuit chip areas, respectively, according to some embodiments of the present invention.

对于本发明的某些实施例,使用方式比比皆是。For certain embodiments of the present invention, the usage patterns abound.

例如,共同拥有的美国专利9,523,736描述了检测给定电网的不同分支之间的状态差异。集成电路中的电气逻辑网络通常预期处于相同状态,例如1或0的逻辑状态, 通过所有分支。因此,当在同一逻辑(电气)网络上的两个物理点之间检测到电压电 平差异时,很可能代表故障注入尝试导致局部变化。设计人员可能会认为,该位置与 其他地方之间的差异(例如,两点之间的50mV)是正常的,而300mV的差异对于集 成电路功能的风险来说是足够异常的,而200mV的差异虽然是异常的,但不视为有风 险。根据某些实施例,不仅仅是设计目标为300mV的检测器,检测器取决于灵敏度的 变化级别,可以通过在此所述的虚拟控制来检测200mV的差异或300mV的差异,例如 可以实时向检测器发送设置控制信号,以将检测器设置为200mV的灵敏度级别或 300mV的灵敏度级别。因此,系统实时确定是否将50mV或200mV或300mV视为差异, 其中差异的正检测(positive detection)代表已检测到故障注入。For example, commonly owned US Patent 9,523,736 describes detecting state differences between different branches of a given electrical grid. Electrical logic networks in integrated circuits are generally expected to be in the same state, such as a logic state of 1 or 0, through all branches. Therefore, when a difference in voltage level is detected between two physical points on the same logical (electrical) network, it is likely to represent a fault injection attempt resulting in a local change. A designer might think that a difference between that location and elsewhere (eg, 50mV between two points) is normal, a 300mV difference is abnormal enough to risk the IC's function, and a 200mV difference Although abnormal, it is not considered a risk. According to some embodiments, instead of just designing the detector to target 300mV, the detector depends on the level of change in sensitivity, a difference of 200mV or a difference of 300mV can be detected by virtual control as described herein, for example, a difference of 200mV can be detected in real time The detector sends a set control signal to set the detector to a sensitivity level of 200mV or a sensitivity level of 300mV. Thus, the system determines in real time whether to consider 50 mV or 200 mV or 300 mV as a difference, where a positive detection of the difference means that fault injection has been detected.

可以理解的是,除了故障注入风险之外,可能还有其他或者比故障注入风险更一般的使用方式,这将证明实时调整灵敏度级别是合理的。例如,据信黑客会研究和特 性画他们所针对的给定装置对故障注入的灵敏度,这可能先于黑客集中尝试在非常特 定的时间及/或特定的装置位置注入故障。实时、随机或根据实时检测到的风险而更 改灵敏度级别,例如如本文所述通过将特定指令与特定风险级别相关联,可能会混淆 或干扰此类研究。It is understandable that there may be other or more general usages of fault injection risk in addition to fault injection risk, which would justify adjusting the sensitivity level in real time. For example, it is believed that hackers will study and characterize the sensitivity of a given device they target to fault injection, possibly prior to a concentrated attempt by hackers to inject faults at very specific times and/or specific device locations. Changing sensitivity levels in real time, randomly or based on real-time detected risks, such as by associating specific directives with specific risk levels as described herein, may confuse or interfere with such research.

此外,如果在特定的操作周期内装置实时检测到大量(超过临限值)的故障注入尝试,例如:在Y时间内进行超过X次检测。例如,在100%的系统运行时间中,可能 存在较低安全风险的时期,例如但不限于根据经验观察到黑客不太流行的时期,并且 可能存在较高安全性风险的时期,例如但不限于从经验上观察到更受黑客欢迎的时 期。Furthermore, if the device detects a large number (over a threshold value) of fault injection attempts in real time during a specific operating cycle, eg, more than X detections are performed in Y time. For example, in 100% of the system uptime, there may be periods of lower security risk, such as but not limited to periods where hackers are empirically observed to be less prevalent, and periods of higher security risk, such as but not limited to Periods that are more popular with hackers are observed empirically.

可以记录检测到的故障注入的时间标记事件,之后合适的程序代码可以随时间跟踪故障注入并辨别具有特别高或特别低的故障注入发生率的外围时间段。Time-stamped events of detected fault injections can be recorded, after which appropriate program code can track fault injections over time and identify peripheral time periods with particularly high or low incidences of fault injections.

可以理解的是,这里的故障检测器可以整合至更大的系统中,从而改进它们的操作。It will be appreciated that the fault detectors herein can be integrated into larger systems to improve their operation.

例如,应当理解的是,本文所示以及所述的实施例不需要充当使条件分支操作更难以破解的唯一防线。相反的,本文所述的故障检测器可以有效地与传统的反黑客技 术相结合,以在程序代码级别对抗故障注入的脆弱性,例如:For example, it should be understood that the embodiments shown and described herein need not act as the only line of defense to make conditional branch operations more difficult to crack. Conversely, the fault detector described in this paper can be effectively combined with traditional anti-hacking techniques to combat fault injection vulnerabilities at the program code level, such as:

a.通过防止或阻止或减少故障注入的发生或发生率及/或a. By preventing or preventing or reducing the occurrence or incidence of fault injection and/or

b.通过规避或改善故障注入的影响,一旦发生时,b. By circumventing or ameliorating the impact of fault injection, once it occurs,

其中任何一个都可以由这里所示以及所述的故障注入检测技术所触发。Any of these can be triggered by the fault injection detection techniques shown and described here.

可以采用在此所示以及所述的用于检测故障注入的任何方法,并且可以增加或替换在先前系统中使用的先前故障注入检测技术,该先前系统包括一旦被检测到可操作 用于规避或改善故障注入影响的模块。例如,当由两个或多个故障注入检测器中的任 一个触发时,可以激活该模块。Any of the methods shown and described herein for detecting fault injection may be employed, and may add to or replace previous fault injection detection techniques used in previous systems including those operable to avoid or, once detected, Mods that improve the impact of fault injection. For example, the module can be activated when triggered by either of two or more fault injection detectors.

通常,类别b需要检测故障注入。因此,可以通过使用在此所示以及所述的改 进的、动态控制的故障注入检测方法来改进类别b中的任何反黑客措施。Generally, category b needs to detect fault injection. Thus, any anti-hacking measures in category b can be improved by using the improved, dynamically controlled fault injection detection methods shown and described herein.

一旦检测到故障注入,例如如本文所示以及所述的,任何合适的故障注入影响改善操作可以由此被触发并且可以响应地执行,以改善例如纠正至少一种影响,例如故 障注入的不良影响,例如但不限于适用于以下故障注入改善操作:Once fault injection is detected, eg, as shown and described herein, any suitable fault injection impact amelioration actions may thereby be triggered and may be performed responsively to ameliorate, eg correct, at least one impact, eg, the adverse effects of fault injection , for example but not limited to the following fault injection improvement actions:

a.将装置置于不可逆转的状态,阻止任何进一步的选项。a. Put the device in an irreversible state, preventing any further options.

b.使处理器跳转到指定的例程,例如执行整体完整性检查,然后通常会重置或 重新启动CPU。b. Causes the processor to jump to a specified routine, such as performing an overall integrity check, and then usually resets or restarts the CPU.

c.将处理器置于无限循环中,直到被看门狗定时器重置。c. Put the processor in an infinite loop until reset by the watchdog timer.

d.停止装置,直到过一段特定的时间。d. Stop the device until a specified period of time has passed.

e.提高灵敏度级别一既定时间后,如果没有进一步检测,灵敏度将恢复为预设值。e. After raising the sensitivity level for a certain period of time, if there is no further detection, the sensitivity will return to the preset value.

f.在一段时间内禁用特定的预先指定的“风险”功能。风险功能可能是认证的批准、敏感数据的揭露或加密密钥的揭露。f. Disable certain pre-designated "risk" features for a period of time. Risky functions may be the approval of authentication, the disclosure of sensitive data, or the disclosure of encryption keys.

g.暂停系统,直到应用电源循环被设置或直到系统或装置硬件重置;看门狗定 时器重置或任何其他用于释放卡住CPU的停止标准或机制。g. Suspend the system until an application power cycle is set or until a system or device hardware reset; watchdog timer reset or any other stop criterion or mechanism for releasing a stuck CPU.

应当理解的是,上述故障注入改善操作仅仅是可以为被设计为改善故障注入攻击的不良影响的模块提供的功能的实施例。改善操作或功能可包括,防止或阻止或减少 故障注入的发生或发生率及/或一旦故障注入发生就回避或改善其影响。应当理解的 是,改善操作可以在硬件及/或软件中实现并且可以利用处理器核心的程序/数据存储 器。It should be understood that the above-described fault injection amelioration operations are merely examples of functions that may be provided for modules designed to ameliorate the ill effects of fault injection attacks. Improving operation or functionality may include preventing or preventing or reducing the occurrence or rate of fault injection and/or avoiding or ameliorating the impact of fault injection once it occurs. It should be understood that the improved operations may be implemented in hardware and/or software and may utilize the program/data memory of the processor core.

可以理解的是,可以执行不止一个这样的故障注入改善操作。例如,上面的操作 e可能会与操作a–d或f–g的一者相结合。It will be appreciated that more than one such fault injection improvement action may be performed. For example, operation e above might be combined with one of operations a–d or f–g.

实现一系列条件分支:例如,许多技术中的一种,用于使故障注入更加困难,因 此不太可能,例如按照上面的类别a,重复条件分支n>1次,例如两次(n=2)。在 这种情况下,第一个分支跳转到第二个分支,第二个分支是跳转到最终目的地的分支, n=2中的两个分支,或更一般地说,所有n个分支都基于相同的条件。这解决了漏洞, 因为在这里对于要被黑客入侵的分支,单个故障是不够的,反而需要在两个或更多通 常为n个节点的每一个节点注入故障,这增加了黑客攻击主题的复杂程度执行流程。 应当理解的是,如果系统设计者需要,本文所示以及所述的实施例可以与其他反黑客 措施(例如任何合适的措施来改善例如纠正至少一种影响,例如故障注入的不良影响) 相结合,从而一起使条件分支操作更难以骇入。以上有关“Implementing A Sequence Of Conditional Branches”的技术藉由使故障注入更困难来阻止故障注入,因此不太可 能可以例如与用于改善故障注入的影响或不良影响的任何合适的技术相结合以改善 故障输入的影响或负面效应。合适的技术可为,例如包括使用在此所示以及所述的任 何实施例来检测故障注入,然后当检测到故障注入时,实施任何合适的故障注入影响 改善措施。Implement a series of conditional branches: e.g. one of many techniques used to make fault injection more difficult and therefore less likely, e.g. as per category a above, repeat a conditional branch n > 1 times, e.g. twice (n=2 ). In this case, the first branch jumps to the second branch, which is the branch that jumps to the final destination, two branches in n=2, or more generally, all n Branches are all based on the same condition. This solves the vulnerability, because here for the branch to be hacked, a single fault is not enough, instead a fault needs to be injected at each of two or more nodes, usually n nodes, which adds to the complexity of the hacking topic degree of execution process. It should be understood that the embodiments shown and described herein may be combined with other anti-hacking measures (eg, any suitable measures to improve, eg correct, at least one effect, eg, the undesirable effects of fault injection), if desired by the system designer. , which together make conditional branch operations harder to hack. The techniques above regarding "Implementing A Sequence Of Conditional Branches" prevent fault injection by making fault injection more difficult, and are therefore unlikely to be able to improve, for example, in combination with any suitable technique for ameliorating the effects or ill effects of fault injection. Effects or negative effects of faulty inputs. Suitable techniques may, for example, include detecting fault injection using any of the embodiments shown and described herein, and then implementing any suitable fault injection impact amelioration when fault injection is detected.

在共同拥有的美国专利9,523,736中描述了一种用于更好地检测故障注入(并因此 更好地改善其影响,例如通过停止系统直到应用电源循环)的已知技术,该专利描述 了一种用于检测故障注入的装置包括跨越机体电路以及电路的高扇出网络。在集成电 路的功能操作期间,高扇出网络可以持续不活动,并且电路可以被配置为检测高扇出 网络中多个采样点处的信号位准,并通过基于感测到的信号位准而检测高扇出网络中 的信号异常来识别故障注入尝试。该电路可以被配置为检测高扇出网络中多个采样点 处的信号位准,以基于感测到的信号位准,在集成电路的功能操作期间区分高扇出网 络中的合法信号变化和信号异常,并通过检测信号异常来识别故障注入尝试。该电路 可以被配置为响应于识别故障注入尝试而修改高扇出网络中的一个或多个信号位准。 由于ALERT信号的设置,控制单元或感测器48可以修改网络根40或高扇出网络的另 一分支上的信号位准(例如,强制信号处于活动状态)。A known technique for better detecting fault injection (and thus better ameliorating its effects, such as by stopping the system until a power cycle is applied) is described in co-owned US Patent 9,523,736, which describes a Means for detecting fault injection include circuits across the body and high fan-out networks of circuits. During functional operation of the integrated circuit, the high fan-out network may remain inactive, and the circuit may be configured to detect signal levels at a plurality of sampling points in the high fan-out network and to detect signal levels based on the sensed signal levels. Detect signal anomalies in high fanout networks to identify fault injection attempts. The circuit may be configured to detect signal levels at multiple sampling points in the high fan-out network to distinguish between legitimate signal changes in the high fan-out network and Signal anomalies and identify fault injection attempts by detecting signal anomalies. The circuitry may be configured to modify one or more signal levels in the high fan-out network in response to identifying the fault injection attempt. Due to the setting of the ALERT signal, the control unit or sensor 48 may modify the signal level (e.g., force the signal to be active) on the net root 40 or another branch of the high fan-out net.

另一个例子是检测硬件突波(glitch),例如由外部(如,电磁能量源)所引起 的集成电路中的电源/接地发生突波。通过电源突波进行故障注入是一种已知用于入 侵集成电路装置的方法。多年来,电磁(Electromagnetic,EM)突波一直被认为是实 现对集成电路的物理攻击的有效故障注入技术。用于指示故障注入漏洞且“承受”着 安全级别以及误报(false alarm)(又称假阳性(false positive))之间的权衡的检 测硬件突波的电路,包括,如可通过网际网络在以下http位置获得的电路:ieeexpl ore.ieee.org/document/5376828;Another example is the detection of hardware glitches, such as power/ground glitches in integrated circuits caused by external sources (e.g., electromagnetic energy sources). Fault injection through power surges is a known method for hacking integrated circuit devices. Electromagnetic (EM) surges have been considered for many years as an effective fault injection technique to achieve physical attacks on integrated circuits. Circuits for detecting hardware surges that indicate fault injection vulnerabilities and "suffer" between security levels and false alarms (also known as false positives), including, for example, available over the Internet at Circuit obtained at the following http location: ieeexpl ore.ieee.org/document/5376828;

Zussa,L等人所著,“Efficiency of a glitch detector againstelectromagnetic fa ult injection”ieeexplore.ieee.org/document/6800417/Zussa, L et al., "Efficiency of a glitch detector against electromagnetic fa ult injection" ieeexplore.ieee.org/document/6800417/

并在以下https www位置:blackhat.com/docs/eu-15/materials/eu-15-Giller-Imple menting-Electrical-Glitching-Attacks.pdf。and at the following https www location: blackhat.com/docs/eu-15/materials/eu-15-Giller-Imple menting-Electrical-Glitching-Attacks.pdf.

关于故障注入攻击检测器的最新知识在日期为2016年12月16日的“Cheap &Cheerful:A Low Low-Cost Digital Sensor for Detecting Laser Fault Injection Attacks”中有所描述,可通过网际网络在以下http位置获得:www-users.math.umn.e du/~math-sa-sara0050/space16/slides/space2016121602-37.pdf。建议的解决方案是可调的(“该传感器具有双向检测能力,且后端阶段(back-end stage)的灵敏度可调”)。 也如别处所指出的,本文件的公开内容,以及实际上这里引用的所有文件,特此通过 引用并入。The latest knowledge on Fault Injection Attack Detectors is described in "Cheap &Cheerful: A Low Low-Cost Digital Sensor for Detecting Laser Fault Injection Attacks" dated December 16, 2016, available over the Internet at the following http location Obtained: www-users.math.umn.e du/~math-sa-sara0050/space16/slides/space2016121602-37.pdf. The proposed solution is tunable ("the sensor has bidirectional detection capability and the sensitivity of the back-end stage is tunable"). Also as noted elsewhere, the disclosure of this document, and indeed all documents cited herein, are hereby incorporated by reference.

可以理解的是,可以通过使用在此所述的实施例而增加操作码响应动态灵敏度级别调整,来增进上述的检测器。上述“Cheap&Cheerful”的公开文件中的CPU设计 是可调整的,可以适用于随时提供指示将要执行的指令的输出信号。例如,可以在设 计中嵌入多个实时可选择的调整,或者可以添加多个电路,每个电路具有不同的调整, 其中根据由此处所示以及所述的决策逻辑所指示的灵敏度级别,仅实时选择多个电路 之一者的其中一个输出。It will be appreciated that the above-described detector may be enhanced by adding opcode response to dynamic sensitivity level adjustment using the embodiments described herein. The CPU design in the aforementioned "Cheap & Cheerful" publication is adaptable and can be adapted to provide an output signal indicating the instruction to be executed at any time. For example, multiple real-time selectable adjustments can be embedded in the design, or multiple circuits can be added, each with a different adjustment, where, depending on the level of sensitivity indicated by the decision logic shown and described here, only Select one of the outputs of one of multiple circuits in real time.

一般而言,本领域已知的任何故障注入攻击对策如以下所述:In general, any fault injection attack countermeasure known in the art is as follows:

由Thierno Barry、Damien Courousse、Bruno Robisson所著的“Compilation ofa Countermeasure Against Instruction-Skip Fault Attacks”,可通过网际网络在以下https位置中获得:hal-cea.archives-ouvertes.fr/cea-01296572/document;以及"Compilation ofa Countermeasure Against Instruction-Skip Fault Attacks" by Thierno Barry, Damien Courousse, Bruno Robisson, available via the Internet at the following https location: hal-cea.archives-ouvertes.fr/cea-01296572/document ;as well as

“Low-Cost Software Countermeasures Against Fault Attacks:Implementation a nd Performances Trade Offs”可通过网际网络在以下http位置获得:euler.ecs.umas s.edu/research/bpbk-WESS-2010.pdf"Low-Cost Software Countermeasures Against Fault Attacks: Implementation an and Performances Trade Offs" is available via the Internet at the following http location: euler.ecs.umas.edu/research/bpbk-WESS-2010.pdf

可以与本发明的实施例共存,作为互补的检测/保护层。这一切共同增强了CPU 或类似的装置免受攻击的总体保护程度,例如故障注入攻击。Can coexist with embodiments of the present invention as complementary detection/protection layers. Together, this increases the overall degree of protection of a CPU or similar device from attacks, such as fault injection attacks.

可以理解的是,模拟电路通常设计有调整的选择,例如提供多个灵敏度级别的多个检测级别/临限值,因此可能难以提前预测哪些级别/临限值在实际电气系统环境中 最有效。一般而言,一旦在硅电路中,就执行测试以确定哪种配置最有效,然后根据 某些实施例,电路可以被配置为一个特定的“最佳”或最可行的设置,而不是配置为 单个测试选择的设置。取而代之的是,保留所有或多于一个的多个设置,并且如本文 所示以及所述,添加控制电路以实时选择使用多个设置中的哪一个。然后可以简单地 进行测试以重新确认电路在真实硅中的性能。It will be appreciated that analog circuits are often designed with tuning options, such as multiple detection levels/thresholds providing multiple sensitivity levels, so it may be difficult to predict in advance which levels/thresholds will be most effective in the actual electrical system environment. Generally speaking, once in a silicon circuit, testing is performed to determine which configuration works best, and then according to some embodiments, the circuit may be configured for a particular "best" or most feasible setup, rather than being configured as Settings for individual test selections. Instead, all or more than one of the multiple settings are retained, and as shown and described herein, control circuitry is added to select in real-time which of the multiple settings to use. A simple test can then be performed to reconfirm the circuit's performance in real silicon.

此处所示以及所述的实施例的一个特定优点是使的故障注入检测的安全级别以及误报程度之间的权衡是高度可调整的,即使在单个操作码上也是如此。通过将必要 但令人遗憾的误报的高容忍度(或低安全级别)限制在那些需要如此高容忍度的操作 码,并希望降低误报的容忍度(或低安全级别)适用于所有不需要如此高容忍度的操 作码,允许在不小的程度上克服权衡。A particular advantage of the embodiments shown and described here is that the trade-off between the level of safety of fault injection detection and the degree of false positives is highly adjustable, even on a single opcode. By limiting the necessary but unfortunate high tolerance (or low security level) for false positives to those opcodes that require such a high tolerance, and hopefully reducing the false positive tolerance (or low security level) for all non- Opcodes with such high tolerance are required, allowing the trade-off to be overcome to a considerable extent.

应了解的是,本文的特定实施例并非旨在进行限定。本发明旨在包括例如与CPU或处理器结合操作的任何实施例,这些CPU或处理器在内部具有作为将要执行的指令 的解码结果的信号。根据这些实施例,这些信号被发送出CPU,从而允许CPU外部的 至少一个操作单元基于这些信号的状态来采取行动,从而利用在一个环境中可用且设 计用于CPU内部目的的信号用于另一个环境,通常用于CPU外部目的是用于CPU外部 位置或环境。例如,响应于将要执行哪个操作码/指令的实时指示,安全系统中的灵 敏度级别控制模块可以同时(例如实时)调整,可操作以对抗故障注入攻击的对策电 路中的故障注入检测器功能的灵敏度级别(也称为安全级别)。It should be understood that the specific examples herein are not intended to be limiting. The present invention is intended to include any embodiment that operates, for example, in conjunction with a CPU or processor that has internally a signal that is the result of decoding an instruction to be executed. According to these embodiments, these signals are sent out of the CPU, thereby allowing at least one operating unit external to the CPU to take action based on the state of these signals to utilize signals available in one environment and designed for CPU-internal purposes for another Environment, usually used outside of the CPU Purpose is for a location or environment outside of the CPU. For example, in response to a real-time indication of which opcode/instruction is to be executed, a sensitivity level control module in a security system may simultaneously (eg, in real-time) adjust the sensitivity of a fault injection detector function in a countermeasure circuit operable to counter fault injection attacks level (also known as security level).

如果用于实现这里的某些实施例,固件则可以保存在非挥发性存储器中,例如快闪式存储器或ROM。可以使用任何合适的技术来防止固件位置的限制而干扰快闪存 储器的管理。If used to implement certain embodiments herein, the firmware may be stored in non-volatile memory, such as flash memory or ROM. Any suitable technique may be used to prevent firmware location constraints from interfering with the management of flash memory.

或者,本文描述的某些实施例可以部分的或单独的(即,没有固件)在硬件中实现,在这种情况下,本文描述的变量、参数、顺序操作以及计算中的一些或全部可以 在硬件中。Alternatively, some of the embodiments described herein may be implemented in hardware, in part or alone (ie, without firmware), in which case some or all of the variables, parameters, sequential operations, and calculations described herein may be implemented in in hardware.

如本文所用的术语“对策(Countermeasure,CM)”旨在包括芯片上电路的操作 的任何方面,其通常可实时对控制信号做出反应,因此通常是硬件实现的,其保护 CPU及/或芯片中的任何其他操作功能或阻止故障注入攻击,例如但不限于电源突波 攻击、时脉突波攻击以及信号突波攻击。The term "Countermeasure (CM)" as used herein is intended to encompass any aspect of the operation of an on-chip circuit, which typically reacts to control signals in real-time, and is therefore typically implemented in hardware, which protects the CPU and/or the chip Any other operational function in the system or prevent fault injection attacks such as, but not limited to, power surge attacks, clock surge attacks, and signal surge attacks.

一些对策是“回避(evasive)”的,因为它们混淆了敌人或攻击者该于何时何地 注入故障;可以理解的是,如果攻击者在“错误的”(从攻击的角度来看)地点或时 间注入故障,则攻击不太可能导致其预期效果。Some countermeasures are "evasive" because they confuse the enemy or attacker when and where to inject the fault; understandably, if the attacker is in the "wrong" (from an attack's point of view) place or time injection failure, the attack is less likely to have its intended effect.

例如,这篇文章https://www.nuvoton.com/support/technical-support/technical-article s/TSNuvotonTechBlog-000154/介绍了“随机延迟和随机变化处理流程的顺序”,这 两者都会产生不可预测的系统执行时序,作为针对故障注入攻击的对策,解释「让攻 击者无法轻易的了解系统内部运作的时序,将会是一个有效的防护,最简单的方法就 是建立不可预测的系统时序和处理流程,让攻击者不容易找到合适的攻击时间点,也不容易持续攻击到同一个关键运行点,而这可以通过随机延迟和随机变化处理流程 的顺序来实现。For example, this article https://www.nuvoton.com/support/technical-support/technical-articles/TSNuvotonTechBlog-000154/ describes "random delays and random changes in the order of the processing flow", both of which can result in unreliable Predicted system execution timing, as a countermeasure against fault injection attacks, explains that "it will be an effective protection to prevent attackers from easily understanding the timing of the internal operation of the system. The easiest way is to establish unpredictable system timing and processing. The process makes it difficult for attackers to find a suitable attack time point, and it is not easy to continuously attack the same critical operation point, which can be achieved by random delay and random change of the order of processing processes.

在本文中所使用的术语对策(countermeasure,CM)包括可操作以检测及/或响 应攻击的任何机制、电路、检测器或其他硬件或固件或软件,例如通过反击或采取行 动来反击曾经或将要或可能已经或即将由攻击引起的任何危险或威胁。对策可以包括 一种机制,例如温度传感器或由攻击触发的故障检测器(又称为“陷阱(trap)”或 “暗门(trapdoor)”)因此检测到攻击;然后,该机制也可以触发适当的动作,例 如辩护或决议。The term countermeasure (CM) as used herein includes any mechanism, circuit, detector or other hardware or firmware or software operable to detect and/or respond to an attack, such as by countering or taking action to counter what was or will be or any danger or threat that may have been or will be caused by an attack. Countermeasures can include a mechanism such as a temperature sensor or a failure detector (aka a "trap" or "trapdoor") that is triggered by the attack so that the attack is detected; the mechanism can then also trigger an appropriate actions, such as defenses or resolutions.

CM可以包括由攻击触发及/或触发保护受保护电路的动作的任何硬件、固件甚至软件,无论是全部还是部分,无论是在攻击之前还是攻击期间,例如主动或在攻击之 后,例如追溯。A CM may include any hardware, firmware or even software, whether in whole or in part, that is triggered by an attack and/or triggers an action to protect a protected circuit, whether before or during an attack, e.g. proactively or after an attack, e.g. retrospectively.

本文中的术语“突波(glitch)”旨在包括在集成电路中的特定点或集成电路IO端子/引脚处施加一些外在的电、磁、激光或其他能量,这会以各种可能的方式干扰芯 片功能,例如但不限于导致CPU采取CPU不应该采取的条件分支,导致逻辑状态机 (state-machine)做出逻辑状态机不应该做出的状态改变,由外在故意地改变暂存器 或存储器的状态位元,使某些芯片逻辑暂时产生不正确的(从设计者的角度来看)逻 辑结果。本领域中使用的术语“突波(glitch)”旨在包括发生在信号上的任何转变。 这通常会在信号稳定到其预期值之前发生,尤其是在数字电路中。通常,转变包括通 常持续时间较短的电脉冲,例如由于可能来自共同来源但可能具有不同延迟的多个信 号之间的竞争条件(racecondition)。某些电子元件,例如触发器,需要由至少给定 长度的脉冲所触发,否则触发器(例如)无法正常工作。在这种情况下,比最小长度 短的脉冲也被认为是突波。突波还可以包括矮脉冲(runt pulse),或者其幅度小于正 确操作所需的最小位准的脉冲,及/或例如可能由震荡或串音(crosstalk)引起的尖峰 (spike)。例如在适当调整时序的同步电路中,突波(glitch)可能无害或耐受良好, 但更多情况下会构成导致误动作的影响,因此被视为故障或设计错误。此处使用的术 语突波(glitch)通常包括发生在信号及/或电源/接地线上并被引入攻击者的转换,其 目的是使集成电路出现故障,及/或使集成电路执行某些操作,或无法执行某些操作, 通过他们的委托(commission)或疏忽(omission)而分别产生攻击者想要的结果, 例如向攻击者揭露秘密资料,如储存在集成电路上的社会安全号码。The term "glitch" as used herein is intended to include the application of some external electrical, magnetic, laser or other energy at a specific point in an integrated circuit or at an IO terminal/pin of an integrated circuit, which may occur in various ways Interfering with the function of the chip in a way, such as but not limited to causing the CPU to take a conditional branch that the CPU should not take, causing the logic state machine (state-machine) to make state changes that the logic state machine should not make, and deliberately changing the temporary state bits of a register or memory that cause some chip logic to temporarily produce incorrect (from the designer's point of view) logic results. The term "glitch" as used in the art is intended to include any transition that occurs in a signal. This usually happens before the signal settles to its expected value, especially in digital circuits. Typically, transitions include electrical pulses of generally short duration, e.g. due to race conditions between multiple signals that may originate from a common source but may have different delays. Certain electronic components, such as flip-flops, need to be triggered by a pulse of at least a given length, otherwise the flip-flop (for example) will not function properly. In this case, pulses shorter than the minimum length are also considered to be glitches. Spurs may also include runt pulses, or pulses whose amplitude is less than the minimum level required for proper operation, and/or spikes such as may be caused by oscillations or crosstalk. For example, in a synchronous circuit with proper timing adjustment, glitch may be harmless or well tolerated, but in more cases it will constitute an effect that causes malfunction and thus be regarded as a fault or a design error. The term glitch as used herein generally includes transitions that occur on signal and/or power/ground lines and are introduced to an attacker with the purpose of causing the integrated circuit to fail and/or cause the integrated circuit to perform some operation , or inability to perform certain operations, through their commission or omission, respectively, to produce the attacker's desired result, such as revealing secret information to the attacker, such as a social security number stored on an integrated circuit.

根据某些实施例,一种安全系统被配置为部署在要保护的芯片上,该安全系统包括至少一个配置为部署在芯片上的故障注入检测子系统,每个故障注入检测子系统具 有实时可选的多个灵敏度级别,并包括:至少一个硬件故障注入检测器电路,用以部 署在芯片上,以及与其耦合的灵敏度级别控制逻辑,灵敏度级别控制逻辑用于部署在 芯片上且实时操作以通过生成灵敏度控制信号(也称为灵敏度级别选择)而将故障注 入检测子系统自多个可选灵敏度级别中的目前灵敏度级别转换至多个可选灵敏度级 别中的下一个灵敏度级别,并将灵敏度控制信号发送到子系统中至少一硬件故障注入 检测器。According to certain embodiments, a security system is configured to be deployed on a chip to be protected, the security system including at least one fault injection detection subsystem configured to be deployed on the chip, each fault injection detection subsystem having a real-time A plurality of sensitivity levels are selected and include: at least one hardware fault injection detector circuit for deployment on the chip, and sensitivity level control logic coupled therewith, the sensitivity level control logic for deployment on the chip and operating in real time to pass generating a sensitivity control signal (also referred to as sensitivity level selection) to transition the fault injection detection subsystem from the current sensitivity level of the plurality of selectable sensitivity levels to the next sensitivity level of the plurality of selectable sensitivity levels, and converting the sensitivity control signal Sent to at least one hardware fault injection detector in the subsystem.

可以理解的是,任何合适的机制都可以触发状态改变。芯片状态转换可以由硬件自动发生,例如在检测到无活动时,或可由固件触发。It will be appreciated that any suitable mechanism can trigger a state change. Chip state transitions can occur automatically by hardware, such as when inactivity is detected, or can be triggered by firmware.

可以理解的是,芯片上可能有一个或多个子系统,并且这些子系统中的每一者可包括一或多个硬件故障注入检测器、一或多个灵敏度级别控制逻辑电路,其中一或多 个灵敏度级别控制逻辑电路的每一者都可耦接至一或多个硬件故障注入检测器,以及 一或多个功能模块,每个功能模块可与不同的检测器相关联。It will be appreciated that there may be one or more subsystems on a chip, and each of these subsystems may include one or more hardware fault injection detectors, one or more sensitivity level control logic circuits, one or more of which Each of the sensitivity level control logic circuits may be coupled to one or more hardware fault injection detectors, and one or more functional modules, each functional module may be associated with a different detector.

可采用适用于多个灵敏度级别的任何合适的实施方式。可以使用具有多个对应检测位准的电压故障检测器(例如,如本文中详细描述或显示的),或者具有多个对应 的温度检测临限值的温度感测器。Any suitable implementation suitable for multiple sensitivity levels may be employed. A voltage fault detector with a plurality of corresponding detection levels (e.g., as described or shown in detail herein), or a temperature sensor with a plurality of corresponding temperature detection thresholds, may be used.

术语“突波(glitch)检测器”旨在包括监控电源线并在每次功率位准下降到低 于额定的功率位准的X%(或Y mV)时所触发的任何电路。每次检测到这种下降时, 这可能是由于攻击者试图恶意操纵芯片的电源所注入的故障。The term "glitch detector" is intended to include any circuit that monitors the power line and triggers each time the power level falls below X% (or Y mV) of the rated power level. Every time this dip is detected, it may be due to a fault injected by an attacker trying to maliciously manipulate the chip's power supply.

突波(glitch)检测器可以通过(检测)突波(glitch)检测器监测的任何电源或 信号上的突波(glitch)来触发。类似地,当放置感测器的芯片的某个区域的温度偏 离(通常预定义的)“正常”温度范围时,可以触发温度传感器。当CM被触发时可 能发生的其他事件包括,例如,停止CPU执行及/或选择性地重置某些芯片机制及/或 阻止存取某些存储器区域及/或禁用某些芯片IO通道的功能。The glitch detector can be triggered by (detecting) a glitch on any power supply or signal monitored by the glitch detector. Similarly, a temperature sensor can be triggered when the temperature of a certain area of the chip in which the sensor is placed deviates from a (usually predefined) "normal" temperature range. Other events that may occur when a CM is triggered include, for example, halting CPU execution and/or selectively resetting certain chip mechanisms and/or preventing access to certain memory regions and/or disabling the functionality of certain chip IO channels .

提供具有多个灵敏度级别的对策的另一个实施例是为给定子系统可以包括多个检测器,其中多个检测器的子集合可以是活动的,例如100个检测器中只有25个的子 集合可以是活动的,或者50个检测器中只有第二个子集是活动的,或者只有75个检测 器的第三子集可以是活动的,从而在各种不同时间点产生每个子系统的多个(例如, 在这种情况下为3个)灵敏度级别。Another example of providing a countermeasure with multiple sensitivity levels is that a given subsystem may include multiple detectors, where a subset of the multiple detectors may be active, for example only a subset of 25 out of 100 detectors. Can be active, or only a second subset of 50 detectors can be active, or only a third subset of 75 detectors can be active, resulting in multiple (eg 3 in this case) sensitivity levels.

更一般地说,子系统可以包括多个检测器,并且子系统在时间t的灵敏度级别可以实现为多个检测器中的多个检测器,这些检测器在时间t致能,通常灵敏度级别控 制逻辑确定在时间t致能许多检测器中的多少个检测器,从而提供具有实时可配置灵 敏度级别的对策,使得通过较少数量的致能的检测器电路来实现较低的灵敏度级别, 且通过较大数量的致能的检测器电路来实现较高的灵敏度级别。More generally, a subsystem may include multiple detectors, and the sensitivity level of the subsystem at time t may be implemented as multiple detectors of multiple detectors enabled at time t, typically the sensitivity level controls The logic determines how many of the many detectors are enabled at time t, providing a countermeasure with real-time configurable sensitivity levels such that lower sensitivity levels are achieved with a smaller number of detector circuits enabled, and A larger number of enabled detector circuits achieves higher sensitivity levels.

可以检测故障注入攻击的硬件检测器电路的多个实例(例如,突波(glitch)检 测器、或温度传感器或其他对策)可以分布在要保护的芯片的至少一(通常是预定义 的)部分之上,或者均匀分布,或者使用预定义的、有意的放置,而这尤其取决于芯 片的功能模块的位置及/或与其相关的安全风险。Multiple instances of hardware detector circuits that can detect fault injection attacks (eg, glitch detectors, or temperature sensors, or other countermeasures) can be distributed over at least one (usually predefined) portion of the chip to be protected on top, either evenly distributed, or using predefined, intentional placements, depending in particular on the location of the functional modules of the chip and/or the security risks associated therewith.

通常,至少一个故障注入子系统还包括部署在芯片上的至少一个功能模块,实时产生输出信号,并将输出信号发送到灵敏度级别控制逻辑,从而提供具有关于要从多 个可选灵敏度级别中选择的下一个灵敏度级别的指示的灵敏度级别控制逻辑。Typically, the at least one fault injection subsystem also includes at least one functional module deployed on the chip that generates an output signal in real-time and sends the output signal to the sensitivity level control logic, thereby providing information about the sensitivity level to be selected from a plurality of selectable sensitivity levels. The next sensitivity level indicates the sensitivity level control logic.

例如,每个功能模块可包括:For example, each functional module may include:

加密加速器;及/或cryptographic accelerators; and/or

通信功能模块(例如,通用异步接收机/发射机(Universal AsynchronousReceiver/Transmitter,UART)、I2C、USB控制器或任何(通常是硬件)模块)使 用一组特定的信号并遵循预定义的协议,与另一个芯片及/或另一个可能部署的子系 统进行通信在同一个系统板上;及/或A communication function module (for example, Universal Asynchronous Receiver/Transmitter (UART), I2C, USB controller, or any (usually hardware) module) uses a specific set of signals and follows a predefined protocol, with another chip and/or another possibly deployed subsystem to communicate on the same system board; and/or

外围功能,例如定时器或功能模块控制对非挥发性存储器的存取,例如一次性密码、看门狗定时器、中断控制器、DMA控制器。Peripheral functions such as timers or function blocks control access to non-volatile memory such as one-time passwords, watchdog timers, interrupt controllers, DMA controllers.

由给定功能模块所产生的每个输出信号通常指示该功能模块的当前状态,或该功能模块的状态将是什么(例如,功能模块将要转变到的状态)。例如,功能模块可以 包括处理器核心,其中处理器核心用以指示处理器核心将要执行哪些指令的输出。功 能模块可产生指示功能模块将要转换到哪个状态(例如致能与非致能)的输出。功能 模块可产生指示特定活动(例如密码活动)即将开始由功能模块所执行或密码活动可 能即将在功能模块中结束的输出。Each output signal produced by a given functional module generally indicates the current state of the functional module, or what the state of the functional module will be (eg, the state the functional module will transition to). For example, a functional module may include a processor core, where the processor core is used to indicate the output of which instructions the processor core is to execute. The functional module may generate an output indicating which state the functional module is to transition to (eg, enabled and disabled). The functional module may generate an output indicating that a particular activity (e.g., a cryptographic activity) is about to begin to be performed by the functional module or that the cryptographic activity may be about to end in the functional module.

通常,模块每次保持相同状态时(每次下一状态相对于当前状态不变),输出信 号保持不变。在这种情况下,只要被选择的下一个灵敏度级别受到目标模块的影响, 就可以是当前的灵敏度级别。Typically, each time the module remains in the same state (every time the next state is unchanged relative to the current state), the output signal remains unchanged. In this case, as long as the next sensitivity level selected is affected by the target module, it can be the current sensitivity level.

可以理解的是,一个芯片可以包括任意合适数量的故障注入检测子系统,每个故障注入检测子系统可包括耦接至灵敏度级别控制逻辑的任意合适数量的硬件故障注 入检测器电路,且可包括任意合适数量的功能模块。例如,图9是显示在其上部署了 包括单个功能模块91、灵敏度级别控制逻辑92、和单个硬件错误注入检测器93的单个 子系统的芯片。在图10中,芯片上部署了单个故障注入检测子系统,此子系统包括3 个功能模块91a、91b、91c。在图11中,芯片上部署了单个故障注入检测子系统,与 图10一样,子系统包括3个功能模块91a、91b、91c,而在图11中,子系统包括2个硬 件错误注入检测器电路93a、93b。图12是显示了其上部署了两个子系统且每个子系统 包括3个功能模块以及一个硬件错误注入检测器的芯片。It will be appreciated that a chip may include any suitable number of fault injection detection subsystems, each fault injection detection subsystem may include any suitable number of hardware fault injection detector circuits coupled to sensitivity level control logic, and may include Any suitable number of functional modules. For example, Figure 9 is a chip showing a single subsystem including a single functional module 91, sensitivity level control logic 92, and a single hardware error injection detector 93 deployed thereon. In FIG. 10, a single fault injection detection subsystem is deployed on the chip, and this subsystem includes three functional modules 91a, 91b, and 91c. In Figure 11, a single fault injection detection subsystem is deployed on the chip. Like Figure 10, the subsystem includes 3 functional modules 91a, 91b, 91c, while in Figure 11, the subsystem includes 2 hardware fault injection detectors Circuits 93a, 93b. Figure 12 shows a chip on which two subsystems are deployed and each subsystem includes 3 functional modules and a hardware error injection detector.

因此,如至少一个/或多个功能模块可包括多个功能模块并且灵敏度级别控制逻辑可以通过将来自多个功能模块的每一者的输出指示组合成单个灵敏度控制信号集 合,而导出要被选择的下一灵敏度级别。Thus, as at least one/or more functional modules may comprise multiple functional modules and the sensitivity level control logic may derive the to be selected by combining output indications from each of the multiple functional modules into a single set of sensitivity control signals the next sensitivity level.

通常,每组信号包括多位元灵敏度控制信号。Typically, each set of signals includes a multi-bit sensitivity control signal.

通常,提供多个故障注入检测子系统,其中每个故障注入检测子系统被配置为部署在芯片上且包括至少一个硬件故障注入检测器,并且每个故障注入检测子系统与灵 敏度级别控制逻辑相互耦接。Typically, a plurality of fault injection detection subsystems are provided, wherein each fault injection detection subsystem is configured to be deployed on a chip and includes at least one hardware fault injection detector, and each fault injection detection subsystem interacts with sensitivity level control logic coupled.

根据某些实施例,系统部署在被保护的芯片上,并且至少一功能模块包括至少第一功能模块以及第二功能模块。一般而言,多个子系统包括分别保护第一功能模块以 及第二功能模块的第一子系统以及第二子系统,第一功能模块比第二功能模块更靠近 第一子系统,第二功能模块比第一个功能模块更靠近第二子系统。According to some embodiments, the system is deployed on a protected chip, and the at least one functional module includes at least a first functional module and a second functional module. Generally speaking, the multiple subsystems include a first subsystem and a second subsystem that protect the first functional module and the second functional module respectively, the first functional module is closer to the first subsystem than the second functional module, and the second functional module is closer to the first subsystem than the second functional module. Closer to the second subsystem than the first functional module.

应当理解的是,故障注入被电气地和物理地施加到作为目标的芯片电路的附近。因此,功能模块以及“负责”保护该功能模块的检测器之间相互接近是合乎需要的, 以允许检测器(故障注入检测器电路)有效地拦截可能是故障注入尝试的相关活动。 如果需要,功能模块以及给定子系统的检测器之间的距离(例如,用以确定哪些功能 模块更接近哪些子系统)可以定义为检测器在芯片上的位置与功能模块的逻辑的“加 权中心”之间的距离,其中“加权中心”指的是功能模块的逻辑中的一个点,对于该 点,从该点到功能模块中包含的每个单元(例如到其中的每个逻辑闸(比如说包含在 给定功能模块中的10k个逻辑门))的距离平方的总和的平方根,相对于功能模块的 逻辑中所有其他点的类似平方根而言是最小的。It should be understood that fault injection is applied electrically and physically in the vicinity of the targeted chip circuit. Therefore, it is desirable that the functional modules and the detectors "responsible for" protecting the functional modules are in close proximity to each other to allow the detectors (fault injection detector circuits) to effectively intercept related activities that may be fault injection attempts. If desired, the distance between functional blocks and detectors for a given subsystem (eg, to determine which functional blocks are closer to which subsystems) can be defined as the location of the detectors on the chip and the logical "weighted center of the functional block" ”, where “weighted center” refers to a point in the logic of a functional module, for which point, from that point to each unit contained in the functional module (e.g. to each logic gate in it (such as Say the square root of the sum of the squared distances of the 10k logic gates)) contained in a given functional module is minimal relative to the similar square root of all other points in the logic of the functional module.

通常,多个故障注入检测子系统中的至少一个子系统S保护芯片上的至少一个功能模块。通常,来自多个子系统的相应硬件故障注入检测器中的每个单独检测器具有 由单独检测器所保护的至少一功能模块所实时选择的灵敏度级别。Typically, at least one subsystem S of the plurality of fault injection detection subsystems protects at least one functional module on the chip. Typically, each individual detector of respective hardware fault injection detectors from multiple subsystems has a sensitivity level selected in real time by at least one functional module protected by the individual detector.

特定功能模块与特定检测器之间可能存在排他性关联。然而在一般情况下,每个功能模块可能影响(例如为其选择灵敏度级别)一个以上的探测器,并且每个探测器 可能受到多个功能模块的影响,例如可以通过组合由多个功能模块产生的输出来选择 给定的检测器的灵敏度级别,这些功能模块通常由该检测器所保护(例如在其检测范 围内)。There may be an exclusive association between certain functional modules and certain detectors. In general, however, each functional module may affect (eg select a sensitivity level for) more than one detector, and each detector may be affected by multiple functional modules, for example, may be produced by combining multiple functional modules output to select the sensitivity level of a given detector by which these functional blocks are normally protected (eg, within its detection range).

通常,每个检测器具有多个可实时选择的灵敏度级别。Typically, each detector has multiple sensitivity levels that can be selected in real time.

根据某些实施例,灵敏度级别控制逻辑根据至少部分地某些芯片上的模块是否致能,来实时选择可控的灵敏度级别。According to some embodiments, the sensitivity level control logic selects the controllable sensitivity level in real time based on whether at least in part certain on-chip modules are enabled.

例如,当某些芯片上的模块处于致能状态时,可控灵敏度级别可以由灵敏度级别控制逻辑选择为低于当某些芯片上的模块不致能时由机制所选择的可控灵敏度级别。For example, when certain on-chip modules are enabled, the controllable sensitivity level may be selected by the sensitivity level control logic to be lower than the controllable sensitivity level selected by the mechanism when certain on-chip modules are disabled.

及/或,例如,当给定的芯片上的模块处于致能状态时,可由灵敏度级别控制逻 辑选择的可控灵敏度级别高于当给定的芯片上的模块处于未致能状态时由灵敏度级 别控制逻辑所选择的可控灵敏度级别。And/or, for example, when a given on-chip module is enabled, the controllable sensitivity level selectable by the sensitivity level control logic is higher than when the given on-chip module is disabled. The controllable sensitivity level selected by the control logic.

芯片上的模块可以包括如:Modules on a chip can include, for example:

a.进行通信的通信模块,在操作时被认为是安全关键的,例如发射器,可用于 在芯片外部传输被视为机密的数据,或接收器,可用于接收数据而关键数据影响芯片 任务的正确执行。a. A communication module that communicates and is considered safety-critical when in operation, such as a transmitter, which can be used to transmit data that is considered confidential outside the chip, or a receiver, which can be used to receive data that is critical to the mission of the chip Do it correctly.

b.被视为安全关键的GPIO模块,用以控制和监控某些IO信号,例如控制芯片的 输出信号,这些信号致能芯片外的某些功能,关键的是除非某个特定的安全标准,例 如密码认证成功,否则不得致能这些功能。b. GPIO modules considered as safety-critical, used to control and monitor certain IO signals, such as the output signals of the control chip, these signals enable certain functions outside the chip, the key is that unless a specific safety standard, For example, password authentication is successful, otherwise these functions cannot be enabled.

c.一个特定的存储器介面模块,在处理预定义的存储器区域时被认为是安全关键的。例如,对用于储存关键或秘密信息的给定储存区的存取可能被认为是安全关键 的。该区域从位址A开始,到位址B结束;这两者都可以是可编辑的。解码器知道或 确定正在存取该区域内的位址,并且可以输出发送到灵敏度级别控制逻辑的信号作为 响应,告诉灵敏度级别控制逻辑提高其灵敏度级别,以便在从那个存储器区域提取数 据时产生更高的安全性。c. A specific memory interface module that is considered safety-critical when dealing with predefined memory regions. For example, access to a given storage area for storing critical or secret information may be considered security critical. The area starts at address A and ends at address B; both can be editable. The decoder knows or determines the address within that region is being accessed, and can output a signal sent to the sensitivity level control logic in response, telling the sensitivity level control logic to increase its sensitivity level in order to generate more information when fetching data from that memory region. High security.

d.自检模块,例如当运行时被认为是安全关键的一个测试某个存储器阵列。可以理解的是,存储器错误会导致安全问题,因此一些传统的安全系统在开始使用被测试 单元之前会执行某些单元的自检。干扰这种自检会导致安全系统发生误动作,无论是 非严重的还是严重的,这取决于被测试单元的重要程度。d. A self-test module, such as one that tests a certain memory array that is deemed safety-critical when run. Understandably, memory errors can cause safety issues, so some conventional safety systems perform self-tests of certain units before starting to use the unit under test. Interfering with this self-test can lead to malfunction of the safety system, whether minor or severe, depending on the criticality of the unit under test.

如果该模块在受到干扰或被黑客入侵时会对芯片的安全产生严重影响,则该模块通常被认为是关键或安全关键的,因为它会对芯片的操作产生严重的不利影响,从而 产生风险。If the module, when disturbed or hacked, would have a serious impact on the security of the chip, the module is generally considered critical or safety-critical because it would have a serious adverse effect on the operation of the chip, thereby creating a risk.

可以理解的是,可以在任何合适的阶段做出关于什么是关键的决定。例如,芯片的架构者可以决定哪些元件或功能模块是关键的,或者可以决定哪些元件或功能模块 (芯片的元件或功能模块的所有或任何子集合)可被认为是关键的,将决定的自由度 留给后面的阶段,例如系统的设计者,可以随后决定致能什么。Understandably, decisions about what is critical can be made at any suitable stage. For example, the architect of the chip can decide which elements or functional blocks are critical, or can decide which elements or functional blocks (all or any subset of the elements or functional blocks of the chip) can be considered critical, the freedom to decide Degrees are left to later stages, such as the system designer, who can then decide what to enable.

根据某些实施例,关于什么是关键的决定在集成电路初始化期间被编辑以及配置,然后通过设计的操作而保持固定。According to some embodiments, decisions about what is critical are edited and configured during initialization of the integrated circuit, and then held fixed through the operation of the design.

根据某些实施例,例如对于包括CM和灵敏度控制的系统,灵敏度可以设置为给 定值(例如最大值),直到集成电路的固件被另行设置。由于配置是关键阶段,因此 该实施例允许在释放CM以在正常级别运行之前进型高度保护的配置,正常级别通常 比为配置阶段所设置的安全级别更不安全。According to some embodiments, such as for a system including a CM and sensitivity control, the sensitivity may be set to a given value (e.g., a maximum value) until the firmware of the integrated circuit is set otherwise. Since configuration is a critical stage, this embodiment allows for a highly secured configuration to be advanced before the CM is released to operate at the normal level, which is generally less secure than the security level set for the configuration stage.

根据某些实施例,某些元件或功能模块被配置为具有向灵敏度控制指示它们当前是致能还是非致能的能力。例如,每次加速器主动执行加密活动时,诸如加密加速器 之类的给定功能可产生输出信号。该输出可以连接到灵敏度级别控制逻辑,其可相应 地设置对策电路灵敏度的级别作为回应。According to some embodiments, certain elements or functional modules are configured with the ability to indicate to the sensitivity control whether they are currently enabled or disabled. For example, a given function, such as a cryptographic accelerator, may generate an output signal each time the accelerator is actively performing cryptographic activity. This output can be connected to the sensitivity level control logic, which can set the countermeasure circuit sensitivity level accordingly in response.

应当理解的是,可以使用任何合适的技术来确保给定元件或功能模块知道它是否是致能。例如,加密加速器通常加载要处理的数据,然后通过设置“开始”或“启动” 位元来促使其采取行动。一旦数据加载或一旦开始/启动被致能时,加速器可被认为 是致能的,并且直到数据被载入或直到开始/启动被致能之前被认为是未致能。当到 达其内部状态机中的状态(又名“传输开始”状态)时,通信模块可知道它已经开始 通信,并且如果通信模块不在“传输开始”状态,知道它并未致能。It should be understood that any suitable technique may be used to ensure that a given element or functional module knows whether it is enabled. For example, a cryptographic accelerator typically loads the data to be processed and then causes it to take action by setting a "start" or "start" bit. The accelerator may be considered enabled once data is loaded or once start/start is enabled, and not enabled until data is loaded or until start/start is enabled. When reaching a state in its internal state machine (aka "transfer started" state), the communication module can know that it has started communication, and if it is not in the "transfer started" state, that it is not enabled.

根据某些实施例,至少一个功能模块可操作以产生至少一输出信号并将其发送到灵敏度级别控制逻辑,该输出信号包括指示模块是否致能的状态指示。通常,逻辑根 据至少部分的状态指示来选择下一个灵敏度级别。According to some embodiments, at least one functional module is operable to generate and send at least one output signal to the sensitivity level control logic, the output signal including a status indication indicating whether the module is enabled. Typically, logic selects the next sensitivity level based on at least part of the status indication.

根据某些实施例,当且仅当模块是致能的时,下一个灵敏度级别被选择为给定级别。根据其他实施例,下一个灵敏度级别既取决于模块是否处于致能状态,也取决于 其他因素,例如模块是高风险模块还是低风险模块(这可能例如需要相对于高风险模 块稍低的灵敏度级别,即使是致能的)。According to some embodiments, the next sensitivity level is selected as a given level if and only if the module is enabled. According to other embodiments, the next sensitivity level depends both on whether the module is in an enabled state, but also on other factors, such as whether the module is a high-risk module or a low-risk module (which may, for example, require a slightly lower sensitivity level relative to a high-risk module , even if enabled).

根据某些实施例,响应于功能模块中的至少一个单独模块变为活动,逻辑至少一次选择更高的下一灵敏度级别。According to some embodiments, the logic selects the next higher sensitivity level at least once in response to at least one individual module of the functional modules becoming active.

根据某些实施例,至少响应于个别的模块变得不活动,逻辑至少一次释放至比更高的下一灵敏度级别较低的级别。According to some embodiments, logic is released to a lower level than the next higher sensitivity level at least once in response to an individual module becoming inactive.

可以理解的是,如果没有其他模块要求更高的灵敏度级别,则可能发生释放到较低的灵敏度级别,并且如果任何其他模块确实要求更高(例如,当前)灵敏度级别, 则可能不会发生释放到较低的灵敏度级别。相反的,需要提升灵敏度级别的单个模块 可能会导致灵敏度提升到更高级别。It is understandable that a release to a lower sensitivity level may occur if no other module requires a higher sensitivity level, and may not occur if any other module does require a higher (eg, current) sensitivity level to a lower sensitivity level. Conversely, a single module requiring an increased sensitivity level may result in a higher sensitivity level.

因此,系统可以利用这样一个事实,即在100%的系统操作时间中通常存在较低安全风险的时段,例如但不限于,根据经验,已经观察到不太受黑客攻击的时段,及 /或即使确实发生了攻击但每次攻击导致较少负面结果的时期,并且存在较高安全风 险的时期,例如但不限于,根据经验,已经观察到更受黑客攻击的时期及/或每次攻 击将导致更负面结果的时期。然后,系统将系统对安全威胁更敏感的时间限制在第二 种类型的时段内,从而总体上降低系统对误报的感受性,相对于系统在100%的时间 内对故障注入具有最高灵敏度的情况下,使系统更安全且同时不影响可用性和使用 性。Thus, the system can take advantage of the fact that 100% of the system's operating time typically has periods of lower security risk, such as, but not limited to, periods when less hacking has been observed empirically, and/or even if Periods where attacks did occur but each attack resulted in fewer negative outcomes, and periods when there was a higher security risk, such as, but not limited to, periods of greater hacking that have been observed empirically and/or each attack would result in Periods of more negative outcomes. The system then limits the times when the system is more sensitive to security threats to the second type of time period, thereby reducing the system's overall susceptibility to false positives relative to the situation where the system has the highest sensitivity to fault injection 100% of the time , making the system more secure without compromising usability and usability.

根据某些实施例,至少一个输出信号代表与至少一个功能模块的当前活动相关联的风险级别。通常,灵敏度级别控制逻辑至少部分地从风险级别导出灵敏度级别,并 将该灵敏度级别选为下一个灵敏度级别。According to some embodiments, the at least one output signal represents a risk level associated with the current activity of the at least one functional module. Typically, the sensitivity level control logic derives the sensitivity level, at least in part, from the risk level and selects that sensitivity level as the next sensitivity level.

通常,芯片架构者和芯片设计者会提前确定合适的风险等级(例如:确定密码活动是最高风险活动等),然后进行相应设计,为灵敏度级别控制逻辑提供状态信号或 输出信号以进行实时监控,允许逻辑相应地实时调整灵敏度级别控制信号。例如,如 果希望基于给定模块是否处于活动/非活动状态来确定灵敏度级别,则这些模块可以 被设计为提供指示(例如实时改变)模块是否正在做某事的单个二进制输出信号,或 是否在任何给定时间闲置。对于多个级别的风险评级,设计者可以为多个模块中的 每一者提供决策,以便每个模块的状态携带相关信息。Usually, chip architects and chip designers will determine the appropriate risk level in advance (for example: determine that cryptographic activities are the highest risk activities, etc.), and then design accordingly to provide status signals or output signals for sensitivity level control logic for real-time monitoring, Allows the logic to adjust the sensitivity level control signal accordingly in real time. For example, if it is desired to determine the sensitivity level based on whether a given module is active/inactive, these modules can be designed to provide a single binary output signal indicating (eg changing in real time) whether the module is doing something, or whether it is in any Idle for a given time. For multiple levels of risk ratings, the designer can provide decisions for each of the multiple modules so that the status of each module carries relevant information.

根据某些实施例,如果功能模块是活动的并且具有第一级别的风险,则逻辑选择第一灵敏度级别作为下一灵敏度级别。如果功能模块是活动的并且具有第二级别的风 险,则逻辑选择低于第一级风险的第二灵敏度级别作为下一级别风险。如果功能模块 不活动,则选择第三级灵敏度作为下一个灵敏度级别。According to some embodiments, if the functional module is active and has a first level of risk, the logic selects the first sensitivity level as the next sensitivity level. If the functional module is active and has a second level of risk, the logic selects a second sensitivity level lower than the first level of risk as the next level of risk. If the function block is inactive, the third sensitivity level is selected as the next sensitivity level.

可以理解的是,可以提供任何合适数量的风险级别,例如2或3或4或更多风险级别,通常取决于芯片设计所提供的灵敏度级别的数量(或者,芯片被设计为提供足够 的灵敏度级别以适应所需的任何风险分级解决方案)。It will be appreciated that any suitable number of risk levels may be provided, such as 2 or 3 or 4 or more risk levels, typically depending on the number of sensitivity levels provided by the chip design (or, the chip is designed to provide sufficient sensitivity levels) to accommodate any risk grading solution required).

应当理解的是,攻击者有时可能知道加密活动何时发生,在这种情况下,CM在 这种情况下更加敏感可能尤为重要,以便在这种情况下提供更好的保护。因此,根 据某些实施例,灵敏度级别控制逻辑至少部分地根据芯片是否正在执行加密加速来实 时选择可控灵敏度级别。It should be understood that attackers may sometimes know when cryptographic activity is taking place, in which case it may be especially important for the CM to be more sensitive in this situation in order to provide better protection in this situation. Thus, according to some embodiments, the sensitivity level control logic selects the controllable sensitivity level in real-time based at least in part on whether the chip is performing cryptographic acceleration.

根据某些实施例,功能模块包括与高风险级别相关联的密码模块。According to some embodiments, the functional module includes a cryptographic module associated with a high risk level.

例如,当CPU正在执行加密加速时,可控灵敏度级别可被灵敏度级别控制逻辑强制为高于当CPU没有执行加密加速时灵敏度级别控制逻辑所强制的可控灵敏度级别 的灵敏度级别。For example, when the CPU is performing cryptographic acceleration, the controllable sensitivity level may be enforced by the sensitivity level control logic to a sensitivity level higher than the controllable sensitivity level enforced by the sensitivity level control logic when the CPU is not performing cryptographic acceleration.

术语“更高的灵敏度”意味着相较于当系统的灵敏度级别较低时被诊断为故障注入,更多的事件被判断为故障注入。通常,攻击者会尝试研究目标装置何时执行各种 操作(例如但不限于加密活动、敏感通信活动,如传送社会安全号码或其他敏感数据; 存取某些存储器范围—这基本上是为另一个实施例;执行某些与安全相关的测量/检 测;时脉电路处于锁定/调整状态),然后根据攻击者所欲完成的目标决定何时进行 攻击。例如,如果攻击者试图欺骗系统认为某个软件(例如由攻击者注入的恶意软件) 是被授权的,尽管它不是,攻击者可能会选择在他知道或认为是加密活动的时间进行 他的攻击。通常,当执行加密活动时,系统会切换到较高的灵敏度级别,尽管这涉及 到较高级别的误报,并且在执行加密活动后,系统会切换回较低的灵敏度级别。The term "higher sensitivity" means that more events are diagnosed as fault injection than when the system's sensitivity level is lower. Typically, attackers will try to study when the target device is performing various actions (such as but not limited to encryption activities, sensitive communication activities such as transferring social security numbers or other sensitive data; accessing certain memory ranges - this is basically for another One embodiment; perform some security-related measurements/detections; clock circuits are locked/adjusted), and then decide when to attack based on what the attacker wants to accomplish. For example, if an attacker tries to trick the system into thinking that a piece of software (such as malware injected by the attacker) is authorized, even though it is not, the attacker may choose to conduct his attack at a time he knows or believes to be cryptographic activity . Typically, when performing cryptographic activities, the system switches to a higher sensitivity level, although this involves a higher level of false positives, and after performing cryptographic activities, the system switches back to a lower sensitivity level.

根据某些实施例,灵敏度级别控制逻辑至少部分地取决于芯片的功率状态,实时地选择可控灵敏度级别。According to some embodiments, the sensitivity level control logic selects the controllable sensitivity level in real time depending at least in part on the power state of the chip.

当CPU处于闲置功率状态时,灵敏度级别控制逻辑可以选择比灵敏度级别控制逻辑在CPU处于活动状态时所选择的可控灵敏度级别,更低或更高的可控灵敏度级别。 系统可以在闲置时强制第一灵敏度级别,并在活动时强制更高的第二灵敏度级别。例 如,由于如果芯片处于休眠状态,就不太担心它受到攻击。或者,系统可能会在致能 时强制使用较低的第二灵敏度级别,例如由于执行不必要的故障检测补救措施是有风 险的或不可取的,这通常会给芯片的正常操作带来很大负担。When the CPU is in an idle power state, the sensitivity level control logic may select a lower or higher controllable sensitivity level than the controllable sensitivity level selected by the sensitivity level control logic when the CPU is active. The system can enforce a first sensitivity level when idle and a second, higher sensitivity level when active. For example, since if the chip is dormant, there is less concern about it being attacked. Alternatively, the system may force a lower second sensitivity level when enabled, e.g. because it is risky or undesirable to perform unnecessary fault detection remedies, which often detract from the normal operation of the chip burden.

根据某些实施例,CM始终是活动的,但是其灵敏度级别随时间变化,因为CM 的灵敏度级别有时会在此所示以及所述的硬件自动降低。According to some embodiments, the CM is always active, but its sensitivity level changes over time, as the CM's sensitivity level is sometimes automatically reduced by the hardware shown and described herein.

应当理解的是,固件已知一些功率状态转换,例如由固件触发的功率状态转换,例如固件通过向控制暂存器写入一些内容来使芯片处于某种闲置状态。It should be understood that some power state transitions are known to the firmware, eg power state transitions triggered by the firmware, eg the firmware puts the chip in some idle state by writing something to the control register.

因此,根据一个实施例,功能模块包括固件,该固件触发可能的功率状态之间的转换,从而使灵敏度级别控制逻辑知道当前状态。Thus, according to one embodiment, the functional module includes firmware that triggers transitions between possible power states so that the sensitivity level control logic is aware of the current state.

可以理解的是,即使转换不是由固件触发的,固件也可以知道电源状态转换。例如,退出低功耗状态通常由硬件触发,例如计时器或外部事件。在这种情况下,该事 件可能会触发中断,通过该中断通知固件唤醒。Understandably, firmware can be aware of power state transitions even if the transitions are not triggered by firmware. For example, exiting a low-power state is often triggered by hardware, such as a timer or an external event. In this case, the event may trigger an interrupt that informs the firmware to wake up.

在这些情况下,固件可以被配置(例如由固件设计者)以包括至少部分地取决于已知的当前功率状态的实时灵敏度级别的选择。In these cases, the firmware may be configured (eg, by the firmware designer) to include a selection of real-time sensitivity levels that depend at least in part on the known current power state.

或者,例如如果固件不知道电源状态的某些变化,这些变化又称为转换可能会产生控制信号,这可能会降低灵敏度级别。Or, for example, if the firmware is unaware of certain changes in power state, these changes aka transitions may generate control signals, which may reduce the sensitivity level.

根据某些实施例,芯片具有多种可能的功率状态,包括至少一种闲置状态和至少一种唤醒状态。通常,逻辑响应芯片的新状态而选择下一个灵敏度级别,新状态包括 多个可能状态中的一个。According to some embodiments, the chip has multiple possible power states, including at least one idle state and at least one awake state. Typically, the logic selects the next sensitivity level in response to a new state of the chip, which includes one of several possible states.

在该实施例中,功能模块可被称为电源管理模块或电源控制模块。该功能模块通常不产生或处理任何东西或将任何东西从一个地方移动到另一个地方,而是收集芯片 中存在的各种指示,从而控制芯片及其模块的状态。例如,在检测到特定的、通常预 定义的“进入睡眠”的CPU指令时,电源管理或电源控制模块(逻辑)可使芯片进入 睡眠状态及/或可禁用某些其他功能。通常,固件会使芯片进入睡眠状态。在执行这 样的指令时,CPU可以将自己置于休眠状态,并且还可以响应于该功率管理逻辑可将 芯片的其他部分或功能元件置于休眠状态而发出信号。In this embodiment, the functional modules may be referred to as power management modules or power control modules. This functional module typically does not produce or process anything or move anything from one place to another, but instead collects various indications present in the chip, thereby controlling the state of the chip and its modules. For example, a power management or power control module (logic) may put the chip to sleep and/or may disable some other function upon detection of a specific, often predefined, "go to sleep" CPU instruction. Usually, firmware puts the chip to sleep. In executing such instructions, the CPU may place itself in a sleep state, and may also signal in response to the power management logic that other parts or functional elements of the chip may be placed in a sleep state.

可以在芯片的电源状态转换到新状态之前选择下一个灵敏度级别。在芯片的电源状态转换到新状态之前,可以将检测器设置为下一个灵敏度级别。在芯片的电源状态 转换到新状态后,可以选择下一个灵敏度级别。The next sensitivity level can be selected before the chip's power state transitions to a new state. The detector can be set to the next sensitivity level before the chip's power state transitions to a new state. After the chip's power state transitions to a new state, the next sensitivity level can be selected.

在芯片的电源状态转换到新状态之后,检测器可以被设置为下一个灵敏度级别。After the chip's power state transitions to a new state, the detector can be set to the next sensitivity level.

应当理解的是,诸如“强制”、“必需”、“需要”和“必须”之类的术语是指 为了清楚起见在此处描述的特定实现或应用的上下文中做出的实现选择,并且不用以 限制,因为在另一种实现方式中,相同的元件可能被定义为非强制性和非必需,甚至 可能一并消除。It should be understood that terms such as "mandatory," "required," "required," and "must" refer to implementation choices made for clarity in the context of a particular implementation or application described herein, and are not used To limit, because in another implementation, the same elements may be defined as optional and optional, and may even be eliminated altogether.

本发明的特征,包括在单独实施例的上下文中描述的操作,也可以在单个实施例中组合提供。例如,系统实施例旨在包括相应的过程实施例,反之亦然。此外,每个 系统实施例旨在包括系统、电脑可读介质、装置的整个功能的以服务器为中心的“视 角”或以客户端为中心的“视图”或来自系统的任何其他节点的“视图”,仅包括在 该服务器、客户端或节点上执行的那些功能。特征还可以与本领域已知的特征组合, 特别是但不限于在背景部分或其中提及的出版物中描述的那些特征。相反的,本发明 的特征包括在单个实施例的上下文中或以特定顺序为简洁描述的操作,可以单独提供 或以任何合适的子组合提供,包括本领域已知的特征(特别地但不限于那些在背景部 分或其中提到的出版物中描述)或以不同的顺序。“例如”用于表示不旨在限定的实 施例。每个方法可以包括所示或所述的一些或所有操作,适当的排序,例如,如本文 所示或所述。Features of the invention, including operations that are described in the context of separate embodiments, may also be provided in combination in a single embodiment. For example, system embodiments are intended to include corresponding process embodiments, and vice versa. Furthermore, each system embodiment is intended to include a server-centric "view" or a client-centric "view" of the entire functionality of the system, computer-readable medium, device, or "view" from any other node of the system ", including only those functions performed on that server, client, or node. Features may also be combined with features known in the art, in particular but not limited to those described in the Background section or in the publications mentioned therein. Rather, features of the invention, including operations that are described for brevity in the context of a single embodiment or in a specific order, may be provided separately or in any suitable subcombination, including features known in the art (in particular but not limited to those described in the Background section or the publications mentioned therein) or in a different order. "For example" is used to denote an embodiment that is not intended to be limiting. Each method may include some or all of the operations shown or described, in a suitable order, e.g., as shown or described herein.

虽然本揭露的实施例及其优点已揭露如上,但应该了解的是,任何本领域技术人员,在不脱离本揭露的精神和范围内,当可作更动、替代与润饰。此外,本揭露的保 护范围并未局限于说明书内所述特定实施例中的制程、机器、制造、物质组成、装置、 方法及步骤,任何本领域技术人员可从本揭露一些实施例的揭示内容中理解现行或未 来所发展出的制程、机器、制造、物质组成、装置、方法及步骤,只要可以在此处所 述实施例中实施大抵相同功能或获得大抵相同结果皆可根据本揭露一些实施例使用。 因此,本揭露的保护范围包括上述制程、机器、制造、物质组成、装置、方法及步骤。 另外,每一申请专利范围构成个别的实施例,且本揭露的保护范围也包括各个申请专 利范围及实施例的组合。Although the embodiments of the present disclosure and their advantages have been disclosed above, it should be understood that any person skilled in the art can make changes, substitutions and modifications without departing from the spirit and scope of the present disclosure. In addition, the protection scope of the present disclosure is not limited to the process, machine, manufacture, material composition, device, method and steps in the specific embodiments described in the specification, and any person skilled in the art can learn from the disclosure content of some embodiments of the present disclosure. It is understood that processes, machines, manufacturing, material compositions, devices, methods and steps developed in the present or in the future can be implemented according to the present disclosure as long as they can implement substantially the same functions or obtain substantially the same results in the embodiments described herein. Example use. Therefore, the protection scope of the present disclosure includes the above-mentioned processes, machines, manufactures, compositions of matter, devices, methods and steps. In addition, each claimed scope constitutes a separate embodiment, and the protection scope of the present disclosure also includes the combination of each claimed scope and the embodiments.

Claims (21)

1. A security system for deployment on a chip to protect the chip, the security system comprising:
at least one fault injection detection subsystem for deployment on the chip, wherein the fault injection detection subsystem has a plurality of sensitivity levels, wherein the fault injection detection subsystem comprises:
at least one hardware fault injection detector circuit disposed on the chip; and
a sensitivity level control logic disposed on the chip and operative in real-time to convert the fault injection detection subsystem from a current sensitivity level of the plurality of sensitivity levels to a next sensitivity level of the plurality of sensitivity levels by generating a sensitivity control signal and sending the sensitivity control signals to the at least one hardware fault injection detector circuit in the fault injection detection subsystem.
2. The safety system of claim 1, wherein the at least one fault injection detection subsystem further comprises:
at least one functional module disposed on the chip, wherein the at least one functional module generates an output signal in real time and sends the output signal to the sensitivity level control logic, thereby instructing the sensitivity level control logic to select the next sensitivity level from the plurality of sensitivity levels.
3. The security system of claim 2, wherein the at least one function module generates at least one output signal to the sensitivity level control logic, wherein the at least one output signal includes a status indication indicating whether the at least one function module is active, wherein the sensitivity level control logic selects the next sensitivity level based at least in part on the status indication.
4. The security system of claim 3, wherein the sensitivity level control logic selects a higher sensitivity level as the next sensitivity level at least once in response to at least one respective one of the at least one functional module becoming active.
5. The security system of claim 3, wherein the at least one output signal represents a risk level associated with a current activity of the at least one functional module; wherein the sensitivity level control logic derives a sensitivity level as the next sensitivity level at least in part from the risk level.
6. The safety system of claim 5, wherein the sensitivity level control logic selects a first sensitivity level as the next sensitivity level if the at least one function module is active and has a first risk level, wherein the sensitivity level control logic selects a second sensitivity level as the next sensitivity level if the at least one function module is active and has a second risk level, and wherein the sensitivity level control logic selects a third sensitivity level lower than the first sensitivity level as the next sensitivity level if the at least one function module is inactive.
7. The security system of claim 2, wherein the chip has a plurality of power states including at least one idle state and at least one wake state, wherein the sensitivity level control logic selects the next sensitivity level in response to a new state of the chip, the new state including one of the plurality of power states.
8. The security system of claim 7, wherein the functional module includes firmware that drives transitions between the plurality of power states such that the sensitivity level control logic knows that the chip is operating in a current one of the plurality of power states.
9. The security system of claim 7, wherein said next sensitivity level is selected before said chip transitions to said new one of said plurality of power states.
10. The security system of claim 9 wherein said hardware fault injection detector circuit is set to said next sensitivity level before said chip transitions to said new state.
11. The security system of claim 7, wherein said next sensitivity level is selected after said chip transitions to said new state.
12. The security system of claim 11, wherein said hardware fault injection detector circuit is set to said next sensitivity level after said chip transitions to said new state.
13. The security system of claim 1, wherein said security system is disposed on said chip to be protected.
14. The safety system of claim 2, wherein the at least one fault injection detection subsystem comprises a plurality of fault injection detection subsystems, wherein each of the plurality of fault injection detection subsystems is configured to be disposed on the chip, and wherein each of the plurality of fault injection detection subsystems comprises the hardware fault injection detector circuit and the sensitivity level control logic coupled to the hardware fault injection detector circuit.
15. The security system of claim 14, wherein the security system is disposed on the chip to be protected, wherein the at least one functional module comprises a first functional module and a second functional module, wherein the plurality of fault injection detection subsystems comprises a first fault injection detection subsystem and a second fault injection detection subsystem for protecting the first functional module and the second functional module, respectively, wherein the first functional module is closer to the first fault injection detection subsystem than the second functional module, and the second functional module is closer to the second fault injection detection subsystem than the first functional module.
16. The safety system according to claim 14, wherein at least one fault injection detection subsystem of the plurality of fault injection detection subsystems protects at least one functional module on the chip, wherein each hardware fault injection detector circuit of the corresponding plurality of hardware fault injection detector circuits of the plurality of fault injection detection subsystems has a sensitivity level selected in real time by at least one respective functional module protected by said each hardware fault injection detector circuit.
17. The safety system of claim 16, wherein each of said hardware fault injection detector circuits has said plurality of sensitivity levels selectable in real time.
18. The safety system of claim 1, wherein the fault injection detection subsystem comprises a plurality of hardware fault injection detector circuits, wherein the sensitivity level of the fault injection detection subsystem at a point in time is implemented by a number of the plurality of hardware fault injection detector circuits that are enabled at the point in time, wherein the sensitivity level control logic determines how many of the plurality of hardware fault injection detector circuits are enabled at the point in time; thus, a countermeasure is provided having a sensitivity level that is adjustable in real time such that a lower sensitivity level is achieved with a smaller number of hardware fault injection detector circuits, and a higher sensitivity level is achieved with a larger number of hardware fault injection detector circuits.
19. The security system of claim 2, wherein said at least one functional module comprises a plurality of functional modules, and wherein said sensitivity level control logic derives a sensitivity level as said next sensitivity level by combining said output signal of each of said plurality of functional modules and composes a set of sensitivity control signals.
20. The security system of claim 4, wherein the sensitivity level control logic selects a sensitivity level that is lower than the higher sensitivity level at least once in response to at least one individual functional module of the at least one functional module becoming active.
21. A security system according to claim 3, wherein said functional module comprises a cryptographic module, wherein said cryptographic module is associated with a high risk level.
CN202210319845.1A 2021-03-30 2022-03-29 Security system Pending CN115146265A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US17/217,472 2021-03-30
US17/217,472 US12182260B2 (en) 2017-12-18 2021-03-30 System and method for detecting fault injection attacks

Publications (1)

Publication Number Publication Date
CN115146265A true CN115146265A (en) 2022-10-04

Family

ID=83407262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210319845.1A Pending CN115146265A (en) 2021-03-30 2022-03-29 Security system

Country Status (3)

Country Link
JP (1) JP7383750B2 (en)
CN (1) CN115146265A (en)
TW (1) TWI812042B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233661B (en) * 2023-05-04 2023-08-18 新华三技术有限公司 Network equipment and optical module access control method
TWI863521B (en) * 2023-08-23 2024-11-21 新唐科技股份有限公司 Control chip and control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150369865A1 (en) * 2014-06-19 2015-12-24 Nuvoton Technology Corporation Detection of fault injection attacks using high-fanout networks
CN110048997A (en) * 2017-12-18 2019-07-23 新唐科技股份有限公司 The security system and method for handling failure injection attacks

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058428A (en) 2001-08-20 2003-02-28 Sony Corp Integrated circuit and data processor
US8510569B2 (en) * 2009-12-16 2013-08-13 Intel Corporation Providing integrity verification and attestation in a hidden execution environment
US10083296B2 (en) * 2015-06-27 2018-09-25 Mcafee, Llc Detection of malicious thread suspension
US10380341B2 (en) 2016-04-01 2019-08-13 Qualcomm Incorporated Adaptive systems and procedures for defending a processor against transient fault attacks
EP3714368B1 (en) * 2017-12-08 2021-09-15 Huawei Technologies Co., Ltd. Fault injection system and method of fault injection
US10979054B1 (en) * 2020-01-14 2021-04-13 Nuvotonn Technology Corporation Coupling of combinational logic circuits for protection against side-channel attacks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150369865A1 (en) * 2014-06-19 2015-12-24 Nuvoton Technology Corporation Detection of fault injection attacks using high-fanout networks
CN105277871A (en) * 2014-06-19 2016-01-27 新唐科技股份有限公司 Method and device for detecting error injection
CN110048997A (en) * 2017-12-18 2019-07-23 新唐科技股份有限公司 The security system and method for handling failure injection attacks

Also Published As

Publication number Publication date
TW202238422A (en) 2022-10-01
JP2022155571A (en) 2022-10-13
TWI812042B (en) 2023-08-11
JP7383750B2 (en) 2023-11-20

Similar Documents

Publication Publication Date Title
TWI685739B (en) Security system and method for coping with fault injection attacks
Sun et al. OAT: Attesting operation integrity of embedded devices
US11972033B2 (en) Alert handling
US10671727B2 (en) Systems and methods involving features of securely handling attempts to perform boot modifications(s) via a separation kernel hypervisor
KR102034348B1 (en) Security supervision
US12182260B2 (en) System and method for detecting fault injection attacks
CN108885663B (en) Adaptive system and program for making processor resistant to transient fault attack
TWI812042B (en) Security system
Js et al. Hardware trojan attacks in soc and noc
Zhu et al. Jintide: Utilizing low-cost reconfigurable external monitors to substantially enhance hardware security of large-scale CPU clusters
US20240184932A1 (en) Read-Only Memory (ROM) Security
Wang et al. An M-cache-based security monitoring and fault recovery architecture for embedded processor
Bresch et al. A red team blue team approach towards a secure processor design with hardware shadow stack
Provelengios et al. A hardware monitor to protect linux system calls
US20240361923A1 (en) Read-Only Memory (ROM) Security
US12189824B2 (en) Register file protection
Kanuparthi et al. Reliable integrity checking in multicore processors
Sharma Embedded Systems--A Security Paradigm for Pervasive Computing
Wang et al. rTPM: A Native Firmware-Based Trusted Platform Module for RISC-V
Bu et al. Compiler/hardware assisted application code and data security in embedded systems
Zhenliu et al. An Efficient Trustworthy Protected-Ring Model for UEFI Firmware
Zhou et al. An Efficient Trustworthy Protected-Ring Model for UEFI Firmware

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination