A 16-bit S-box construction method based on LM-NFSR structure

By combining Lai-Massey and NFSR structures, a 16-bit S-box with strict avalanche characteristics is constructed, which solves the vulnerability problem of existing S-boxes in high-performance computing and quantum computing attacks, and realizes a highly secure 16-bit S-box. Support, providing strong nonlinear transformation capabilities for block cipher algorithms.

CN114900286BActive Publication Date: 2024-09-27GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210533588.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-15
Publication Date
2024-09-27
Estimated Expiration
2042-05-15

AI Technical Summary

Technical Problem

Existing 4/8-bit S-boxes are difficult to resist attack threats brought by high-performance computing and quantum computing. 16-bit S-boxes have advantages in mathematical attacks but have complex construction methods and lack high-security S-box support.

Method used

Using the combination of Lai-Massey and NFSR structures, by combining the NFSR component with less iterations and the 8-bit S-box sample set, a 16-bit S-box with strict avalanche characteristics is constructed to enhance the diffusion and nonlinear transformation capabilities.

Benefits of technology

It realizes the construction of a 16-bit S-box with strong cryptographic properties, provides high-security nonlinear transformation support, simplifies the structural design and is easy to implement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114900286B
    Figure CN114900286B
Patent Text Reader

Abstract

The present invention discloses a method for constructing a 16-bit S-box based on Lai-Massey and NFSR (L-M-NFSR) structures. A sample set is constructed by selecting the AES algorithm S-box as a sample using affine equivalence; an 8-level nonlinear feedback shift register is used to design a NFSR structure that can achieve strict avalanche characteristics with a small number of iterations, and the structure is combined with the Lai-Massey structure. The 8-bit S-box is used as a sample, and the 8-bit S-box is used as a round function in the Lai-Massey structure, thereby enhancing the variability of the structure, simplifying the structural design, and being easy to implement. The method of the present invention constructs a 16-bit S-box with strong cryptographic properties, providing secure nonlinear transformation support for block cipher algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of information security and is a method for constructing a 16-bit S box based on a LM-NFSR structure. Background Art

[0002] Block cipher algorithms are widely used as the mainstream algorithms in symmetric encryption algorithms. The design of block cipher algorithms needs to follow the Shannon principles of diffusion and confusion, where the confusion characteristics are mainly provided by the S-box, which is the only one that can perform nonlinear transformations. The security of the S-box determines the security strength of the overall cryptographic algorithm. Therefore, the current attacks on encryption algorithms are mainly attacks on the S-box. Studies have shown that DES was cracked due to the weakness of the S-box. With the improvement of computer computing power, 4 / 8-bit S-boxes have become difficult to resist the attack threats brought by high-performance computing, especially quantum computing, due to their low complexity. The 16-bit S-box is 2 times more complex than the 8-bit S-box. 8 times, so the 16-bit S-box has a strong advantage in resisting mathematical attacks.

[0003] The construction methods of cryptographic S-box mainly include mathematical method construction, cryptographic algorithm structure construction, intelligent algorithm construction, etc. Cryptographic algorithm structure construction is a commonly used method. Classic cryptographic algorithm structures include Feistel structure, SPN structure, MISTY structure, Lai-Massey structure, etc. Among them, Lai-Massey structure is a two-branch structure. This structure can be iterated for multiple rounds. It is mainly composed of XOR operation and round function. It has the advantages of simple structure and easy hardware implementation. The evaluation indicators of S-box security mainly include mathematical indicators and indicators for resisting side channel attacks. In terms of mathematical indicators, there are nonlinearity, differential uniformity, algebraic number, etc.; in terms of evaluating indicators for resisting side channel attacks, there are signal-to-noise ratio, etc. Summary of the invention

[0004] The purpose of the present invention is to provide a method for constructing a 16-bit S-box based on Lai-Massey and NFSR (LM-NFSR) structures, by designing a NFSR structure that can achieve strict avalanche characteristics with a small number of iterations, combining it with the Lai-Massey structure, taking an 8-bit S-box as a sample, constructing a 16-bit S-box with strong cryptographic properties, and providing secure nonlinear transformation support for block cipher algorithms.

