Laser injection attack detection circuit for chip and security chip

文档序号:1895078 发布日期:2021-11-26 浏览:18次 中文

阅读说明:本技术 用于芯片的激光注入攻击检测电路和安全芯片 (Laser injection attack detection circuit for chip and security chip ) 是由 薛建锋 李运宁 苏源 于 2020-08-07 设计创作,主要内容包括:一种用于芯片的激光注入攻击检测电路和安全芯片,该检测电路包括第一电容(C1)、第二电容(C2)、第一开关(S1)、第二开关(S2)、感光元件(D)、第一NMOS管(N1)以及第二NMOS管(N2),第一NMOS管(N1)的漏极用于输出第一电压信号,第二NMOS管(N2)的漏极用于输出第二电压信号,第一电压信号和第二电压信号用于指示芯片受到激光注入攻击,从而实现激光注入攻击的检测,保证所属芯片的鲁棒性与安全性。(The detection circuit comprises a first capacitor (C1), a second capacitor (C2), a first switch (S1), a second switch (S2), a photosensitive element (D), a first NMOS tube (N1) and a second NMOS tube (N2), wherein the drain electrode of the first NMOS tube (N1) is used for outputting a first voltage signal, the drain electrode of the second NMOS tube (N2) is used for outputting a second voltage signal, and the first voltage signal and the second voltage signal are used for indicating that the chip is attacked by laser injection, so that the detection of the laser injection attack is realized, and the robustness and the safety of the chip are ensured.)

1. A laser injection attack detection circuit for a chip, wherein the detection circuit is disposed within the chip, the detection circuit comprising: a first capacitor; a second capacitor;

the control end of the first switch is used for receiving a first clock signal to control the on-off state of the first switch, the first end of the first switch is connected to a power supply voltage, and the second end of the first switch is grounded through the first capacitor;

a control end of the second switch is used for receiving a second clock signal to control the on-off state of the second switch, a first end of the second switch is connected to the power supply voltage, and a second end of the second switch is grounded through the second capacitor;

a photosensitive element;

a drain of the first NMOS transistor is connected to the second end of the first switch and is used for outputting a first voltage signal, a source of the first NMOS transistor is connected to the photosensitive element, and a gate of the first NMOS transistor is connected to the second end of the second switch; and

the drain electrode of the second NMOS tube is connected to the second end of the second switch and used for outputting a second voltage signal, the source electrode of the second NMOS tube is connected to the photosensitive element, the grid electrode of the second NMOS tube is connected to the second end of the first switch, and the first voltage signal and the second voltage signal are used for indicating that the chip is attacked by laser injection.

2. The detection circuit of claim 1, further comprising: the first clock signal and the second clock signal have the same frequency and the same phase.

3. The detection circuit of claim 1, further comprising: the first clock signal and the second clock signal are mutually inverse signals.

4. The detection circuit according to any one of claims 1 to 3, further comprising: the first switch is turned on when the first clock signal is at a high level and turned off when the first clock signal is at a low level; the second switch is turned on when the second clock signal is at a high level and turned off when the second clock signal is at a low level.

5. The detection circuit of claim 4, wherein the first switch comprises: the first inverter and the first PMOS tube; wherein the content of the first and second substances,

the input end of the first phase inverter is used as the control end of the first switch, the output end of the first phase inverter is connected with the grid electrode of the first PMOS tube, the drain electrode of the first PMOS tube is used as the first end of the first switch, and the source electrode of the first PMOS tube is used as the second end of the first switch.

6. The detection circuit of claim 4, wherein the second switch comprises: a second inverter and a second PMOS tube; wherein the content of the first and second substances,

the input end of the second phase inverter is used as the control end of the second switch, the output end of the second phase inverter is connected with the grid electrode of the second PMOS tube, the drain electrode of the second PMOS tube is used as the first end of the second switch, and the source electrode of the second PMOS tube is used as the second end of the second switch.

7. The detection circuit according to any one of claims 1 to 3, further comprising: the first switch is turned on when the first clock signal is at a low level and turned off when the first clock signal is at a high level; the second switch is turned on when the second clock signal is at a low level and turned off when the second clock signal is at a high level.

8. The detection circuit of claim 7, wherein the first switch comprises: a third PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the third PMOS tube is used as the control end of the first switch, the drain electrode is used as the first end of the first switch, and the source electrode is used as the second end of the first switch.

9. The detection circuit of claim 7, wherein the second switch comprises: a fourth PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the fourth PMOS tube is used as the control end of the second switch, the drain electrode is used as the first end of the second switch, and the source electrode is used as the second end of the second switch.

10. The detection circuit according to any one of claims 1 to 3, further comprising: the first switch is turned on when the first clock signal is at a low level and turned off when the first clock signal is at a high level; the second switch is turned on when the second clock signal is at a high level and turned off when the second clock signal is at a low level.

11. The detection circuit of claim 10, wherein the first switch comprises: a third PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the third PMOS tube is used as the control end of the first switch, the drain electrode is used as the first end of the first switch, and the source electrode is used as the second end of the first switch.

12. The detection circuit of claim 10, wherein the second switch comprises: a second inverter and a second PMOS tube; wherein the content of the first and second substances,

