Side-channel attack prevention apparatus, method and electronic device using the same
By dynamically adjusting the power waveform through machine learning models and controllers, the problem of high hardware costs and limited anti-attack capabilities in existing technologies is solved, achieving efficient and flexible side-channel attack protection and improving the security of electronic devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NUVOTON
- Filing Date
- 2025-10-15
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies, when facing side-channel attacks, disrupt power consumption characteristics by adding additional hardware devices, which increases hardware costs and limits their resistance to attacks. Furthermore, the effectiveness of protection may weaken as analysis tools advance.
Machine learning models are used to interpret the power waveform characteristics of electronic devices, and the power waveform is adjusted by a controller. Combined with the dynamic control of hardware devices, the power waveform is dynamically adjusted to avoid the exposure of specific features. The elasticity of machine learning models and the flexibility of hardware are used to prevent side-channel attacks.
It effectively prevents malicious individuals from stealing keys or confidential data through power consumption characteristic analysis, reduces hardware costs, and has the ability to flexibly respond to unknown attacks, thereby improving the security of electronic devices.
Smart Images

Figure CN122316596A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a side-channel attack prevention technology to prevent hackers from performing side-channel attacks through power analysis, and more particularly to a side-channel attack prevention device, method, and electronic device using the same, which uses a machine learning model to determine whether the power waveform of an electronic device may have specific characteristics when the device is performing encryption, decryption, or confidential data processing. Background Technology
[0002] To improve the security of data storage within a chip (i.e., data encryption) or for secure data exchange with external systems, implementing encryption algorithms within the chip is a common practice. Common encryption algorithms include the Advanced Encryption Standard (AES). Because these algorithms have been around for many years, they have been studied extensively by individuals (such as academics or hackers). Taking AES as an example, the power consumption characteristics exhibited during AES computation are widely understood. Therefore, malicious individuals (such as hackers) can potentially deduce the key used by AES by collecting a large amount of information about these power consumption characteristics, thereby achieving the goal of stealing confidential data. The aforementioned attack methods are collectively known as side-channel attacks.
[0003] Side-channel attacks succeed because the algorithm is fixed, and the power consumption of each operation within the algorithm generally exhibits specific characteristics. Therefore, by collecting enough data, it's possible to crack the key. To counter side-channel attacks, some have proposed adding unnecessary dummy operations to the original AES computation or repeatedly executing the original operations to disrupt the attacker's ability to derive the key through power consumption analysis. While these methods can disrupt analysis, they incur additional hardware costs. Furthermore, since the added hardware is fixed, the additional power consumption is also fixed (i.e., the interference is fixed). Therefore, with advancements in analysis tools, it's questionable whether these methods will remain effective in protecting keys in the future. Summary of the Invention
[0004] As can be understood from the above description, the purpose of this invention is to provide a side-channel attack prevention device, method, electronic device using the same, and testing device that makes it difficult for malicious individuals to determine the operation of encryption / decryption devices and / or confidential data processing devices by collecting large amounts of power consumption characteristics.
[0005] Based on one objective of this invention, embodiments of the invention provide a side-channel attack prevention device, which is disposed in an electronic device or a testing device and includes a controller and a machine learning module. The controller is used to change the power waveform of the electronic device using a power waveform adjustment method when the confidential data processing device and / or encryption / decryption device of the electronic device is running. The machine learning module is electrically connected to the controller and is used to acquire the power waveform when the encryption / decryption device and / or confidential data processing device of the electronic device is running, and to use a trained machine learning model to determine the credibility of the power waveform having specific characteristics. The power waveform adjustment method is set by the user, and when the credibility is greater than or equal to a threshold value, the controller prompts the user to reset the power waveform adjustment method; alternatively, the power waveform adjustment method is selected by the controller from a plurality of previously unselected power waveform adjustment methods, and when the credibility is greater than or equal to the threshold value, the controller reselects from the plurality of previously unselected power waveform adjustment methods.
[0006] Based on one objective of the present invention, embodiments of the present invention provide an electronic device, comprising an encryption / decryption device and / or a confidential data processing device, multiple hardware devices, a power conversion device, a controller, and a machine learning module. The power conversion device is electrically connected to the encryption / decryption device and / or the confidential data processing device and the multiple hardware devices, and is used to receive a power signal and convert the power signal to generate a supply voltage or supply current. The controller is electrically connected to the power conversion device, the encryption / decryption device and / or the confidential data processing device, and the multiple hardware devices, and is used to change the power waveform of the electronic device corresponding to the power signal using a power waveform adjustment method when the confidential data processing device and / or the encryption / decryption device is operating. The machine learning module is electrically connected to the controller and the power conversion device, and is used to acquire the power waveform when the encryption / decryption device and / or the confidential data processing device of the electronic device is operating, and to use a trained machine learning model to determine the confidence level of the power waveform having specific characteristics. The power waveform adjustment method is set by the user, and when the confidence level is greater than or equal to a threshold value, the controller prompts the user to reset the power waveform adjustment method. Alternatively, the power waveform adjustment method is selected by the controller from a plurality of power waveform adjustment methods that were not previously selected, and when the confidence level is greater than or equal to the threshold value, the controller reselects one of the plurality of power waveform adjustment methods that were not previously selected. The power waveform adjustment method involves at least one of a plurality of hardware devices of the electronic device being turned on or off at different times during the operation of the confidential data processing device or encryption / decryption device, or at least one of a plurality of hardware devices of the electronic device adjusting its operating voltage, operating current, or operating frequency at different times during the operation of the confidential data processing device or encryption / decryption device.
[0007] Based on one objective of the present invention, an embodiment of the present invention provides a side-channel attack prevention method, which is executed in an electronic device or a testing device, and includes the following steps: changing the power waveform of the electronic device using a power waveform adjustment method while the confidential data processing device and / or encryption / decryption device of the electronic device are running via a controller; acquiring the power waveform while the encryption / decryption device and / or confidential data processing device of the electronic device are running via a machine learning module, and determining the credibility of the power waveform having specific characteristics using a trained machine learning model; and setting the power waveform adjustment method by the user, and prompting the user to reset the power waveform adjustment method when the credibility is greater than or equal to a threshold value, or the power waveform adjustment method is selected by the controller from a plurality of previously unselected power waveform adjustment methods, and when the credibility is greater than or equal to the threshold value, reselecting a power waveform adjustment method from a plurality of previously unselected power waveform adjustment methods via the controller.
[0008] In summary, compared to existing technologies, the side-channel attack prevention device, method, and electronic device using them provided by this invention can ensure that malicious actors cannot determine the operation of encryption / decryption devices and / or confidential data processing devices by collecting large amounts of power consumption characteristics. This increases the security of electronic devices and prevents keys or confidential data from being stolen or destroyed. Furthermore, the electronic device provided by this invention requires no additional hardware beyond a machine learning module. Therefore, compared to existing technologies, it reduces hardware setup costs and may even effectively reduce unnecessary power consumption. Attached Figure Description
[0009] Figure 1 This is a block diagram of an electronic device with a side-channel attack prevention device according to an embodiment of the present invention.
[0010] Figure 2 This is the original power waveform of the electronic device during operation of the encryption / decryption device and / or confidential data processing device of the electronic device in the embodiments of the present invention.
[0011] Figure 3 This refers to the adjusted power waveform of the electronic device during operation of the encryption / decryption device and / or confidential data processing device in the embodiment of the present invention.
[0012] Figure 4 This is a flowchart of a side-channel attack prevention method according to an embodiment of the present invention.
[0013] Explanation of reference numerals in the attached figures:
[0014] 101…Machine learning module; 102…Controller; 103…Encryption / decryption device; 104…Confidential data processing device; 105-107…Hardware device; 108…Power conversion device; 201, 302-307…Power waveform; S301-S305…Steps. Detailed Implementation
[0015] The primary objective of this invention is to provide a side-channel attack prevention device, method, and electronic device using the same, which ensures that it is difficult for malicious individuals to determine the operation of encryption / decryption devices and / or confidential data processing devices by collecting extensive power consumption characteristics. To achieve this objective, the side-channel attack prevention device, method, and electronic device using the same provided by this invention can, before leaving the factory or in a secure environment (e.g., an offline environment or other environment where malicious individuals cannot obtain power waveforms), use a machine learning model to determine the reliability of specific characteristics in the power waveform of the electronic device during the operation of the confidential data processing device and / or encryption / decryption device.
[0016] If the confidence level is greater than or equal to the threshold value, another power waveform adjustment method is applied when the confidential data processing device and / or encryption / decryption device are running, thereby changing the confidence level of the power waveform with specific characteristics until the confidence level is less than the threshold value. When the confidence level of the power waveform of the electronic device during the operation of the confidential data processing device and / or encryption / decryption device is less than the threshold value, it means that it is difficult for malicious individuals to determine that the encryption / decryption device and / or confidential data processing device is running by collecting a large amount of power consumption characteristics.
[0017] The following will describe in detail the possible embodiments of the present invention with reference to the accompanying drawings. However, it should be noted that the following implementation details are not intended to limit the scope of the claims made by the present invention, but are only intended to facilitate understanding by those skilled in the art.
[0018] First, please refer to Figure 1 , Figure 1 This is a block diagram of an electronic device with a side-channel attack prevention mechanism according to an embodiment of the present invention. The electronic device includes an encryption / decryption device 103 and / or a confidential data processing device 104, multiple hardware devices 105-107, a power conversion device 108, a controller 102, and a machine learning module 101. The power conversion device 108 is electrically connected to the encryption / decryption device 103 and / or the confidential data processing device 104, the multiple hardware devices 105-107, the controller 102, and the machine learning module 101, and the controller 102 is electrically connected to the encryption / decryption device 103 and / or the confidential data processing device 104, the multiple hardware devices 105-107, and the machine learning module 101.
[0019] The side-channel attack prevention device of the present invention mainly comprises a controller 102 and a machine learning module 101. The controller 102 is used to change the power waveform of the electronic device using a power waveform adjustment method when the confidential data processing device 104 and / or encryption / decryption device 103 of the electronic device are running. The machine learning module 101 is electrically connected to the controller and is used to acquire the power waveform when the confidential data processing device 104 and / or encryption / decryption device 103 of the electronic device are running, and to use a trained machine learning model to determine the credibility of the power waveform having specific characteristics. Further, the aforementioned machine learning model can be at least one of Support Vector Machine (SVM), forward neural network, recurrent neural network (RNN), convolutional neural network (CNN), gated recurrent unit (GRU), and long-short-term memory (LSTM).
[0020] In one implementation, the power waveform adjustment method is set by the user, for example, by issuing a command to the controller 102 to set the power waveform adjustment method (i.e., manually setting the power waveform adjustment method). At this time, when the confidence level is greater than or equal to a threshold value, the controller 102 will prompt the user to reset the power waveform adjustment method. For example, the controller 102 will output a result indicating that the confidence level is greater than or equal to the threshold value to inform the user. Then, after resetting the power waveform adjustment method, when the confidential data processing device 104 and / or encryption / decryption device 103 subsequently run, the machine learning module 101 again uses a machine learning model to determine the confidence level of the power waveform with specific characteristics. If the confidence level is less than the threshold value, the controller 102 will prompt the user that the currently set power waveform adjustment method can be applied to the subsequent operation of the confidential data processing device 104 and / or encryption / decryption device 103.
[0021] In another implementation, the power waveform adjustment method is selected by the controller 102 from among a plurality of previously unselected power waveform adjustment methods (i.e., automatic selection of the power waveform adjustment method). In this case, if the confidence level is greater than or equal to a threshold value, the controller 102 reselects from the plurality of previously unselected power waveform adjustment methods. If the confidence level is less than the threshold value, the controller 102 records the selected power waveform adjustment method, for example, by writing the power waveform adjustment method to non-volatile memory. Later, when the confidential data processing device 104 and / or the encryption / decryption device 103 are running, the controller reads the recorded power waveform adjustment method from the non-volatile memory and uses the recorded power waveform adjustment method to change the power waveform.
[0022] The power conversion device 108 receives and converts power signals to generate a supply voltage or current for the encryption / decryption device 103 and / or the confidential data processing device 104, multiple hardware devices 105-107, the controller 102, and the machine learning module 101. The power waveform corresponding to the power signal can be a voltage waveform, a current waveform, or a power consumption waveform. Furthermore, the specific characteristics of the power waveform can be its time-domain and / or frequency-domain characteristics.
[0023] The encryption / decryption device 103 may be, for example, but is not limited to, an AES encryption / decryption device. However, it could also be an RSA encryption algorithm encryption / decryption device, or any other encryption / decryption device whose operation can be known through a side-channel attack. In short, the present invention is not limited to the type of encryption / decryption device 103. The confidential data processing device 104 may be another encryption / decryption device, an encrypted data storage device, or another device for processing confidential data. When processing confidential data, the confidential data processing device 104 may also cause the power waveform corresponding to the power signal of the electronic device to have specific characteristics.
[0024] In order to make the power waveform of the encryption / decryption device 103 and / or the confidential data processing device 104 difficult to observe with specific characteristics, the controller 102 of the present invention controls at least one of the multiple hardware devices 105 to 107 to turn on or off at different times during the operation of the confidential data processing device 104 or the encryption / decryption device 103, according to the power waveform adjustment method set by the user or selected by the controller 102, or controls at least one of the multiple hardware devices 105 to 107 to adjust its operating voltage, operating current or operating frequency at different times during the operation of the confidential data processing device 104 or the encryption / decryption device 103.
[0025] Once a confidence level below a threshold is identified that allows the power waveform to exhibit specific characteristics, the corresponding power waveform adjustment method can be applied to the subsequent operation of the encryption / decryption device 103 and / or the confidential data processing device 104, thereby achieving the purpose of preventing side-channel attacks. Furthermore, hardware devices 105-107 are not additional hardware devices added to the electronic device, but are inherent to the electronic device itself. Therefore, unlike existing technologies that require additional hardware devices, the approach of this invention can effectively reduce hardware setup costs.
[0026] Please refer to Figures 1-3 , Figure 2 The original power waveform of the electronic device during operation of the encryption / decryption device and / or confidential data processing device of the electronic device in this embodiment of the invention, and Figure 3 This refers to the adjusted power waveform of the electronic device during operation of the encryption / decryption device and / or confidential data processing device in an embodiment of the present invention. Figure 2 In the process of operating the encryption / decryption device 103 and / or the confidential data processing device 104, the original power waveform 201 of the electronic device has specific characteristics, making it easily analyzeable by malicious individuals to determine that the encryption / decryption device 103 and / or the confidential data processing device 104 are running. By applying a power waveform adjustment method found through a machine learning model, [the following is possible:] Figure 3 In the process of the encryption / decryption device 103 and / or the confidential data processing device 104 operating the electronic device, the power waveform of the electronic device during operation is a combination of power waveform 201 and power waveforms 302 to 307, wherein power waveforms 302, 304 and 305 are power waveforms contributed when hardware device 105 is turned on, power waveforms 302 and 306 are power waveforms contributed when hardware device 106 is turned on, and power waveform 307 is power waveform contributed when hardware device 107 is turned on.
[0027] Please refer to Figure 1 and Figure 4 , Figure 4This is a flowchart of a side-channel attack prevention method according to an embodiment of the present invention. First, in step S301, the controller 102 selects one of a plurality of power waveform adjustment methods that was not previously selected, and uses the selected power waveform adjustment method to change the power waveform of the electronic device when the confidential data processing device 104 or the encryption / decryption device 103 is running. Then, in step S302, the machine learning module 101 obtains the power waveform of the electronic device when the confidential data processing device 104 or the encryption / decryption device 103 is running. Next, in step S303, the machine learning module 101 uses a trained machine learning model to determine the credibility of the power waveform having specific characteristics. In step S304, the controller 102 determines whether the credibility is greater than or equal to a threshold value. If the credibility is greater than or equal to the threshold value, step S301 is executed, and one of the plurality of power waveform adjustment methods that was not previously selected is reselected; if the credibility is less than the threshold value, step S305 is executed. In step S305, the selected power waveform adjustment method is recorded by the controller 102, and the recorded power waveform adjustment method is used to change the power waveform when the confidential data processing device 104 or the encryption / decryption device 103 is running.
[0028] Please note that Figure 4 The side-channel attack prevention method is illustrated using the controller 102 automatically selecting a power waveform adjustment mode as an example. However, as mentioned above, in one embodiment, the power waveform adjustment mode can also be manually set. In the case of manually setting the power waveform adjustment mode, step S301 becomes: when the confidential data processing device 104 or the encryption / decryption device 103 is running, the set power waveform adjustment mode is used to change the power waveform of the electronic device. Step S305 becomes: prompting the user that the currently set power waveform adjustment mode can be applied to the subsequent operation of the confidential data processing device 104 and / or the encryption / decryption device 103.
[0029] Please note that in the above embodiments, the controller 102 and the machine learning module 101 are located in the electronic device, but this invention is not limited thereto. In other embodiments, the controller 102 and the machine learning module 101 are located in a test device, and the electronic device has another controller electrically connected to the controller 102, the encryption / decryption device 103 and / or the confidential data processing device 104, and multiple hardware devices 105-107. The controller 102 of the test device is used to communicate with the controller of the electronic device, and the test device can find a suitable power waveform adjustment method for the electronic device during the testing phase. This allows the controller of the electronic device to use the suitable power waveform adjustment method found by the controller 102 of the test device when the encryption / decryption device 103 and / or the confidential data processing device 104 are running, thereby preventing side-channel attacks.
[0030] In summary, the side-channel attack prevention device, method, and electronic device using the present invention have the following characteristics: (1) A machine learning model is used to determine whether the specific characteristics of the power waveform of the electronic device are obvious. If obvious, it means that the electronic device is easily compromised by a side-channel attack and its keys or confidential data are easily obtained. If the selected power waveform adjustment method makes the machine learning model know that the specific characteristics of the power waveform are not obvious, it means that the electronic device is difficult to compromise by a side-channel attack and its keys or confidential data are difficult to obtain. (2) The machine learning model can be updated so that the interpretation capability keeps pace with the times. (3) Existing technologies use additional hardware devices to create a mask. Function, but because the ability to mask the function is fixed, it is not flexible. However, the method of using machine learning models in this invention is more flexible and has a better chance of resisting unknown attack forms; (4) Although additional hardware devices can be added to the electronic device in this invention, and the hardware devices can be turned on to mask the power waveform when needed, it is better not to add additional hardware devices, but to turn on the existing hardware devices of the electronic device to save hardware costs; (5) In this invention, the power waveform adjustment method of turning on those hardware devices to mask the power waveform can be manually set, or the controller can select it by itself, or even another machine learning model can be introduced to select it automatically.
[0031] This invention is disclosed herein only by preferred embodiments. However, it should be understood by anyone skilled in the art that the above embodiments are for illustrative purposes only and are not intended to limit the scope of the claims. Any variations or substitutions that are equivalent to or equivalent to the above embodiments should be interpreted as being covered within the spirit or scope of this invention. Therefore, the scope of protection of this invention should be based on the scope defined by the above claims.
Claims
1. A side-channel attack prevention device, disposed in an electronic device or a testing device, characterized in that: A controller is used to change a power waveform of the electronic device using a power waveform adjustment method when a confidential data processing device and / or an encryption / decryption device of the electronic device is in operation. as well as A machine learning module, electrically connected to the controller, is used to acquire the power waveform when the encryption / decryption device and / or the confidential data processing device of the electronic device are running, and to use a trained machine learning model to determine the confidence level of the power waveform having a specific feature; The power waveform adjustment method is set by a user, and when the confidence level is greater than or equal to the threshold value, the controller prompts the user to reset the power waveform adjustment method. Alternatively, the power waveform adjustment method is one of the power waveform adjustment methods that the controller has previously not selected, and when the confidence level is greater than or equal to the threshold value, the controller reselects one of the power waveform adjustment methods that has previously not been selected.
2. The side-channel attack prevention device as described in claim 1, characterized in that, The power waveform adjustment method is selected by the controller from among the plurality of power waveform adjustment methods that were not previously selected. When the confidence level is less than the threshold value, the controller records the selected power waveform adjustment method and, when the confidential data processing device and / or the encryption / decryption device are subsequently running, causes the electronic device to use the recorded power waveform adjustment method to change the power waveform.
3. The side-channel attack prevention device as described in claim 1, characterized in that, The power waveform adjustment method is that at least one hardware device of the electronic device is turned on or off at different times when the confidential data processing device or the encryption / decryption device is running, or at least one hardware device of the electronic device adjusts an operating voltage, an operating current or an operating frequency at different times when the confidential data processing device or the encryption / decryption device is running.
4. The side-channel attack prevention device as described in claim 1, characterized in that, The power supply waveform is a voltage waveform, a current waveform, or a power consumption waveform, and the specific feature is a time-domain feature and / or a frequency-domain feature of the power supply waveform.
5. The side-channel attack prevention device as described in claim 1, characterized in that, The electronic device includes the machine learning module and the controller; or, the electronic device does not include the machine learning module and the controller, and the machine learning module and the controller are disposed in the test device outside the electronic device.
6. An electronic device, characterized in that: An encryption / decryption device and / or a confidential data processing device; Multiple hardware devices; A power conversion device, electrically connected to the encryption / decryption device and / or the confidential data processing device and the plurality of hardware devices, is used to receive a power signal and convert the power signal to generate a supply voltage or a supply current. A controller, electrically connected to the power conversion device, the encryption / decryption device and / or the confidential data processing device and the plurality of hardware devices, is used to change a power waveform of the electronic device corresponding to the power signal using a power waveform adjustment method when the confidential data processing device and / or the encryption / decryption device is running; as well as A machine learning module, electrically connected to the controller and the power conversion device, is used to acquire the power waveform when the encryption / decryption device and / or the confidential data processing device of the electronic device are running, and to use a trained machine learning model to determine the confidence level of the power waveform having a specific feature; The power waveform adjustment method is set by a user, and when the confidence level is greater than or equal to the threshold value, the controller prompts the user to reset the power waveform adjustment method; or, the power waveform adjustment method is one of the power waveform adjustment methods that the controller has previously not selected from among a plurality of power waveform adjustment methods, and when the confidence level is greater than or equal to the threshold value, the controller reselects one of the plurality of power waveform adjustment methods that has previously not been selected. The power waveform adjustment method is to turn on or off at least one of the plurality of hardware devices of the electronic device at different times when the confidential data processing device or the encryption / decryption device is running, or to adjust an operating voltage, an operating current or an operating frequency of at least one of the plurality of hardware devices of the electronic device at different times when the confidential data processing device or the encryption / decryption device is running.
7. The electronic device as claimed in claim 6, characterized in that, The machine learning model is at least one of a support vector machine, a feedforward neural network, a recurrent neural network, a convolutional neural network, a gated recurrent unit, and a long short-term memory network.
8. The electronic device as claimed in claim 6, characterized in that, The power waveform adjustment method is one of the power waveform adjustment methods that the controller selects from those that were not previously selected, and the recorded power waveform adjustment method is written by the controller to a non-volatile memory.
9. A side-channel attack prevention method, implemented in an electronic device or a testing device, characterized in that: A controller, during the operation of a confidential data processing device and / or an encryption / decryption device of the electronic device, uses a power waveform adjustment method to change a power waveform of the electronic device. During operation of the encryption / decryption device and / or the confidential data processing device of the electronic device, a machine learning module acquires the power waveform and uses a trained machine learning model to determine the confidence level of the power waveform having a specific feature; and The power waveform adjustment method is set by a user, and when the confidence level is greater than or equal to the threshold value, the controller prompts the user to reset the power waveform adjustment method. Alternatively, the power waveform adjustment method is selected by the controller from among a plurality of power waveform adjustment methods that have not been previously selected, and when the confidence level is greater than or equal to the threshold value, the controller reselects from among the plurality of power waveform adjustment methods that have not been previously selected.
10. The side-channel attack prevention method as described in claim 9, characterized in that, The power waveform adjustment method is one of the power waveform adjustment methods that the controller selects from those that were not previously selected, and the recorded power waveform adjustment method is written by the controller to a non-volatile memory.