[0005] The technical solution for achieving the purpose of the present invention is:

[0006] A 16-bit S-box construction method based on LM-NFSR structure comprises the following steps:

[0007] (1) Construct an 8-bit S-box sample set;

[0008] Using affine equivalence, we select the AES algorithm S-box with better cryptographic properties as the sample to construct the sample set;

[0009] (2) Design NFSR components that meet strict avalanche characteristics;

[0010] Two NFSR components with fewer iterations and strict avalanche characteristics are constructed using 8-level nonlinear feedback shift registers, providing full diffusion support for the constructed 16-bit S-box.

[0011] (3) Construct a 16-bit S-box structure based on LM-NFSR;

[0012] The constructed NFSR component is combined with the Lai-Massey structure, and based on the constructed 8-bit cipher S-box sample set, multiple rounds of iterations are performed to calculate and output, and a 16-bit cipher S-box is constructed;

[0013] (4) Traverse and search the 16-bit S-box;

[0014] Based on the new structure, a large number of 16-bit S-boxes are constructed by fully traversing the 8-bit S-box sample set and the left and right branches on the 8-bit binary domain;

[0015] (5) S-box screening;

[0016] The constructed 16-bit S-boxes are tested to select the 16-bit cryptographic S-boxes with better cryptographic properties.

[0017] In the 16-bit S-box construction method of the present invention, the step (1) of constructing an 8-bit S-box sample set comprises the following specific steps:

[0018] (1.1) Select an 8-bit S-box sample: Select an AES algorithm 8-bit S-box as an affine equivalent sample. The nonlinearity of the S-box is 112, the differential uniformity is 4, and the algebraic degree is 7;

[0019] (1.2) Based on the selected 8-bit S-box, the S-box sample set is constructed using affine equivalence. The affine equivalence formula is: Among them, SBox AES is the AES algorithm S-box; M, N are n-order reversible matrices, M, N∈GL(n,F2), m, n are n-bit constants, The S-box obtained by affine equivalence can ensure that its nonlinearity, differential uniformity, algebraic degree and other properties are the same as those of the selected S-box sample.

[0020] In the 16-bit S-box construction method of the present invention, the step (2) of constructing a NFSR component that meets strict avalanche characteristics is specifically performed as follows:

[0021] (2.1) In order to ensure that the constructed 16-bit S-box has a better diffusion effect and increase the safety of the S-box, two 8-level NFSR components that meet strict avalanche characteristics are constructed in the present invention, marked as NFSR1 and NFSR2 respectively. After a certain number of iterations, their sequence has a diffusion characteristic. Each 8-level NFSR has 8 state registers, with R i (0≤i≤7) represents the state of a bit before the register iteration, represented by R i '(0≤i≤7) represents the bit status of the register after iteration. In the iterative update, 4 bits to be updated are selected, namely the 1st, 3rd, 5th and 7th bits, that is, the above 4 bits are updated in each iteration of NFSR, and other positions directly receive the cyclic shifted data; the iteration number of NFSR1 and NFSR2 is set to 10 and 23 respectively. Under this iteration number, the two NFSRs can meet the strict avalanche characteristics;

[0022] (2.2) For NFSR1, set the update function expression as:

[0023] (2.3) For NFSR2, set the update function expression as:

[0024] In the 16-bit S-box construction method of the present invention, step (3) constructs a 16-bit S-box structure based on LM-NFSR, and the specific steps are as follows:

[0025] (3.1) A 16-bit S-box is constructed based on the Lai-Massey structure. Three 8-bit S-boxes are used as round functions to simplify the design of the round function, providing strong nonlinear support for the structure. The NFSR structure constructed in two steps (2) is used as a component to enhance the diffusion effect.

[0026] (3.2) Determine the number of rounds of the combined structure: The Lai-Massey structure can achieve a certain degree of security in 3 rounds, so the number of iterative rounds of the new structure is set to 3;

[0027] (3.3) Determine input / output: The Lai-Massey structure is a balanced structure with two branches, so the input / output of the left branch and the right branch are both 8 bits. The initial input of the left and right branches are defined as: L, R∈F2 8 , the final outputs of the left and right branches are defined as: L', R'∈F2 8 ;