the input end of the second phase inverter is used as the control end of the second switch, the output end of the second phase inverter is connected with the grid electrode of the second PMOS tube, the drain electrode of the second PMOS tube is used as the first end of the second switch, and the source electrode of the second PMOS tube is used as the second end of the second switch.

13. The detection circuit according to any one of claims 1 to 3, further comprising: the first switch is turned on when the first clock signal is at a high level and turned off when the first clock signal is at a low level; the second switch is turned on when the second clock signal is at a low level and turned off when the second clock signal is at a high level.

14. The detection circuit of claim 13, wherein the first switch comprises: the first inverter and the first PMOS tube; wherein the content of the first and second substances,

the input end of the first phase inverter is used as the control end of the first switch, the output end of the first phase inverter is connected with the grid electrode of the first PMOS tube, the drain electrode of the first PMOS tube is used as the first end of the first switch, and the source electrode of the first PMOS tube is used as the second end of the first switch.

15. The detection circuit of claim 13, wherein the second switch comprises: a fourth PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the fourth PMOS tube is used as the control end of the second switch, the drain electrode is used as the first end of the second switch, and the source electrode is used as the second end of the second switch.

16. A detection circuit according to any of claims 1 to 3, wherein the light sensing element is a photodiode.

17. The detection circuit according to any one of claims 1 to 16, further comprising a signal processing circuit for outputting a processed signal based on the first voltage signal and the second voltage signal, the processed signal being used to control the state of other circuits within the chip.

18. A security chip, comprising: the laser injection attack detection circuit and the storage circuit of any one of claims 1 to 17, wherein,

the first voltage signal and the second voltage signal are used to control the clearing of the contents of the memory circuit.

Technical Field

The application relates to the technical field of chip safety, in particular to a laser injection attack detection circuit for a chip and a safety chip.

Background

In order to achieve the purposes of stealing data stored in the chip, influencing the normal work of the chip and the like, a hacker may attack the chip. Especially, the security chip is often a key object of hacking based on the reasons that the security chip is widely applied to the fields of identity recognition, key data storage, finance and the like, which require high data reliability, and generally stores confidential data. An attacker generally injects a fault into a chip through an attack means, so that the working state of the chip is wrong, and confidential data stored in the chip is acquired.

Laser Injection Attack (Lazer Fault Injection Attack) is a semi-invasive Attack means commonly used by attackers, and the attackers use pulse laser to Attack chips from the front or the back, so that circuits generate wrong time sequence or abnormal turnover, and further storage contents are changed, and data transmission and normal work of encryption modules in the chips are influenced. In order to ensure the robustness and the security of the chip and the device to which the chip belongs, the laser injection attack to the chip needs to be detected in time and an alarm is given, so that the chip or the device to which the chip belongs can process the laser injection attack in time.

Disclosure of Invention

The application provides a laser injection attack detection circuit and a security chip for a chip, which can detect laser injection attack aiming at the chip such as the security chip and improve the robustness and the security of the chip.

In a first aspect, the present application provides a laser injection attack detection circuit for a chip, wherein the detection circuit is disposed in the chip, and the detection circuit includes: a first capacitor; a second capacitor;

the control end of the first switch is used for receiving a first clock signal to control the on-off state of the first switch, the first end of the first switch is connected to a power supply voltage, and the second end of the first switch is grounded through the first capacitor;

a control end of the second switch is used for receiving a second clock signal to control the on-off state of the second switch, a first end of the second switch is connected to the power supply voltage, and a second end of the second switch is grounded through the second capacitor;

a photosensitive element;

a drain of the first NMOS transistor is connected to the second end of the first switch and is used for outputting a first voltage signal, a source of the first NMOS transistor is connected to the photosensitive element, and a gate of the first NMOS transistor is connected to the second end of the second switch; and

the drain electrode of the second NMOS tube is connected to the second end of the second switch and used for outputting a second voltage signal, the source electrode of the second NMOS tube is connected to the photosensitive element, the grid electrode of the second NMOS tube is connected to the second end of the first switch, and the first voltage signal and the second voltage signal are used for indicating that the chip is attacked by laser injection.

The laser injection attack detection circuit can detect laser injection attack aiming at the chip, and improves the robustness and the safety of the chip.

In one possible implementation manner, the method further includes: the first clock signal and the second clock signal have the same frequency and the same phase.

In one possible implementation manner, the method further includes: the first clock signal and the second clock signal are mutually inverse signals.

In one possible implementation manner, the method further includes: the first switch is turned on when the first clock signal is at a high level and turned off when the first clock signal is at a low level; the second switch is turned on when the second clock signal is at a high level and turned off when the second clock signal is at a low level.

In one possible implementation, the first switch includes: the first inverter and the first PMOS tube; wherein the content of the first and second substances,

the input end of the first phase inverter is used as the control end of the first switch, the output end of the first phase inverter is connected with the grid electrode of the first PMOS tube, the drain electrode of the first PMOS tube is used as the first end of the first switch, and the source electrode of the first PMOS tube is used as the second end of the first switch.

In one possible implementation, the second switch includes: a second inverter and a second PMOS tube; wherein the content of the first and second substances,

the input end of the second phase inverter is used as the control end of the second switch, the output end of the second phase inverter is connected with the grid electrode of the second PMOS tube, the drain electrode of the second PMOS tube is used as the first end of the second switch, and the source electrode of the second PMOS tube is used as the second end of the second switch.

