Pre-silicon password energy side channel formalized security verification method
By using gate-level information flow tracking technology and formal verification methods in the pre-silicon stage, the energy-side channel security model designed by the cryptographic core is automatically constructed and verified, and the problem of complex and high cost of post-silicon channel evaluation in the prior art is solved. , realizes efficient and accurate cryptographic core design energy-side channel security verification.
Patent Information
- Application Number
- CN202411573173.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The prior art lacks an effective energy-side channel security verification method for cryptographic core design for silicon front design, resulting in a complex, high cost and unfavorable design optimization process.
A formal security verification method for pre-silicon cryptographic energy side channel is proposed. The information flow security model library is established through gate-level information flow tracking technology, and the cryptographic core design is transformed into gate-level netlists, matching and combining information flow security models to construct Energy side channel security model. The method includes objective function attribute summary, target register determination, energy-side channel security attribute mining and formal verification to automatically realize energy-side channel security verification of cryptographic core design.
The automatic establishment of the energy-side channel security model for cryptographic core design is realized, which reduces the time and cost of energy-side channel evaluation after silicon, facilitates design optimization and change, and improves the accuracy of energy-side channel security verification.
Smart Images

Figure CN119449273A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of cryptographic core design security analysis, and in particular to a pre-silicon cryptographic energy side channel formal security verification method. Background Art
[0002] Energy side channel analysis is a widely used passive side channel analysis method. When a cryptographic device is running, the flipping of data will generate energy consumption. Energy side channel analysis studies the relationship between the energy consumption generated by the cryptographic device when performing encryption operations and sensitive information to recover the encryption key. Common energy side channel analysis methods include simple energy analysis, differential energy analysis, correlation energy analysis, template analysis, and mutual information analysis. These methods are based on the energy consumption of the encryption device, the data processed, and the operations performed, and realize key retrieval by analyzing the energy consumption trajectory.
[0003] Energy side channel analysis mainly includes four stages: building an energy consumption model, determining the target function, collecting energy traces, and analyzing the key. An energy consumption model is established based on the principle of energy consumption generation, and the target function that needs to be analyzed for energy side channel analysis is determined according to the characteristics of the cryptographic structure. The register corresponding to the target function in the cryptographic core design is the target register. The energy consumption trace generated by the target register during operation is collected by an oscilloscope as the energy trace, and the key is further derived by analyzing the correlation between the energy consumption model and the real energy trace. Although energy side channel analysis poses a threat to the security of cryptographic core design, it also promotes the development of energy side channel evaluation of cryptographic core design. The security of cryptographic core design can be inferred based on the difficulty of implementing energy side channel analysis. However, although this method can evaluate the security of cryptographic core design to a certain extent, its process is complicated and costly.
[0004] In recent years, a research team has proposed an energy side channel leakage assessment method, which mainly monitors the energy consumption of cryptographic devices when performing encryption operations, uses statistical methods to analyze the correlation between energy consumption and key information, and then judges the security of the cryptographic core design based on the degree of key leakage, such as the test vector leakage assessment method. This method is an energy information leakage assessment method based on hypothesis testing, which is simple, efficient and highly operational, but requires statistical analysis of a large number of energy traces, which is time-consuming and costly.
[0005] The energy side channel leakage assessment methods that have been proposed so far mainly conduct energy side channel security assessment on cryptography after silicon. Although they can effectively assess the side channel security of the cryptographic core design, they are not conducive to design changes and optimizations. The process of post-silicon design repair is complex and costly. These methods require analysts to manually analyze the cryptographic core design. This process not only takes a long time to collect energy traces, but also cannot quantitatively test the energy side channel of the cryptographic core design due to manual measurement, resulting in possible false positives in the assessment results. Most of the methods that have been proposed to implement energy side channel security assessment before silicon are only applicable to specific cryptographic algorithms and require manual assessment, which has certain limitations.
[0006] It can be seen that the field of cryptographic core design security analysis technology still lacks effective pre-silicon energy side channel security verification methods for cryptographic core design. Summary of the invention
[0007] In view of this, an embodiment of the present application proposes a pre-silicon cryptographic energy side channel formal security verification method, which can realize the automation of energy side channel security model construction and energy side channel security verification in cryptographic core design, complete the precise analysis of the energy side channel security of cryptographic core design before silicon, effectively reduce the time and cost required for post-silicon energy side channel evaluation, and facilitate the optimization and modification of cryptographic core design.
[0008] In a first aspect, an embodiment of the present application proposes a pre-silicon cryptographic energy side channel formal security verification method, the method comprising the following steps: using gate-level information flow tracking technology to establish information flow security models for each basic logic unit of the circuit design, and integrating each information flow security model to establish an information flow security model library; converting the cryptographic core design into a gate-level netlist, mapping each basic logic unit in the gate-level netlist to the information flow security model library for matching, and logically combining each matched information flow security model to obtain an energy side channel security model established for the cryptographic core design; summarizing the objective function properties by analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel; simulating and verifying the energy side channel security model with the objective function properties as constraints, and taking the register corresponding to the encryption transformation that meets the objective function properties in the cryptographic core design as the target register; based on the energy consumption model and its principle, combined with the energy side channel security model, mining the security attributes of the energy side channel to obtain security attributes; according to the security attributes and the energy side channel security model, using a formal verification tool to analyze whether there is energy leakage in the target register, if the verification passes, then there is no leakage in the target register, otherwise, there is leakage in the target register.
[0009] In addition, the gate-level information flow tracking technology is used to establish information flow security models for each basic logic unit of the circuit design, including: adding pollution labels to the input and output signals of the circuit design to indicate the state of the signal, and using the flow of pollution labels to identify the change and flip of the signal; wherein, when the pollution label is logic 0, it indicates that the signal is in an uncontaminated state, and when the pollution label is logic 1, it indicates that the signal is in a contaminated state; based on the input and output signals of the basic logic units of each circuit design, and the pollution labels corresponding to the input and output signals, a Boolean expression is used to describe the information flow security model of each basic logic unit.
[0010] In addition, the objective function properties are summarized by analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel, including: analyzing the structural characteristics of the cryptographic algorithm, and analyzing the characteristics of the energy side channel through simple energy analysis, correlation energy analysis and differential energy analysis, summarizing the common characteristics of the objective function to obtain the objective function properties; wherein the objective function properties include controllable properties, sensitive properties, confusion properties and divide-and-conquer properties, the controllable property indicates that the input of the objective function can be controlled by the analyst, the sensitive property indicates that the objective function needs to be related to the key, the confusion property indicates that one key bit should be related to the output bits of multiple objective functions, and the divide-and-conquer property indicates that the output of the objective function should be related to a subset of the key information.
[0011] In addition, the energy side channel security model is simulated and verified with the objective function attributes as constraints, and the registers corresponding to the encryption transformations that meet the objective function attributes in the cryptographic core design are used as target registers, including: using standard EDA tools to simulate the energy side channel security model and collect simulation traces; wherein, during the simulation process, the contamination label of the key signal is set to 1 bit by bit, and the contamination labels of the remaining signals are all set to 0; the flow of contamination label information in the collected simulation traces is used to simulate the flipping and transformation of the output signal during the encryption process; it is analyzed whether the flow of contamination label information meets all objective function attributes, and the registers corresponding to the encryption transformations that meet all objective function attributes are used as target registers.
[0012] In addition, based on the energy consumption model and its principle, combined with the energy side channel security model, the security attribute mining of the energy side channel is carried out to obtain the security attributes, including: the energy consumption generated by the cryptographic device when performing encryption operations is mainly dynamic energy consumption. Based on the principle that the dynamic energy consumption is linearly related to the Hamming distance and Hamming weight of the operation data, combined with the energy side channel security model, the security attribute mining of the energy side channel is carried out to obtain the security attributes of the energy side channel.
[0013] In addition, according to the security attributes and the energy side channel security model, a formal verification tool is used to analyze whether there is an energy leakage in the target register, including: using a security attribute description language to formally describe the security attributes as the security constraints of the energy side channel security model, and then using a formal verification tool to analyze whether the target register meets the security constraints to determine whether there is an energy leakage in the cryptographic core design.
[0014] In addition, the security attribute description language uses a standard hardware design description language.
[0015] Through the above-mentioned methods, the present application designs a pre-silicon energy side channel security verification method for cryptographic core design, realizes the automated establishment of the energy side channel security model of the cryptographic core design, makes up for the shortcomings of the existing methods in automated modeling, and provides an automated analysis method for the energy side channel security verification of the cryptographic core design in the pre-silicon stage based on formal verification technology, effectively reducing the current cost of post-silicon energy side channel security verification. Compared with the existing pre-silicon energy side channel verification method, the present application is not limited to the type of cryptographic algorithm in the process of establishing the energy side channel security model. By realizing the establishment of the energy side channel security model at the gate level, the accuracy of the model is improved, and it has better scalability and versatility, which is convenient for design changes and optimization. At the same time, the present application uses a formal security verification method to achieve accurate analysis of the energy side channel security of the cryptographic core design, effectively improving the accuracy of the side channel security verification of the cryptographic core design.
[0016] In the second aspect, an embodiment of the present application proposes a pre-silicon cryptographic energy side channel formal security verification system, the system comprising: an information flow security model library establishment module, which is used to use gate-level information flow tracking technology to establish information flow security models for each basic logic unit of the circuit design, and integrate each information flow security model to establish an information flow security model library; an energy side channel security model establishment module, which is used to convert the cryptographic core design into a gate-level netlist, map each basic logic unit in the gate-level netlist to the information flow security model library for matching, and logically combine the matched information flow security models to obtain an energy side channel security model established for the cryptographic core design; an objective function attribute summary module, which is used to pass By analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel, the objective function properties are summarized; the target register determination module is used to simulate and verify the energy side channel security model with the objective function properties as constraints, and the register corresponding to the encryption transformation that meets the objective function properties in the cryptographic core design is used as the target register; the security attribute mining module is used to mine the security attributes of the energy side channel based on the energy consumption model and its principles, combined with the energy side channel security model, to obtain security attributes; the security verification module is used to use formal verification tools to analyze whether there is energy leakage in the target register according to the security attributes and the energy side channel security model. If the verification passes, there is no leakage, otherwise, there is leakage.
[0017] In a third aspect, an embodiment of the present application proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a pre-silicon cryptographic energy side channel formal security verification method as described in the first aspect above.
[0018] In a fourth aspect, an embodiment of the present application proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement a pre-silicon cryptographic energy side channel formal security verification method as described in the first aspect above.
[0019] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 is a flow chart of a pre-silicon cryptographic energy side channel formal security verification method provided in one embodiment of the present application;
[0022] Figure 2 It is a schematic diagram of the principle of a pre-silicon cryptographic energy side channel formal security verification method provided in one embodiment of the present application;
[0023] Figure 3 is a schematic diagram of a process of establishing an energy side channel security model provided in an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of a process for determining a target register provided in one embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of energy side channel security verification of a cryptographic core design provided in one embodiment of the present application;
[0026] Figure 6 is a structural diagram of an AES_GF cryptographic core design provided in another embodiment of the present application;
[0027] Figure 7 is a schematic diagram of the first three rounds of simulation results of an AES_GF energy side channel security model simulation provided in another embodiment of the present application;
[0028] Figure 8 is a schematic diagram of the structure of a pre-silicon cryptographic energy side channel formal security verification system provided in another embodiment of the present application;
[0029] Fig. 9 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. In the various embodiments of the present application, many technical details are proposed in order to make the reader better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is only for the convenience of description, and the specific implementation mode of the present application should not constitute any limitation. The various embodiments can be combined with each other and referenced to each other under the premise of no contradiction.
[0031] An embodiment of the present application proposes a pre-silicon cryptographic energy side channel formal security verification method, which is applied to an electronic device, wherein the electronic device can be a terminal or a server. In this embodiment and the following embodiments, the electronic device is described using a server as an example. The implementation details of the pre-silicon cryptographic energy side channel formal security verification method proposed in this embodiment are specifically described below. The following content is only the relevant implementation details provided for ease of understanding and is not necessary for the implementation of this solution.
[0032] The specific process of the formal security verification method for the pre-silicon cryptographic energy side channel proposed in this embodiment can be as follows: Figure 1 As shown, the principle can be Figure 2 As shown, the method specifically includes:
[0033] Step 101 , using gate-level information flow tracing technology to establish information flow security models for each basic logic unit of the circuit design, and integrating each information flow security model to establish an information flow security model library.
[0034] In the specific implementation, the server first needs to model the commonly used circuit design, that is, it needs to use gate-level information flow tracking technology to establish information flow security models for each basic logic unit of the circuit design, and integrate each information flow security model to establish an information flow security model library.
[0035] In one example, the server needs to indicate the state of the signal by adding pollution labels to the input and output signals of the circuit design, and use the flow of pollution labels to identify the changes and flips of the signal. Among them, when the pollution label is logical 0, it means that the signal is in an unpolluted state, and when the pollution label is logical 1, it means that the signal is in a polluted state. The propagation of pollution labels in the information flow security model meets the logical constraints of the circuit design, that is, the pollution state of the input signal can only be propagated to the output signal when the input data has an impact on the value of the output data. Therefore, the server can use Boolean expressions to describe the information flow security model of each basic logic unit based on the input and output signals of the basic logic units of each circuit design, and the pollution labels corresponding to the input and output signals. After the information flow security model of each basic logic unit is established, the information flow security models can be integrated to establish an information flow security model library.
[0036] For a NOT gate circuit, the change of input signal A will directly affect the output signal O. Therefore, the information flow security model of the NOT gate can be described by Boolean expression: t =A t , A t and O t are the pollution labels corresponding to the input signal A and the output signal O respectively.
[0037] For a two-input NAND gate circuit, changes in input signals A and B will affect the output signal O. Part of the truth table of the information flow security model of the two-input NAND gate is shown in Table 1.
[0038] Table 1: Partial truth table of the information flow security model for a two-input NAND gate
[0039] A B <![CDATA[A t ]]> <![CDATA[B t ]]> O <![CDATA[O t ]]> 1 0 0 1 0 1 0 2 0 0 0 1 1 0 3 0 1 1 0 1 1 4 0 1 0 1 1 0 5 1 0 1 0 1 0 6 1 0 0 1 1 1 7 1 1 1 0 0 1 8 1 1 0 1 0 1
[0040] From the two rows numbered 3 and 4 in Table 1, we can see that although the input signal values are the same, the difference in the pollution labels of the input signals leads to different values of the pollution labels of the output signals. The reason is that when the input signal B of the two-input NAND gate is 1, the value of the output signal O depends on the input signal A, so A t The pollution state will flow to O t This shows that the information flow security model of the two-input NAND gate can accurately measure the transformation and flipping of the signal of the two-input NAND gate. Through logical simplification, the Boolean expression of the information flow security model of the two-input NAND gate can be obtained as t =BA t +AB t +A t B t .
[0041] Using the same method, the server can establish information flow security models for other basic logic units, such as AND gates and OR gates, and further integrate the information flow security models of all basic logic units to establish an information flow security model library.
[0042] Step 102, converting the cryptographic core design into a gate-level netlist, mapping each basic logic unit in the gate-level netlist to an information flow security model library for matching, and logically combining the matched information flow security models to obtain an energy side channel security model established for the cryptographic core design.
[0043] In a specific implementation, after establishing the information flow security model library, the server can convert the cryptographic core design into a gate-level netlist, map each basic logic unit in the gate-level netlist to the information flow security model library for matching, and logically combine the matched information flow security models to obtain the energy side channel security model established for the cryptographic core design.
[0044] In one example, the process of establishing the energy side channel security model can be as follows: Figure 3 shown.
[0045] It is worth noting that the process of establishing an energy side channel security model for cryptographic core design has no requirements on the cryptographic algorithm. It can establish an energy side channel security model for any cryptographic core design, which has good versatility. The energy side channel security model for cryptographic core design is established according to the combination law of circuit design, and the correctness of the energy side channel security model is ensured by combining the information flow security model of the basic logic unit.
[0046] Step 103, summarize the properties of the objective function by analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel.
[0047] In the specific implementation, while the server establishes the energy side channel security model for the cryptographic core design, it also needs to summarize the objective function properties by analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel. The extracted objective function properties are closely related to the cryptographic structure and the energy side channel analysis method used. The comprehensiveness of the extracted target properties is ensured by analyzing and summarizing the characteristics of various energy side channel analysis methods. The objective function is the cryptographic transformation studied by the energy side channel analysis method that leaks sensitive information. By summarizing the characteristics of the energy side channel analysis method implemented on the cryptographic core design after silicon, the basic properties satisfied by the objective function with side channel leakage can be derived.
[0048] In one example, the server analyzes the structural characteristics of the cryptographic algorithm, and analyzes the characteristics of the energy side channel through simple energy analysis, correlation energy analysis, and differential energy analysis, and summarizes the common characteristics of the target function to obtain the target function attributes. Among them, the target function attributes include controllable attributes, sensitive attributes, obfuscation attributes, and divide-and-conquer attributes. The controllable attribute indicates that the input of the target function can be controlled by the analyst, the sensitive attribute indicates that the target function must be related to the key, the obfuscation attribute indicates that one key bit should be related to multiple output bits of the target function, and the divide-and-conquer attribute indicates that the output of the target function should be related to a subset of the key information. It is worth noting that the target function attributes are not limited to these four attributes, but can also include diffusion attributes, etc. The specific target function attributes are related to the energy side channel analysis method used. Using multiple energy side channel analysis methods can ensure the comprehensiveness of the extracted target function attributes.
[0049] Step 104 , the energy side channel security model is simulated and verified with the objective function attribute as a constraint, and the register corresponding to the encryption transformation that satisfies the objective function attribute in the cryptographic core design is used as the target register.
[0050] In the specific implementation, after extracting the objective function attributes, the server immediately simulates and verifies the energy side channel security model with the objective function attributes as constraints, and uses the register corresponding to the encryption transformation that meets the objective function attributes in the cryptographic core design as the target register.
[0051] In one example, the process of determining the target register may be as follows: Figure 4 As shown. The server uses standard EDA tools to simulate the energy side channel security model and collect simulation traces; during the simulation process, the pollution label of the key signal is set to 1 bit by bit, and the pollution labels of the remaining signals are all set to 0. According to the principle of information flow tracking, the bits with logic 1 in the pollution label of the output signal are related to the key information. The server can simulate the flipping and transformation of the output signal in the encryption process by using the flow of pollution label information in the collected simulation traces, and then further analyze whether the flow of pollution label information meets all the objective function attributes, and use the register corresponding to the transformation that meets all the objective function attributes as the target register.
[0052] In one example, a standard EDA tool such as Modelsim may be selected.
[0053] It is worth noting that each target attribute has a corresponding judgment method. The target function attributes can be screened by analyzing the simulation results of the energy side channel security model of the cryptographic core design to determine the target register.
[0054] Step 105, based on the energy consumption model and its principle, combined with the energy side channel security model, the security attribute mining of the energy side channel is performed to obtain the security attribute.
[0055] In a specific implementation, after determining the target register, the server can mine the security attributes of the energy side channel based on the energy consumption model and its principles and in combination with the energy side channel security model to obtain security attributes.
[0056] In an example, the energy consumption generated by a cryptographic device when performing encryption operations is mainly dynamic energy consumption. Based on the principle that dynamic energy consumption is linearly related to the Hamming distance and Hamming weight of the operation data, combined with the energy side channel security model, the security attributes of the energy side channel are mined to obtain the security attributes of the energy side channel.
[0057] Step 106, based on the security attributes and the energy side channel security model, use a formal verification tool to analyze whether there is energy leakage in the target register. If the verification passes, there is no leakage, otherwise, there is leakage.
[0058] In the specific implementation, after the server digs out the security properties of the energy side channel, it can use formal verification tools to analyze whether there is energy leakage in the target register based on the security properties and the energy side channel security model. If the verification passes, there is no leakage, otherwise, there is leakage.
[0059] In one example, the formal verification tool may be Yosys.
[0060] In an example, the process of energy side channel security verification of cryptographic core design is as follows: Figure 5 As shown in the figure, the server uses a security attribute description language to formally describe the security attributes as the security constraints of the energy side channel security model, and then uses formal verification tools to analyze whether the target registers meet the security constraints to determine whether there is energy leakage in the cryptographic core design. The security attribute description language uses a standard hardware design description language, such as System Verilog.
[0061] This embodiment designs a pre-silicon energy side channel security verification method for cryptographic core design, realizes the automated establishment of the energy side channel security model of the cryptographic core design, makes up for the shortcomings of the existing methods in automated modeling, and based on formal verification technology, provides an automated analysis method for the energy side channel security verification of the cryptographic core design in the pre-silicon stage, effectively reducing the current cost of post-silicon energy side channel security verification. Compared with the existing pre-silicon energy side channel evaluation method, this embodiment is not limited to the type of cryptographic algorithm in the process of establishing the energy side channel security model. By realizing the establishment of the energy side channel security model at the gate level, the accuracy of the model is improved, and it has better scalability and versatility, which facilitates design changes and optimization. At the same time, the application uses a formal security verification method, which can realize accurate analysis of the energy side channel security of the cryptographic core design, and effectively improves the accuracy of the side channel security verification of the cryptographic core design.
[0062] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.
[0063] In another embodiment, the feasibility and effectiveness of a pre-silicon cryptographic energy side channel formal security verification method proposed in this application are illustrated by taking the AES cryptographic core design (AES_GF) based on Galois finite field as an example. The hardware environment used for implementation is as follows: Intel core i7, Ubuntu 18.0, Windows 11. The method proposed in this application is implemented using the GCC compilation environment, SystemVerilog language, formal verification tool Yosys and standard EDA tool Modelsim.
[0064] The specific implementation of this embodiment is as follows:
[0065] 1) Establish the energy side channel security model of AES_GF cryptographic core design.
[0066] The design structure of AES_GF cryptographic core is as follows Figure 7 As shown, PT is the plaintext signal, Key is the key signal, and Reg is the register. The Yosys tool is used to perform logic synthesis on the AES_GF design implemented in the standard hardware description language to generate a gate-level netlist, and the basic logic units in the gate-level netlist are mapped to the constructed information flow security model library to automatically generate the energy side channel security model for the AES cryptographic core design.
[0067] 2) Determine the objective function properties of the AES_GF cryptographic core design.
[0068] Combining the cryptographic algorithm structure and existing energy side channel analysis methods such as related energy analysis for AES, it is concluded that the objective function must satisfy function properties, input controllability, divide-and-conquer properties, and obfuscation properties, as shown in Table 2.
[0069] Table 2: Objective function properties of AES_GF cryptographic core design
[0070] property meaning Explanation P1 Sensitive attributes The target function is a function related to the key P2 Controllable attributes The input of the objective function should be related to the plaintext P3 Obfuscated attributes One key bit affects multiple output bits of the target function P4 Divide and conquer property The target function needs to be a function of a small subset of the key (less than 32 bits)
[0071] 3) Determine the target registers for the AES_GF cryptographic core design.
[0072] The target register is selected according to the target function attributes determined in the previous step, and the target register is distinguished by analyzing whether each function transformation satisfies the target function attributes in Table 2. The sensitive attribute, controllable attribute, and divide-and-conquer attribute can be selected as candidate functions by analyzing the cryptographic algorithm. The obfuscation attribute requires analyzing the label signal in the AES_GF energy side channel security model to further determine the target function. Use the same set of plaintext and key for multiple simulations, and only set the key bit position to logic 1 in each simulation. According to the fan-in fan-out and information flow tracking principles, the relationship between the Hamming weight of the output label of the candidate function and the input label is determined. If the Hamming weight is greater than the input label, it means that the candidate function is the target function, thereby determining the target register.
[0073] The experiment is conducted by taking the 32-bit key bit Key
[32] of the encryption process as an example. First, the information flow label Key_t
[32] of the key bit is set to logic 1, and the information flow tracking method is used to search step by step for the data register Data_Reg
[32] (storing the encryption intermediate round data result) and the key register Key_Reg (storing the intermediate key expansion result) to which the Key
[32] bit pollution label is propagated. Then, these candidate registers are checked to see if they meet the four properties of the objective function. Figure 7 The simulation results of the first three rounds of the AES_GF energy side channel security model are shown. After attribute screening, it is determined that the key register and data register of the second round meet the four attributes, and the two registers are the target registers.
[0074] 4) AES_GF energy side channel security verification.
[0075] The energy side channel security property requires that the change of key information flow during encryption operation does not change due to the change of encrypted plaintext. If the target register meets this security property, it means that there is no energy side channel security risk in the target register. The SystemVerilog language can be used to describe this property. For example, when different plaintexts are encrypted with the same key, if the Hamming weight of the target register is consistent, it means that there is no energy side channel in the target register, otherwise there is energy leakage.
[0076] Using the key 128'h000102030405060708090a0b0c0d0e0f as a benchmark test, two different plaintexts 128'h004488cd115599de2266aaef3377bbfc and 128'h022446688aaccef1133557799bbddfe1 were encrypted, and the Yosys tool was used to verify whether the Hamming weights of the key register and the data register in the second round of the two encryption processes were equal to determine whether the target register had a leak. It was verified that the data register had a leak, but the key register did not, which is consistent with the conclusion of the existing evaluation method, and also proves the effectiveness of a pre-silicon cryptographic energy side channel formal security verification method proposed in this application.
[0077] Another embodiment of the present application proposes a pre-silicon cryptographic energy side channel formal security verification system. The implementation details of the pre-silicon cryptographic energy side channel formal security verification system proposed in this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for implementing this example. Figure 8 This is a structural diagram of a pre-silicon cryptographic energy side channel formal security verification system proposed in this embodiment, which includes: an information flow security model library establishment module 201, an energy side channel security model establishment module 202, an objective function attribute summary module 203, a target register determination module 204, a security attribute mining module 205 and a security verification module 206.
[0078] The information flow security model library establishment module 201 is used to establish information flow security models for each basic logic unit of the circuit design using gate-level information flow tracking technology, and integrate each information flow security model to establish an information flow security model library.
[0079] The energy side channel security model establishment module 202 is used to convert the cryptographic core design into a gate-level netlist, map each basic logic unit in the gate-level netlist to the information flow security model library for matching, and logically combine the matched information flow security models to obtain the energy side channel security model established for the cryptographic core design.
[0080] The objective function attribute summarizing module 203 is used to summarize the objective function attributes by analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel.
[0081] The target register determination module 204 is used to simulate the energy side channel security model with the objective function attribute as a constraint, and use the register corresponding to the transformation that meets the objective function attribute in the cryptographic core design as the target register.
[0082] The security attribute mining module 205 is used to mine the security attributes of the energy side channel based on the energy consumption model and its principle in combination with the energy side channel security model to obtain security attributes.
[0083] The security verification module 206 is used to analyze whether there is energy leakage in the target register using a formal verification tool according to the security attributes and the energy side channel security model. If the verification passes, there is no leakage, otherwise, there is leakage.
[0084] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0085] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.
[0086] Another embodiment of the present application provides an electronic device, whose specific structure is as follows: Fig. 9 As shown, it includes: at least one processor 301; and a memory 302 that is communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can execute a pre-silicon cryptographic energy side channel formal security verification method as described in the above-mentioned method embodiments.
[0087] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be further described in this article. The bus interface is responsible for providing an interface between the bus and the transceiver. The transceiver can be one component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0088] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0089] The memory stores a program for implementing a pre-silicon cryptographic energy side channel formal security verification method proposed in this application. When the processor needs to perform pre-silicon cryptographic energy side channel formal security verification, the processor reads the program stored in the processor and executes it, thereby achieving accurate analysis and security verification of the energy side channel security of the cryptographic core design.
[0090] Another embodiment of the present application proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement a pre-silicon cryptographic energy side channel formal security verification method as described in the above method embodiments.
[0091] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (Processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory), RAM (Random Access Memory), disk or optical disk and other media that can store program codes.
[0092] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A formal security verification method for pre-silicon cryptographic energy side channels, characterized in that: include: The gate-level information flow tracking technology is used to establish information flow security models for each basic logic unit of the circuit design, and each information flow security model is integrated to establish an information flow security model library; Convert the cryptographic core design into a gate-level netlist, map each basic logic unit in the gate-level netlist to the information flow security model library for matching, and logically combine the matched information flow security models to obtain the energy side channel security model established for the cryptographic core design; By analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel, the properties of the objective function are summarized; The energy side channel security model is simulated and verified with the objective function attribute as a constraint, and the register corresponding to the encryption transformation that satisfies the objective function attribute in the cryptographic core design is used as the target register; Based on the energy consumption model and its principle, combined with the energy side channel security model, the security attribute mining of the energy side channel is carried out to obtain the security attributes; According to the security attributes and energy side channel security model, formal verification tools are used to analyze whether there is energy leakage in the target register. If the verification passes, there is no leakage, otherwise, there is leakage.
2. The method according to claim 1, characterized in that: The gate-level information flow tracking technology is used to establish an information flow security model for each basic logic unit of the circuit design, including: The state of the signal is indicated by adding pollution labels to the input and output signals of the circuit design, and the flow of pollution labels is used to identify the change and flip of the signal; when the pollution label is logic 0, it means that the signal is in an unpolluted state, and when the pollution label is logic 1, it means that the signal is in a polluted state; Based on the input and output signals of the basic logic units of each circuit design and the pollution labels corresponding to the input and output signals, the information flow security model of each basic logic unit is described using Boolean expressions.
3. The method according to claim 1, characterized in that By analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel, the objective function properties are summarized, including: Analyze the structural characteristics of the cryptographic algorithm, and analyze the characteristics of the energy side channel through simple energy analysis, correlation energy analysis and differential energy analysis, summarize the common characteristics of the objective function to obtain the objective function properties; Among them, the objective function attributes include controllable attributes, sensitive attributes, obfuscation attributes and divide-and-conquer attributes. The controllable attribute means that the input of the objective function can be controlled by the analyst, the sensitive attribute means that the objective function needs to be related to the key, the obfuscation attribute means that one key bit should be related to multiple output bits of the objective function, and the divide-and-conquer attribute means that the output of the objective function should be related to a subset of the key information.
4. The method according to claim 3, characterized in that The energy side channel security model is simulated and verified with the objective function attribute as a constraint, and the register corresponding to the encryption transformation that satisfies the objective function attribute in the cryptographic core design is used as the target register, including: Use standard EDA tools to simulate the energy side channel security model and collect simulation traces. During the simulation, the pollution label of the key signal is set to 1 bit by bit, and the pollution labels of other signals are all set to 0. The flow of contaminated label information in the collected simulation trajectory is used to simulate the flipping and transformation of the output signal during the encryption process; Analyze whether the flow of contaminated label information satisfies all objective function attributes, and use the register corresponding to the encryption transformation that satisfies all objective function attributes as the target register.
5. The method according to claim 4, characterized in that Based on the energy consumption model and its principle, combined with the energy side channel security model, the security attribute mining of the energy side channel is carried out to obtain the security attributes, including: The energy consumption generated by cryptographic devices when performing encryption operations is mainly dynamic energy consumption. Based on the principle that dynamic energy consumption is linearly related to the Hamming distance and Hamming weight of the operation data, combined with the energy side channel security model, the security attributes of the energy side channel are mined to obtain the security attributes of the energy side channel.
6. The method according to claim 5, characterized in that According to the security attributes and the energy side channel security model, the formal verification tool is used to analyze whether there is energy leakage in the target register, including: The security attributes are formally described using a security attribute description language as security constraints for the energy side channel security model. Formal verification tools are then used to analyze whether the target registers meet the security constraints to determine whether there is energy leakage in the cryptographic core design.
7. The method according to claim 6, characterized in that The security attribute description language uses a standard hardware design description language.
8. A pre-silicon cryptographic energy side channel formal security verification system, characterized in that: include: An information flow security model library establishment module is used to establish information flow security models for each basic logic unit of the circuit design using gate-level information flow tracking technology, and integrate each information flow security model to establish an information flow security model library; The energy side channel security model establishment module is used to convert the cryptographic core design into a gate-level netlist, map each basic logic unit in the gate-level netlist to the information flow security model library for matching, and logically combine the matched information flow security models to obtain the energy side channel security model established for the cryptographic core design; The objective function attribute summary module is used to summarize the objective function attributes by analyzing the structural characteristics of the cryptographic algorithm and the characteristics of the energy side channel; A target register determination module is used to perform simulation verification on the energy side channel security model with the objective function attribute as a constraint, and the register corresponding to the encryption transformation that satisfies the objective function attribute in the cryptographic core design is used as the target register; The security attribute mining module is used to mine the security attributes of the energy side channel based on the energy consumption model and its principle, combined with the energy side channel security model, to obtain security attributes; The security verification module is used to analyze whether there is energy leakage in the target register using formal verification tools based on security attributes and energy side channel security models. If the verification passes, there is no leakage, otherwise, there is leakage.
9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a pre-silicon cryptographic energy side channel formal security verification method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement a pre-silicon cryptographic energy side channel formal security verification method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for verifying security model of computer system
CN102194061A
Method and processing device for performing lattice-based cryptographic operation
CN110363030A
Attack method and system for side channel password energy leakage signal
CN110460425A
Hardware security vulnerability detection method based on gate-level pollution label tracking model
CN112650638A
Method and device for compiling cryptographic information, consumable, authentication system and medium
CN113971290A
Cited By
Cipher circuit-oriented pre-silicon power consumption side channel leakage assessment method and system
CN122554118A