[0028] (3.4) Replacing the round function with an 8-bit S-box: To increase the variability of the structure and simplify the design, the selected 8-bit S-box is used to replace the round function of the traditional Lai-Massey structure. The 3-round structure uses three 8-bit S-boxes, which are labeled as: S0, S1, and S2. These three S-boxes are taken from the 8-bit S-box sample set constructed by affine equivalence in step (1). Let the output of the round function, that is, the output of each S-box, be expressed as: S i (x),0≤i≤2,x∈F2 8 ;

[0029] (3.5) Diffusion based on NFSR structure: The constructed NFSR1 and NFSR2 are placed at the output of the left and right branches of each round of Lai-Massey structure. The calculation results of NFSR1 and NFSR2 in the first round of the structure are represented by A1 and B1, respectively, and the results in the second round of the structure are represented by A2 and B2, respectively;

[0030] (3.6) Output of the overall structure: Based on the LM-NFSR structure and calculation method, the final output expression of the new structure is:

[0031] In the 16-bit S-box construction method of the present invention, the traversal search of the 16-bit S-box in step (4) is specifically performed as follows:

[0032] (4.1) Initialization: Set the sample set of 8-bit S-boxes to SBox8, and put the 8-bit S-box constructed based on the affine equivalent of the AES algorithm S-box into the sample set SBox8; set the 16-bit S-box array Array with a length of 65536 to be empty; the initial inputs of the left and right branches are L, R∈F2 respectively. 8 , take the first value in lexicographic order respectively;

[0033] (4.2) According to the full traversal method, select three S-boxes from the S-box sample set SBox8 as S0, S1, and S2 in the new structure respectively;

[0034] (4.3) Substitute L and R into the formula S LMN (L, R) calculation, concatenate the first bit of the output L' and R' bit strings of the last left and right branches, convert them into decimal integers and store them in Array in sequence;

[0035] (4.4) If R is in F2 8 If the traversal is not completed in the domain, R is set in F2 8 Traverse the next value in the domain in lexicographic order and go to (4.3); after traversal is completed, go to (4.5);

[0036] (4.5) If L is in F2 8If the traversal is not completed in the domain, L is set in F2 8 Traverse the next value in the domain in lexicographic order and place R in F2 8 Take the first value in the domain in lexicographic order and go to (4.3); when the traversal is complete, the traversal ends and go to (4.6);

[0037] (4.6) Obtain an array of 65536 integer data elements, that is, a 16-bit S-box array Array, and write the S-box from the program to the TXT file on the disk through character stream operations;

[0038] (4.7) If the traversal of the 8-bit S-box sample set SBox8 is not completed, continue to traverse to obtain the next set of 3 S-boxes, substitute S0, S1, and S2, and set the left and right branch inputs L and R to take F2 respectively 8 The first value in the domain, go to (4.2); after traversal is complete, go to (4.8);

[0039] (4.8) End the S-box search.

[0040] In the 16-bit S-box construction method of the present invention, the S-box screening described in step (5) is to screen out S-boxes with higher security from the constructed 16-bit cryptographic S-box results. Here, the nonlinearity, differential uniformity, algebraic degree, bijectivity and signal-to-noise ratio of the S-box are tested. According to the test results, a 16-bit S-box with excellent cryptographic properties is selected through compromise.

[0041] The beneficial effects of the present invention are:

[0042] (1) The method of the present invention is based on the LM-NFSR structure, and uses the 8-bit S-box as the round function in the Lai-Massey structure, which enhances the variability of the structure, simplifies the structural design, and is easy to implement;

[0043] (2) The method of the present invention can construct a 16-bit S-box with better cryptographic properties, providing S-box support with high security for block cipher algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 Flowchart for constructing a 16-bit S-box for an embodiment;

[0045] Figure 2 A block diagram of the NFSR1 assembly is constructed for the embodiment;

[0046] Figure 3 A block diagram of the NFSR2 components is constructed for the embodiment;

[0047] Figure 4 The LM-NFSR combined structure of the embodiment;

[0048] Figure 5 A flow chart of a 16-bit S-box is constructed for an embodiment. DETAILED DESCRIPTION