In one possible implementation manner, the method further includes: the first switch is turned on when the first clock signal is at a low level and turned off when the first clock signal is at a high level; the second switch is turned on when the second clock signal is at a low level and turned off when the second clock signal is at a high level.

In one possible implementation, the first switch includes: a third PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the third PMOS tube is used as the control end of the first switch, the drain electrode is used as the first end of the first switch, and the source electrode is used as the second end of the first switch.

In one possible implementation, the second switch includes: a fourth PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the fourth PMOS tube is used as the control end of the second switch, the drain electrode is used as the first end of the second switch, and the source electrode is used as the second end of the second switch.

In one possible implementation manner, the method further includes: the first switch is turned on when the first clock signal is at a low level and turned off when the first clock signal is at a high level; the second switch is turned on when the second clock signal is at a high level and turned off when the second clock signal is at a low level.

In one possible implementation, the first switch includes: a third PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the third PMOS tube is used as the control end of the first switch, the drain electrode is used as the first end of the first switch, and the source electrode is used as the second end of the first switch.

In one possible implementation, the second switch includes: a second inverter and a second PMOS tube; wherein the content of the first and second substances,

the input end of the second phase inverter is used as the control end of the second switch, the output end of the second phase inverter is connected with the grid electrode of the second PMOS tube, the drain electrode of the second PMOS tube is used as the first end of the second switch, and the source electrode of the second PMOS tube is used as the second end of the second switch.

In one possible implementation manner, the method further includes: the first switch is turned on when the first clock signal is at a high level and turned off when the first clock signal is at a low level; the second switch is turned on when the second clock signal is at a low level and turned off when the second clock signal is at a high level.

In one possible implementation, the first switch includes: the first inverter and the first PMOS tube; wherein the content of the first and second substances,

the input end of the first phase inverter is used as the control end of the first switch, the output end of the first phase inverter is connected with the grid electrode of the first PMOS tube, the drain electrode of the first PMOS tube is used as the first end of the first switch, and the source electrode of the first PMOS tube is used as the second end of the first switch.

In one possible implementation, the second switch includes: a fourth PMOS tube; wherein the content of the first and second substances,

and the grid electrode of the fourth PMOS tube is used as the control end of the second switch, the drain electrode is used as the first end of the second switch, and the source electrode is used as the second end of the second switch.

In one possible implementation, the photosensitive element is a photodiode.

In a possible implementation manner, the chip further includes a signal processing circuit, configured to output a processing signal according to the first voltage signal and the second voltage signal, where the processing signal is used to control states of other circuits in the chip.

In a second aspect, an embodiment of the present application provides a security chip, including: the laser injection attack detection circuit and the memory circuit according to any one of the first aspect,

the first voltage signal and the second voltage signal are used to control the clearing of the contents of the memory circuit.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a block diagram of one embodiment of a laser injection attack detection circuit according to the present application;

FIG. 2 is a diagram illustrating an exemplary structure between a B point of a laser injection attack detection circuit and a substrate according to the present application;

FIGS. 3 to 6 are timing diagrams illustrating the operation principle of the detection unit of the laser injection attack detection circuit of the present application shown in FIG. 1;

FIG. 7 is a block diagram of another embodiment of a laser injection attack detection circuit according to the present application;

FIG. 8 is a block diagram of another embodiment of a laser injection attack detection circuit according to the present application;

FIG. 9 is a block diagram of an embodiment of a security chip of the present application;

fig. 10 is a structural diagram of another embodiment of the security chip of the present application.

Detailed Description

The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.

The embodiment of the application provides a laser injection attack detection circuit for a chip, which can detect the laser injection attack aiming at the chip such as a security chip and improve the robustness and the security of the chip. The following provides an exemplary description of an implementation of the laser injection attack detection circuit according to the embodiment of the present application.

Fig. 1 is a structural diagram of an embodiment of a laser injection attack detection circuit according to the present application, and as shown in fig. 1, the laser injection attack detection circuit includes: a detection unit 10, a processing unit 20, wherein,

the first input terminal IN11 of the detection unit 10 receives the first clock signal CLKA, and the second input terminal IN12 receives the second clock signal CLKB; in this embodiment, the first clock signal CLKA and the second clock signal CLKB are the same signal, that is, when the first clock signal CLKA is at a high level, the second clock signal CLKB is also at a high level, and when the first clock signal CLKA is at a low level, the second clock signal CLKB is also at a low level. In the case where the first clock signal CLKA and the second clock signal CLKB are guaranteed to have the same frequency and the same phase, the signal amplitudes of the two are not limited. The first output terminal OUT1 of the detecting unit 10 is used for outputting a first voltage signal, and the second output terminal OUT2 is used for outputting a second voltage signal.

