CN212749837U - Laser injection attack detection circuit and security chip - Google Patents

Laser injection attack detection circuit and security chip Download PDF

Info

Publication number
CN212749837U
CN212749837U CN202021641958.6U CN202021641958U CN212749837U CN 212749837 U CN212749837 U CN 212749837U CN 202021641958 U CN202021641958 U CN 202021641958U CN 212749837 U CN212749837 U CN 212749837U
Authority
CN
China
Prior art keywords
switch
clock signal
detection circuit
pmos tube
turned
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.)
Active
Application number
CN202021641958.6U
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.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
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
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN202021641958.6U priority Critical patent/CN212749837U/en
Application granted granted Critical
Publication of CN212749837U publication Critical patent/CN212749837U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application provides a laser injection attack detection circuitry and security chip, and detection circuitry includes: the detection unit and the processing unit, the first output end and the second output end of the detection unit are correspondingly connected with the first input end and the second input end of the processing unit, the first output end and/or the second input end output low level signals when the detection unit detects that the laser injection attack is detected, and the processing unit outputs alarm signals when the first input end and/or the second input end receives the low level signals, so that the detection of the laser injection attack is realized, and the robustness and the safety of the chip are ensured.

Description

Laser injection attack detection circuit and security chip
Technical Field
The application relates to the technical field of chip safety, in particular to a laser injection attack detection circuit 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.
SUMMERY OF THE UTILITY MODEL
The application provides a laser injection attack detection circuit and a security 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, including: a detection unit and a processing unit, wherein,
the detection unit includes: the device comprises a first switch, a second switch, a first NMOS (N-channel metal oxide semiconductor) tube, a second NMOS tube, a first capacitor, a second capacitor and a photosensitive element; the control end of the first switch is used as a first input end of the detection unit and used for receiving a first clock signal, and the first clock signal is used for controlling the on-off state of the first switch; the first end of the first switch is connected with a power supply voltage; the second end of the first switch is connected with the drain electrode of the first NMOS tube and the grid electrode of the second NMOS tube, and is grounded through the first capacitor; the second end of the first switch is also used as the first output end of the detection unit and used for outputting a first voltage signal; the control end of the second switch is used as a second input end of the detection unit and is used for receiving a second clock signal, and the second clock signal is used for controlling the on-off state of the second switch; the first end of the second switch is connected with the power supply voltage; the second end of the second switch is connected with the drain electrode of the second NMOS tube and the grid electrode of the first NMOS tube, and is grounded through the second capacitor; the second end of the second switch is also used as a second output end of the detection unit and used for outputting a second voltage signal; the source electrode of the first NMOS tube and the source electrode of the second NMOS tube are both connected with the first end of the photosensitive element, and the second end of the photosensitive element is suspended;
the first output end of the detection unit is connected with the first input end of the processing unit; the second output end of the detection unit is connected with the second input end of the processing unit;
the processing unit is configured to: and when the first voltage signal received by the first input end and/or the second voltage signal received by the second input end is a low-level signal, outputting an alarm signal.
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 second aspect, an embodiment of the present application provides a security chip, including: the laser injection attack detection circuit and the processor of any one of the first aspect; wherein the content of the first and second substances,
the processor outputs the first clock signal and the second clock signal to the laser injection attack detection circuit;
the laser injection attack detection circuit detects whether the security chip is attacked by laser injection or not, and outputs an alarm signal to the processor when detecting the laser injection attack.
Drawings
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 structural diagram of an embodiment of a 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, which can detect laser injection attacks aiming at chips such as security chips and improve the robustness and the security of the chips. 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; the processing unit 20 outputs an alarm 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, that is, the processing unit 20 outputs an alarm signal whenever 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. The processing unit 20 may output the alarm signal to a processor of a chip where 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.
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 inverted from a high level to a low level, the processing unit 20 receives the low level signal, outputs an Alarm signal Alarm, and 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 an alarm 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 alarm signal, and the subsequent processing performed by the processor 91 based on the alarm signal is not limited in this embodiment of the application.
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.

Claims (17)

