Side channel protection analysis method, apparatus, device, and medium
Patent Information
- Application Number
- CN202611200319.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-10
AI Technical Summary
[0015]本发明的有益效果为:针对侧信道故障攻击中高维小整数线性不等式组求解问题,在置信传播算法的变量节点消息更新中引入先验强度参数α,通过对数域消息整合公式调控预设先验分布的影响力,实现硬约束与预设先验分布的有效平衡,解决了传统置信传播算法在带环图上因硬约束导致解偏离先验的问题;将抗差估计思想融入置信传播框架,为每个约束因子节点引入权重参数,构建加权因子图;采用具有硬截断特性的Tukey双权重函数计算约束权重,对离群约束实现完全排除;通过迭代重加权机制动态更新权重,使算法自动识别并抑制错误不等式的影响,无需预先标记错误约束;在因子节点到变量节点的消息更新中,采用高斯近似方法将线性组合结果近似为正态分布,将复杂的求和遍历转化为正态累积分布函数的差值计算,结合向量化编程技术,显著降低计算复杂度,保证算法的数值稳定性。
Smart Images

Figure CN122698227B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and in particular to a side-channel protection analysis method, apparatus, device, and medium. Background Technology
[0002] In the fields of cryptography and information security, a side channel refers to an unintended communication channel that leaks internal system state information. Unlike traditional attack methods, side-channel attacks do not rely on theoretical vulnerabilities in the algorithm but rather on side-channel information exhibited by the system during runtime. Therefore, attackers can use specific side-channel analysis (SCA) techniques to analyze the physical characteristics of cryptographic implementations and thereby infer sensitive information such as encryption keys and user data.
[0003] Numerous algorithms have been proposed and studied to address the inequality problem in current side-channel defense. Mixed-Integer Linear Programming (MILP) is an extremely powerful tool in mathematical optimization, performing exceptionally well in systems with strict constraints and discrete variables. However, MILP has low fault tolerance; it cannot be directly applied if the system of inequalities contains incorrect inequalities. Furthermore, for high-dimensional lattice problems with a key dimension of 1024, traditional lattice basis reduction algorithms have extremely high complexity, making computation infeasible. Traditional backpropagation (BP) algorithms are vulnerable under finite constraints and may be insufficient to handle scenarios with a low number of inequalities, resulting in low side-channel attack protection rates. Summary of the Invention
[0004] In order to at least solve one of the technical problems existing in the prior art, the present invention provides a side-channel protection analysis method, apparatus, device and medium.
[0005] One aspect of the present invention provides a side-channel protection analysis method, comprising: Obtain a set of inequalities generated by a fault attack on side-channel data, wherein the set of inequalities includes multiple inequalities, and the inequalities include multidimensional unknown variables. The set of inequalities is used to characterize the multidimensional unknown variables to be recovered, wherein the multidimensional unknown variables are keys. Each component of a multidimensional unknown variable is used as a variable node, inequalities are used as constraint factor nodes, and the pre-defined prior distribution of each multidimensional unknown vector is used as a prior factor node. The dependency relationship between variable nodes and factor nodes is connected by edges to obtain a factor graph, where the factor node is either a constraint factor node or a prior factor node. The message passing of the initial factor graph is initialized, and the factor graph is iteratively updated until convergence. The iterative update includes calculating the message passed from the constraint factor node to the variable node using Gaussian approximation; calculating the confidence distribution of the variable node using prior strength parameters; and updating the message passed from the variable node to the constraint factor node. The solution vector is extracted using maximum a posteriori estimation, and the solution vector is used as the key analysis result of the side channel data.
[0006] According to the side-channel protection analysis method described above, a factor graph is constructed using each component of a multidimensional unknown variable as a variable node, inequalities as constraint factor nodes, and the prior distribution of each multidimensional unknown vector as a prior factor node, including: The variable nodes are connected to the corresponding prior factor nodes; the constraint factor nodes are connected to multiple variable nodes, and the inequality is expressed as follows: ; in, To constrain the interval length, , The number of inequalities; and Represents the connection of constraint factor nodes in the factor graph. and variable nodes The edge, , The number of multidimensional unknown variables, and the number of variable nodes. The value of , It is a discrete set; Among them, the prior factor node Represented as , Assuming a pre-defined prior distribution, Set as a central binomial distribution.
[0007] According to the side-channel protection analysis method described above, the message update method of the factor graph includes: The message update formula from variable node to factor node is: ; in, Indicates the first In the next iteration, in the variable To factor In the message being transmitted, Values Confidence level, , indicating from the prior factor node To variable node The message; To and A set of contiguous factor indices, that is, including and all satisfaction constraint factor nodes ; The relation is proportional to the variable node, used to represent the product of messages from the variable node to the factor node, including messages from the prior factors and messages from the variable node. External all and variables Messages of connected factors; The message update formula from factor node to variable node is: ; in, Indicates the first In the next iteration, in the factor To variable In the messages being transmitted, in constraints From the perspective of Values Confidence level, To and A set of connected variable node indices. This is an indicator function, equal to 1 when the inequality is true and zero otherwise, and it is used when calculating messages from factor nodes to variable nodes, except for... Summing and iterating through all possible combinations of values for all connected variables.
[0008] According to the side-channel protection analysis method described above, the message transmitted from the constraint factor node to the variable node is calculated using Gaussian approximation, including: When calculating messages from factor nodes to variable nodes, traverse except Summing all possible combinations of values for all connected variables yields a linear combination. for: ; According to linear combination Approximately Gaussian distribution: ; in, It is the cumulative distribution function of the standard normal distribution. It is a small positive number used to ensure the numerical stability of the calculation process.
[0009] According to the aforementioned side-channel protection analysis method, the confidence distribution of variable nodes is calculated using prior strength parameters, including: Each time the factor graph is updated, the messages are integrated, and the prior strength parameter is used during message integration. The confidence distribution is calculated as follows: ; Among them, the prior strength parameter Used to control the prior influence of variable nodes during the update phase.
[0010] According to the side-channel protection analysis method, the solution vector is extracted using maximum a posteriori estimation, and the solution vector is used as the key analysis result of the side-channel data, including: Based on the confidence distribution, the solution to the inequality is estimated using maximum a posteriori (MAP) to obtain the key analysis results. The MAP estimate... for: .
[0011] According to the aforementioned side-channel protection analysis method, the method further includes: In each iteration, the message update from the factor node to the variable node uses the Tukey double-weight function to calculate the weights, including calculating the weighted message: ; in, This indicates a weighted uniform distribution. This indicates the weighted message; Based on the M-estimation framework, the degree of violation of each constraint by each predicted solution is used as the model residual. The weights are then calculated using the Tukey double-weighting function based on the model residuals. for: ; in, It is the boundary point of the piecewise function, the model residual. Represented as: .
[0012] Another aspect of the present invention provides a side-channel protection analysis device, comprising: The first module is used to obtain a set of inequalities generated by a fault attack on side-channel data. The set of inequalities includes multiple inequalities and is used to characterize the multidimensional unknown variables to be recovered, wherein the multidimensional unknown variables are keys. The second module is used to take each component of a multidimensional unknown variable as a variable node, the inequality as a constraint factor node, the preset prior distribution of each multidimensional unknown vector as a prior factor node, and the dependency relationship between the variable node and the factor node through edges to obtain a factor graph, wherein the factor node is one of the constraint factor node and the prior factor node. The third module is used to initialize the message passing of the factor graph and iteratively update the factor graph until convergence. The iterative update includes using Gaussian approximation to calculate the message passed from the constraint factor node to the variable node; using prior strength parameters to calculate the confidence distribution of the variable node; and updating the message passed from the variable node to the constraint factor node. The fourth module is used to extract the solution vector using maximum a posteriori estimation, and the solution vector is used as the key analysis result of the side channel data.
[0013] Another aspect of the present invention provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described above.
[0014] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.
[0015] The beneficial effects of this invention are as follows: Addressing the problem of solving high-dimensional small-integer linear inequalities in side-channel fault attacks, a prior strength parameter α is introduced into the variable node message update of the belief propagation algorithm. By adjusting the influence of the preset prior distribution through the number domain message integration formula, an effective balance between hard constraints and the preset prior distribution is achieved, solving the problem of traditional belief propagation algorithms causing solutions to deviate from the prior due to hard constraints on loop graphs. The robust estimation concept is integrated into the belief propagation framework, introducing weight parameters for each constraint factor node to construct a weighted factor graph. The Tukey double-weight function with hard truncation characteristics is used to calculate constraint weights, completely eliminating outlier constraints. The weights are dynamically updated through an iterative reweighting mechanism, enabling the algorithm to automatically identify and suppress the influence of erroneous inequalities without the need for pre-marking erroneous constraints. In the message update from factor node to variable node, the Gaussian approximation method is used to approximate the linear combination result as a normal distribution, transforming the complex summation traversal into the difference calculation of the normal cumulative distribution function. Combined with vectorized programming techniques, this significantly reduces computational complexity and ensures the numerical stability of the algorithm. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the side-channel protection analysis process according to an embodiment of the present invention; Figure 2 This is a factor graph of a system of linear inequalities with prior factors according to an embodiment of the present invention. Figure 3 This is a factor graph with introduced weights in an embodiment of the present invention; Figure 4 This is a schematic diagram of a side-channel protection analysis device according to an embodiment of the present invention. Detailed Implementation
[0017] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0018] refer to Figure 1 , Figure 1 This is a flowchart of a side-channel protection analysis method according to an embodiment of the present invention, which includes, but is not limited to, steps S100-S400: S100, Obtain a set of inequalities generated by a fault attack on the side-channel data, wherein the set of inequalities includes multiple inequalities and is used to characterize the multidimensional unknown variables to be recovered, wherein the multidimensional unknown variables are keys. In some embodiments, the multidimensional unknown variables are derived from a specific lattice cryptography construction method, such as error-learning.
[0019] It is understood that the side-channel data in this embodiment specifically refers to the instantaneous power consumption trajectory or electromagnetic radiation waveform data collected by an oscilloscope or electromagnetic probe when the cryptographic chip performs encryption operations.
[0020] It is understood that the inequality set in this embodiment is the boundary of computational error caused by fault attacks (such as voltage glitches or laser injection). That is, when the chip is interfered with and generates erroneous ciphertext, the erroneous data actually defines the legal value range of the internal state variable (i.e. the key) (for example, the value of a certain intermediate variable must be less than a certain threshold to cause the observed fault), thereby transforming the physical attack phenomenon into mathematical inequality constraints.
[0021] For example, in the protection analysis of the AES-128 encryption algorithm, the analysis method obtains the power consumption data of the smart card after it suffers a clock glitch attack in a specific round through a probe, and extracts the erroneous ciphertext that causes the fault output; through the differential fault analysis in this embodiment, a set of nonlinear inequalities containing 16 bytes of key variables is constructed, each byte of the 128-bit key is set as a variable node, and the fault propagation path is set as a constraint node; a Gaussian approximation algorithm is used to transmit probability messages between nodes, and after about 50 iterations, the factor graph state converges; the solution vector with the highest probability is extracted from the converged distribution through maximum a posteriori estimation, and the 128-bit master key inside the smart card is successfully restored, verifying the effectiveness of the device in evaluating the chip's resistance to side-channel attacks.
[0022] In some embodiments, if the number of inequalities is The number of unknown variables is The length of the constraint interval is Therefore, the system of inequalities Can write ; S200 constructs a factor graph by using each component of a multidimensional unknown variable as a variable node, inequalities as constraint factor nodes, and a pre-defined prior distribution of each multidimensional unknown vector as a prior factor node.
[0023] In some embodiments, reference Figure 2 The factor graph shown contains a system of linear inequalities with prior factors, where variable nodes are connected to their corresponding prior factor nodes; constraint factor nodes are connected to multiple variable nodes, and the inequalities are expressed as follows: ; in, To constrain the interval length, , The number of inequalities; and Represents the connection of constraint factor nodes in the factor graph. and variable nodes The edge, , The number of multidimensional unknown variables, and the number of variable nodes. The value of , It is a discrete set; Among them, the prior factor node Represented as , Assuming a pre-defined prior distribution, Set to a central binomial distribution, for example ; refer to Figure 2 The factor graph shown has the following solution vectors. Each component corresponds to a variable node, whose value is a discrete set. .
[0024] S300, initialize the message passing of the factor graph, and iteratively update the factor graph until convergence. The iterative update includes using Gaussian approximation to calculate the message passed from the constraint factor node to the variable node; using prior strength parameters to calculate the confidence distribution of the variable node; and updating the message passed from the variable node to the constraint factor node.
[0025] It is understandable that the message passing in this embodiment simulates the flow and reduction process of information entropy using the Gaussian approximation. Through iterative calculation, candidate key values that do not conform to the characteristics of physical faults are continuously eliminated, making the confidence distribution of variable nodes gradually sharper, and finally converging to the unique correct key value.
[0026] In some embodiments, the initialization message iteratively performs the following updates until convergence: calculates the message passed from the constraint factor node to the variable node using a Gaussian approximation; calculates the confidence distribution of the variable node, wherein a prior strength parameter is introduced. Adjust the influence of the preset prior distribution; update the messages passed from the variable nodes to the constraint factor nodes.
[0027] In some embodiments, the message update formula from the variable node to the factor node is: ; in, Indicates the first In the next iteration, in the variable To factor In the message being transmitted, Values confidence level , indicating from the prior factor node To the variable node The message; To and Connected factor index set (including) and all satisfaction of ), that is, including and all satisfaction constraint factor nodes ; The relation is proportional to the variable node, used to represent the product of messages from the variable node to the factor node, including messages from the prior factors and messages from the variable node. External all and variables Messages from connected factors.
[0028] Similarly, definition To and Given a set of connected variable node indices, the message update formula from the factor node to the variable node is: ; in, Indicates the first In the next iteration, in the factor To variable In the message being transmitted, in the constraints From the perspective of Values confidence level To and A set of connected variable node indices. This is an indicator function, equal to 1 when the inequality is true, and zero otherwise. This is the factor function for the problem proposed in this embodiment. It is an indicator function, which is 1 when the input inequality is true and 0 otherwise. When calculating the message from the factor node to the variable node, it is necessary to sum and traverse the interval. All possible combinations of values for all connected variables.
[0029] To simplify calculations, linear combinations can be used. ; The calculation results approximate a Gaussian distribution: ; in, It is the cumulative distribution function of the standard normal distribution. It is a small positive number (e.g.) ), used to ensure the numerical stability of the calculation process.
[0030] To balance the conflict between hard constraints and the pre-defined prior distribution, a prior strength parameter is introduced into the message integration formula. : ; The prior strength parameters in this embodiment Used to control the prior influence of variable nodes during the update phase.
[0031] The embodiments of the present invention use prior strength parameters This approach achieves a shift from "parameter tuning to combat noise" to "adaptive noise elimination through intrinsic mechanisms." Furthermore, based on information theory lower bound analysis, the method in this embodiment prioritizes boundary inequalities, reducing the number of inequalities required to uniquely determine a solution from approximately 2400 when randomly selected to approximately 500. Experiments demonstrate that a solution can be successfully obtained when N=1000, significantly reducing the dependence on fault attacks to obtain the number of inequalities. In addition, the use of Gaussian approximation instead of exact summation traversal, combined with vectorization, enables the algorithm to complete the solution within an acceptable timeframe in high-dimensional scenarios.
[0032] In some embodiments, reference Figure 3 The factor graph with introduced weights, as shown, illustrates that in situations involving erroneous inequalities, it's unclear which inequalities are incorrect; therefore, it's necessary to infer the variables... While determining the value, the inequality is also evaluated to determine if it is correct. To handle actual erroneous inequalities, this invention extends the improved BP solution model by softening hard constraints into weighted constraints, allowing the model to adaptively reduce or even ignore those "suspicious" inequalities.
[0033] like Figure 3 As shown, the adaptive weighted backpropagation algorithm based on Tukey's dual weights involves adding a weight parameter to each factor node (constraint) in the factor graph. At this point, the factor function is: ; Among them when When, the form of the factor function is consistent; when When the factor node to variable node message degenerates into an initial uniform distribution, some of the constraints can be eliminated from the solution model.
[0034] Furthermore, compared to explicitly introducing it into the factor function... An easier-to-implement equivalent method is to add a step of calculating weighted messages to the original BP solution model. That is, in each iteration, when calculating the messages from factors to variables, there is... ; Among them, items This indicates a weighted uniform distribution. This indicates the weighted message.
[0035] From the perspective of the M-estimation framework, this embodiment of the invention uses the degree of violation of each constraint by the predicted solution as the residual of the model: ; Calculate the weights using the Tukey double-weight function: ; parameter It is the boundary point of a piecewise function; a commonly used parameter value is... At this point, under the assumption that the data perfectly follows a normal distribution, the asymptotic efficiency of the estimator reaches 95%.
[0036] S400 uses maximum a posteriori estimation to extract solution vectors, and uses these solution vectors as the key analysis results for the side-channel data.
[0037] In some embodiments, maximum a posteriori estimation includes performing maximum a posteriori estimation on the solution of the inequality based on the confidence distribution to obtain the key analysis result, wherein the maximum a posteriori estimation... for: ; It is understood that the embodiments of the present invention use solution vectors. As a result of key analysis.
[0038] For example, in the protection analysis of the AES-128 encryption algorithm, the analysis method obtains the power consumption data of the smart card after it suffers a clock glitch attack in a specific round through a probe, and extracts the erroneous ciphertext that causes the fault output. Through the differential fault analysis in this embodiment, a set of nonlinear inequalities containing 16-byte key variables is constructed, each byte of the 128-bit key is set as a variable node, and the fault propagation path is set as a constraint node. A Gaussian approximation algorithm is used to transmit probability messages between nodes. After about 50 iterations, the factor graph state converges. The solution vector with the highest probability is extracted from the converged distribution through maximum a posteriori estimation, and the 128-bit master key inside the smart card is successfully restored, verifying the effectiveness of the method of this embodiment in evaluating the chip's resistance to side-channel attacks.
[0039] Figure 4 This is a schematic diagram of a side-channel protection analysis device according to an embodiment of the present invention. The device includes a first module 410, a second module 420, a third module 430, and a fourth module 440.
[0040] The system comprises four modules: First, a set of inequalities generated by a fault attack on side-channel data. This set of inequalities represents the multidimensional unknown variables to be recovered, where the multidimensional unknown variables are keys. Second, a factor graph is generated by using each component of the multidimensional unknown variables as variable nodes, the inequalities as constraint factor nodes, and the preset prior distribution of each multidimensional unknown vector as prior factor nodes. The variable nodes and factor nodes are connected by edges based on their dependencies, resulting in a factor graph where factor nodes are either constraint factor nodes or prior factor nodes. Third, a message passing mechanism for initializing the factor graph is used to iteratively update the graph until convergence. This iterative update includes calculating the messages passed from constraint factor nodes to variable nodes using Gaussian approximation, calculating the confidence distribution of variable nodes using prior strength parameters, and updating the messages passed from variable nodes to constraint factor nodes. Fourth, a solution vector is extracted using maximum a posteriori estimation, and this solution vector serves as the key analysis result of the side-channel data.
[0041] For example, with the cooperation of the first, second, third, and fourth modules in the device, the embodiment device can implement any of the aforementioned side-channel protection analysis methods, namely, obtaining a set of inequalities generated by a fault attack on the side-channel data, wherein the set of inequalities includes multiple inequalities, which are used to characterize the multidimensional unknown variables to be recovered, wherein the multidimensional unknown variables are keys; taking each component of the multidimensional unknown variables as variable nodes, taking the inequalities as constraint factor nodes, taking the preset prior distribution of each multidimensional unknown vector as a prior factor node, and connecting the variable nodes and factor nodes through edges to obtain a factor graph, wherein the factor nodes are one of constraint factor nodes and prior factor nodes; initializing the message transmission of the factor graph, iteratively updating the factor graph until convergence, wherein the iterative update includes using Gaussian approximation to calculate the message transmitted from the constraint factor nodes to the variable nodes; using prior strength parameters to calculate the confidence distribution of the variable nodes; updating the message transmitted from the variable nodes to the constraint factor nodes; extracting the solution vector using maximum a posteriori estimation, and using the solution vector as the key analysis result of the side-channel data. The beneficial effects of this invention are as follows: For the problem of solving a system of high-dimensional small-integer linear inequalities in side-channel failure attacks, a priori strength parameter is introduced into the variable node message update of the belief propagation algorithm. By adjusting the influence of the preset prior distribution in the data domain message integration formula, an effective balance between hard constraints and the preset prior distribution is achieved, solving the problem of traditional belief propagation algorithms deviating from the prior due to hard constraints in graphs with loops. Robust estimation is integrated into the belief propagation framework, introducing weight parameters for each constraint factor node to construct a weighted factor graph. The Tukey double-weight function with hard truncation characteristics is used to calculate constraint weights, completely eliminating outlier constraints. Weights are dynamically updated through an iterative reweighting mechanism, enabling the algorithm to automatically identify and suppress the influence of erroneous inequalities without pre-marking erroneous constraints. In the message update from factor nodes to variable nodes, the Gaussian approximation method is used to approximate the linear combination result as a normal distribution, transforming the complex summation traversal into the difference calculation of the normal cumulative distribution function. Combined with vectorized programming techniques, computational complexity is significantly reduced, ensuring the numerical stability of the algorithm.
[0042] This invention also provides an electronic device, which includes a processor and a memory; The memory stores the program; The processor executes a program to perform the aforementioned side-channel protection analysis method; the electronic device has the function of carrying and running the software system for side-channel protection analysis provided in the embodiments of the present invention, such as a personal computer, minicomputer, mainframe, workstation, network or distributed computing environment, standalone or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.
[0043] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the side-channel protection analysis method described above.
[0044] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented in the embodiments of this invention. Alternative embodiments are contemplated, in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0045] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned side-channel protection analysis method.
[0046] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, considering the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed in the embodiments of the invention, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0047] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0048] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can include, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0049] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0050] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0051] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0052] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0053] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A side-channel protection analysis method, characterized in that, include: Obtain a set of inequalities generated by a fault attack on side-channel data, wherein the set of inequalities includes multiple inequalities, and the set of inequalities is used to characterize the multidimensional unknown variable to be recovered, wherein the multidimensional unknown variable is the key; Each component of a multidimensional unknown variable is used as a variable node, inequalities are used as constraint factor nodes, and the pre-defined prior distribution of each multidimensional unknown vector is used as a prior factor node. The dependency relationship between variable nodes and factor nodes is connected by edges to obtain a factor graph, where the factor node is either a constraint factor node or a prior factor node. The message passing of the initial factor graph is initialized, and the factor graph is iteratively updated until convergence. The iterative update includes calculating the message passed from the constraint factor node to the variable node using Gaussian approximation; calculating the confidence distribution of the variable node using prior strength parameters; and updating the message passed from the variable node to the constraint factor node. The solution vector is extracted using maximum a posteriori estimation, and the solution vector is used as the key analysis result of the side channel data; The process involves using each component of a multidimensional unknown variable as a variable node, inequalities as constraint factor nodes, a preset prior distribution of each multidimensional unknown vector as a prior factor node, and connecting variable nodes and factor nodes through edges to obtain a factor graph, including: The variable node is connected to the corresponding prior factor node; the constraint factor node is connected to multiple variable nodes, and the inequality is expressed as follows: in, To constrain the interval length, , The number of inequalities; and Represents the connection of constraint factor nodes in the factor graph. and variable nodes The edge, , The number of multidimensional unknown variables, and the number of variable nodes. The value of , It is a discrete set; Among them, the prior factor node Represented as , As a prior distribution, Set as a central binomial distribution; The iterative update of the factor graph until convergence includes: The message update formula from variable node to factor node is: in, Indicates the first In the next iteration, in the variable To factor In the message being transmitted, Values confidence level , indicating from the prior factor node To the variable node The message; To and A set of contiguous factor indices, that is, including and all satisfaction constraint factor nodes ; The relation is proportional to the variable node, used to represent the product of messages from the variable node to the factor node, including messages from the prior factors and messages from the variable node. External all and variables Messages of connected factors; The message update formula from factor node to variable node is: in, Indicates the first In the next iteration, in the factor To variable In the messages being transmitted, in constraints From the perspective of Values Confidence level, To and A set of connected variable node indices. This is an indicator function, equal to 1 when the inequality is true and zero otherwise, and it is used when calculating messages from factor nodes to variable nodes, except for... Summing and iterating through all possible combinations of values for all connected variables.
2. The side-channel protection analysis method according to claim 1, characterized in that, The message transmitted from the constraint factor node to the variable node using the Gaussian approximation calculation includes: When calculating messages from factor nodes to variable nodes, traverse except Summing all possible combinations of values for all connected variables yields a linear combination. for: According to linear combination Approximately Gaussian distribution: in, It is the cumulative distribution function of the standard normal distribution. It is a small positive number used to ensure the numerical stability of the calculation process.
3. The side-channel protection analysis method according to claim 2, characterized in that, The calculation of the confidence distribution of variable nodes using prior strength parameters includes: Each time the factor graph is updated, the messages are integrated, and the prior strength parameter is used during message integration. The confidence distribution is calculated as follows: Among them, the prior strength parameter Used to control the prior influence of variable nodes during the update phase.
4. The side-channel protection analysis method according to claim 3, characterized in that, The step of extracting the solution vector using maximum a posteriori estimation and using the solution vector as the key analysis result of the side-channel data includes: Based on the confidence distribution, the solution to the inequality is estimated using maximum a posteriori (MAP) to obtain the key analysis results. The MAP estimate... for: 。 5. The side-channel protection analysis method according to claim 4, characterized in that, The method further includes: In each iteration, the message update from the factor node to the variable node uses the Tukey double-weight function to calculate the weights, including calculating the weighted message: in, This indicates a weighted uniform distribution. This indicates the weighted message; Based on the M-estimation framework, the degree of violation of each constraint by each predicted solution is used as the model residual. The weights are then calculated using the Tukey double-weighting function based on the model residuals. for: in, It is the boundary point of the piecewise function, the model residual. Represented as: 。 6. A side-channel protection analysis device, characterized in that, include: The first module is used to obtain a set of inequalities generated by a fault attack on side-channel data. The set of inequalities includes multiple inequalities and is used to characterize the multidimensional unknown variables to be recovered, wherein the multidimensional unknown variables are keys. The second module is used to construct a factor graph by using each component of a multidimensional unknown variable as a variable node, inequalities as constraint factor nodes, and a preset prior distribution of each multidimensional unknown vector as a prior factor node. The third module is used to initialize the message passing of the factor graph and iteratively update the factor graph until convergence. The iterative update includes using Gaussian approximation to calculate the message passed from the constraint factor node to the variable node; using prior strength parameters to calculate the confidence distribution of the variable node; and updating the message passed from the variable node to the constraint factor node. The fourth module is used to extract the solution vector using maximum a posteriori estimation, and the solution vector is used as the key analysis result of the side channel data. The process involves using each component of a multidimensional unknown variable as a variable node, inequalities as constraint factor nodes, a preset prior distribution of each multidimensional unknown vector as a prior factor node, and connecting variable nodes and factor nodes through edges to obtain a factor graph, including: The variable node is connected to the corresponding prior factor node; the constraint factor node is connected to multiple variable nodes, and the inequality is expressed as follows: in, To constrain the interval length, , The number of inequalities; and Represents the connection of constraint factor nodes in the factor graph. and variable nodes The edge, , The number of multidimensional unknown variables, and the number of variable nodes. The value of , It is a discrete set; Among them, the prior factor node Represented as , As a prior distribution, Set as a central binomial distribution; The iterative update of the factor graph until convergence includes: The message update formula from variable node to factor node is: in, Indicates the first In the next iteration, in the variable To factor In the message being transmitted, Values Confidence level, , indicating from the prior factor node To the variable node The message; To and A set of contiguous factor indices, that is, including and all satisfaction constraint factor nodes ; The relation is proportional to the variable node, used to represent the product of messages from the variable node to the factor node, including messages from the prior factors and messages from the variable node. External all and variables Messages of connected factors; The message update formula from factor node to variable node is: in, Indicates the first In the next iteration, in the factor To variable In the messages being transmitted, in constraints From the perspective of Values Confidence level, To and A set of connected variable node indices. This is an indicator function, equal to 1 when the inequality is true and zero otherwise, and it is used when calculating messages from factor nodes to variable nodes, except for... Summing and iterating through all possible combinations of values for all connected variables.
7. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the side-channel protection analysis method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The storage medium stores a program, which is executed by a processor to implement the side-channel protection analysis method as described in any one of claims 1-5.
Citation Information
Patent Citations
Side channel information processing method and device and computer equipment
CN120281471A