The first input terminal IN21 of the processing unit 20 is connected to the first output terminal OUT1 of the detecting unit 10 for receiving the first voltage signal; the second input terminal IN22 of the processing unit 20 is connected to the second output terminal OUT2 of the detecting unit 10 for receiving the second voltage signal; when the first voltage signal received by the first input terminal IN21 is a low level signal and/or the second voltage signal received by the second input terminal IN22 is a low level signal, the processing unit 20 outputs a processing signal, that is, the processing signal is used for controlling the states of other circuits IN the chip where the laser injection attack detection circuit is located, as long as at least one of the first voltage signal received by the first input terminal IN21 and the second voltage signal received by the second input terminal IN22 is a low level signal. For example, the processing unit 20 may output the processing signal to a processor of a chip on which the laser injection attack detection circuit is located, and the processor executes processing preset for the laser injection attack, such as interrupt or chip reset; alternatively, the data may be output to a memory circuit of the chip where the memory circuit executes the erasing of the memory contents.

It should be noted that the processing unit 20 in this embodiment of the present application is an optional unit, and if the laser injection attack detection circuit only includes the detection unit, the laser injection attack detection circuit in this embodiment of the present application may indicate whether the chip where the laser injection attack detection circuit is located generates the laser injection attack through the first voltage signal and the second voltage signal output by the detection unit, where the first voltage signal and the second voltage signal are used to control the states of other circuits in the chip where the laser injection attack detection circuit is located. For example, the first voltage signal and the second voltage signal output by the detection unit may be directly output to a processor of a chip where the laser injection attack detection circuit is located, and the processor executes processing preset for laser injection attack, such as terminal or chip reset, when the first voltage signal is a low-level signal and/or the second voltage signal is a low-level signal; alternatively, the first voltage signal and the second voltage signal output by the detection unit may also be directly output to a storage circuit of the chip where the detection unit is located, and the storage circuit performs the clearing of the stored content when the first voltage signal is a low level signal and/or the second voltage signal is a low level signal.

The detection unit 10 may include: the circuit comprises a first switch S1, a second switch S2, a first N-channel Metal Oxide Semiconductor (NMOS) tube N1, a second NMOS tube N2, a first capacitor C1, a second capacitor C2 and a photosensitive element D. Wherein, the control terminal of the first switch S1 is used as the first input terminal IN11 of the detection unit 10; a first terminal of the first switch S1 is connected to the power supply voltage VDD; a second terminal of the first switch S1 is connected to the drain of the first NMOS transistor N1 and the gate of the second NMOS transistor N2, and is also connected to GND through the first capacitor C1, and a second terminal of the first switch S1 is used as a first output terminal OUT1 of the detection unit 10; a control terminal of the second switch S2 serves as a second input terminal IN12 of the detection unit 10; a first terminal of the second switch S2 is connected to the power supply voltage VDD; a second terminal of the second switch S2 is connected to the drain of the second NMOS transistor N2 and the gate of the first NMOS transistor N1, and is also grounded GND through the second capacitor C2, and a second terminal of the second switch S2 is used as a second output terminal OUT2 of the detection unit 10; the source electrode of the first NMOS transistor N1 and the source electrode of the second NMOS transistor N2 are both connected to the first end of the photosensitive element D, and the second end of the photosensitive element D is suspended. In fig. 1, a first end of the photosensitive element D is denoted as a point a, and a second end of the photosensitive element D is denoted as a point B.

The first clock signal CLKA received by the first input terminal IN11 of the detection unit 10 is used to control the on-off state of the first switch S1; the second clock signal CLKB received by the second input terminal IN12 of the detection unit 10 is used to control the on-off state of the second switch S2.

Alternatively, the light sensing element D may be a photodiode, a first end of the light sensing element D is an anode of the photodiode, and a second end of the light sensing element D is a cathode of the photodiode.

Next, a structural relationship between the B point and the substrate of the laser injection attack detection circuit when the B point is suspended will be described. The substrate of the laser injection attack detection circuit is generally a part of the substrate of the chip to which the laser injection attack detection circuit belongs. As shown in fig. 2, a reverse biased PN junction D2 exists between the terminal B and the substrate, and when laser injection attack occurs, the reverse biased PN junction generates a current to ground, so that the charge stored in the point a is discharged, and when the current is large enough, the charge stored in the point a is discharged, so that the voltage of the point a is pulled down to ground.

The specific control logic for controlling the on/off state of the first switch S1 by the first clock signal CLKA may be: when the first clock signal CLKA is at a low level, the first switch S1 is turned off, and when the first clock signal CLKA is at a high level, the first switch S1 is turned on; the specific control logic for controlling the on/off state of the second switch S2 by the second clock signal CLKB may be: when the second clock signal CLKB is at a low level, the second switch S2 is turned off, and when the second clock signal CLKB is at a high level, the second switch S2 is turned on.

The operation of the laser injection attack detection circuit shown in fig. 1 will be explained.

First, the operation of the first switch S1 controlled by the first clock signal CLKA in fig. 1 will be explained.

The first clock signal CLKA periodically inputs a high level signal to the control terminal of the first switch S1, so that the voltage of the first output terminal OUT1 can be maintained at the power supply voltage VDD when no laser injection attack occurs, and the principle is as follows: when no laser injection attack occurs, once the first capacitor C1 is connected to the power supply voltage VDD, charging is completed, the voltage of the first output terminal OUT1 is equal to the power supply voltage VDD, however, leakage current exists in the circuit, the leakage current can cause the charge on the first capacitor C1 to be discharged, the voltage of the first output terminal OUT1 is reduced, if the first capacitor C1 is not charged for a long time, the voltage of the first output terminal OUT1 can be continuously reduced due to the leakage current through long-term accumulation, once the voltage is reduced to be below a preset first value, a signal output by the first output terminal OUT1 is turned from a high level to a low level, the processing unit 20 receives the low level signal and outputs a processing signal, and a false alarm occurs; and a high level signal is periodically input to the control end of the first switch S1 through the first clock signal CLKA, so that the first switch S1 is controlled to be periodically turned on, the power supply is periodically charged for the first capacitor C1, and the charge released by the first capacitor C1 due to leakage current can be supplemented, so that when the laser injection attack does not occur, the voltage of the first output end OUT1 is always kept at the power supply voltage VDD, that is, kept at a high level, and false detection caused by capacitor leakage is avoided.

The use of the second clock signal CLKB to control the on-off state of the second switch S2 in fig. 1 is based on the same principle, that is: the second clock signal CLKB is used to control the on-off state of the second switch S2, a high level signal is periodically input to the second switch S2, the second switch S2 is controlled to be periodically turned on, the power supply is allowed to periodically charge the second capacitor C2, and the charge released by the second capacitor C2 due to leakage current can be supplemented, so that when no laser injection attack occurs, the voltage of the second output terminal OUT2 can be kept at the power supply voltage VDD.

The operation principle of the laser injection attack detection by the laser injection attack detection circuit shown in fig. 1 will be described below with reference to the timing charts shown in fig. 3 to 6.

In the embodiment of the present application, the period of the first clock signal and the period of the second clock signal are generally 1us to 100us, while in the laser injection attack, a laser pulse signal is generally used to attack the chip, and the laser pulse width is generally in the order of ns, so the laser pulse width of the laser pulse signal is generally much smaller than the width of the high level or the low level in each period of the first clock signal and the second clock signal, and therefore, the laser pulse signal is generally located in the high level time or the low level time in each period of the first clock signal and the second clock signal.

In this embodiment, the first clock signal CLKA and the second clock signal CLKB are the same signal, and the timing diagram of the laser injection attack detection circuit shown in fig. 1 is shown in fig. 3 and fig. 4.

In fig. 3, the timing diagram of the operation of the detecting unit is shown, for example, when the first clock signal CLKA and the second clock signal CLKB are both at a high level, wherein the timing diagram includes the first output terminal OUT1, the second output terminal OUT2, and the voltage signal timing diagram at the point a of the detecting unit.

When the detection circuit is in a detection state and no laser injection attack occurs, the first clock signal CLKA periodically inputs a high level signal to the first switch S1 to control the first switch S1 to be periodically turned on, so that the power supply periodically charges the first capacitor C1, and the voltage of the first output terminal OUT1 is ensured to be always kept at the power supply voltage VDD, that is, kept at a high level, and similarly, the second clock signal CLKB periodically inputs a high level signal to the second switch S2 to control the second switch S2 to be periodically turned on, so that the power supply periodically charges the second capacitor C2, and the voltage of the second output terminal OUT2 is ensured to be always kept at the power supply voltage VDD, that is, kept at a high level. When the voltage of the first output terminal OUT1 is maintained at a high level, the second NMOS transistor N2 is turned on, and when the voltage of the second output terminal OUT2 is maintained at a high level, the first NMOS transistor N1 is turned on, so that the voltage at the point a is maintained at a high level.

The laser injection attack may occur during a high level period of the clock signal, at which time the first clock signal CLKA is at a high level, the first switch S1 is turned on, the first output terminal OUT1 is connected to the power voltage VDD, the second clock signal CLKB is at a high level, the second switch S2 is turned on, and the second output terminal OUT2 is connected to the power voltage VDD, at which time, if the laser injection attack occurs, the photosensitive element D generates a photo-generated current, and the charge at the point a is discharged, because the first NMOS transistor N1 and the second NMOS transistor N2 are in a conducting state, the charges stored in the first capacitor C1 and the second capacitor C2 are discharged via the conducting first NMOS transistor N1 and the conducting second NMOS transistor N2, respectively; however, since the first clock signal CLKA is at a high level and the first output terminal OUT1 is connected to the power supply voltage VDD, the first capacitor C1 is charged by the power supply at the same time as being discharged, and when the current charged by the power supply to the first capacitor C1 is smaller than the current discharged by the first capacitor C1, the voltage of the first output terminal OUT1 will eventually switch from a high level to a low level, and in the same principle, when the current charged by the power supply to the second capacitor C2 is smaller than the current discharged by the second capacitor C2, the voltage of the second output terminal OUT2 switches from a high level to a low level. After the laser injection attack is finished, the first clock signal CLKA and the second clock signal CLKB are both at a high level, the first output terminal OUT1 and the second output terminal OUT2 are connected to the power supply voltage VDD, and the power supply charges the first capacitor C1 and the second capacitor C2, so that the voltages of the first output terminal OUT1 and the second output terminal OUT2 are pulled up to the power supply voltage VDD again and become at a high level.

Fig. 4 shows an operation timing diagram of the detection unit, taking as an example that a laser injection attack occurs when both the first clock signal CLKA and the second clock signal CLKB are at a low level.

