Tamper-proof detector and method for detecting physical attacks - Patents.com
The tamper-proof detector uses digital codes from temperature, voltage, and frequency sensors to reliably detect physical attacks in chips, addressing susceptibility to environmental factors and reducing calibration costs.
Patent Information
- Application Number
- JP2023096746
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2023-01-04
- Filing Date
- 2023-06-13
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2043-06-13
AI Technical Summary
Existing anti-tampering detection mechanisms in chips are susceptible to various factors like operating temperature and voltage, making it difficult to accurately detect multiple types of physical attacks, and often require expensive calibration.
A tamper-proof detector utilizing a temperature sensor, voltage detector, and frequency detector, coupled with a controller, generates digital codes representing operating conditions to reliably detect tampering through multiple oscillators, avoiding analog signals and accounting for manufacturing process variations.
The solution allows for accurate detection of physical attacks by monitoring operating conditions like temperature, supply voltage, and frequency, effectively preventing data alteration or theft, while minimizing side effects and avoiding the need for costly calibration.
Smart Images

Figure 0007563669000001 
Figure 0007563669000002 
Figure 0007563669000003
Abstract
Description
[Technical field]
[0001] The present invention relates to anti-tampering circuits, and more particularly to anti-tamper detectors and methods for detecting physical attacks. [Background technology]
[0002] Circuit attacks include multiple types of physical attacks, such as voltage attacks, voltage glitch attacks, frequency attacks, clock glitch attacks, and temperature attacks. For example, excessive or insufficient power supply voltages may be supplied to the chip, or the chip may be over / under-clocked, causing the chip to operate abnormally. In addition, positive or negative pulses may be injected into the chip's power lines or clock signals, causing the chip to malfunction or operate abnormally at a certain time. Furthermore, the chip's environmental temperature may change, causing the chip to operate abnormally.
[0003] In order to prevent the data in the chip from being tampered with or stolen by the above physical attacks, relevant detection circuits are provided in the chip, which can notify the system when a physical attack is detected. These detection circuits are usually implemented with analog or mixed-signal circuits, which often require expensive calibration. In addition, the detection mechanisms of the related art are susceptible to various factors, such as operating temperature and voltage, which increases the difficulty of correctly detecting the above types of physical attacks.
[0004] Therefore, new architectures and related methods are needed to address the problems of the related art. Summary of the Invention
[0005] The object of the present invention is to provide an anti-tamper detector and a method for detecting physical attacks, which allows to determine the actual operating conditions of a chip (such as operating temperature, power supply voltage and system clock frequency) without or in a manner that is unlikely to introduce side effects, such that the chip can activate relevant protection mechanisms in response to the above mentioned physical attacks.
[0006] At least one embodiment of the present invention provides a tamper-proof detector for detecting a physical attack. The tamper-proof detector includes a temperature sensor, a voltage detector, a frequency detector, and a controller, where the voltage detector is coupled to the temperature sensor, the frequency detector is coupled to the temperature sensor and the voltage detector, and the controller is coupled to the temperature sensor, the voltage detector, and the frequency detector. Specifically, the temperature sensor is configured to generate a temperature code according to an operating temperature. The voltage detector is configured to generate a voltage code according to a supply voltage and the temperature code. The frequency detector is configured to generate a frequency code according to a system clock, the temperature code, and the voltage code. The controller is configured to generate a tamper-proof detection result according to the temperature code, the voltage code, and the frequency code. More specifically, the tamper-proof detection result indicates whether any of the operating temperature, the supply voltage, and the system clock has been tampered with by a physical attack.
[0007] At least one embodiment of the present invention provides a method for detecting a physical attack, the method including: generating a temperature code according to a first clock output from a proportional to absolute temperature (PTAT) oscillator and first calibration mapping information, the temperature code representing an operating temperature; generating a voltage code according to a second clock output from a voltage controlled oscillator (VCO), the temperature code and second calibration mapping information, the voltage code representing a supply voltage; generating a frequency code according to a third clock output from a reference oscillator, the temperature code, the voltage code and third calibration mapping information, the frequency code representing a frequency of a system clock; and generating an anti-tamper detection result using a controller according to the temperature code, the voltage code and the frequency code, the anti-tamper detection result indicating whether any of the operating temperature, the supply voltage and the system clock has been tampered with by the physical attack.
[0008] The anti-tamper detector and method provided by the present invention utilizes multiple oscillators to detect the operating conditions such as temperature, supply voltage and frequency, so that the implementation of analog signals to represent the aforementioned information can be avoided. In addition, after obtaining the temperature information, the present invention further detects the voltage based on the temperature information. After obtaining the voltage information, the present invention further detects the frequency based on the temperature information and the voltage information. Therefore, the operating conditions of the entire system can be properly monitored, and various kinds of physical attacks can be reliably detected.
[0009] These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 shows a tamper-proof detector according to one embodiment of the present invention. [Diagram 2]FIG. 2 is a diagram showing a detailed implementation of a temperature sensor according to one embodiment of the present invention. [Diagram 3] FIG. 3 is a diagram showing a detailed implementation of a voltage detector according to an embodiment of the present invention. [Figure 4] FIG. 4 is a diagram showing a detailed implementation of a voltage anomaly detector according to an embodiment of the present invention. [Diagram 5] FIG. 5 is a diagram illustrating detection of a voltage glitch in a power supply voltage according to an embodiment of the present invention. [Figure 6] FIG. 6 illustrates a detailed implementation of a frequency detector according to one embodiment of the present invention. [Figure 7] FIG. 7 illustrates a detailed implementation of a clock glitch detector according to one embodiment of the present invention. [Figure 8] FIG. 8 is a diagram illustrating detection of a clock glitch in a system clock according to an embodiment of the present invention. [Figure 9] FIG. 9 is a diagram illustrating detection of a clock glitch in a system clock according to another embodiment of the present invention. [Figure 10] FIG. 10 is a diagram showing a detailed implementation of a frequency-to-digital converter according to an embodiment of the present invention. [Figure 11] FIG. 11 is a diagram illustrating the operational flow of a method for detecting a physical attack according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] FIG. 1 illustrates an anti-tamper detector 10 according to an embodiment of the present invention, which is configured to detect physical attacks, such as voltage attacks, voltage glitch attacks, frequency attacks, clock glitch attacks, and temperature attacks. As shown in FIG. 1, the anti-tamper detector 10 may include a temperature sensor 110, a voltage detector 120, a frequency detector 130, and a controller 100, where the voltage detector 120 is coupled to the temperature sensor 110, the frequency detector is coupled to the temperature sensor 110 and the voltage detector 120, and the controller 100 is coupled to the temperature sensor 110, the voltage detector 120, and the frequency detector 130. In this embodiment, the temperature sensor 110 may generate a temperature code Tcode according to an operating temperature. The voltage detector 120 may generate a voltage code Vcode according to a supply voltage and the temperature code Tcode. The frequency detector 130 may generate a frequency code Fcode according to a system clock, the temperature code Tcode, and the voltage code Vcode. The controller 100 may generate a tamper-proof detection result REStamper according to the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode. The tamper-proof detection result REStamper may indicate whether any of the operating temperature, the supply voltage, and the system clock has been tampered with by a physical attack.
[0012] For example, the operating conditions of the chip including the anti-tamper detector 10 are predetermined such that the operating temperature is within a temperature range, the supply voltage is within a voltage range, and the frequency of the system clock is within a frequency range, and the anti-tamper detector 10 may detect whether any of the operating temperature, the supply voltage, and the system clock (e.g., each) is within the specific operating range and generate the anti-tamper detection result REStamper. The controller 100 may have an internal memory device for storing information of the specific operating range, such as a temperature code range corresponding to the temperature range, a voltage code range corresponding to the voltage range, and a frequency code range corresponding to the frequency range. The controller 100 may determine whether the temperature code Tcode corresponds to the temperature code Tcode, determine whether the voltage code Vcode is within the temperature code range, and determine whether the frequency code Fcode is within the frequency code range. If any of the operating temperature, the supply voltage, and the system clock are not within the specific operating range, the controller 100 determines that a physical attack is detected, thereby generating the anti-tamper detection result REStamper.
[0013] The tamper-proof detector 10 may further include a monotonic counter 160. The monotonic counter 160 is coupled to the controller 100 and may count the accumulated operation time of the tamper-proof detector 10 (or the chip including the tamper-proof detector 10) to generate aging information AGEcode. For example, when the power supply of the tamper-proof detector 10 is first turned on, the monotonic counter 160 may increase the aging information AGEcode from an initial value (e.g., 0) to a first accumulated value according to the operation time after the power supply is turned on. When the power supply of the tamper-proof detector 10 is turned on for the second time, the monotonic counter 160 may increase the aging information AGEcode from the first accumulated value to a second accumulated value according to the operation time after the power supply is turned on. By analogy, the aging information AGEcode continues to increase during the operation of the tamper-proof detector 10 and is not reset by power supply off. Therefore, the age information AGEcode may represent the condition of the usage time of the tamper-proof detector 10 (or the chip constituting the tamper-proof detector 10). In reality, the operating conditions of the components in the tamper-proof detector 10 may deviate from the initial conditions over time due to factors such as aging. Therefore, the controller 100 may calibrate the above-mentioned specific operating ranges (e.g., calibrate any of the temperature code range corresponding to the temperature code Tcode, the voltage code range corresponding to the voltage code Vcode, and the frequency code range corresponding to the frequency code Fcode) according to the age information AGEcode generated by the monotonic counter 160 in order to appropriately determine whether any of the operating temperature, the supply voltage, and the system clock has been tampered with by a physical attack under conditions taking into account the factor of aging of the components.
[0014] In this embodiment, the anti-tamper detector 10 may further include a voltage glitch detector 140. The voltage glitch detector 140 is coupled to the voltage detector 120. For example, the voltage glitch detector 140 may detect a change in the voltage code Vcode to generate a voltage glitch detection result Vglitch. The controller may further determine whether there is a voltage glitch in the supply voltage due to a physical attack according to the voltage glitch detection result Vglitch.
[0015] In this embodiment, the anti-tamper detector 10 may further include a clock glitch detector 150. The clock glitch detector 150 is coupled to the frequency detector 130. The clock glitch detector 150 may detect a change in the frequency of the system clock, and generate a clock glitch detection result Cglitch. The controller 100 may further determine whether there is a clock glitch in the system clock due to the system clock physical attack according to the clock glitch detection result Cglitch.
[0016] In practice, when the temperature sensor 110, the voltage detector 120, and the frequency detector 130 use high-resolution digital signals to represent the operating temperature, the supply voltage, and the frequency of the system clock (for example, when the number of bits of each of the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode is extremely high), the least significant bits (LSBs) of each of the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode may continue to change due to factors such as noise even without a physical attack. Therefore, the controller 100 may discard the LSBs of each of the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode, and determine whether the tamper-proof detector 10 (or a chip including the tamper-proof detector 10) is subjected to a physical attack by referring only to the remaining bits. In addition, the tamper-proof detector 10 may further include an entropy extractor 170. The entropy extractor 170 is coupled to the temperature sensor 110, the voltage detector 120, and the frequency detector 130. Based on the LSBs of the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode, which are easily disturbed by noise, the entropy extractor 170 may generate an entropy output BITentropy according to the LSBs of the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode. The entropy output BITentropy may be one or more entropy bits generated by performing hashing, collecting, and arranging operations according to the LSBs of the temperature code Tcode, the voltage code Vcode, and the frequency code Fcode, but the present invention is not limited thereto.
[0017] 2 is a diagram illustrating a detailed implementation of a temperature sensor 110 according to an embodiment of the present invention. As shown in FIG. 2, the temperature sensor 110 includes a proportional to absolute temperature (PTAT) oscillator 111, a frequency-to-digital converter 112, a storage device such as a one-time programmable (OTP) storage device 114, and an encoder 113, where the frequency-to-digital converter 112 is coupled to the PTAT oscillator 111, and the encoder 113 is coupled to the frequency-to-digital converter 112 and the OTP storage device 114. In this embodiment, the PTAT oscillator 111 generates a PTAT clock CLK PTAT The PTAT clock CLK can be output. PTAT The frequency of the PTAT clock CLK is determined according to the operating temperature. In this embodiment, the power of the PTAT oscillator 111 is provided by a supply voltage VDD, which may be an example of the supply voltage mentioned in the embodiment of FIG. 1. Specifically, the PTAT oscillator 111 may include a voltage-controlled current source, and the PTAT clock CLK PTAT The frequency of the PTAT clock CLK is determined by the current of the voltage-controlled current source and is not affected by fluctuations in the supply voltage VDD. The current of the voltage-controlled current source is controlled by the PTAT voltage VPTAT, and the change in the PTAT voltage VPTAT can be proportional to the change in absolute temperature. Therefore, the frequency of the PTAT clock CLK can be increased without interference from changes in the supply voltage VDD or in a state where it is unlikely to be interfered with by changes in the supply voltage VDD. PTAT By detecting the frequency of the PTAT clock CLK, information on the change in the operating temperature can be obtained. For example, the frequency-to-digital converter 112 detects the frequency of the PTAT clock CLK PTAT A frequency-to-digital conversion may be performed on the frequency to generate a digital code Tcode0 corresponding to the operating temperature.
[0018] In practice, through the operation of the PTAT oscillator 111 and the frequency-to-digital converter 112, different chips may output different digital codes Tcode0 under the same temperature due to process variations. In order to overcome the problem of not being able to correctly detect the operating temperature due to process variations, calibration mapping information Tmap corresponding to the process state of the chip (e.g., the process corner to which the chip belongs, such as SS corner, FF corner, or TT corner) is written into the OTP storage device 114 (denoted as "temperature mapping (OTP)" for better understanding) according to the process state of the chip during the test stage before shipping from the factory, and the encoder 113 may receive the digital code Tcode0 and further generate the temperature code Tcode according to the calibration mapping information Tmap stored in the OTP storage device 114. Therefore, after the calibration, the temperature code Tcode output from the temperature sensor 110 can accurately represent the operating temperature without being affected by the manufacturing process.
[0019] 3 is a diagram showing a detailed implementation of a voltage detector 120 according to an embodiment of the present invention. As shown in FIG. 3, the voltage detector 120 includes a voltage controlled oscillator (VCO) 121, a frequency-to-digital converter 122, a storage device such as an OTP storage device 124, and an encoder 123, where the frequency-to-digital converter 122 is coupled to the VCO 121, and the encoder 123 is coupled to the frequency-to-digital converter 122 and the OTP storage device 124. In this embodiment, the VCO 121 generates a voltage controlled clock CLK VCO and outputs the voltage controlled clock CLK VCO The frequency of the voltage controlled clock CLK is determined according to the supply voltage VDD. For example, the change in the supply voltage VDD VCO Therefore, the change in the frequency of the voltage-controlled clock CLK VCO By detecting the frequency of the voltage-controlled clock CLK, information on the change in the supply voltage VDD can be obtained. VCO A frequency-to-digital conversion may be performed on the frequency to generate a voltage code Vcode0 corresponding to the supply voltage VDD.
[0020] In practice, in addition to the process variation factors, the VCO 121 may be affected by the operating temperature. Therefore, in order to overcome the problem of being unable to correctly detect the supply voltage VDD due to the process and temperature factors, the calibration mapping information Vmap corresponding to the process state of the chip (e.g., the process corner to which the chip belongs, such as SS corner, FF corner or TT corner) may be written into the OTP storage device 124 (referred to as "temperature mapping (OTP)" for better understanding) according to the process state of the chip during the test stage before shipping from the factory. The calibration mapping information Vmap includes the voltage-digital mapping relationship of the digital code Vcode0 and the voltage code Vcode under multiple operating temperatures. Therefore, after receiving the digital code Vcode0 and the temperature code Tcode, the encoder 123 selects corresponding specific calibration mapping information from the calibration mapping information Vmap according to the temperature code Tcode, and generates the voltage code Vcode according to the specific mapping information and the digital code Vcode0. Therefore, after the calibration, the voltage code Vcode output from the voltage detector 120 can accurately represent the voltage level of the supply voltage without being affected by the process and temperature variations.
[0021] 4 is a diagram showing a detailed implementation of a voltage glitch detector 140 according to an embodiment of the present invention. As shown in FIG. 4, the voltage glitch detector 140 includes a register 141 and a comparator 142, and the comparator 142 is coupled to the register 141. In this embodiment, the voltage code Vcode is coupled to a system clock CLK SYS and the voltage code Vcode has a previous value during the previous period of the system clock CLK SYSThe voltage detector 120 may have a current value during the current period of V, the register 141 may store a previous value of the voltage code V, and the comparator 142 may compare the previous value of the voltage code V with the current value of the voltage code V to generate a voltage glitch detection result Vglitch. For example, in the current period, the voltage code V output from the voltage detector 120 may represent the current value of the voltage code V, and the voltage code Vcode' output from the register 141 may represent the previous value of the voltage code V. When the comparator 142 detects that the difference between the voltage code V and the voltage code Vcode' is greater than a predetermined threshold, the comparator 142 may pull the voltage glitch detection result Vglitch to a logic value of "1" to report a voltage glitch condition of the supply voltage VDD to the controller 100.
[0022] 5 is a diagram illustrating detection of a voltage glitch in the supply voltage VDD according to an embodiment of the present invention. As shown in FIG. 5, when the supply voltage VDD has a positive glitch, the VCO clock CLK output from the VCO 121 VCO The frequency of may change, causing the value of the voltage code Vcode output from the voltage detector 120 to change (e.g., from D0 to D1), and the voltage glitch detector 140 may pull the voltage glitch detection result Vglitch from a logic value of "0" to a logic value of "1" in response to the change in the value of the voltage code Vcode. When the supply voltage VDD has a negative glitch, the VCO clock CLK output from the VCO 121 VCO The frequency of may change, causing the value of the voltage code Vcode output from the voltage detector 120 to change (e.g., from D0 to D2), and the voltage glitch detector 140 may pull the voltage glitch detection result Vglitch from a logical value of “0” to a logical value of “1” in response to the change in the value of the voltage code Vcode.
[0023] Note that both the frequency-to-digital converters 112 and 122 are connected to the system clock CLK SYS For example, the frequency-to-digital converter 112 performs frequency-to-digital conversion based on a time interval defined by a system clock (e.g., the system clock CLK SYSThe PTAT clock CLK within one period (defined by PTAT By counting the number of periods of the CLK, the digital code Tcode0 can be generated. SYS Even if both the frequencies of the temperature sensor 110 and the frequency of the temperature sensor 110 change, the temperature code Tcode output from the temperature sensor 110 may not change or may be maintained within a temperature range under some conditions, so that the controller 100 cannot detect the change in the operating temperature. In another example, the frequency-to-digital converter 122 may convert the temperature code Tcode output from the temperature sensor 110 to a digital code Tcode output from the temperature sensor 110 at a time interval defined by a system clock (e.g., the system clock CLK SYS Within one period of the VCO clock CLK VCO A digital code VCOde0 can be generated by counting the number of periods of the supply voltage VDD and the system clock CLK. SYS Even if both the frequencies of the supply voltage VDD and the supply voltage Vdd change, the voltage code Vcode output from the voltage detector 120 may not change under some conditions or may be maintained within a temperature range, so the controller 100 cannot detect a change in the voltage level of the supply voltage VDD.
[0024] To prevent the above situation, the present invention utilizes a frequency detector 130 to detect the system clock CLK SYS 6 is a diagram showing a detailed implementation of a frequency detector 130 according to an embodiment of the present invention. As shown in FIG. 6, the frequency detector 130 includes a reference oscillator 131, a frequency-to-digital converter 132, a storage device such as an OTP storage device 134, and an encoder 133, where the frequency-to-digital converter 132 is coupled to the reference oscillator 131, and the encoder is coupled to the frequency-to-digital converter 132 and the OTP storage device 134. In this embodiment, the reference oscillator 131 generates a reference clock CLK REF The reference clock CLK can be output. REF The frequency of the system clock CLK SYS In addition, the frequency-to-digital converter 132 is configured to convert the frequency of the system clock CLK SYS and the reference clock CLK REF According to the system clock CLK SYSTherefore, by monitoring the digital code Fcode0, the system clock CLK SYS It is possible to detect changes in frequency.
[0025] In addition to the process variation factors mentioned above, the reference oscillator 131 may actually be affected by the operating temperature and the supply voltage VDD. Therefore, the system clock CL KSYS In order to overcome the problem of being unable to correctly detect the frequency of the system clock CLK, calibration mapping information Fmap corresponding to the process state of the chip (e.g., the process corner to which the chip belongs, such as SS corner, FF corner or TT corner) can be written into the OTP storage device 134 (denoted as "temperature mapping (OTP)" for better understanding) according to the process state of the chip during the test stage before shipment from the factory. The calibration mapping information Fmap includes frequency-digital mapping relationships of the digital code Fcode0 and the frequency code Fcode under multiple operating temperatures and supply voltages VDD. Therefore, after receiving the digital code Fcode0, the temperature code Tcode and the voltage code Vcode, the encoder 133 can select corresponding specific calibration mapping information from the calibration mapping information Fmap according to the temperature code Tcode and the voltage code Vcode, and generate the frequency code Fcode according to the specific calibration mapping information and the digital code Fcode0. Therefore, after the calibration, the frequency code Fcode output from the frequency detector 130 can be adjusted to match the system clock CLK without being affected by the variations in process, temperature and voltage. SYS The frequency of can be correctly represented.
[0026] 7 is a diagram illustrating a detailed implementation of clock glitch detector 150 according to one embodiment of the present invention. As shown in FIG. 7, clock glitch detector 150 may include a counter 151p, a register 152p, a comparator 153p, a counter 151n, a register 152n, a comparator 153n, and an OR logic gate 154 (labeled as "OR logic" in FIG. 7 for simplicity). In this embodiment, counter 151p detects a system clock CLK having a logic high state (e.g., logic value "1"), and the system clock CLK may be configured to receive a signal from the system clock CLK having a logic high state (e.g., logic value "1"). SYS Within the time interval of the reference clock CLK REF The count result Dp may be transmitted to the register 152p by counting the first number of periods of the system clock CLK. SYS and the count result Dp is a first previous value during a previous period of the system clock CLK. SYS The comparator 153p may compare the first previous value of the count result Dp with the first current value of the count result Dp to generate a positive clock glitch detection result Cgp. For example, the comparator 153p may compare the first previous value of the count result Dp with the first current value of the count result Dp during the current period of the system clock CLK. SYS In the current period of the counter 151n, the count result Dp output from the counter 151p may represent a first current value of the count result Dp, and the count result Dp' output from the register 152p may represent a first previous value of the count result Dp. In addition, the counter 151n may be synchronized with the system clock CLK having a logic low state (e.g., logic value "0"). SYS Within the time interval of the reference clock CLK REF The count result Dn may be transmitted to the register 152n by counting the number of second periods of the system clock CLK. SYS and the count result Dn has a second previous value during a previous period of the system clock CLK. SYS The comparator 153n may compare the second previous value of the count result Dn with the second current value of the count result Dn to generate a negative clock glitch detection result Cgn. For example, SYSIn the current period of the clock signal CLK, the count result Dn output from the counter 151n may represent a second current value of the count result Dn, and the count result Dn' output from the register 152n may represent a second previous value of the count result Dn. In addition, the OR logic gate 154 may perform an OR logic operation on the positive glitch detection result Cgp and the negative clock glitch detection result Cgn to generate a clock glitch detection result Cglitch. Therefore, the clock signal CLK SYS If either the positive glitch detection result Cgp or the negative clock glitch detection result Cgn indicates that the clock has a glitch, the OR logic gate 154 may pull the clock glitch detection result Cglitch to a logic value of “1” to notify the controller 100.
[0027] In some embodiments, clock glitch detector 150 may detect only positive clock glitches. For example, counter 151n, register 152n, comparator 153n, and OR logic gate 154 may be omitted, and clock glitch detector 150 may output the positive glitch detection result Cgp as the clock glitch detection result Cglitch. In some embodiments, clock glitch detector 150 may detect only negative clock glitches. For example, counter 151p, register 152p, comparator 153p, and OR logic gate 154 may be omitted, and clock glitch detector 150 may output the negative glitch detection result Cgn as the clock glitch detection result Cglitch.
[0028] FIG. 8 shows a system clock CLK according to an embodiment of the present invention. SYS In this embodiment, a positive clock glitch is detected in the system clock CLK. SYS If there is no clock glitch in the system clock CLK having a logic high state, the value of the count result Dp is Dp0. SYS (The time length of the system clock CLK is maintained at a fixed value.) SYS If there is a positive clock glitch on the system clock CLK SYSDuring the period when the system clock, CLK, is expected to be in a logic low state, SYS is pulled to a logic high state), the value of the count result Dp may change (e.g., change to Dp1), the positive clock glitch detection result Cgp may be pulled to a logic value of “1”, and the clock glitch detection result Cglitch may be pulled to a logic value of “1”.
[0029] FIG. 9 shows a system clock CLK according to an embodiment of the present invention. SYS In this embodiment, a negative clock glitch is detected in the system clock CLK. SYS If there is no clock glitch in the system clock CLK having a logic low state, the value of the count result Dn is Dn0. SYS (The time length of the system clock CLK is maintained at a fixed value.) SYS If there is a negative clock glitch on the system clock CLK SYS During the period when the system clock, CLK, is expected to be in a logic high state, SYS is pulled to a logic low state), the value of the count result Dn may change (e.g., change to Dn1), the negative clock glitch detection result Cgn may be pulled to a logic value of "1", and the clock glitch detection result Cglitch may be pulled to a logic value of "1".
[0030] 10 is a diagram showing a detailed implementation of a frequency-to-digital converter 200 according to an embodiment of the present invention, in which any of the frequency-to-digital converter 112 shown in FIG. 2, the frequency-to-digital converter 122 shown in FIG. 3, and the frequency-to-digital converter 132 shown in FIG. 6 can be implemented based on the architecture of the frequency-to-digital converter 200. In this embodiment, the frequency-to-digital converter 200 is clocked by a system clock CLK SYS Based on the input clock CLK IN Then, frequency-to-digital conversion is performed on the OUT The PTAT clock CLK shown in FIG. PTAT , the voltage controlled clock CLK shown in FIG. VCOand the reference clock CLK shown in Figure 6 REF is an example of the input clock CLKIN, and the digital code Tcode0 shown in FIG. 2, the digital code Vcode0 shown in FIG. 3, and the digital code Fcode0 shown in FIG. 6 are the output codes D OUT This is an example.
[0031] 10, the frequency-to-digital converter 200 includes a counter 210, a reset signal generator 220, and a register 230, where the reset signal generator 220 is coupled to the counter 210, and the register 230 is coupled to the counter 210. In this embodiment, the counter 210 is clocked by a system clock CLK SYS The input clock CLK within the time interval defined by IN Count the number of periods and get the count result D COUNT The time interval may be determined by a system clock CLK. SYS In addition, the reset signal generator 220 generates a reference clock CLK REF and system clock CLK SYS to generate a reset signal RST to reset the counter 210 at the start of the time interval, and the register 230 to generate a count result D at the end of the time interval. COUNT and output code D OUT Count result as D COUNT In some embodiments, the time interval is determined by the system clock CLK. SYS In some embodiments, the time interval may be one period of the system clock CLK having a logic high state. SYS In some embodiments, the time interval may be the period of a system clock having a logic low state.
[0032] Fig. 11 illustrates a workflow of a method for detecting a physical attack according to an embodiment of the present invention, which may be performed by the anti-tamper detector 10 illustrated in Fig. 1. It should be noted that the workflow illustrated in Fig. 11 is for illustrative purposes only and is not intended to limit the present invention. For example, one or more steps may be added, deleted, or modified in the workflow illustrated in Fig. 11. In addition, the steps do not need to be performed in the exact order illustrated in Fig. 11 if the same results are achieved.
[0033] In step S10, the tamper prevention detector 10 receives a first clock (for example, a PTAT clock CLK) output from a PTAT oscillator. PTAT ) and the first calibration mapping information (for example, the calibration mapping information Tmap shown in FIG. 2 obtained by considering the manufacturing process). The temperature code represents the operating temperature.
[0034] In step S20, the tamper prevention detector 10 detects the second clock (e.g., the voltage controlled clock CLK VCO ), the temperature code, and second calibration mapping information (for example, the calibration mapping information Vmap shown in FIG. 3 obtained in consideration of the manufacturing process).
[0035] In step S30, the tamper prevention detector 10 detects a third clock (for example, a reference clock CLK REF ), the temperature code, the voltage code, and third calibration mapping information (for example, the calibration mapping information Fmap shown in FIG. 6 obtained in consideration of the manufacturing process).
[0036] In step S40, the anti-tamper detector 10 can utilize the controller to generate an anti-tamper detection result according to the temperature code, the voltage code and the frequency code. The anti-tamper detection result indicates whether any of the operating temperature, the supply voltage and the system clock has been tampered with by physical attacks.
[0037] In summary, the anti-tamper detector and related method provided by the embodiment of the present invention can obtain information on temperature, voltage level of supply voltage, and frequency of system clock in the form of digital signals by detecting the frequencies of multiple oscillators using calibration mapping information generated by considering the manufacturing process. Therefore, the problems of the related art caused by using analog circuits can be solved. In addition, the present invention detects voltage based on temperature information after obtaining temperature information, and detects frequency based on temperature information and voltage information after obtaining voltage information. Therefore, the operating status of the entire system can be properly monitored and various types of physical attacks can be reliably detected.
[0038] Those skilled in the art will readily appreciate that numerous modifications and variations of the apparatus and methods may be made while retaining the teachings of this invention. Accordingly, the above disclosure should be construed as limited only by the content and scope of the appended claims.
Claims
1. 1. An anti-tamper detector for detecting physical attacks, comprising: a temperature sensor configured to generate a temperature code according to an operating temperature; a voltage detector coupled to the temperature sensor and configured to generate a voltage code according to a supply voltage and the temperature code; a frequency detector coupled to the temperature sensor and the voltage detector and configured to generate a frequency code according to a system clock, the temperature code, and the voltage code; a controller coupled to the temperature sensor, the voltage detector and the frequency detector, configured to generate a tamper-proof detection result according to the temperature code, the voltage code and the frequency code, the tamper-proof detection result indicating whether any of the operating temperature, the supply voltage and the system clock has been tampered with by the physical attack; and Includes an anti-tamper detector.
2. 2. The anti-tamper detector of claim 1, wherein the controller generates the anti-tamper detection result by detecting whether any of the operating temperature, the supply voltage, and the system clock are within a specified operating range.
3. The temperature sensor is a proportional to absolute temperature (PTAT) oscillator configured to output a PTAT clock, the frequency of the PTAT clock being determined according to the operating temperature; a frequency-to-digital converter coupled to the PTAT oscillator and configured to perform a frequency-to-digital conversion on a frequency of the PTAT clock to generate a digital code corresponding to the operating temperature; The tamper-evident detector of claim 1 , comprising:
4. The temperature sensor is a storage device configured to store calibration mapping information between the digital code and the temperature code; an encoder coupled to the frequency-to-digital converter and the storage device and configured to generate the temperature code according to the calibration mapping information and the digital code; The tamper-evident detector of claim 3 further comprising:
5. The voltage detector includes: a voltage controlled oscillator (VCO) configured to output a voltage controlled clock, the frequency of the voltage controlled clock being determined according to the supply voltage; and a frequency-to-digital converter coupled to the VCO and configured to perform a frequency-to-digital conversion on a frequency of the voltage controlled clock to generate a digital code corresponding to the supply voltage; The tamper-evident detector of claim 1 , comprising:
6. The voltage detector includes: a storage device configured to store calibration mapping information between the digital codes and the voltage codes; an encoder coupled to the frequency-to-digital converter and the storage device, the encoder configured to select a particular calibration mapping information from the calibration mapping information according to the temperature code, and generate the voltage code according to the particular calibration mapping information and the digital code; The tamper-evident detector of claim 5 further comprising:
7. a voltage glitch detector coupled to the voltage detector and configured to detect a change in the voltage code to generate a voltage glitch detection result; The anti-tamper detector of claim 1 , wherein the controller further generates the anti-tamper detection result according to the voltage glitch detection result.
8. the voltage code having a previous value during a previous period of the system clock, and the voltage code having a current value during a current period of the system clock; The voltage glitch detector comprises: a register configured to store a previous value of the voltage code; a comparator configured to compare the previous value and the current value to generate the voltage glitch detection result; 8. The tamper-evident detector of claim 7, comprising:
9. The frequency detector includes: a reference oscillator configured to output a reference clock, the frequency of the reference clock being greater than the frequency of the system clock; a frequency-to-digital converter coupled to the reference oscillator and configured to generate a digital code corresponding to the system clock according to the system clock and the reference clock; The tamper-evident detector of claim 1 , comprising:
10. The frequency detector includes: a storage device configured to store calibration mapping information between the digital code and the frequency code; an encoder coupled to the frequency-to-digital converter and the storage device, configured to select a particular calibration mapping information from the calibration mapping information according to the temperature code and the voltage code, and generate the frequency code according to the particular calibration mapping information and the digital code; The tamper-evident detector of claim 9 further comprising:
11. a clock glitch detector coupled to the frequency detector and configured to detect a change in the frequency of the system clock to generate a clock glitch detection result; The anti-tamper detector of claim 9 , wherein the controller further generates the anti-tamper detection result according to the clock glitch detection result.
12. The clock glitch detector includes: a counter configured to count a number of periods of the reference clock within a time interval of the system clock having a logic high state to generate a count result, the count result having a previous value during a previous period of the system clock and the count result having a current value during a current period of the system clock; a comparator configured to compare the previous value and the current value to generate the clock glitch detection result; 12. The tamper-evident detector of claim 11, comprising:
13. The clock glitch detector includes: a counter configured to count a number of periods of the reference clock within a time interval of the system clock having a logic low state to generate a count result, the count result having a previous value during a previous period of the system clock and the count result having a current value during a current period of the system clock; a comparator configured to compare the previous value and the current value to generate the clock glitch detection result; 12. The tamper-evident detector of claim 11, comprising:
14. The clock glitch detector includes: a first counter configured to count a first number of periods of the reference clock within a first time interval of the system clock having a logic high state to generate a first count result, the first count result having a first previous value during a previous period of the system clock and the first count result having a first current value during a current period of the system clock; a first comparator configured to compare the first previous value and the first current value to generate a first comparison result; a second counter configured to count a second number of periods of the reference clock within a second time interval of the system clock having a logic low state to generate a second count result, the second count result having a second previous value during a previous period of the system clock and the second count result having a second current value during a current period of the system clock; a second comparator configured to compare the second previous value and the second current value to generate a second comparison result; an OR logic gate configured to perform an OR logic operation on the first comparison result and the second comparison result to generate the clock glitch detection result; 12. The tamper-evident detector of claim 11, comprising:
15. The frequency-to-digital converter comprises: a counter configured to count a number of periods of a reference clock within a time interval defined by the system clock to generate a count result, the time interval corresponding to a frequency of the system clock; a reset signal generator coupled to the counter and configured to generate a reset signal according to the reference clock and the system clock to reset the counter at a start of the time interval; a register coupled to the counter and configured to store the counting result at an end of the time interval and to output the counting result as the digital code; 10. The tamper-evident detector of claim 9, comprising:
16. a monotonic counter coupled to the controller and configured to count an accumulated operation time of the anti-tamper detector to generate aging information; The tamper-proof detector of claim 2 , wherein the controller calibrates the specific operating range values according to the aging information.
17. 1. A method for detecting a physical attack, comprising: generating a temperature code according to a first clock output from a proportional to absolute temperature (PTAT) oscillator and first calibration mapping information, the temperature code representing an operating temperature; generating a voltage code according to a second clock output from a voltage controlled oscillator (VCO), the temperature code, and second calibration mapping information, the voltage code representing a supply voltage; generating a frequency code according to a third clock output from a reference oscillator, the temperature code, the voltage code and third calibration mapping information, the frequency code representing a frequency of a system clock; utilizing a controller to generate an anti-tamper detection result according to the temperature code, the voltage code and the frequency code, the anti-tamper detection result indicating whether any of the operating temperature, the supply voltage and the system clock has been tampered with by the physical attack; The method includes:
18. and comparing a previous value of the voltage code during a previous period of the system clock to a current value of the voltage code during a current period of the system clock to generate a voltage glitch detection result; 20. The method of claim 17, wherein the anti-tamper detection result is further generated according to the voltage glitch detection result to determine whether there is a voltage glitch in the supply voltage due to the physical attack.
19. counting a number of periods of the third clock within a time interval to generate a count result, the time interval being defined by a logic high or logic low state of the system clock; comparing a previous value of the counting result during a previous period of the system clock with a current value of the counting result during a current period of the system clock to generate a clock glitch detection result; Further comprising:
20. The method of claim 17, wherein the anti-tamper detection result is further generated according to the clock glitch detection result to determine whether there is a clock glitch in the system clock due to the physical attack.
20. using a counter to count a number of periods of a test clock among the first clock, the second clock, and the third clock within a time interval defined by the system clock to generate a count result, the time interval corresponding to a frequency of the system clock; generating a reset signal according to the test clock and the system clock to reset the counter at a beginning of the time interval; storing said counting result at the end of said time interval using a register and outputting said counting result as a digital code corresponding to one of said operating temperature, said supply voltage and said system clock frequency; 20. The method of claim 17, further comprising:
Citation Information
Patent Citations
Semiconductor device and IC card
JP2003150451A
Semiconductor integrated circuit with safety function
JP2003256793A
Data processing circuit and communication mobile terminal
JP2009123071A
Method for protecting semiconductor integrated circuit from reverse engineering
JP2020136592A
Digital system for the detection of variations in operating conditions of an integrated circuit
US20130241690A1