[0049] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention is not limited thereto.

[0050] Example

[0051] The 16-bit S-box construction method based on the LM-NFSR structure is referenced Figure 1 , including the following steps:

[0052] (1) Select an AES algorithm 8-bit S-box as an affine equivalent sample. The nonlinearity of the S-box is 112, the differential uniformity is 4, and the algebraic degree is 7;

[0053] Using affine equivalence, we construct an 8-bit S-box sample set SBox8. The affine equivalence formula is: Among them, SBox AES is the AES algorithm S-box; M, N are n-order reversible matrices, M, N∈GL(n,F2), m, n are n-bit constants, m, n∈F2 n .

[0054] Example 16: Method for constructing a bit S-box, refer to Figure 1 , step (2) constructs two 8-level NFSR components that meet strict avalanche characteristics, marked as NFSR1 and NFSR2, respectively, referring to Figure 2 , Figure 3 As shown, the specific steps are as follows:

[0055] (2.1) After a certain number of iterations, the sequence of NFSR1 and NFSR2 components has a diffusion characteristic. Each 8-level NFSR has 8 state registers, with R i (0≤i≤7) represents the state of a bit before the register iteration, represented by R i '(0≤i≤7) represents the bit status of the register after iteration. In the iterative update, 4 bits to be updated are selected, namely the 1st, 3rd, 5th and 7th bits, that is, the above 4 bits are updated in each iteration of NFSR, and other positions directly receive the cyclic shifted data; the iteration number of NFSR1 and NFSR2 is set to 10 and 23 respectively. Under this iteration number, the two NFSRs can meet the strict avalanche characteristics;

[0056] (2.2) For NFSR1, set the update function expression as:

[0057] (2.3) For NFSR2, set the update function expression as:

[0058] Example 16: Method for constructing a bit S-box, refer to Figure 1 , step (3) constructs a 16-bit S-box structure based on LM-NFSR, referring to Figure 4 , the specific steps are as follows:

[0059] (3.1) Using three 8-bit S-boxes as round functions simplifies the design of the round function, providing strong nonlinear support for the structure, and using the NFSR structure constructed in two steps (2) as a component to enhance the diffusion effect;

[0060] (3.2) Determine the number of rounds of the combined structure: The Lai-Massey structure can achieve a certain degree of security in 3 rounds, so the number of iterative rounds of the new structure is set to 3;

[0061] (3.3) Determine input / output: This structure is a balanced structure with two branches, so the input / output of the left branch and the right branch are both 8 bits. The initial input of the left and right branches are defined as: L, R∈F2 8 , the final outputs of the left and right branches are defined as: L', R'∈F2 8 ;

[0062] (3.4) Replacing the round function with an 8-bit S-box: To increase the variability of the structure and simplify the design, the selected 8-bit S-box is used to replace the round function of the traditional Lai-Massey structure. The 3-round structure uses three 8-bit S-boxes, which are labeled as: S0, S1, and S2. These three S-boxes are taken from the 8-bit S-box sample set constructed by affine equivalence in step (1). Let the output of the round function, that is, the output of each S-box, be expressed as: S i (x),0≤i≤2,x∈F2 8 ;

[0063] (3.5) Diffusion based on NFSR structure: The constructed NFSR1 and NFSR2 are placed at the output of the left and right branches of each round of Lai-Massey structure. The calculation results of NFSR1 and NFSR2 in the first round of the structure are represented by A1 and B1, respectively, and the results in the second round of the structure are represented by A2 and B2, respectively;

[0064] (3.6) Output of the overall structure: Based on the LM-NFSR structure and calculation method, the final output expression of the new structure is:

[0065] Example 16: Method for constructing a bit S-box, refer to Figure 1 , step (4) traverses and searches for 16-bit S-boxes, refer to Figure 5 , the specific steps are as follows:

[0066] (4.1) Initialization: Set the sample set of 8-bit S-boxes to SBox8, and put the 8-bit S-box constructed based on the affine equivalent of the AES algorithm S-box into the sample set SBox8; set the 16-bit S-box array Array with a length of 65536 to be empty; the initial inputs of the left and right branches are L, R∈F2 respectively. 8 , take the first value in lexicographic order respectively;

