Block cipher design and automatic safety evaluation auxiliary system
By designing a packet cipher design and automation security evaluation auxiliary system, and using STP solver for automated security evaluation, the problems of difficulty in building automation models and high capability requirements in the existing technology are solved, and comprehensive automation and security of the packet cipher algorithm is realized Sexual assessment and detailed report generation.
Patent Information
- Application Number
- CN202411193559.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-28
AI Technical Summary
It is difficult to realize the automated security assessment of packet cryptography algorithms in the prior art, especially in differential attacks, linear attacks, impossible differential attacks, zero-related linear attacks and integral attacks. It is difficult to build an automation model and requires high abilities to practitioners. There is a lack of automation tools that can effectively analyze and reduce user capability requirements.
A packet password design and automated security evaluation auxiliary system was designed, including front-end and back-end. The front-end is based on the RESTful architecture, and the user interface is used to customize the packet encryption algorithm. The back-end includes component function system, solver calling module and data analysis. Module, using STP solver for automated security evaluation, supports differential attacks, linear attacks, impossible differential attacks, zero-related linear attacks, and integral attacks.
It realizes automated security evaluation of user-defined encryption algorithms, reduces user capability requirements, and can effectively perform automated search and modular implementation of differential routes, linear routes, impossible differential routes and integral routes to generate detailed security Evaluation report.
Smart Images

Figure CN119094119A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of confidential communication, relates to the fields of cryptography and network security, and specifically relates to a block cipher design and automated security assessment auxiliary system. Background Art
[0002] Cryptography, as the theoretical basis for ensuring secure data transmission, has gradually become a hot research direction as people pay more and more attention to information security. Among them, the strong adaptability and high flexibility of block ciphers make block ciphers widely used. Therefore, the research on the security of block ciphers is of great significance. The security analysis methods of block encryption algorithms include differential analysis, linear analysis, integral analysis and many other analysis methods. These analysis techniques have their own strengths. Evaluating the strength of a block encryption algorithm against various existing analysis techniques from different angles has become an important indicator for measuring the security of the algorithm.
[0003] Differential attack is a chosen plaintext attack and one of the most effective attack methods known to date for iterative block ciphers. Its basic idea is to find a high-probability differential feature and distinguish the block encryption algorithm from random permutation based on the difference in the probability distribution of the differential feature, and then use this high-probability differential feature to perform a key recovery attack. Differential cryptanalysis has a very wide range of applications in the security analysis of block encryption algorithms. When the designer of a cryptographic algorithm completes the design of a block cipher algorithm, it is necessary to test the ability of the cryptographic algorithm to resist differential cryptanalysis. Impossible differential attack is another important analysis method in the field of block ciphers. The differential attack method uses high-probability differential features to construct a discriminator and perform a key recovery attack. However, from the perspective of hypothesis testing, whether the differential probability is greater than the random probability or less than the random probability, it is different from random permutation and should be used to construct the discriminator. Unlike the differential attack method that uses a high-probability differential route, the impossible differential attack aims to find the longest impossible differential route, that is, a differential route with a probability of 0.
[0004] Linear attack belongs to the category of known plaintext attack. Its basic idea is similar to differential attack. It uses linear expressions with high deviation between input and output to distinguish cryptographic algorithms from random permutations and conduct key recovery attacks. The resistance of block cipher algorithms to linear attack methods is also the bottom line of security of modern cryptographic algorithms. Traditional linear attack methods use linear approximations with high deviation to distinguish target algorithms from random permutations by observing the different performance of linear approximations under correct keys and incorrect keys. As the dual method of impossible differential attacks in the field of linear attacks, zero-correlation linear attacks rely on linear approximations with zero correlation under all keys.
[0005] The integral attack is to select a group of plaintexts that meet a specific form for encryption, and then analyze the properties of the sum of the intermediate states of these plaintexts after several rounds of encryption transformation. The sum of these intermediate states is called the integral. The integral attack distinguishes a cryptographic algorithm from a random permutation through the non-randomness of the integral value. Among them, the division property is a new method for finding integral distinguishers, which is an extension of the integral attack. According to the division of the internal state, the methods for obtaining integral distinguishers can be divided into three categories: 1) State-based divisibility: evaluate the division properties of certain generalized structures. 2) Word-based division properties: evaluate the division properties of certain specific passwords at the word level. 3) Bit-based division properties: evaluate the propagation of division properties at the bit level.
[0006] Traditional analysis methods mainly rely on manual deduction and logical reasoning to evaluate the security of cryptographic algorithms. The main problem is that manual analysis is very dependent on the professional ability of the evaluator and integrates knowledge of cryptography, algebra and other disciplines. At the same time, manual analysis is a time-consuming and complicated process that requires a lot of manpower and material resources to complete. It is also somewhat accidental and incomplete. It is not easy to find the best result, which makes it difficult for cryptographic algorithm designers to accurately grasp the security strength of the algorithm, affecting the scientific nature of cryptographic algorithm design and analysis. With the rapid development of computer technology, cryptanalysts have introduced automated search based on computer technology into cryptographic algorithm analysis, realizing the automated implementation model of analysis methods. Automated analysis methods can rely on modern powerful computing power to obtain more refined and accurate cryptographic analysis results, which can greatly improve the efficiency of cryptographic algorithm analysis and help to more accurately grasp the security strength of cryptographic algorithms. Therefore, the study of automated analysis methods for block cipher algorithms has a strong application background and theoretical value.
[0007] STP is an important tool for automated analysis of block ciphers. It is a solver developed based on Satisfiability Modulo Theories. The STP solver can accept a set of CNF conjunctive normal forms (Boolean expressions and their negations are called literals, the disjunction of a finite number of literals is called a short sentence, and the conjunction of a finite number of short sentences is called a CNF conjunctive normal form) as input, and after a series of processing, it is converted into a SAT problem (determining the solvability of a set of Boolean expressions), and then solved using the SAT solver, and finally a determination is made on the satisfiability of the input normal form.
[0008] Problems with existing technologies:
[0009] 1. Block ciphers have many attack modes and varied structures. Common attack modes include differential attack, linear attack, impossible differential attack, zero-correlation linear attack, integral attack, meet-in-the-middle attack, etc. The mainstream block cipher algorithm structures include Feistel structure, SPN structure, Lai-Massey structure, etc. from the perspective of round function; from the perspective of nonlinear layer, they include structures with S-box and ARX structure without S-box. It is difficult to complete the automated implementation of all structures.
[0010] 2. Difficulty in building automated models. The key to automated search is to transform the route search problem into a mathematical problem. In the automated model building of common password attack modes, the problems that need to be solved and the mathematical principles used include the construction of differential distribution tables and linear approximation tables, the Markov chain hypothesis used in differential probability propagation, the stacking lemma used in linear probability propagation, and the construction and propagation of divisible models in integral attacks. Convex hull theory, greedy algorithms, finite state automata, etc. are also used in automated search.
[0011] 3. High requirements on the ability of practitioners. To conduct automated analysis of block ciphers, cryptanalysts need to master the principles of cryptography, algorithm design principles, various attack principles, mathematical modeling capabilities, solver application capabilities, etc. A deep understanding of these requires a cryptanalysis team to achieve, and currently there is no automated analysis tool that can both effectively analyze block encryption algorithms and reduce the requirements on users' abilities. Summary of the invention
[0012] In view of the problems existing in the prior art, the present invention provides a block cipher design and automated security assessment auxiliary system for users to customize the design of block encryption algorithms and perform security assessments on them.
[0013] The technical solution is implemented as follows:
[0014] A block cipher design and automated security assessment auxiliary system, including a front end and a back end:
[0015] The front end is designed based on RESTful architecture, including user interface, FastAPI and verification module. The core idea of RESTful architecture is to regard network resources as a state, and transmit and operate these states through HTTP protocol. FastAPI described in the present invention is of this style. The user interface is used for users to intuitively design their desired group encryption algorithm. Users upload basic parameters of the group encryption algorithm such as group size, number of branches and number of rounds of the group encryption algorithm through the user interface, and use the function name provided by the user interface to design the round function structure and security self-assessment type of the group encryption algorithm. The supported security self-assessment types include differential attack, linear attack, impossible differential attack, zero-correlation linear attack and integral attack. The basic parameters provided by the user are the input parameters of each function in the round function structure. The verification module adopts JWT technology for verification between the front end and the back end. JWT is called Json Web Token. It transmits information securely between parties in the form of JSON object. This information is digitally signed and can be verified and trusted. When the front end initiates a user request to the back end, the JWT is placed in the request header for the back end to authenticate the identity. If the authentication is passed, the request is accepted and the data is returned, otherwise the request is rejected.
[0016] The backend includes a component function system, a solver calling module, an STP solver and a data parsing module;
[0017] The component function system includes various component functions under all attack modes (including differential attack, linear attack, impossible differential attack, zero-correlation linear attack and integral attack). The components under different attack modes can be divided into linear components and nonlinear components. In the field of block ciphers, linear components provide diffusion and nonlinear components provide confusion. The function of the component function is to convert the propagation mode of each component into a CNF conjunction normal form acceptable to the STP solver in combination with the basic parameters of the function, wherein the basic parameters of the function need to be provided by the user. The linear components include binary matrices, XOR, cyclic shifts, and branches; the nonlinear components include S-boxes, modular addition operations, AND operations, and OR operations. Since the component function system includes various component functions under all attack modes, users can customize the required group encryption algorithm round function structure and determine the security self-assessment type through the component functions provided in the component function system. Two points need to be supplemented: First, in the present invention, since the user performs a security self-assessment on the group encryption algorithm designed by the user, the user needs to perform a cryptographic attack on the group encryption algorithm to evaluate the security of the group encryption algorithm. Therefore, in this article, the security self-assessment can also be equivalent to the user attacking his own group encryption algorithm; Second, in the group encryption algorithm, the structure of each round is usually the same. This structure is called a round function structure. The structure of each round implements the encryption process by repeatedly applying the same steps. The last round is slightly different, but the branch permutation step is omitted only for the symmetry of encryption and decryption. Therefore, when describing the structure of a group encryption algorithm, it is only necessary to construct the round function structure.
[0018] The solver calling module includes a python script file, which combines the basic parameters provided by the user with the round function structure and its security self-assessment type constructed by the user, executes all component functions determined by the user, and the CNF conjunction normal form obtained based on the transformation of all component functions together constitutes an STP solution model. Furthermore, the solver calling module calls the STP solver to solve the satisfiability problem of the model.
[0019] The STP solver is a solver for solving bit vector constraint problems developed based on the miniSAT solver. Specifically, the STP solver accepts a set of STP solution models in the form of CNF conjunction normal form (Boolean expressions and their negations are called literals, the disjunction of a finite number of literals is called a short sentence, and the conjunction of a finite number of short sentences is called a CNF conjunction normal form) as input, converts these CNF conjunction normal forms into SAT problems, and then uses the SAT solver to solve them, and finally makes a determination on the satisfiability of the input normal form. After the STP solver solves the STP solution model, it will generate a solution file.
[0020] The solution file contains several formulas in the form of CNF conjunction normal form, which contain solution information. In order to facilitate user understanding, the data analysis module uses a python script file to extract the information in each CNF conjunction normal form in the solution file and convert it into the result information of the security assessment that the user can understand. The information obtained in different attack modes is different. For example, under differential attack, the user can obtain the differential route and differential route probability under each round of the block encryption algorithm, and under linear attack, the linear route and linear route probability under each round of the block encryption algorithm can be obtained. And the routes corresponding to all attack modes will generate a route file.
[0021] Furthermore, the component function system includes component functions in five attack modes. The propagation modes of each linear component and nonlinear component in different attack modes are as follows:
[0022] Differential propagation patterns of each component in differential attacks and impossible differential attacks, including:
[0023] (1) Difference propagation on XOR: The input difference is α1, α2, and the output difference is β, then in, is an XOR operation;
[0024] (2) Propagation of difference on the branch: the input difference is α1, α2, and the output difference is β, then α1 = α2 = β;
[0025] (3) Difference propagation on the S-box: Let x i represents the ith bit of the difference, that is, x i = 0 means that the input pair is equal at the i-th bit, x i =1, the opposite is true. t Indicates whether the S box is active, A t =0 means S box is inactive, A t =1 means the S-box is active. The purpose of finding a high-probability differential route is to increase the number of active S-boxes ∑ t A t Therefore, for an S-box with an input size of ω bits and an output size of v bits, the input difference and output difference are (x0, ..., x ω-1 ) and (y0,…,y v-1 ), to ensure that the input differential is non-zero to make the S-box active, and the output differential is non-zero to make the S-box active, we have:
[0026]
[0027] Furthermore, in the block cipher design and automated security assessment auxiliary system of the present invention, all S-boxes only consider bijective S-boxes with n-bit input and n-bit output.
[0028] (4) Propagation of differential in modulus: Let the input differential be α, β, and the output differential be γ. If:
[0029]
[0030] in, is a logical NOT operation, "∧" is a logical AND operation, and "<<" is a left shift operation, then the difference is effectively propagated in this module;
[0031] For the propagation of differential probability in the module plus, two steps are required: the first step is to determine whether the propagation of the differential route on the module plus component is effective, and the second step is to calculate the propagation of the differential probability in the module plus. + ,have:
[0032]
[0033] Among them, "#" represents the cardinality of the set, that is, the number of elements in the set;
[0034] For the specific calculation of the above formula, it is necessary to first verify that the difference is effectively propagated in the module addition, and then calculate:
[0035]
[0036] Where eq(α[i], β[i], γ[i]) represents the function that determines whether α[i], β[i], and γ[i] are equal, that is, The Boolean vector suffix [i] means the i-th bit of the Boolean vector, and for an n-bit difference, the difference probability is only related to [0, n-2] bits.
[0037] Furthermore, the linear mask propagation patterns of the components in the linear attack and the zero-correlation linear attack are hereinafter referred to as masks, including:
[0038] (1) Mask propagation on XOR: The input mask is α1, α2, and the output mask is β, then α1 = α2 = β;
[0039] (2) Mask propagation on branches: The input masks are α1, α2, and the output mask is β.
[0040] (3) Mask propagation on linear mapping: The input mask is α, the output mask is β, then α = M T β;
[0041] (4) Mask propagation on S-box: Let xi represents the i-th bit of the mask, that is, x i = 0 means that the input pair is equal at the i-th bit, x i =1, the opposite is true. t Indicates whether the S box is active, A t =0 means S box is inactive, A t =1 means the S-box is active. The purpose of finding a high-probability linear mask route is to increase the number of active S-boxes ∑ t A t Therefore, for an S-box with an input size of ω bits and an output size of v bits, the input mask and output mask are (x0, ..., x ω-1 ) and (y0,…,y v-1 ), to ensure that the input mask is non-0 to make the S-box active, and the output mask is non-0 to make the S-box active, we have:
[0042]
[0043] (5) Mask propagation in modular addition: Let the two inputs of modular addition be (x, y), and the input masks be Λ α , Λ β , the output mask is Γ, the correlation is denoted by cor, and the inner product (denoted by ·) is defined as: for two vectors on the binary domain The inner product of a and b is expressed as:
[0044]
[0045] Then the propagation of linear correlation in modular addition is:
[0046]
[0047] Specifically in the calculation of correlation, for modulo 2 n The linear approximation of , where the input mask is Λ α , Λ β , the output mask is Γ, Λ α , Λ β , And α =(Λ α [n-1],…,Λ α [0]), Λ β =(Λ β [n-1],…,Λ β [0]), Γ=(Γ[n-1],...,Γ[0]), define vector u=(u[n-1],...,u[0]) where u[i]=4Γ[i]+2Λ α [i]+Λ β[i], where 0 ≤ u[i] < 8 and 0 ≤ i < n. The correlation can be calculated by the following linear expression:
[0048] cor 田 (Γ, Λ α , Λ β ) = LA u[n-1] A u[n-2] …A u[1] A u[0] C
[0049] where ⊕ is the symbol for modular addition, and A r (r = 0, …, 7) is a 2×2 matrix L is a row vector L = (1 0), and C is a column vector C = (1 1) T .
[0050] For example, for the binary mask vectors of the linear approximation formula (Γ = 10100, Λ α = 11110, Λ β = 11000), u = 736208, the correlation
[0051] Furthermore, in the integral attack, considering the propagation of the Division Property at the word level, the input variables and output variables of each component are in the binary field and for the propagation mode of the Division Property of each component, it includes:
[0052] (1) Propagation of the Division Property on the copy operation: Denote as the propagation route of the n-bit Division Property on the copy operation, where a is the input of the copy operation, and b0 and b1 are the outputs of the copy operation. Each variable needs to satisfy the following constraint conditions: a ≤ n
[0053] b0 ≤ n
[0054] b1 ≤ n
[0055] a = b0 + b1
[0056] (2) Propagation of the Division Property on the XOR operation: Denote as the propagation route of the n-bit Division Property on the XOR operation, where a0 and a1 are the inputs of the XOR operation, and b is the output of the copy operation. Each variable needs to satisfy the following constraint conditions:
[0057] a0 ≤ n
[0058] a1 ≤ n
[0059] b≤n
[0060] a0+a1=b
[0061] (3) Propagation of the separability property on linear mappings: Let F(x) = M x, where M is a finite field. In the MDS matrix, m determines the finite field to which each element in the matrix M and the vector belongs. The dimension of s determines the size of the matrix M and the length of the vector it acts on. That is, M is an s×s matrix acting on a vector of length s. is the propagation of the separability feature on the linear map F, a i 、b j They are input separable features and output separable features, and each variable needs to satisfy the following constraints:
[0062] a i ≤m, i=0, 1, …, s-1
[0063] b j ≤m,j=0,1,…,s-1
[0064] a0+a1+…+a s -1=b0+b1+…b s-1
[0065] Where i = 0, 1, ..., s-1 and j = 0, 1, ..., s-1;
[0066] (4) Propagation of the divisibility property on a 4-bit S-box: is the divisibility feature propagation route of a 4-bit S-box, where x = (x[0], x[1], x[2]) and y = (y[0], y[1], y[2]) are both 3-bit vectors. The propagation of the divisibility feature on a 4-bit S-box needs to satisfy the following constraints:
[0067] x≤4
[0068] y≤4
[0069]
[0070] in, It means to negate the vector y[0]. It means to negate the vector x[0], and so on.
[0071] (5) Propagation of the divisibility property on 8-bit S-boxes: is the propagation route of the divisibility feature of an 8-bit S-box, where x = (x[0], x[1], x[2], x[3]) and y = (y[0], y[1], y[2], y[3]) are both 4-bit vectors. The propagation of the divisibility feature on an 8-bit S-box needs to satisfy the following constraints:
[0072] x≤8
[0073] y≤8
[0074]
[0075] y[1]=0
[0076] y[2]=0
[0077]
[0078] Furthermore, according to the propagation modes of the above differences on each component, the propagation modes of the linear masks on each component, and the propagation modes of the separable characteristics on each component, component functions are constructed to convert these propagation modes into CNF conjunction normal form. These component functions jointly construct a component function system, including:
[0079] F XOR_DIF (I1, I2, O): differential XOR operation, receiving three input parameters, where I1 and I2 are two input differential variables, and O is the output differential variable;
[0080] F ls_DIF (I1, num): difference is shifted left, receiving two parameters, where I1 is the input difference variable and num is the left shift value;
[0081] F rs_DIF (I1, num): performs a right shift operation on the difference, accepting two parameters, where I1 is the input difference variable and num is the right shift value;
[0082] F crs_DIF (I1, num): performs a circular right shift operation on the difference, accepting two parameters, where I1 is the input difference variable and num is the right shift value;
[0083] F cls_DIF (I1, num): performs a circular left shift operation on the difference, accepting two parameters, where I1 is the input difference variable and num is the left shift value;
[0084] F p_DIF (I, O): Bit-level permutation of difference, receiving an input difference variable I and an output difference variable O;
[0085] F S_DIF(I, O): The difference passes through the nonlinear component S-box, receiving the input difference variable I and the output difference variable O of the S-box;
[0086] F S_active_DIF (I): Calculate the number of active S-boxes in all rounds of differential attack. A non-zero input differential will definitely make the output differential non-zero, so only one input differential I is needed;
[0087] F modulo_DIF (I1, I2, O): differential modulo addition operation, accepting three parameters, where I1 and I2 are two input differential variables, and O is the output differential variable;
[0088] F w_DIF (I1, I2, O, w): Calculates the probability of modular addition difference, accepts four parameters, where I1 and I2 are two input difference variables, O is the output difference variable, and w is the variable used to represent the difference probability, that is, w is equal to the negative logarithm of the difference probability over modular addition with base 2;
[0089] F equal (I, O): equality operation, receiving two parameters I and O, adding constraints to make the two parameters received by the function equal;
[0090] F XOR_LIN (I1, I2, O): Linear mask XOR operation, receiving three input parameters, where I1 and I2 are two input mask variables, and O is the output mask variable;
[0091] F ls_LIN (I1, num): Linear mask performs left shift operation, receiving two parameters, where I1 is the input mask variable and num is the left shift value;
[0092] F rs_LIN (I1, num): Linear mask right shift operation, receiving two parameters, where I1 is the input mask variable and num is the right shift value;
[0093] F crs_LIN (I1, num): Linear mask performs circular right shift operation, receiving two parameters, where I1 is the input mask variable and num is the right shift value;
[0094] F cls_LIN (I1, num): Linear mask performs circular left shift operation, receiving two parameters, where I1 is the input mask variable and num is the left shift value;
[0095] F Split_LIN (I1, I2, O): Linear mask undergoes a branch operation and receives two parameters, where I1 and I2 are two input mask variables and O is the output mask variable;
[0096] F p_LIN (I, O): Bit-level permutation of a linear mask, receiving an input mask variable I and an output mask variable O;
[0097] F S_LIN (I, O): The linear mask passes through the nonlinear component S-box, receiving the input mask variable I and the output mask variable O of the S-box;
[0098] F S_active_LIN (I): Calculate the number of active S-boxes in all rounds of the linear attack. A non-zero input mask will definitely make the output mask non-zero, so only one input mask I is needed;
[0099] F modulo_LIN (I1, I2, O): Linear masked modular addition operation, receiving three parameters, where I1 and I2 are two input mask variables, and O is the output mask variable;
[0100] F w_LIN (I1, I2, O, w): Calculates the probability of modulo masking, accepts four parameters, where I1 and I2 are two input mask variables, O is the output mask variable, and w is a variable used to represent the probability of a linear path, that is, w is equal to the negative logarithm of the modulo probability of the total correlation;
[0101] F XOR_DP (I1, I2, O): XOR operation of divisible characteristics, receiving three input parameters, where I1 and I2 are two input divisible characteristic variables, and O is the output divisible characteristic variable;
[0102] F p_DP (I, O): byte-level permutation, receiving an input divisible feature variable I and an output divisible feature variable O;
[0103] F S_DP (I, O): the divisible characteristic passes through the S-box, receiving the input divisible characteristic variable I and the output divisible characteristic variable O of the S-box;
[0104] F Separate_DP (I, O1, O2, O3, O4, O5, O6, O7, O8): The branch variables of the divisible feature are converted into byte variables. Taking the branch size of eight bytes as an example, it accepts an input I of a byte variable and outputs O1, O2, O3, O4, O5, O6, O7, O8 of eight branch variables;
[0105] F Combine_DP(I1, I2, I3, I4, I5, I6, I7, I8, O): The byte variables of the divisible feature are converted into branch variables. Taking the branch size of eight bytes as an example, it accepts eight byte variable inputs I1, I2, I3, I4, I5, I6, I7, I8 and one branch variable output O.
[0106] Furthermore, the user is provided with a callable component function name through the user interface at the front end. After verification by the verification module, the user uploads the basic parameters of the block encryption algorithm to FastAPI in the front end user interface, calls the provided component function name, customizes the description of the round function structure, and provides the selected security self-assessment type to FastAPI; the system back end generates the STP solution model of the block encryption algorithm through the solver call module according to the basic parameters of the block encryption algorithm uploaded by the user and the described round function structure and its attack mode, and calls the STP solver based on the SMT satisfiability problem to solve the STP solution model. The results obtained by the STP solver are analyzed through the data analysis module, and different results are obtained according to the security self-assessment type, such as differential attacks will obtain differential routes and differential route probabilities, linear attacks will obtain linear routes and linear route probabilities, impossible differential attacks will obtain impossible differential routes, zero-correlated linear attacks will obtain zero-correlated linear routes, and integral attacks will obtain integral routes. In addition, all attack modes will obtain solution time, and analysis report files and route files will be generated based on the obtained results, and passed to the front end for users to download.
[0107] Furthermore, the operation process of the block cipher design and automated security assessment auxiliary system is as follows:
[0108] Step 1: The user logs in to the block cipher design and automated security assessment auxiliary system with the username and password, and obtains JWT from the front-end FastAPI for the next request.
[0109] Step 2: The user enters the basic parameters of the block encryption algorithm such as block size, number of branches, and number of rounds through the front-end interface, and submits the input parameters and JWT to FastAPI.
[0110] In step 3, FastAPI authenticates the user through the verification module and saves the parameters entered by the user in memory through variables.
[0111] Step 4: After successful authentication, the user customizes the round function structure and its security self-assessment type according to the component function name provided in the component function system, and submits the designed round function structure and its security self-assessment type of the group encryption algorithm to FastAPI.
[0112] Step 5: The solver calling module calls the component function provided by the backend component function system according to the round function structure of the block encryption algorithm obtained by FastAPI and its security self-assessment type, takes the basic parameters passed by the user as the input parameters of the component function, and converts the round function structure described by the user with the component function into a CNF conjunction normal form acceptable to the STP solver, thereby constructing the STP solution model.
[0113] Step 6: The solver calling module calls the STP solver to solve the satisfiability problem of the generated STP solution model and saves the solution result to a file.
[0114] Step 7: The backend analyzes the file obtained by the STP solver through the data analysis module, and parses the CNF conjunction paradigm in the solution result file into a security assessment result that is easy for users to understand according to the attack mode corresponding to the security self-assessment type. Then, an analysis report file is generated based on the security assessment result, and a route file is generated for all routes corresponding to the attack mode. The download link of the security assessment result and the file generated by the data analysis module is passed to the front-end user interface through FastAPI for users to view and download the report.
[0115] The beneficial effects of the present invention are as follows:
[0116] It can be seen from the above scheme that the method provided by the present invention receives the basic data and round function description passed by the user at the front end, uses the parsing method to link the basic description of the user-defined encryption algorithm with each module, uses the background script file to automatically generate the CVC language file, and uses the STP solver to complete the automatic search and modular implementation of differential attack, linear attack, impossible differential attack, zero-correlation linear attack, and integral attack; it realizes the security evaluation of the encryption algorithm designed by the user and returns the evaluation result report. At present, there is no automated analysis tool that can both effectively analyze the block encryption algorithm and reduce the ability requirements for the user. The present invention fills this gap. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] Figure 1 It is a flow chart of the front-end and back-end interaction in the present invention;
[0118] Figure 2 This is a flow chart of the block cipher design and automated security assessment auxiliary platform in the present invention;
[0119] Figure 3 It is a 0-1 matrix form of the linear layer bit permutation of the block encryption algorithm of the first embodiment of the present invention;
[0120] Figure 4 This is a structural diagram of the linear layer bit replacement of the block encryption algorithm of the first embodiment of the present invention;
[0121] Figure 5 This is a block encryption algorithm structure diagram of the first embodiment of the present invention;
[0122] Figure 6 This is a block encryption algorithm structure diagram of the second embodiment of the present invention. DETAILED DESCRIPTION
[0123] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.
[0124] In order to make the advantages of the technical solution of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0125] in, Figure 1 The front-end and back-end interaction process of block cipher design and automated security assessment auxiliary system is demonstrated. Figure 2 The principles of the entire block cipher design and automated security assessment auxiliary system operation process are demonstrated.
[0126] Embodiment 1
[0127] The present invention is for the block encryption algorithm with the nonlinear layer being the S box, Figure 5 Take the Feistel structure algorithm shown as an example, Figure 5 The round function structure of the block encryption algorithm is given. The algorithm structure is designed and automatically evaluated based on the block cipher design and automated security assessment auxiliary system, which mainly includes the following processes:
[0128] Step 1: The user provides the basic parameters of the block encryption algorithm, for example, the block size is 64 bits, the number of branches is 2, that is, the data length of each branch is 32 bits, and the nonlinear component is an S-box. For the bit-level permutation P component, an interface is provided for the user at the front end to allow the user to input the bit permutation P. It should be noted that the bit permutation P receives 0-1 matrix on , Figure 3 Given a 0-1 matrix example, Figure 4 This gives an intuitive representation of the bit permutation P for this matrix example, Figure 4 The bit replacement structure is Figure 3 The format of a 0-1 matrix is provided for user input.
[0129] Assuming that the linear matrix is represented by M, the input difference is represented by column vector X, and the output difference is represented by column vector Y, the propagation mode of the difference on the linear matrix M is:
[0130] Y=MX
[0131] It should be noted that the linear bit permutation P also supports the maximum separable matrix (MDS matrix). The maximum separable matrix only needs to be converted into a 0-1 matrix form and can be passed to the system as the input of the linear bit permutation P.
[0132] The user provides a 4-bit S-box in the S component at the client. In this structure, the data flow size of the S component is 32 bits, that is, the data flow passes through 32 / 4=8 parallel identical S-boxes. Table 1 shows the mapping rules of a 4-bit input 4-bit output S-box.
[0133] Table 1: Mapping table for 4-bit input and 4-bit output S-box
[0134] x 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 S(x) 2 0 7 4 1 3 6 5 9 11 13 15 14 12 10 8
[0135] The user can use {2, 0, 7, 4, 1, 3, 6, 5, 9, 11, 13, 15, 14, 12, 10, 8} to represent the S-box, that is, list them in integer order. For each value in , the first integer represents the mapping of 0, the second integer represents the mapping of 1, and so on.
[0136] Step 2: The user performs a self-assessment based on the component functions provided in the component function system and the type of security self-assessment to be performed. Figure 5 The structure shown in the figure describes the round function structure to Figure 5 Taking the structure of the differential attack self-assessment as an example, the user needs to first perform the following function description to describe the round function structure of the algorithm, where L is the left branch of the round function input, R is the right branch of the round function input, k is the round key of the block encryption algorithm, S in is the input difference of the S-box, S out is the output differential of the S-box, P in is the input difference of the linear bit permutation P, P out is the output difference of the linear bit permutation P, L′ is the output of the left branch of the round function, and R′ is the output of the right branch of the round function. All parameters have been Figure 5 Mark in the corresponding position:
[0137] F equal (R,S in );
[0138] F S_DIF (S in , S out );
[0139] F p_DIF (P in , P out );
[0140] F XOR_DIF (L, P out , R′);
[0141] F equal (R, L′);
[0142] It should be noted that, assuming that for a pair of plaintexts p1 and p2, p1 and p2 are added to the key to obtain ciphertexts c1 and c2, that is, From these two formulas, we know that the difference of the plaintext is the same as the difference of the ciphertext, that is, Therefore, propagating the difference over the XOR key does not change the value of the difference, so there is no need to use functions to describe the XOR key components.
[0143] Based on the above round function structure, the structure is cycled r-1 times, that is, the first r-1 rounds of the algorithm. The difference from the first r-1 rounds is that there is no branch replacement in the rth round, that is, the last round function structure is:
[0144] F XOR_DIF (R, k, S in );
[0145] F S_DIF (S in , S out );
[0146] F p_DIF (P in , P out );
[0147] F XOR_DIF (L, P out, L′);
[0148] F equal (R, R′);
[0149] All variables in the last round function structure are the same as those in the previous r-1 rounds, except for the last branch permutation. L is the left branch of the last round function input, R is the right branch of the last round function input, k is the round key of the last round of the block encryption algorithm, S in is the input difference of the S-box, S out is the output differential of the S-box, P in is the input difference of the linear bit permutation P, P out is the output difference of the linear bit permutation P, L' is the output of the left branch of the custom block encryption algorithm, and R' is the output of the right branch of the custom block encryption algorithm.
[0150] Step 3: The solver calling module calls the component function provided by the backend component function system according to the round function structure of the block encryption algorithm obtained by FastAPI and its security self-assessment type, takes the basic parameters passed by the user as the input parameters of the component function, and converts the round function structure described by the user with the component function into a CNF conjunction normal form acceptable to the STP solver, thereby constructing the STP solution model.
[0151] Step 4: The solver calling module calls the STP solver to solve the satisfiability problem of the generated STP solution model and saves the solution result to a file.
[0152] Step 5: The data analysis module at the back end analyzes the results obtained by the STP solver. For the differential attack in this example, the system parses the CNF conjunction normal form in the solution result file obtained in step 4 into a security assessment result that is easy for users to understand, including the optimal differential route, differential route probability, solution time, etc. The data analysis module generates an analysis report and a complete optimal differential route file based on the security assessment results, and passes them to the front end for users to download.
[0153] Furthermore, the user can judge the security of the designed block encryption algorithm based on the analysis report and the optimal differential route, and improve the block encryption algorithm.
[0154] Embodiment 2
[0155] The present invention uses a block encryption algorithm with a nonlinear layer as a modular addition. Figure 6 Take the Lai-Massey structure SPECK-32 algorithm as an example, Figure 6 The round function structure of the algorithm is given, and the block cipher design and automated security assessment of the algorithm structure mainly include the following processes.
[0156] Step 1: The user needs to provide the basic parameters of the block encryption algorithm, for example, the block size is 64 bits, the number of branches is 2, that is, the data length of each branch is 32 bits, and the nonlinear component is a modular addition operation.
[0157] Step 2: The user uses the functions provided in the component function system and the type of security self-assessment to be performed to Figure 6 The structure shown in the figure describes the round function structure to Figure 6 Taking the structure of linear attack self-evaluation as an example, the user needs to first perform the following function description to describe the round function structure of the algorithm, where x i is the input mask of the left branch of the round function structure of the block cipher algorithm, y i is the input mask of the right branch of the round function structure of the block cipher algorithm, Modulo in1 and Modulo in2Modulo is the two input masks for the modulo addition operation. out Output mask for modulo addition operation, XOR in1 and XOR in2 The two input masks for the XOR operation on the right branch, XOR out is the output mask of the XOR operation on the right branch, x i+1 and i+1 are the output masks of the left and right branches of the round function structure respectively. All parameters are in Figure 5 Mark in the corresponding position:
[0158] F Split_LIN (y i , Modulo in2 , F crs_LIN (XOR in1 , 2));
[0159] F equal (F crs_LIN (x i ,7),Modulo in1 );
[0160] F modulo_LIN (Modulo in1 , Modulo in2 , Modulo out );
[0161] F Split_LIN (XOR in2 , Modulo out , x i+1 );
[0162] F XOR_LIN (XOR in1 , XOR in2 , XOR out );
[0163] F equal (XOR out ,y i+1 );
[0164] It should be noted that, assuming that for a plaintext p1, p1 is added to the key to obtain the ciphertext c1, that is If we make inner products of p1, c1, k and the same mask α, we can easily get
[0165]
[0166] This always holds true with probability 1, so propagating a linear mask over the XOR key does not change the value of the mask, and so there is no need to use a function to describe the XOR key components.
[0167] Based on the above round function structure, the structure is cycled r times, that is, the rth round of the block encryption algorithm
[0168] Step 3: The solver calling module calls the component function provided by the backend component function system according to the round function structure of the block encryption algorithm obtained by FastAPI and its security self-assessment type, takes the basic parameters passed by the user as the input parameters of the component function, and converts the round function structure described by the user with the component function into a CNF conjunction normal form acceptable to the STP solver, thereby constructing the STP solution model.
[0169] Step 4: The solver calling module calls the STP solver to solve the satisfiability problem of the generated STP solution model and saves the solution result to a file.
[0170] Step 4: The solver calling module calls the STP solver to solve the satisfiability problem of the generated STP solution model and saves the solution result to a file.
[0171] Step 5: The data analysis module at the back end analyzes the results obtained by the STP solver. For the linear attack in this example, the system parses the CNF conjunction normal form in the solution result file obtained in step 4 into a security assessment result that is easy for users to understand, including the optimal linear route, linear route probability, solution time, etc. The data analysis module generates an analysis report and a complete optimal linear route file based on the security assessment results, and passes them to the front end for users to download.
[0172] Furthermore, users can judge the security of the designed block encryption algorithm based on the analysis report and the optimal linear route, and improve the block encryption algorithm.
[0173] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.
[0174] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0175] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A block cipher design and automated security assessment auxiliary system, characterized in that: Including front-end and back-end: The front end is designed based on a RESTful architecture, including a user interface, a FastAPI and a verification module; the user interface is used for users to intuitively design their desired block encryption algorithm, and users upload basic parameters of the block encryption algorithm such as the block size, the number of branches and the number of rounds of the block encryption algorithm through the user interface, and use the function name provided by the user interface to design the round function structure and the security self-assessment type of the block encryption algorithm. The supported security self-assessment types include differential attack, linear attack, impossible differential attack, zero-correlation linear attack and integral attack; The basic parameters provided by the user are the input parameters of each function in the round function structure; the verification module uses JWT technology for front-end and back-end verification. When the front-end initiates a user request to the back-end, the JWT is placed in the request header for the back-end to authenticate the identity. If the authentication is successful, the request is accepted and the data is returned, otherwise the request is rejected; The backend includes a component function system, a solver calling module, an STP solver and a data parsing module; The component function system includes various component functions under all attack modes, and the components under different attack modes can be divided into linear components and nonlinear components; the function of the component function is to transform the propagation mode of each component into a CNF conjunction normal form acceptable to the STP solver by combining the basic parameters of the function; the linear component includes binary matrix, XOR, cyclic shift, and branch; the nonlinear component includes S box, modular addition operation, AND operation, and OR operation; the solver call module includes a python script file, which combines the basic parameters provided by the user with the round function structure constructed by the user and its security self-assessment type, executes all component functions determined by the user, and the CNF conjunction normal form obtained based on the transformation of all component functions together constitutes an STP solution model; further, the solver call module calls the STP solver to solve the satisfiability problem of the model; The STP solver accepts a set of STP solution models in the form of CNF conjunction normal form as input, converts these CNF conjunction normal forms into SAT problems, and then uses the SAT solver to solve them, and finally makes a determination on the satisfiability of the input normal form; after the STP solver solves the STP solution model, a solution file will be generated; The data analysis module uses a python script file to extract information from each CNF conjunction paradigm in the solution file and convert it into security assessment result information that the user can understand. The information obtained in different attack modes is different; and a route file will be generated for the routes corresponding to all attack modes.
2. A block cipher design and automated security assessment auxiliary system according to claim 1, characterized in that: The component function system includes component functions in five attack modes. The propagation modes of linear components and nonlinear components in different attack modes include: The propagation mode of the difference across components, the propagation mode of the linear mask across components, and the propagation mode of the separable feature across components.
3. A block cipher design and automated security assessment auxiliary system according to claim 2, characterized in that: Differential propagation patterns of each component in differential attacks and impossible differential attacks, including: (1) Difference propagation on XOR: The input difference is α1, α2, and the output difference is β, then in, is an XOR operation; (2) Propagation of differentials on branches: The input differentials are α1, α2, and the output differential is β, then α1 = α2 = β; (3) Difference propagation on the S-box: Let x i represents the ith bit of the difference, that is, x i = 0 means that the input pair is equal at the i-th bit, x i =1, the opposite is true; let A t Indicates whether the S box is active, A t =0 means S box is inactive, A t =1 means the S-box is active. The purpose of finding a high-probability differential route is to increase the number of active S-boxes ∑ t A t minimized; therefore, for an S-box with an input size of ω bits and an output size of υ bits, the input difference and output difference are (x0,…,x ω-1 ) and (y0,…,y υ-1 ), to ensure that the input differential is non-zero to make the S-box active, and the output differential is non-zero to make the S-box active, we have: All S-boxes only consider bijective S-boxes with n-bit input and n-bit output; (4) Propagation of differential in modulus: Let the input differential be α, β, and the output differential be γ; if: in, is a logical NOT operation, "∧" is a logical AND operation, and "<<" is a left shift operation, then the difference is effectively propagated in this module; For the propagation of differential probability in the module plus, two steps are required: the first step is to determine whether the propagation of the differential route on the module plus component is effective, and the second step is to calculate the propagation of the differential probability in the module plus; for the differential probability xdp + ,have: Among them, "#" represents the cardinality of the set, that is, the number of elements in the set; For the specific calculation of the above formula, it is necessary to first verify that the difference is effectively propagated in the module addition, and then calculate: Where eq(α[i],β[i],γ[i]) represents the function that determines whether α[i],β[i],γ[i] are equal, that is The Boolean vector suffix [i] means the i-th bit of the Boolean vector, and for an n-bit difference, the difference probability is only related to [0, n-2] bits.
4. A block cipher design and automated security assessment auxiliary system according to claim 2, characterized in that: The linear mask propagation patterns of the components in the linear attack and zero-correlation linear attack are referred to as masks below, and include: (1) Mask propagation on XOR: The input mask is α1, α2, and the output mask is β, then α1 = α2 = β; (2) Mask propagation on branches: The input mask is α1, α2, and the output mask is β, then (3) Mask propagation on linear mapping: The input mask is α, the output mask is β, then α = M T β; (4) Mask propagation on the S-box: Let x i represents the i-th bit of the mask, that is, x i = 0 means that the input pair is equal at the i-th bit, x i =1, the opposite is true; let A t Indicates whether the S box is active, A t =0 means S box is inactive, A t =1 means the S-box is active. The purpose of finding a high-probability linear mask route is to increase the number of active S-boxes ∑ t A t minimized; therefore, for an S-box with an input size of ω bits and an output size of u bits, the input mask and output mask are (x0,…,x ω-1 ) and (y0,…,y υ-1 ), to ensure that the input mask is non-0 to make the S-box active, and the output mask is non-0 to make the S-box active, we have: (5) Mask propagation in modular addition: Let the two inputs of modular addition be (x, y), and the input masks be Λ α ,Λ β , the output mask is Γ, the correlation is represented by cor, and the inner product is defined as: for two vectors on the binary domain The inner product of a and b is expressed as: Then the propagation of linear correlation in modular addition is: Specifically for the calculation of relevance, for the modulo-2 n linear approximation, where the input masks are Λ α , Λ β respectively, and the output mask is Γ, and Λ α =(Λ α [n - 1], …, Λ α [0]), Λ β =(Λ β [n - 1], …, Λ β [0]), Γ=(Γ[n - 1], …, Γ[0]), define the vector u=(u[n - 1], …, u[0]) where u[i]=4Γ[i]+2Λ α [i]+Λ β [i], 0 ≤ u[i]<8, 0 ≤ i < n; the relevance can be calculated by the following linear expression: in A is the symbol for modular addition. r (r=0,…,7) is a 2×2 matrix L is a row vector L = (1 0), C is a column vector C = (1 1) T .
5. A block cipher design and automated security assessment auxiliary system according to claim 2, characterized in that: In the integral attack, the propagation of separable features at the word level is considered, and the input variables and output variables of each component are in the binary domain. Above, for each component, the divisible feature propagation mode includes: (1) Propagation of the divisibility feature in branch operations: It is the propagation route of the n-bit divisible feature on the branch operation, where a is the input of the branch operation, b0 and b1 are the outputs of the branch operation, and each variable needs to satisfy the following constraints: a≤n b0≤n b1≤n a=b0+b1 (2) Propagation of the divisibility feature in the XOR operation: It is the propagation route of the divisible characteristic of n bits in the XOR operation, where a0 and a1 are the inputs of the XOR operation, b is the output of the branch operation, and each variable needs to meet the following constraints: a0≤n a1≤n b≤n a0+a1=b (3) Propagation of the separability property on linear mappings: Let F(x) = M x, where M is a finite field. In the MDS matrix, m determines the finite field to which each element in the matrix M and the vector belongs. The dimension of s determines the size of the matrix M and the length of the vector it acts on. That is, M is an s×s matrix acting on a vector of length s. is the propagation of the separability feature on the linear map F, a i , b j They are input separable features and output separable features, and each variable needs to satisfy the following constraints: a i ≤m,i=0,1,…,s-1 b j ≤m,j=0,1,…,s-1 a0+a1+…+a s-1 =b0+b1+…b s-1 where i = 0, 1, ..., s-1 and j = 0, 1, ..., s-1; (4) Propagation of the divisibility property on a 4-bit S-box: is the propagation route of the divisibility feature of a 4-bit S-box, where x = (x[0], x[1], x[2]) and y = (y[0], y[1], y[2]) are both 3-bit vectors. The propagation of the divisibility feature on a 4-bit S-box needs to satisfy the following constraints: x≤4 y≤4 in, It means to negate the vector y[0]. It means to negate the vector x[0], and so on; (5) Propagation of the divisibility property on 8-bit S-boxes: is the propagation route of the divisibility feature of an 8-bit S-box, where x = (x[0], x[1], x[2], x[3]) and y = (y[0], y[1], y[2], y[3]) are both 4-bit vectors. The propagation of the divisibility feature on an 8-bit S-box needs to satisfy the following constraints: x≤8 y≤8 y[1]=0 y[2]=0 6. A block cipher design and automated security assessment auxiliary system according to any one of claims 2 to 5, characterized in that: According to the propagation modes of the above differences on each component, the propagation modes of the linear masks on each component, and the propagation modes of the separable characteristics on each component, component functions are constructed to convert these propagation modes into CNF conjunction normal form. These component functions jointly construct a component function system, including: F XOR_DIF (I1, I2, O): differential XOR operation, receiving three input parameters, where I1 and I2 are two input differential variables, and O is the output differential variable; F ls_DIF (I1, num): difference is shifted left, receiving two parameters, where I1 is the input difference variable and num is the left shift value; F rs_DIF (I1, num): performs a right shift operation on the difference, accepting two parameters, where I1 is the input difference variable and num is the right shift value; F crs_DIF (I1, num): performs a circular right shift operation on the difference, accepting two parameters, where I1 is the input difference variable and num is the right shift value; F cls_DIF (I1, num): performs a circular left shift operation on the difference, accepting two parameters, where I1 is the input difference variable and num is the left shift value; F p_DIF (I, O): Bit-level permutation of difference, receiving an input difference variable I and an output difference variable O; F S_DIF (I, O): The difference passes through the nonlinear component S-box, receiving the input difference variable I and the output difference variable O of the S-box; F S_active_DIF (I): Calculate the number of active S-boxes in all rounds of differential attack. A non-zero input differential will definitely make the output differential non-zero, so only one input differential I is needed; F modulo_DIF (I1, I2, O): differential modulo addition operation, accepting three parameters, where I1 and I2 are two input differential variables, and O is the output differential variable; F w_DIF (I1, I2, O, w): Calculates the probability of modular addition difference, accepts four parameters, where I1 and I2 are two input difference variables, O is the output difference variable, and w is the variable used to represent the difference probability, that is, w is equal to the negative logarithm of the difference probability over modular addition with base 2; F equal (I, O): equality operation, receiving two parameters I and O, adding constraints to make the two parameters received by the function equal; F XOR_LIN (I1, I2, O): Linear mask XOR operation, receiving three input parameters, where I1 and I2 are two input mask variables, and O is the output mask variable; F ls_LIN (I1, num): Linear mask performs left shift operation, receiving two parameters, where I1 is the input mask variable and num is the left shift value; F rs_LIN (I1, num): Linear mask right shift operation, receiving two parameters, where I1 is the input mask variable and num is the right shift value; F crs_LIN (I1, num): Linear mask performs circular right shift operation, receiving two parameters, where I1 is the input mask variable and num is the right shift value; F cls_LIN (I1, num): Linear mask performs circular left shift operation, receiving two parameters, where I1 is the input mask variable and num is the left shift value; F Split_LIN (I1, I2, O): Linear mask undergoes a branch operation and receives two parameters, where I1 and I2 are two input mask variables and O is the output mask variable; F p_LIN (I, O): Bit-level permutation of a linear mask, receiving an input mask variable I and an output mask variable O; F S_LIN (I, O): The linear mask passes through the nonlinear component S-box, receiving the input mask variable I and the output mask variable O of the S-box; F S_active_LIN (I): Calculate the number of active S-boxes in all rounds of the linear attack. A non-zero input mask will definitely make the output mask non-zero, so only one input mask I is needed; F modulo_LIN (I1, I2, O): Linear masked modular addition operation, receiving three parameters, where I1 and I2 are two input mask variables, and O is the output mask variable; F w_LIN (I1, I2, O, w): Calculates the probability of modulo masking, accepts four parameters, where I1 and I2 are two input mask variables, O is the output mask variable, and w is a variable used to represent the probability of a linear path, that is, w is equal to the negative logarithm of the modulo probability of the total correlation; F XOR_DP (I1, I2, O): XOR operation of divisible characteristics, receiving three input parameters, where I1 and I2 are two input divisible characteristic variables, and O is the output divisible characteristic variable; F p_DP (I, O): byte-level permutation, receiving an input divisible feature variable I and an output divisible feature variable O; F S_DP (I, O): the divisible characteristic passes through the S-box, receiving the input divisible characteristic variable I and the output divisible characteristic variable O of the S-box; F Separate_DP (I, O1, O2, O3, O4, O5, O6, O7, O8): The branch variables of the divisible feature are converted into byte variables. Taking the branch size of eight bytes as an example, it accepts an input I of a byte variable and outputs O1, O2, O3, O4, O5, O6, O7, O8 of eight branch variables; F Combine_DP (I1, I2, I3, I4, I5, I6, I7, I8, O): The byte variables of the divisible feature are converted into branch variables. Taking the branch size of eight bytes as an example, it accepts eight byte variable inputs I1, I2, I3, I4, I5, I6, I7, I8 and one branch variable output O.
7. A block cipher design and automated security assessment auxiliary system according to claim 1, characterized in that: The user interface at the front end provides the user with a callable component function name. After verification by the verification module, the user uploads the basic parameters of the block encryption algorithm to FastAPI in the front end user interface, calls the provided component function name, customizes the description of the round function structure, and provides the selected security self-assessment type to FastAPI. The system back end generates an STP solution model of the block encryption algorithm through the solver calling module based on the basic parameters of the block encryption algorithm uploaded by the user and the described round function structure and its attack mode, and calls the STP solver based on the SMT satisfiability problem to solve the STP solution model. The results obtained by the STP solver are analyzed through the data parsing module, and different results are obtained according to the security self-assessment type. Based on the obtained results, an analysis report file and a route file are generated, and passed to the front end for the user to download.
8. A block cipher design and automated security assessment auxiliary system according to claim 1, characterized in that: The operation process of the block cipher design and automated security assessment auxiliary system is as follows: Step 1: The user logs in to the block cipher design and automated security assessment auxiliary system with the username and password, and obtains JWT from the front-end FastAPI for the next request; Step 2: The user enters the basic parameters of the block encryption algorithm through the front-end interface and submits the input parameters and JWT to FastAPI; Step 3, FastAPI authenticates the user through the verification module and saves the parameters entered by the user in memory through variables; Step 4: After successful identity authentication, the user customizes the round function structure and its security self-assessment type according to the component function name provided in the component function system, and submits the designed round function structure and its security self-assessment type of the block encryption algorithm to FastAPI; Step 5: The solver calling module calls the component function provided by the backend component function system according to the round function structure of the block encryption algorithm obtained by FastAPI and its security self-assessment type, takes the basic parameters passed by the user as the input parameters of the component function, and converts the round function structure described by the user with the component function into a CNF conjunction normal form acceptable to the STP solver, thereby constructing an STP solution model; Step 6: The solver calling module calls the STP solver to solve the satisfiability problem of the generated STP solution model, and saves the solution result to a file; Step 7: The backend analyzes the file obtained by the STP solver through the data analysis module, and parses the CNF conjunction normal form in the solution result file into a security assessment result that is easy for users to understand according to the attack mode corresponding to the security self-assessment type. Then, an analysis report file is generated based on the security assessment result, and a route file is generated for each route corresponding to each attack mode. The security assessment results and the download link of the file generated by the data analysis module are passed to the front-end user interface through FastAPI for users to view and download the report.
Citation Information
Patent Citations
Password equipment performance test method
CN114244503A
Method for realizing STP security authentication
CN114499820A
Password anti-differential attack security detection method based on artificial intelligence
CN118101157A
Cited By
Password security assessment method and system based on quadratic Boolean equation variable segmentation
CN121150971A