When the detection circuit is in a detection state and no laser injection attack occurs, the first clock signal CLKA periodically inputs a high level signal to the first switch S1 to control the first switch S1 to be periodically turned on, so that the power supply periodically charges the first capacitor C1, and the voltage of the first output terminal OUT1 is ensured to be always kept at the power supply voltage VDD, that is, kept at a high level, and similarly, the second clock signal CLKB periodically inputs a high level signal to the second switch S2 to control the second switch S2 to be periodically turned on, so that the power supply periodically charges the second capacitor C2, and the voltage of the second output terminal OUT2 is ensured to be always kept at the power supply voltage VDD, that is, kept at a high level. When the voltage of the first output terminal OUT1 is maintained at a high level, the second NMOS transistor N2 is turned on, and when the voltage of the second output terminal OUT2 is maintained at a high level, the first NMOS transistor N1 is turned on, so that the voltage at the point a is maintained at a high level.

The laser injection attack may occur during a low level period of the clock signal, where the first clock signal CLKA is at a low level, the first switch S1 is turned off, the first output terminal OUT1 is floating, the voltage is the power voltage VDD, the second clock signal CLKB is at a low level, the second switch S2 is turned off, the second output terminal OUT2 is floating, the voltage is the power voltage VDD, at this time, if the laser injection attack occurs, the photosensitive element D generates a photo-generated current, and the charge at the point a is discharged, and since the first NMOS transistor N1 and the second NMOS transistor N2 are in a conducting state, the charge stored in the first capacitor C1 and the second capacitor C2 is discharged through the conducting first NMOS transistor N1 and the conducting second NMOS transistor N2, respectively, and the voltage at the point a, the voltage at the first output terminal OUT1, and the voltage at the second output terminal OUT2 are converted from a high level to a low level. After the laser injection attack is finished, because the first clock signal CLKA and the second clock signal CLKB are both at a low level, the first output terminal OUT1 and the second output terminal OUT2 are suspended, and the voltage is still at a low level until the first clock signal CLKA and the second clock signal CLKB become at a high level, the first switch S1 and the second switch S2 are respectively turned on, the first output terminal OUT1 and the second output terminal OUT2 are connected with the power supply voltage VDD, the power supply charges the first capacitor C1 and the second capacitor C2, and the voltages of the first output terminal OUT1 and the second output terminal OUT2 are pulled up to the power supply voltage VDD again and become at a high level.

As can be seen from fig. 3 and 4 and the corresponding description, the laser injection attack detection circuit according to the embodiment of the present application can detect a laser injection attack for a chip under the condition that the first clock signal CLKA and the second clock signal CLKB are at a high level or a low level, thereby ensuring the robustness and the security of the chip.

Different from the above embodiments in which the first clock signal CLKA and the second clock signal CLKB are in-phase signals, the present embodiment further provides another laser injection attack detection circuit, based on the circuit structure shown in fig. 1, in which the first clock signal CLKA and the second clock signal CLKB are opposite-phase signals, that is, when the first clock signal CLKA is at a low level, the second clock signal CLKB is at a high level, and when the first clock signal CLKA is at a high level, the second clock signal CLKB is at a low level. In the case where the first clock signal CLKA and the second clock signal CLKB are guaranteed to have the same frequency and opposite phases, the signal amplitudes of the two are not limited. Timing charts of the laser injection attack detection circuit in this embodiment at this time are shown in fig. 5 and 6.

Fig. 5 shows an operation timing chart of the detection unit, taking as an example that the laser injection attack occurs when the first clock signal CLKA is at a high level and the second clock signal CLKB is at a low level.

When the detection circuit is in a detection state and no laser injection attack occurs, the first clock signal CLKA periodically inputs a high level signal to the first switch S1 to control the first switch S1 to be periodically turned on, so that the power supply periodically charges the first capacitor C1, and the voltage of the first output terminal OUT1 is ensured to be always kept at the power supply voltage VDD, that is, kept at a high level, and similarly, the second clock signal CLKB periodically inputs a high level signal to the second switch S2 to control the second switch S2 to be periodically turned on, so that the power supply periodically charges the second capacitor C2, and the voltage of the second output terminal OUT2 is ensured to be always kept at the power supply voltage VDD, that is, kept at a high level. When the voltage of the first output terminal OUT1 is maintained at a high level, the second NMOS transistor N2 is turned on, and when the voltage of the second output terminal OUT2 is maintained at a high level, the first NMOS transistor N1 is turned on, so that the voltage at the point a is maintained at a high level.

The laser injection attack may occur during a period when the first clock signal CLKA is at a high level and the second clock signal CLKB is at a low level, at this time, the first clock signal CLKA is at a high level, the first switch S1 is turned on, the first output terminal OUT1 is connected to the power supply voltage VDD, the second clock signal CLKB is at a low level, the second switch S2 is turned off, the second output terminal OUT2 is suspended, the voltage is the power supply voltage VDD, at this time, if the laser injection attack occurs: the photo-generated current is generated by the photo-sensing device D, the charge at the point a is discharged, the charge stored in the first capacitor C1 is discharged through the conducting first NMOS transistor N1 and the charge stored in the second capacitor C2 is discharged through the conducting second NMOS transistor N2 because the first NMOS transistor N1 and the second NMOS transistor N2 are in a conducting state, however, since the first clock signal CLKA is at a high level, the first output terminal OUT1 is connected to the power voltage VDD, the first capacitor C1 is charged by the power supply while being discharged, when the current charged by the power supply to the first capacitor C1 is greater than the current discharged by the first capacitor C1, the voltage at the first output terminal OUT1 may drop by a small amount (not shown in fig. 5), but, compared with the discharging speed of the second capacitor C2, the discharging speed of the first capacitor C1 is slow, and since the second clock signal CLKB is at a low level, the second output terminal OUT2, the voltage at the second output terminal OUT2 is pulled to a low ground quickly, changing to a low level; after the voltage of the second output terminal OUT2 is pulled down to ground, the first NMOS transistor N1 turns off, the charge of the first capacitor C1 stops draining, and VDD continues to charge the first capacitor C1, so that the voltage of the first output terminal OUT1 is pulled up to the supply voltage VDD; accordingly, the first clock signal CLKA is at a high level, the second clock signal CLKB is at a low level, and when the laser injection attack exists, the voltage of the first output terminal OUT1 is at a high level, and the voltage of the second output terminal OUT2 is at a low level. After the laser injection attack is finished, the voltage of the second output terminal OUT2 keeps low level until the second clock signal CLKB is inverted to high level, the second switch S2 is turned on, the power supply voltage VDD is connected with the second capacitor C2, the power supply charges the second capacitor C2, and the voltage of the second output terminal OUT2 is pulled up to the power supply voltage VDD again and becomes high level.

Fig. 6 shows an operation timing chart of the detection unit, taking as an example that the laser injection attack occurs when the first clock signal CLKA is at a low level and the second clock signal CLKB is at a high level.

Similar to the operation principle of fig. 5, when the first clock signal CLKA is at a low level, the second clock signal CLKB is at a high level, and the laser injection attack exists, the voltage of the first output terminal OUT1 is pulled down to ground and is at a low level, and when the current charged by the power supply to the second capacitor C2 is larger than the current discharged by the second capacitor C2, the voltage of the second output terminal OUT2 may drop by a small amplitude, but is always close to or equal to the power supply voltage VDD and is at a high level. After the laser injection attack is finished, the voltage of the first output terminal OUT1 keeps low level until the first clock signal CLKA is inverted to high level, the first switch S1 is turned on, the power supply voltage VDD is connected with the first capacitor C1, the power supply charges the first capacitor C1, and the voltage of the first output terminal OUT1 is pulled up to the power supply voltage VDD again and becomes high level.

As can be seen from fig. 5 and 6, in the laser injection attack detection circuit according to the embodiment of the present application, when the first clock signal is at a high level and the second clock signal is at a low level, or when the first clock signal is at a low level and the second clock signal is at a high level, the laser injection attack on the chip can be effectively detected, so that the robustness and the security of the chip are ensured.

Alternatively, for the laser injection attack detection circuit shown in fig. 1, the first switch S1 may be implemented by an inverter and a P-channel Metal Oxide Semiconductor (PMOS) transistor, as shown in part 71 in fig. 7, and the first switch S1 includes: an input terminal of the first inverter NO1 is used as a control terminal of the first switch S1, and is connected to the first input terminal IN11 of the detecting unit 10 to receive the first clock signal CLKA; the output end of the first inverter NO1 is connected with the gate of the first PMOS tube P1; the drain of the first PMOS transistor P1 is used as the first terminal of the first switch S1, and is connected to the power supply voltage VDD; the source of the first PMOS transistor P1 is used as the second terminal of the first switch S1, for connecting the drain of the first NMOS transistor N1 and the gate of the second NMOS transistor N2, and for connecting to the ground GND through the first capacitor C1, and at the same time, for being used as the first output terminal OUT1 of the detecting unit 10.

Alternatively, for the laser injection attack detection circuit shown in fig. 1, the second switch S2 may be implemented by an inverter and a PMOS transistor, as shown in part 72 of fig. 7, and the second switch S2 includes: an input terminal of the second inverter NO2 is used as a control terminal of the second switch S2, and is connected to the second input terminal IN12 of the detecting unit 10 to receive the second clock signal CLKB; the output end of the second inverter NO2 is connected with the gate of the second PMOS tube P2; the drain of the second PMOS transistor P2 is used as the first terminal of the second switch S2, and is connected to the power supply voltage VDD; the source of the second PMOS transistor P2 is used as the second terminal of the second switch S2, for connecting the drain of the second NMOS transistor N2 and the gate of the first NMOS transistor N1, and for connecting to the ground GND through the second capacitor C2, and at the same time, for being used as the second output terminal OUT2 of the detecting unit 10.

The working principle of the laser injection attack detection circuit shown in fig. 7 is described with reference to fig. 1, and details thereof are omitted here.

In contrast to the control logic of the first clock signal CLKA for the on-off state of the first switch S1 and the control logic of the second clock signal CLKB for the on-off state of the second switch S2 in the laser injection attack detection circuit shown in fig. 1, in another embodiment:

the control logic for the first clock signal CLKA to control the on/off state of the first switch S1 may be: when the first clock signal CLKA is at a high level, the first switch S1 is turned off, and when the first clock signal CLKA is at a low level, the first switch S1 is turned on; the control logic for the second clock signal CLKB to control the on/off state of the second switch S2 may be: when the second clock signal CLKB is at a high level, the second switch S2 is turned off, and when the second clock signal CLKB is at a low level, the second switch S2 is turned on.