1. A laser injection attack detection circuit, comprising: a detection unit and a processing unit, wherein,
the detection unit includes: the device comprises a first switch, a second switch, a first NMOS (N-channel metal oxide semiconductor) tube, a second NMOS tube, a first capacitor, a second capacitor and a photosensitive element; the control end of the first switch is used as a first input end of the detection unit and used for receiving a first clock signal, and the first clock signal is used for controlling the on-off state of the first switch; the first end of the first switch is connected with a power supply voltage; the second end of the first switch is connected with the drain electrode of the first NMOS tube and the grid electrode of the second NMOS tube, and is grounded through the first capacitor; the second end of the first switch is also used as the first output end of the detection unit and used for outputting a first voltage signal; the control end of the second switch is used as a second input end of the detection unit and is used for receiving a second clock signal, and the second clock signal is used for controlling the on-off state of the second switch; the first end of the second switch is connected with the power supply voltage; the second end of the second switch is connected with the drain electrode of the second NMOS tube and the grid electrode of the first NMOS tube, and is grounded through the second capacitor; the second end of the second switch is also used as a second output end of the detection unit and used for outputting a second voltage signal; the source electrode of the first NMOS tube and the source electrode of the second NMOS tube are both connected with the first end of the photosensitive element, and the second end of the photosensitive element is suspended;
the first output end of the detection unit is connected with the first input end of the processing unit; the second output end of the detection unit is connected with the second input end of the processing unit;
the processing unit is configured to: and when the first voltage signal received by the first input end and/or the second voltage signal received by the second input end is a low-level signal, outputting an alarm signal.
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. A security chip, comprising: the laser injection attack detection circuit of any one of claims 1 to 16 and a processor; wherein the content of the first and second substances,
the processor outputs the first clock signal and the second clock signal to the laser injection attack detection circuit;
the laser injection attack detection circuit detects whether the security chip is attacked by laser injection or not, and outputs an alarm signal to the processor when detecting the laser injection attack.
CN202021641958.6U 2020-08-07 2020-08-07 Laser injection attack detection circuit and security chip Active CN212749837U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202021641958.6U CN212749837U (en) 2020-08-07 2020-08-07 Laser injection attack detection circuit and security chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202021641958.6U CN212749837U (en) 2020-08-07 2020-08-07 Laser injection attack detection circuit and security chip

Publications (1)

Publication Number Publication Date
CN212749837U true CN212749837U (en) 2021-03-19

Family

ID=74987215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202021641958.6U Active CN212749837U (en) 2020-08-07 2020-08-07 Laser injection attack detection circuit and security chip

Country Status (1)

Country Link
CN (1) CN212749837U (en)

Similar Documents

Publication Publication Date Title
CN103034804B (en) Safety chip and attack detecting circuit thereof
EP1057096B1 (en) Data carrier with obscured power consumption
CN105891651B (en) Low power open circuit detection system
US10489595B2 (en) Method and detection circuit for detecting security chip operating state
CN102854454A (en) Method for shortening verification time of hardware Trojan in integrated circuit test
US8963574B2 (en) Circuit and method for detecting a fault attack
US20210396789A1 (en) Voltage Glitch Detection In Integrated Circuit
US20040010526A1 (en) Random number generator and method for generating a random number
EP3783371A1 (en) Glitch signal detection circuit, security chip, and electronic apparatus
US11181566B2 (en) Detection circuit of electromagnetic fault injection and security chip
CN102565529A (en) Low-power-consumption clock frequency detection circuit
CN112673263B (en) Burr signal detection circuit, safety chip and electronic equipment
CN212749837U (en) Laser injection attack detection circuit and security chip
CN113711222B (en) Laser injection attack detection circuit for chip and security chip
EP3639047B1 (en) Method for detecting at least one glitch in an electrical signal and device for implementing this method
CN100371857C (en) Method for preventing simple power consumption analysis attack
CN213659588U (en) Information leakage prevention circuit and POS machine
Mirbaha et al. Differential analysis of Round-Reduced AES faulty ciphertexts
KR100884566B1 (en) Smart card having laser attack detector
Sun et al. Towards hardware trojan resilient design of convolutional neural networks
CN112098815A (en) Light detection structure, light detection method, security chip and electronic card
CN210006049U (en) Detection circuit, safety chip and electronic equipment of electromagnetic fault injection
US11817142B2 (en) Refresh circuit and memory
CN116338418A (en) Chip fault processing method and system
CN108233914A (en) A kind of random noise current disturbing circuit

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant