Device for combating side-channel attacks
By introducing machine learning units into the encryption core, the accumulated energy of information-sensitive signals is extracted and eliminated, and the problem of insufficient power contribution and security upgrade capabilities to combat side channel attacks in the prior art is solved, and efficient side channel attack defense and Security repair significantly improves security and flexibility.
Patent Information
- Application Number
- CN202380027929.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-02-16
- Filing Date
- 2023-02-16
- Publication Date
- 2024-11-01
AI Technical Summary
The prior art cannot effectively reduce the power contribution of small signal information sensitive when fighting side channel attacks, and cannot adapt to newly discovered side channel vulnerabilities and attacks, limiting the reduction of power overhead and security upgrade capabilities, especially for long-lived energy sources. Challenges exist in autonomous systems and high-cost equipment.
Adopting a machine learning-based design adaptive framework, the machine learning unit (MLU) includes a feature extractor, a machine learning-based power estimator and a power compensation unit to generate and eliminate the accumulated energy of information-sensitive signals to achieve anti-side channel attacks. Iterative training is performed using lightweight machine learning power model (MLPM) to update model parameters to enable hardware patches and security repairs.
Significantly improves the minimum public trace (MTD), reaching 60,000X and 240,000X on AES and PRESENT encryption cores, achieving flexibility and upgradeability against side channel attacks, supporting cross-password reuse and low power Overhead target compensation, maintain high safety standards.
Smart Images

Figure CN118891626A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates broadly, but not exclusively, to frameworks and devices for combating side-channel attacks. Background Art
[0002] Countering side-channel attacks has become a fundamental requirement in protecting integrated circuits with sensitive data and preventing side-channel leakage such as power consumption and electromagnetic (EM) emissions. Over time, the implementation of protection techniques has evolved from design-specific frameworks to design-reusable frameworks.
[0003] Compared to design-specific frameworks, design-reusable frameworks allow the protected IP to be reused in various designs to reduce design costs and security assessment efforts. Such adversarial techniques typically reduce attack SNR by embedding protection techniques in voltage regulators, such as current balancing, switching regulators with randomized loop control, DLDO with noise injection, DLDO with randomized thresholds and AES transforms, DLDO with edge-tracking quantizers, current domain signature attenuation, and additional time-varying transfer functions. Such protections allow design reuse and a certain degree of power security flexibility, but also have common limitations because they compensate for fluctuations in overall power overhead rather than small signal information-sensitive power contributions, which in turn limits the reduction of power overhead. In addition, in existing adversarial frameworks, the protection level is usually set at design time and cannot be increased after chip manufacturing. Therefore, they cannot adapt to mitigate newly discovered side channel vulnerabilities and attacks.
[0004] Indeed, power overhead and the ability to safely upgrade over time are critical for energy autonomous systems with long service lives and for applications where device replacement is costly or not feasible (e.g., IoT, implantable devices). Summary of the invention
[0005] According to one embodiment, a device for countering side channel attacks (SCA) is provided, comprising: a machine learning unit (MLU) connectable to an encryption core, wherein the MLU comprises: a feature extractor unit configured to extract information sensitive signals from the encryption core and generate machine learning features based on the information sensitive signals; and a machine learning-based power estimator unit configured to output accumulated information sensitive energy based on the generated machine learning features; and a power compensation unit configured to eliminate the accumulated information sensitive energy in order to counter side channel attacks (SCA).
[0006] Information sensitive signals from the cryptographic core may be selected based on multiplexing and / or clock gating logic.
[0007] The power estimator unit based on machine learning can adopt a linear regression model. The linear regression model can be based on the following equation (1):
[0008]
[0009] in:
[0010] x is the generated machine learning features from the feature extractor unit,
[0011] w is the pre-trained machine learning model parameter,
[0012] k represents the number of subkey modules, and
[0013] D represents one or more of the selected generated machine learning features.
[0014] Pre-trained machine learning model parameters can be updateable and can then be mapped into a linear regression model to implement hardware patches.
[0015] The power compensation unit may be connected to a power source, and the power compensation unit may be configured to draw equivalent energy from the power source to eliminate the accumulated information sensitive energy.
[0016] The power compensation unit may include an N-bit capacitive digital-to-analog converter standard cell including N binary-scaled gate clusters. N may be equal to 10, and the accumulated information-sensitive energy may be represented as a 10-bit control signal. If the corresponding input bit from the MLU is 1, the transition and energy contribution of each of the gate clusters may be enabled. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The embodiments are provided by way of example only and will be better understood and readily appreciated by those of ordinary skill in the art by reading the following written description in conjunction with the accompanying drawings, in which:
[0018] Figure 1 Two prior art categories of frameworks (outside the shaded area) and a designed adaptive framework according to an embodiment (inside the shaded area) are shown.
[0019] Figure 2 It is a schematic diagram of designing an adaptive side channel attack countermeasure framework / device based on machine learning according to an embodiment.
[0020] Figure 3 is a flow chart illustrating an iterative training strategy for machine learning according to an embodiment of the present invention.
[0021] Figure 4 The protection performance of a machine learning based designed adaptive adversarial framework / device according to an embodiment of an AES encryption core is shown.
[0022] Figure 5 The protection performance of a machine learning based designed adaptive adversarial framework / device according to an embodiment of the PRESENT cryptographic core is shown.
[0023] Figure 6 Iterative machine learning model training showing the impact of measured MTD for AES and PRESENT. DETAILED DESCRIPTION
[0024] Embodiments will be described by way of example only with reference to the accompanying drawings, in which like reference numerals and characters indicate like elements or equivalents.
[0025] Embodiments of the present invention relate to a machine learning based design-adaptive hardware countermeasure approach to side channel attacks (SCA). Embodiments of the present invention enable post-silicon upgradability and security fixes over time, reuse across ciphers under single-standard and multi-standard ciphers, and targeted compensation of information-sensitive power contributions for low power overhead.
[0026] According to one implementation, a lightweight on-chip machine learning power model (MLPM) is used to estimate the information-sensitive energy of a cryptographic core (crypto-core). In the following description, the term "information-sensitive signal" refers to a signal related to a key or a signal in which a cryptographic key participates in its generation. The MLPM input is provided by an on-chip feature extraction unit, which extracts information-sensitive signals from the block to be protected. The MLPM output is the information-sensitive energy of the block to be protected. Machine learning weight updates allow post-silicon enhancements and large-scale deployment of security fixes throughout the life of the device. The MLPM can be iteratively trained for updates so that possible information leakage is fully contained in the model. Advantageously, a small number of training iterations is sufficient to increase the minimum trace (MTD) of key leakage to or better than the value of the prior art. The MLPM output drives an N-bit power digital-to-analog converter (powerDAC, also referred to as "capDAC" in the following description) with a stdcell-based design to offset the information-sensitive energy of the crypto-core. The linearity of the N-bit powerDAC can be further improved by inserting and training redundant least significant bits (LSBs) to achieve fine compensation with higher accuracy.
[0027] Prototypes according to embodiments of the present invention have been developed for both AES crypto-cores and PRESENT crypto-cores, and protection performance is demonstrated by silicon measurement results. The minimum disclosed trace (MTD) of the protected core (using embodiments of the present invention) exceeds 1.2B, which is an improvement of more than 60,000X over the unprotected core, which is the best compared to the prior art. The MLPM according to embodiments of the present invention can use a linear regression model, and can be replaced with other machine learning models (e.g., random forests, neural networks). The protected crypto-core can be extended to other ciphers and even other digital circuits (e.g., neural network accelerators).
[0028] Embodiments of the present invention are directed to a design adaptive framework for countering / mitigating side-channel attacks. Figure 1 ,Compared to the frameworks in both prior art categories, the ,design adaptive framework (in the shaded area) exploits an on-chip target power estimation and ,compensation unit based on machine learning, which enables post-silicon upgradability and security ,fixes over time for “hardware patches” by simply changing their ,configuration parameters (like “hardware APIs”), cross-crypto reuse in single-standard and multi-standard security chips, and ,targeted compensation for small signal information-sensitive power ,contributions to reduce power overhead adversarial.
[0029] Compared to the prior art (off-chip) machine learning auxiliary framework, embodiments of the present invention provide an on-chip runtime machine learning model with flexible size, comprehensive feature availability, flexible selection to accommodate different passwords and different micro-architecture implementations of the same password. Therefore, the machine learning-based protection framework according to an embodiment of the present invention provides a higher degree of flexibility and adaptability to different designs and upgradeability against new attacks. This ultimately facilitates design reuse and also uniquely supports hardware patches for side-channel attacks, maintaining high security standards during the service life of the device and even allowing for improvements over time.
[0030] Figure 2 The architecture of a machine learning-based adaptive side channel attack countermeasure framework and device according to an embodiment of the present invention is shown. The device includes an on-chip machine learning power model (MLPM). The MLPM includes a feature extractor unit and a machine learning-based power estimator unit. The device also includes a power compensation unit to compensate for any information leakage at runtime.
[0031] The input features of the machine learning power model (MLPM) are generated by the feature extractor unit, which are directly taken from the crypto-core signals. Since not all signals of all rounds involve information leakage, signal selection via multiplexing and clock gating logic is introduced to prevent unnecessary power overhead of extracting unused features. After that, the selected signals are sent to the Hamming distance (HD) and Hamming weight (HW) modules to generate features commonly used in side channel attacks.
[0032] Next, the generated machine learning features are sent to the power estimator unit, where a lightweight linear regression model is used for MLPM as shown in Equation 1 (Eq. 1). Here x is the machine learning feature from the feature extractor unit, and w is the pre-trained machine learning model parameter. The detailed training process will be described below. K and D represent the number of subkey blocks and the selected one or more generated machine learning features, respectively. The subkey block means that the complete encryption key is usually large (e.g. 128 bits for AES-128), so that a potential attacker divides the complete key into sub-blocks (e.g. 16-byte sub-blocks) and attacks one by one. The MLPM output is the accumulated information sensitive energy during encryption, expressed as a 10-bit control signal that drives the subsequent power compensation DAC.
[0033]
[0034] In summary, a machine learning power model (MLPM) can be implemented as a machine learning unit (MLU). The MLU models the cumulative energy associated with data-sensitive signal transitions (i.e., key-related) within an encryption core ("encryption-core") during encryption. The MLU input features are selected directly from the encryption core via multiplexing (the Hamming weight / distance of the intermediate values generated in the entire encryption round in both linear functions / nonlinear functions). The MLU output drives a capacitive DAC (capDAC) that draws energy distribution from the power supply to offset the data-sensitive contribution of the encryption-core, thereby eliminating them. After training, the MLU directly compensates for the small signal energy contribution that is truly key-related (as defined by the relevant input features), avoiding indiscriminate higher power compensation for the entire encryption-core power as in the case of the prior art. A more accurate MLU model (e.g., via better training, feature selection, model size) allows for more sophisticated energy compensation and a higher level of protection (i.e., higher MTD).
[0035] In one implementation, one or more digital shifters are applied in the MLPM to achieve flexible alignment of the magnitudes of different machine learning model parameters, so that the machine learning model parameters can be more flexible in range and the generated output values can be well matched with the power DAC compensation energy. Figure 2 In FIG. 1 , two shifters are shown. The two shifters have the same function, which is to shift the number (bit). The circuit implementation of the machine learning linear regression model only requires signed fixed-point multiplication and accumulation calculations (MAC), thus achieving a relatively low hardware implementation cost.
[0036] The capacitive DAC (capDAC) described above can be implemented as an N-bit capDAC standard cell comprising N binary-scaled gate clusters, whose transitions and energy contributions are enabled only when the corresponding input bit from the MLU is 1 (coarse 9-bit compensation). The stdcell capDAC energy naturally tracks the crypto-core across process corners, voltages, and temperatures. Automatic place-and-route (PNR) in a single design iteration avoids manual optimization and iterative PNR, and compensates for nonlinearities due to its irregular placement by inserting and training redundant LSBs for fine 4-bit compensation.
[0037] In one implementation, the MLPM output drives a 10-bit power DAC that draws energy contributions from the power supply to offset the data-sensitive contributions of the crypto-core, thereby canceling them out. The DAC includes 2 10 The proposed method uses 10 binary-scaled standard cell-based gate clusters with 10 energy levels. For each gate cluster, the transition and energy contribution are enabled only when their corresponding input bit from the machine learning model is 1. Due to the irregular layout, the energy drawn by each gate cluster is not completely linear for each energy level, especially for the smallest contribution, i.e., LSB. Therefore, such nonlinearity is further compensated by inserting 7 redundant LSBs for finer compensation, which avoids manual optimization or iterative PNR to reach a given linearity target.
[0038] The power estimation unit and the power compensation unit may not need to respond immediately since their latency requirements are relaxed by the DC-DC conversion and power DECAP since they are integrated and thus spread the exposure of information sensitive power contributions over a longer time window.
[0039] Figure 3 The iterative training strategy for machine learning according to an embodiment of the present invention is shown. This strategy enables compensation for all information leakage sources.
[0040] At step 1, power traces are collected with an initialized machine learning model. At step 2, the entire Correlated Power Analysis (CPA) attack is performed to find all information sensitive samples during encryption. Based on the selected information sensitive samples, the information sensitive energy is extracted by accumulating the total energy in the corresponding period, which is also the output of the MLPM. At step 3, offline training is performed to update the ML parameters, which are then mapped into the model to achieve the desired hardware patch. If the MTD requirement is still not met, another round of retraining is performed to further improve the MTD. In this way, the hardware patch parameters can be extracted. The linear dependence of power on data and total consumption ensures monotonic convergence with increasing number of iterations.
[0041] In order to demonstrate the protection performance of the embodiments of the present invention, a 40 nm test chip was designed and fabricated. First, using silicon measurement results, a power analysis (EM) attack was performed on AES without and with the embodiments of the present invention.
[0042] Figure 4 The protection performance of the machine learning-based design adaptive adversarial framework and device according to the embodiment of the AES encryption core is shown. Figure 4 As can be seen in the figure, the unprotected AES attacked by power analysis (EM) leaks the key after MTD=10K (20K) traces, while the protected core increases the MTD to more than 1.2B, resulting in an MTD improvement of 120,000X (60,000X) over the unprotected AES. For further verification, the test vector leakage assessment (TVLA) on the unprotected AES crypto-core achieved a |t|-value target of 4.5 under a power attack of 800 traces and an EM attack of 900. Using an embodiment of the present invention, the protection is increased to 750M and 250M, providing an improvement of 937,500X and 277,780X compared to the unprotected version, confirming the robustness of AES against side-channel attacks.
[0043] Figure 5 The protection performance of the machine learning-based design adaptive adversarial framework and device according to an embodiment of the PRESENT crypto-core is shown. To demonstrate the hardware API capabilities of an embodiment of the present invention, the attack is repeated on the PRESENT crypto-core while retraining the same on-chip model with the same circuit implementation and the same power domain, adapted to the PRESENT cipher instead of AES. Figure 5 As can be seen in the figure, the unprotected PRESENT power analysis (EM) attack leaks the key immediately after 5K (7K) traces, while the protected core improves the MTD to over 1.2B. Compared to the unprotected PRESENT, the MTD is improved by 240,000X and 171,000X respectively, which is consistent with the results of AES.
[0044] The hardware patching capability of embodiments of the present invention is demonstrated by retraining the MLPM to protect PRESENT from a recently discovered side channel vulnerability. The newly discovered attack is different from conventional attacks on the first round of PRESENT because it attacks the bit arrangement structure of the last round of PRESENT. The new attack is a good representation of the typical situation of vulnerabilities discovered during the life cycle of a chip.
[0045] like Figure 5 As shown in , a power analysis (EM) attack on the last round of new vulnerabilities on PRESENT without updated protection leaks the key after MTD=8K (12K) traces. As an illustration of the hardware patching concept, the inclusion of the last round of features and model retraining to combat both conventional and new attacks again provides full protection with the MTD restored to 1.2B traces for both attacks. This means that the MTD for power analysis has been greatly improved by over 150,000X, and the MTD for EM attacks has been greatly improved by 100,000X. Similarly, the TVLA on the PRESENT ciphers is highly consistent with the results for AES discussed previously. For the unprotected PRESENT crypto-core, TVLA achieves a |t|-value target of 4.5 under a power attack of 700 traces and an EM attack of 800 traces. In contrast, the protection provided by embodiments of the present invention increases such trace counts to 250M and 100M, providing improvements of 357,140X and 125,000X over the unprotected versions.
[0046] Figure 6 Figure 2 shows how iterative machine learning model training affects the measured MTD for AES and PRESENT. A larger number of training iterations can better capture such power contributions and quickly improve compensation accuracy, improving MTD to billion-scale trace counts, which is comparable to the state-of-the-art. Figure 6 ,The MTD of the two protected cores increases monotonically with the number of training iterations. After 5 or 6 iterations, the two encryption cores reach an MTD of 1.2B. Therefore, a larger number of training iterations allows better capture of the information-sensitive contributions of the encryption cores, the machine learning power estimation unit, and the power compensation unit. The compensation accuracy increases rapidly, reaching billion-scale trace counts in the state of the art.
[0047] Various features and associated technical advantages of embodiments of the present invention are described below.
[0048]
[0049]
[0050] According to an embodiment, a method for countering side channel attacks (SCA) is provided, comprising: using a machine learning unit (MLU) connectable to an encryption core, the MLU comprising: a feature extractor unit configured to extract information sensitive signals from the encryption core and generate machine learning features based on the information sensitive signals; and a machine learning-based power estimator unit configured to output cumulative information sensitive energy based on the generated machine learning features. The method also includes using a power compensation unit configured to eliminate the accumulated information sensitive energy in order to counter side channel attacks (SCA). In other words, the method includes using a feature extractor unit to extract information sensitive signals from the encryption core, and generating machine learning features based on the information sensitive signals; and using a machine learning-based power estimator unit to output the accumulated information sensitive energy based on the generated machine learning features, and using the power compensation unit to eliminate the accumulated information sensitive energy in order to counter side channel attacks (SCA).
[0051] It will be appreciated by those skilled in the art that, without departing from the spirit or scope of the invention as broadly described, various changes and / or modifications may be made to the invention shown in the specific embodiments. Therefore, the present embodiments are to be considered in all aspects as illustrative and not restrictive.
Claims
1. A device for countering a side channel attack (SCA), comprising: A machine learning unit (MLU) that can be connected to the cryptographic core, wherein the MLU includes: a feature extractor unit configured to extract information sensitive signals from the encryption core and generate machine learning features based on the information sensitive signals; and a machine learning-based power estimator unit configured to output a cumulative information-sensitive energy based on the generated machine learning features; and A power compensation unit is configured to eliminate the accumulated information sensitive energy so as to counter a side channel attack (SCA).
2. The device according to claim 1, wherein: The information sensitive signals are selected from the encryption core based on multiplexing and / or clock gating logic.
3. The device according to claim 1 or 2, wherein: The machine learning based power estimator unit employs a linear regression model.
4. The device according to claim 3, wherein: The linear regression model is based on the following equation (1): in: x is the generated machine learning feature from the feature extractor unit, w is the pre-trained machine learning model parameter, k represents the number of subkey blocks, and D represents one or more of the selected generated machine learning features.
5. The device according to claim 4, wherein: The pre-trained machine learning model parameters are updateable and can subsequently be mapped into the linear regression model to implement hardware patches.
6. The device according to claim 1, wherein: The power compensation unit is connectable to a power source, and wherein the power compensation unit is configured to draw equivalent energy from the power source to eliminate the accumulated information sensitive energy.
7. The device according to claim 1, wherein: The power compensation unit includes an N-bit capacitive digital-to-analog converter standard cell, and the N-bit capacitive digital-to-analog converter standard cell includes N binary-scaled gate clusters.
8. The device according to claim 7, wherein: N is 10, and wherein the accumulated information sensitive energy is represented as a 10-bit control signal.
9. The device according to claim 7, wherein: If the corresponding input bit from the MLU is 1, the transition and energy contribution of each of the gate clusters is enabled.