[0067] (4.2) According to the full traversal method, select three S-boxes from the S-box sample set SBox8 as S0, S1, and S2 in the new structure respectively;

[0068] (4.3) Substitute L and R into the formula S LMN (L, R) calculation, concatenate the first bit of the output L' and R' bit strings of the last left and right branches, convert them into decimal integers and store them in Array in sequence;

[0069] (4.4) If R is in F2 8 If the traversal is not completed in the domain, R is set in F2 8 Traverse the next value in the domain in lexicographic order and go to (4.3); after traversal is completed, go to (4.5);

[0070] (4.5) If L is in F2 8 If the traversal is not completed in the domain, L is set in F2 8 Traverse the next value in the domain in lexicographic order and place R in F2 8 Take the first value in the domain in lexicographic order and go to (4.3); when the traversal is complete, the traversal ends and go to (4.6);

[0071] (4.6) Obtain an array of 65536 integer data elements, that is, a 16-bit S-box array Array, and write the S-box from the program to the TXT file on the disk through character stream operations;

[0072] (4.7) If the traversal of the 8-bit S-box sample set SBox8 is not completed, continue to traverse to obtain the next set of 3 S-boxes, substitute S0, S1, and S2, and set the left and right branch inputs L and R to take F2 respectively 8 The first value in the domain, go to (4.2); after traversal is complete, go to (4.8);

[0073] (4.8) End the S-box search.

[0074] Example 16: Method for constructing a bit S-box, refer to Figure 1Step (5) is S-box screening, specifically, screening out S-boxes with higher security from the constructed 16-bit cryptographic S-box results. Here, the nonlinearity, differential uniformity, algebraic degree, bijectivity and signal-to-noise ratio of the S-box are tested. Based on the test results, a 16-bit S-box with excellent cryptographic properties is selected through compromise.

[0075] In the test of the embodiment, 256 S-boxes were selected from a batch of S-boxes for testing. The test results show that the constructed 16-bit S-boxes all satisfy the bijectivity, and the algebraic order is 15; the lower bound of the differential uniformity is 18, the upper bound is 22, and most of them are 18; the highest nonlinearity is 31992; the lower bound of the signal-to-noise ratio is 146.712, and the upper bound is 148.937.

[0076] The examples show that the method of the present invention can be used to construct a 16-bit S-box with strong cryptographic properties, providing secure nonlinear transformation support for block cipher algorithms.

Claims

1. A 16-bit S-box construction method based on LM-NFSR structure, characterized in that: The method comprises the following steps: (1) Construct an 8-bit S-box sample set; Using affine equivalence, the AES algorithm S-box is selected as a sample to construct a sample set; (2) construct NFSR components that meet strict avalanche characteristics; Using 8-stage nonlinear feedback shift registers, two NFSR components with strict avalanche characteristics are constructed to provide full diffusion support for the constructed 16-bit S-box. (3) Construct a 16-bit S-box structure based on LM-NFSR; The constructed NFSR component is combined with the Lai-Massey structure, and based on the constructed 8-bit cipher S-box sample set, multiple rounds of iterations are performed to calculate and output, and a 16-bit cipher S-box is constructed. The specific steps are as follows: (3.1) A 16-bit S-box is constructed based on the Lai-Massey structure, three 8-bit S-boxes are used as round functions, and the NFSR structure constructed in two steps (2) is used as a component to enhance diffusion; (3.2) Determine the number of rounds of the combined structure: The Lai-Massey structure can achieve a certain degree of security in 3 rounds, so the number of iterative rounds of the new structure is set to 3; (3.3) Determine input / output: The Lai-Massey structure is a balanced structure with two branches, so the input / output of the left branch and the right branch are both 8 bits. The initial inputs of the left and right branches are defined as: The final outputs of the left and right branches are defined as: (3.4) Replacing the round function with an 8-bit S-box: The selected 8-bit S-box is used to replace the round function of the traditional Lai-Massey structure. The 3-round structure uses three 8-bit S-boxes, which are labeled as S0, S1, and S2. These three S-boxes are taken from the 8-bit S-box sample set constructed by affine equivalence in step (1). Let the output of the round function, i.e., the output of each S-box, be expressed as: (3.5) Diffusion based on NFSR structure: The constructed NFSR1 and NFSR2 are placed at the output of the left and right branches of each round of Lai-Massey structure. The calculation results of NFSR1 and NFSR2 in the first round of the structure are represented by A1 and B1, respectively, and the results in the second round of the structure are represented by A2 and B2, respectively; (3.6) Output of the overall structure: Based on the LM-NFSR structure and calculation method, the final output expression of the new structure is: (4) Traverse and search the 16-bit S-box; Based on the new structure, a large number of 16-bit S-boxes are constructed by fully traversing the 8-bit S-box sample set and the left and right branches on the 8-bit binary domain; (5) S-box screening; The constructed 16-bit S-boxes are tested to select the 16-bit cryptographic S-boxes with better cryptographic properties.