Alternatively, the first switch S1 in the laser injection attack detection circuit of this embodiment may be implemented by a PMOS transistor, as shown in part 81 in fig. 8, and the first switch S1 includes: the gate of the third PMOS transistor P3 is used as the control terminal of the first switch S1, and is connected to the first input terminal IN11 of the detecting unit 10 to receive the first clock signal CLKA; the drain of the third PMOS transistor P3 is used as the first terminal of the first switch S1, and is connected to the power supply voltage VDD; the source of the third PMOS transistor P3 is used as the second terminal of the first switch S1, for connecting the drain of the first NMOS transistor N1 and the gate of the second NMOS transistor N2, and for connecting to the ground GND through the first capacitor C1, and at the same time, for being used as the first output terminal OUT1 of the detecting unit 10.

Alternatively, for the laser injection attack detection circuit shown in fig. 1, the second switch S2 may be implemented by an inverter and a PMOS transistor, as shown in part 82 in fig. 8, and the second switch S2 includes: the gate of the fourth PMOS transistor P4 is used as the control terminal of the second switch S2, and is connected to the second input terminal IN12 of the detecting unit 10 to receive the second clock signal CLKB; the drain of the fourth PMOS transistor P4 is used as the first terminal of the second switch S2, and is connected to the power supply voltage VDD; the source of the fourth PMOS transistor P4 is used as the second terminal of the second switch S2, for connecting the drain of the second NMOS transistor N2 and the gate of the first NMOS transistor N1, and for connecting to the ground GND through the second capacitor C2, and at the same time, for being used as the second output terminal OUT2 of the detecting unit 10.

The working principle of the laser injection attack detection circuit in this embodiment can refer to the working principle of the laser injection attack detection circuit shown in fig. 1, which is not described herein again.

In contrast to the control logic of the first clock signal CLKA for the on-off state of the first switch S1 and the control logic of the second clock signal CLKB for the on-off state of the second switch S2 in the laser injection attack detection circuit shown in fig. 1, in another embodiment:

the control logic for the first clock signal CLKA to control the on/off state of the first switch S1 may be: when the first clock signal CLKA is at a high level, the first switch S1 is turned off, and when the first clock signal CLKA is at a low level, the first switch S1 is turned on; the control logic for the second clock signal CLKB to control the on/off state of the second switch S2 may be: when the second clock signal CLKB is at a low level, the second switch S2 is turned off, and when the second clock signal CLKB is at a high level, the second switch S2 is turned on.

Alternatively, the first switch S1 may be implemented by a PMOS, such as shown in part 81 of fig. 8. The second switch S2 may be implemented by an inverter and a PMOS, such as shown in part 72 of fig. 7.

The working principle of the laser injection attack detection circuit in this embodiment can refer to the working principle of the laser injection attack detection circuit shown in fig. 1, which is not described herein again.

In contrast to the control logic of the first clock signal CLKA for the on-off state of the first switch S1 and the control logic of the second clock signal CLKB for the on-off state of the second switch S2 in the laser injection attack detection circuit shown in fig. 1, in another embodiment:

the control logic for the first clock signal CLKA to control the on/off state of the first switch S1 may be: when the first clock signal CLKA is at a low level, the first switch S1 is turned off, and when the first clock signal CLKA is at a high level, the first switch S1 is turned on; the control logic for the second clock signal CLKB to control the on/off state of the second switch S2 may be: when the second clock signal CLKB is at a high level, the second switch S2 is turned off, and when the second clock signal CLKB is at a low level, the second switch S2 is turned on.

Alternatively, the first switch S1 may be implemented by an inverter and a PMOS, such as shown in part 71 in fig. 7. The second switch S2 may be implemented by a PMOS, such as shown in part 82 of fig. 8.

The working principle of the laser injection attack detection circuit in this embodiment can refer to the working principle of the laser injection attack detection circuit shown in fig. 1, which is not described herein again.

The laser injection attack detection circuit of the present application can be applied to any chip, such as a security chip, and referring to fig. 9, a structural example diagram of the security chip is shown, and the security chip 90 may include: the laser injection attack detection circuit comprises a processor 91 and a laser injection attack detection circuit 92 of the embodiment of the application; wherein the content of the first and second substances,

the processor 91 may output the first clock signal CLKA and the second clock signal CLKB to the laser injection attack detection circuit 92, the laser injection attack detection circuit 92 outputs a processing signal to the processor 91 when detecting that the security chip 90 is attacked by laser injection, the processor 91 may perform corresponding processing, such as interrupt or chip reset, based on the processing signal, and the subsequent processing performed by the processor 91 based on the processing signal is not limited in this embodiment of the application.

As shown in fig. 10, which shows another example of the structure of the security chip, the security chip 100 may include: a laser injection attack detection circuit 102 and a memory circuit 101, wherein,

the first voltage signal and the second voltage signal output by the laser injection attack detection circuit 102 are used for controlling the clearing of the content of the storage circuit 101.

Alternatively, the first clock signal CLKA and the second clock signal CLKB may be transmitted by the processor of the security chip to the laser injection attack detection circuit.

In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.

Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:开关柜配置系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类