2. The 16-bit S-box construction method according to claim 1, characterized in that: The specific steps of constructing an 8-bit S-box sample set in step (1) are as follows: (1.1) Select an 8-bit S-box sample: Select an AES algorithm 8-bit S-box as an affine equivalent sample. The nonlinearity of the S-box is 112, the differential uniformity is 4, and the algebraic degree is 7; (1.2) Based on the selected 8-bit S-box, the S-box sample set is constructed using affine equivalence. The affine equivalence formula is: Among them, SBox AES is the AES algorithm S-box; M, N are n-order reversible matrices, M, N∈GL(n,F2), m, n are bit constants, 3. The 16-bit S-box construction method according to claim 1, characterized in that: Step (2) of constructing a NFSR component that meets strict avalanche characteristics comprises the following specific steps: (2.1) Construct two 8-level NFSR components that meet strict avalanche characteristics, marked as NFSR1 and NFSR2. After a certain number of iterations, their sequence has a diffusion characteristic. Each 8-level NFSR has 8 state registers, with R i Indicates the state of a bit before register iteration, with R i ' represents the bit status of the register after iteration, 0≤i≤7. In the iterative update, 4 bits to be updated are selected, namely the 1st, 3rd, 5th and 7th bits, that is, the NFSR updates the above 4 bits in one beat per iteration, and other positions directly receive the cyclic shifted data; the number of iterations of NFSR1 and NFSR2 is set to 10 and 23 respectively. Under this number of iterations, the two NFSRs can meet the strict avalanche characteristics; (2.2) For NFSR1, set the update function expression as: (2.3) For NFSR2, set the update function expression as:

4. The 16-bit S-box construction method according to claim 3, characterized in that: Step (4) of traversing and searching the 16-bit S-box includes the following specific steps: (4.1) Initialization: Set the sample set of 8-bit S-boxes to SBox8, and put the 8-bit S-box constructed based on the affine equivalent of the AES algorithm S-box into the sample set SBox8; Set the 16-bit S-box array Array of length 65536 to be empty; the initial inputs of the left and right branches are Take the first value in lexicographic order respectively; (4.2) According to the full traversal method, select three S-boxes from the S-box sample set SBox8 as S0, S1, and S2 in the new structure respectively; (4.3) Substitute L and R into the formula S LMN (L, R) calculation, concatenate the first bit of the output L' and R' bit strings of the last left and right branches, convert them into decimal integers and store them in Array in sequence; (4.4) If R is If the traversal is not completed in the domain, R Traverse the next value in the domain in lexicographic order and go to (4.3); after traversal is completed, go to (4.5); (4.5) If L is If the traversal is not completed in the domain, then L The next value in the domain is traversed in lexicographic order, and R is Take the first value in the domain in lexicographic order and go to (4.3); when the traversal is complete, the traversal ends and go to (4.6); (4.6) Obtain an array of 65536 integer data elements, that is, a 16-bit S-box array Array, and write the S-box from the program to the TXT file on the disk through character stream operations; (4.7) If the traversal of the 8-bit S-box sample set SBox8 is not completed, continue to traverse to obtain the next set of 3 S-boxes, substitute S0, S1, and S2, and set the left and right branch inputs L and R to take The first value in the domain, go to (4.2); Traversal completed transfer (4.8); (4.8) End the S-box search.