A dynamic permutation s-box and a generating method thereof

By generating dynamic permutation S-boxes with specific cryptographic properties, the problem that dynamic permutation of S-boxes in existing technologies cannot maintain the original properties is solved, thereby improving the security and dynamism of cryptographic algorithms and making them suitable for the design and analysis of symmetric cryptographic algorithms.

CN117478318BActive Publication Date: 2026-11-27WUHAN SHIP COMM RES INST (NO 722 RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311422603.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2026-11-27
Estimated Expiration
2043-10-27

AI Technical Summary

Technical Problem

In existing technologies, the dynamic permutation method of S-box cannot maintain the original cryptographic properties, which affects the security of cryptographic algorithms.

Method used

A dynamic permutation S-box generation method is adopted, which uses 2k sets of mutually independent basic permutation S-boxes and control modules, combined with a linear transformation module, to generate dynamic permutation S-boxes with specific cryptographic properties.

Benefits of technology

The generated dynamic permutation S-box enhances the security and dynamism of cryptographic algorithms while maintaining cryptographic properties. It is applicable to symmetric cryptographic functions, algorithm design and analysis, and strengthens the security of block and stream cipher algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117478318B_ABST
    Figure CN117478318B_ABST
Patent Text Reader

Abstract

The application provides a dynamic permutation S-box and a generating method thereof. The dynamic permutation S-box is an n-bit permutation, and at least comprises 2k groups of independent basic permutation S-boxes, each group of the basic permutation S-boxes at least comprises two b-bit permutation S-boxes; and a control module comprises 2k control data, which are one-to-one corresponding to the 2k groups of the basic permutation S-boxes, and the control data are used for calling one b-bit permutation S-box from one group of the basic permutation S-boxes. The dynamic permutation S-box and the generating method thereof are based on the control selection method of the dynamic control data, a dynamic large-scale permutation S-box is generated from a small-scale basic permutation S-box, and a series of permutation S-boxes generated have the same key cryptographic properties, so that the dynamic nonlinear components are provided for symmetric cryptographic algorithms such as a block cipher algorithm, a sequence cipher algorithm and a hash cipher algorithm, and the security of the cryptographic algorithm can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication encryption technology, specifically to a dynamic permutation S-box and its generation method. Background Technology

[0002] Cryptographic algorithms are the cornerstone of cyberspace security. In cryptographic algorithms, the S-box is the basic structure for performing permutation calculations in symmetric cryptographic algorithms. As the only non-linear component in symmetric cryptographic algorithms, the quality of the S-box directly affects the overall security of the cryptographic algorithm and plays an important role in ensuring the security of cryptographic algorithms.

[0003] Currently, the main method for generating S-boxes is static permutation, which uses the same S-box to process multiple different data. In other words, the S-box remains unchanged throughout the cryptographic algorithm. However, this static permutation approach is vulnerable to attacks. Some methods also employ dynamic permutation, using different S-boxes to process multiple different data, thereby improving the dynamism and security of the cryptographic algorithm.

[0004] However, this dynamic permutation is achieved by designing certain rules, such as swapping positions, which makes it impossible for the transformed S-box to maintain the original cryptographic properties. Summary of the Invention

[0005] This invention provides a dynamic permutation S-box and its generation method to solve the problem that the transformed S-box cannot maintain the original cryptographic properties in the prior art.

[0006] On one hand, the present invention provides a dynamic permutation S-box, wherein the dynamic permutation S-box is an n-bit permutation, comprising at least:

[0007] 2k sets of mutually independent basic permutation S-boxes, each set of basic permutation S-boxes including at least two b-bit permutation S-boxes;

[0008] The control module includes 2k control data, which correspond one-to-one with 2k sets of the basic permutation S-boxes. The control data is used to arbitrarily call one of the b-bit permutation S-boxes from a set of the basic permutation S-boxes.

[0009] Where n = k × b, k = 2 t t is a positive integer.

[0010] Furthermore,

[0011] The 2k sets of mutually independent basic permutation S-boxes include k sets of first-layer basic permutation S-boxes and k sets of second-layer basic permutation S-boxes;

[0012] In this group, a set of first-layer basic replacement S-boxes corresponds to a set of second-layer basic replacement S-boxes.

[0013] Furthermore, the dynamically displaced S-box also includes:

[0014] The linear transformation module is used to convert the output b-bit data of the first layer permutation S-box into the input b-bit data of the second layer permutation S-box.

[0015] Furthermore,

[0016] Each of the b-bit permutation S-boxes possesses the first property;

[0017] One b-bit permutation S-box is arbitrarily called from each group of the basic permutation S-boxes to obtain 2k b-bit permutation S-boxes; any dynamic permutation S-box generated based on the arbitrarily obtained 2k b-bit permutation S-boxes has the second property.

[0018] Furthermore, the first and second properties are set based on the input and output bits;

[0019] The first property includes one or more of differential probability, linear probability, and algebraic immune order; the second property includes one or more of differential probability, linear probability, and algebraic immune order.

[0020] On the other hand, the present invention also provides a method for generating a dynamically permuted S-box, wherein the dynamically permuted S-box is an n-bit permutation, and the generation method includes at least:

[0021] Generate 2k sets of mutually independent basic permutation S-boxes, each set of basic permutation S-boxes including at least two b-bit permutation S-boxes;

[0022] A control module is set up, which includes 2k control data, each corresponding to one of the 2k groups of the basic permutation S-boxes; the control data is used to arbitrarily call one of the b-bit permutation S-boxes from a group of the basic permutation S-boxes.

[0023] A dynamic permutation S-box is generated based on the basic permutation S-box and the control data;

[0024] Where n = k × b, k = 2 t t is a positive integer.

[0025] Furthermore, the generation method further includes: dividing the generated 2k sets of mutually independent basic permutation S-boxes into k sets of first-layer basic permutation S-boxes and k sets of second-layer basic permutation S-boxes;

[0026] In this group, a set of first-layer basic replacement S-boxes corresponds to a set of second-layer basic replacement S-boxes.

[0027] Furthermore, the generation method also includes:

[0028] A linear transformation module is provided to convert the output b-bit data of the first layer permutation S-box into the input b-bit data of the second layer permutation S-box.

[0029] Furthermore, generating 2k mutually independent basic permutation S-boxes requires satisfying the following:

[0030] Each of the b-bit permutation S-boxes possesses the first property;

[0031] One b-bit permutation S-box is arbitrarily called from each group of the basic permutation S-boxes to obtain 2k b-bit permutation S-boxes; any dynamic permutation S-box generated based on the arbitrarily obtained 2k b-bit permutation S-boxes has the second property.

[0032] Furthermore, the method for generating 2k mutually independent basic permutation S-boxes includes:

[0033] In each group of the basic permutation S-boxes, only one independent b-bit permutation S-box is generated, resulting in 2k b-bit permutation S-boxes.

[0034] Determine whether all b-bit permutation S-boxes satisfy the first property in turn; if not, generate 2k new b-bit permutation S-boxes; if they satisfy, determine whether the dynamic permutation S-box generated based on the 2k b-bit permutation S-boxes satisfies the second property; if not, generate 2k new b-bit permutation S-boxes.

[0035] If satisfied, add a b-bit permutation S-box and determine whether all current b-bit permutation S-boxes satisfy the first property; if not satisfied, regenerate the current b-bit permutation S-box; if satisfied, merge the current b-bit permutation S-box into the first group of basic permutation S-boxes, and determine whether any dynamic permutation S-box generated based on the current b-bit permutation S-box and the b-bit permutation S-boxes called by other groups except the first group satisfies the second property; if not satisfied, regenerate the current b-bit permutation S-box.

[0036] If the condition is met, then add another b-bit permutation S-box, and so on, until 2k sets of mutually independent basic permutation S-boxes are generated.

[0037] In general, the technical solution conceived by this invention can achieve the following beneficial effects compared with the prior art:

[0038] This invention provides a dynamic permutation S-box and its generation method. Based on a dynamic control data selection method, a dynamic large-scale permutation S-box is generated from a small-scale basic permutation S-box, and the series of permutation S-boxes generated have the same key cryptographic properties.

[0039] The dynamic permutation S-box of this invention can be used for the construction of symmetric cryptographic functions, the design and analysis of symmetric cryptographic algorithms, and provides a secure dynamic nonlinear component for symmetric cryptographic algorithms such as block ciphers, stream ciphers, and hash ciphers, thereby further improving the security of cryptographic algorithms. In addition, the generation process of the dynamic permutation S-box of this invention is simple, and the properties of the generated dynamic permutation S-box are controllable, making it easy to implement in both hardware and software. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0041] Figure 1 This is a schematic diagram of the structure of an existing permutation S-box, which is a dynamic permutation S-box and its generation method provided by the present invention.

[0042] Figure 2 This is a schematic diagram of the structure of a dynamically permuted S-box and its generation method provided by the present invention.

[0043] Figure 3 This is a schematic diagram of the process for generating 2k sets of basic permutation S-boxes using a dynamic permutation S-box and its generation method provided by the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the appendices of this invention will be described below. Figures 1-3 The technical solutions of the present invention are clearly and completely described below, including embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Furthermore, the technical features involved in the various embodiments described below can be combined with each other as long as they do not conflict with each other.

[0045] It should be noted that, in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, or product that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, or product. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, or product that includes said element.

[0046] The structure of a typical target permutation S-box in the prior art is as follows: Figure 1As shown, it includes 2k independent basic permutation S-boxes and linear transformation modules (the linear transformation modules are MDS transformations). If the target permutation S-box is an n-bit permutation and the basic permutation S-box is a b-bit permutation, then n is a power of 2 of b, that is, n = k × b, k = 2. t t is a positive integer.

[0047] like Figure 1 As shown, the target permutation S-box is a target permutation S-box with both input and output being n bits in the prior art.

[0048] For any 2k b-bit permutation S-boxes S(0), S(1), ..., S(i), ..., S(2k-1) and linear transformation M, a unique target permutation S-box with n-bit input and n-bit output can be determined.

[0049] Specifically, the specific operation rules are as follows: Divide the input n-bit data into k first b-bit data. Then, sequentially check each b-bit S-box S(i) of the first layer, where i is a positive integer, i = 0, ..., k-1. Input the k first b-bit data into the k b-bit S-boxes S(i) of the first layer, i.e., into S(0), S(1), ..., S(k-1), to obtain k second b-bit data. Then, each second b-bit data is processed by the linear transformation module M to obtain k third b-bit data. Next, sequentially check each b-bit S-box S(i) of the second layer, where i is a positive integer, i = 0, ..., k-1. Input the k third b-bit data into the k b-bit S-boxes S(i) of the second layer, i.e., into S(k), S(1), ..., S(2k-1), to obtain k fourth b-bit data. Finally, concatenate the k fourth b-bit data to output n bits.

[0050] However, the n-bit permutation S-box output in this way is static and cannot be dynamically changed. Therefore, this invention provides a dynamically permuted S-box and a method for generating it.

[0051] On one hand, the present invention provides a dynamic permutation S-box, which is an n-bit permutation and includes at least:

[0052] There are 2k independent sets of basic permutation S-boxes, each set containing at least two b-bit permutation S-boxes; a control module, comprising 2k control data points, each corresponding one-to-one with one of the 2k sets of basic permutation S-boxes. These control data points are used to arbitrarily call one b-bit permutation S-box from a set of basic permutation S-boxes; where n = k × b, k = 2. t t is a positive integer.

[0053] That is to say, such as Figure 2As shown, each small-scale b-bit permutation S-box at the S operation position is designed as multiple small-scale b-bit permutation S-boxes; then, 2k control data are introduced to call the small-scale b-bit permutation S-boxes at the 2k positions, thus constructing a system where dynamic control data C calls mutually independent 2 2mk The b-bit permutation of the S-box.

[0054] It should be noted that the number of b-bit permutations S-boxes in each group can be the same or different, mainly based on the control data C. i Call the b-bit permutation S-box in the basic permutation S-box. More specifically, if the basic permutation S-box includes 2... m If b bits are used to replace the S-box, then the control data C in the control module will be... i The number of bits is m bits, which means m bits of control data control 2. m The S-box is permuted by a bit.

[0055] For example, if the basic permutation S-box includes two b-bit permutation S-boxes S(0,0) and S(0,1), then the control data C i Each bit is 1, i.e., 0 or 1, where i = 0, ..., k-1, and k is a positive integer. For the first set of basic permutation S-boxes, i.e., k = 1, then i = 0. When C0 = 0, the target b-bit S-box S(0,0) in the first set of basic permutation S-boxes is called; when C0 = 1, the target b-bit S-box S(0,1) in the first set of basic permutation S-boxes is called. This is how to dynamically call the b-bit permutation S-box to complete the permutation.

[0056] Furthermore, there are 2k independent sets of basic permutation S-boxes, including k sets of first-layer basic permutation S-boxes and k sets of second-layer basic permutation S-boxes; wherein, one set of first-layer basic permutation S-boxes corresponds to one set of second-layer basic permutation S-boxes. The dynamic permutation S-box also includes a linear transformation module, used to convert the output b-bit data of the first-layer permutation S-box into the input b-bit data of the second-layer permutation S-box.

[0057] As an embodiment of the present invention, such as Figure 2 As shown, a dynamic permutation S-box with n-bit input and n-bit output is controlled by 2k control data. Each set of basic permutation S-boxes includes two b-bit permutation S-boxes.

[0058] Specifically, its operation rule is as follows: Set the control module C = (C0, C1, ..., C... k-1 C k C k+1 C 2k-1 The input n-bit data is divided into k first b-bit data.

[0059] Based on the control module, the b-bit S-boxes S(i, C) in each group of basic permutation S-boxes of the first layer are called sequentially. i ), where i = 0, ..., k-1, and k is a positive integer. For example, when C i When C = 0, call the target b-bit S-box S(i, 0) in the i-th group of basic permutation S-boxes; when C i When = 1, the target b-bit S-box S(i, 1) in the i-th group of basic permutation S-boxes is called; and so on, based on the control module C, a target b-bit S-box is arbitrarily called from each group of basic permutation S-boxes to obtain k target b-bit S-boxes; as a specific embodiment of the present invention, the k target b-bit S-boxes are S(0,0), S(1,0), S(2,0), ..., S(k-1,0). The k first b-bit data are sequentially input into the k target b-bit S-boxes of the first layer to obtain the k second b-bit data.

[0060] Then, the second b-bit data is processed by a linear transformation M to obtain k third b-bit data; based on the control module, the b-bit S-boxes S(i, C) in each group of basic permutation S-boxes of the second layer are called sequentially. i The method used is the same as that used for the first layer's b-bit S-boxes. Then, k third b-bit data are sequentially input into the k target b-bit S-boxes of the second layer to obtain k fourth b-bit data. Finally, the k fourth b-bit data are concatenated sequentially to output an n-bit number.

[0061] Since the constructed n-bit dynamic permutation S-box generally has corresponding cryptographic property requirements, such as differential probability, linear probability, and algebraic immune order, for example, the differential probability is no greater than p1, the linear probability is no greater than p2, and the algebraic immune order is no less than d, etc.

[0062] However, the n-bit permutation S-box generated by arbitrarily selected b-bit minimalist component S-box may not satisfy the required cryptographic properties, so it is necessary to further design the selection of b-bit minimalist component S-box.

[0063] Therefore, further, for any chosen b-bit permutation S-box, the following must be satisfied: each b-bit permutation S-box possesses the first property. For the dynamic permutation S-box generated based on the arbitrarily chosen b-bit permutation S-box, the following must be satisfied: one b-bit permutation S-box is arbitrarily called from each group of basic permutation S-boxes to obtain 2k b-bit permutation S-boxes; any dynamic permutation S-box generated based on the arbitrarily obtained 2k b-bit permutation S-boxes possesses the second property.

[0064] It should be noted that the first and second properties are set based on the input and output bits; the first property includes one or more of differential probability, linear probability, and algebraic immune order; the second property includes one or more of differential probability, linear probability, and algebraic immune order.

[0065] For example, when b=4, the first property A1 can be set as the difference probability being no greater than 2. -2 The linear probability is no greater than 2. -2 The algebraic immune order is 2; when n=8, the second property A2 can be set to a difference probability of no more than 2. -4 The linear probability is no greater than 2. -4 The algebraic immune order is 3.

[0066] On the other hand, the present invention also provides a method for generating a dynamically permuted S-box, wherein the dynamically permuted S-box is an n-bit permutation, and the generation method includes at least the following:

[0067] Generate 2k sets of independent basic permutation S-boxes, each set containing at least two b-bit permutation S-boxes; set up a control module, which includes 2k control data points, each corresponding one-to-one with one of the 2k sets of basic permutation S-boxes; the control data are used to arbitrarily call one b-bit permutation S-box from a set of basic permutation S-boxes; generate dynamic permutation S-boxes based on the basic permutation S-boxes and the control data; where n = k × b, k = 2. t t is a positive integer.

[0068] Furthermore, the generation method also includes: dividing the generated 2k sets of mutually independent basic permutation S-boxes into k sets of first-layer basic permutation S-boxes and k sets of second-layer basic permutation S-boxes; wherein, a set of first-layer basic permutation S-boxes corresponds to a set of second-layer basic permutation S-boxes.

[0069] Furthermore, the generation method also includes setting a linear transformation module to convert the output b-bit data of the first-layer permutation S-box into the input b-bit data of the second-layer permutation S-box.

[0070] Since there are generally corresponding cryptographic property requirements for the constructed n-bit dynamic permutation S-box, generating 2k sets of mutually independent basic permutation S-boxes must satisfy the following: each b-bit permutation S-box possesses the first property; one b-bit permutation S-box is arbitrarily selected from each set of basic permutation S-boxes to obtain 2k b-bit permutation S-boxes; and any dynamic permutation S-box generated based on the arbitrarily obtained 2k b-bit permutation S-boxes possesses the second property.

[0071] More specifically, methods for generating 2k sets of independent basic permutation S-boxes include:

[0072] In each group of basic permutation S-boxes, only one independent b-bit permutation S-box is generated, resulting in 2k b-bit permutation S-boxes.

[0073] Determine whether all b-bit permutation S-boxes satisfy the first property in turn; if not, generate 2k new b-bit permutation S-boxes; if they satisfy, determine whether the dynamic permutation S-box generated based on the 2k b-bit permutation S-boxes satisfies the second property; if not, generate 2k new b-bit permutation S-boxes.

[0074] If satisfied, add a b-bit permutation S-box and determine whether all current b-bit permutation S-boxes satisfy the first property; if not satisfied, regenerate the current b-bit permutation S-box; if satisfied, merge the current b-bit permutation S-box into the first group of basic permutation S-boxes, and determine whether any dynamic permutation S-box generated based on the current b-bit permutation S-box and the b-bit permutation S-boxes called by other groups except the first group satisfies the second property; if not satisfied, regenerate the current b-bit permutation S-box.

[0075] If the condition is met, then add another b-bit permutation S-box, and so on, until 2k sets of mutually independent basic permutation S-boxes are generated.

[0076] In one embodiment of the present invention, an MDS matrix M is first selected, and 2k b-bit permutation S-boxes are randomly generated. It is then determined whether these b-bit permutation S-boxes satisfy the first property. If not, they are regenerated. If they satisfy the property, another b-bit permutation S-box is generated sequentially at each corresponding position. During generation, it is first determined whether the b-bit permutation S-box satisfies the first property, and then it is determined whether all newly generated dynamic permutation S-boxes corresponding to that b-bit permutation S-box satisfy the second property. After all b-bit permutation S-boxes at all positions have been generated, a series of dynamic permutation S-boxes satisfying the second property can be obtained.

[0077] In fact, the number of random searches required increases as the random generation process progresses, and in some cases, the search may even fail. Therefore, it is necessary to design a maximum number of random searches. That is, when the maximum number of random searches is reached, the search is restarted to improve the search efficiency of b-bit small-scale permutation S-box.

[0078] This allows the generation of multiple dynamic permutation S-boxes with identical key cryptographic properties, selected by dynamic control data. These dynamic permutation S-boxes can be used for the construction of symmetric cryptographic functions and the design and analysis of symmetric cryptographic algorithms, further enhancing the security of cryptographic algorithms.

[0079] As a specific embodiment of the present invention, let the dynamic permutation S-box be an n-bit permutation and the basic permutation S-box be a b-bit permutation. Then n is a power of 2 multiple of b, that is, n = k × b, k = 2. tLet t be a positive integer. A b-bit permutation of the S-box must satisfy the first property A1, and a dynamic permutation of the S-box must satisfy the second property A2. The dynamic control data C is m bits, and the resulting dynamic change in the dynamically permuted S-box is 2. m One, such as Figure 3 The diagram shows a flowchart for generating 2k sets of basic permutation S-boxes.

[0080] First, set the number of input and output bits of the dynamic permutation S-box to n, the number of basic permutation S-boxes to b bits, and each group of basic permutation S-boxes to include two b-bit permutation S-boxes; calculate k = n / b; select a linear transformation M over a finite field that satisfies the number of branches k+1; and set the maximum number of random searches T.

[0081] Then, 2k b-bit permutation S-boxes S(0,0), S(1,0), ..., S(2k-1,0) are randomly generated. It is determined whether S(0,0), S(1,0), ..., S(2k-1,0) all satisfy the preset first property A1. If they do not satisfy, they are regenerated. If they satisfy, it is determined whether the n-bit permutation S-boxes generated based on S(0,0), S(1,0), ..., S(2k-1,0) satisfy the preset second property A2. If they do not satisfy, 2k b-bit permutation S-boxes S(0,0), S(1,0), ..., S(2k-1,0) are regenerated.

[0082] Next, a b-bit permutation S-box S(0,1) is randomly generated, and it is determined whether S(0,1) satisfies the preset first property A1. If not, S(0,1) is regenerated. If it is satisfied, it is determined whether the n-bit permutation S-box generated based on S(0,1), S(1,0), ..., S(2k-1,0) satisfies the preset second property A2. If not, S(0,1) is regenerated.

[0083] Similarly, for a b-bit permutation S-box S(i, C) iIn the sequence ), i ranges from 1 to 2k-1. When the number of random searches is t = 0, for a randomly generated b-bit S-box S(i,1), determine whether S(i,1) satisfies the preset first property A1. If it does not satisfy A1, regenerate S(i,1); if it does satisfy A1, then sequentially determine the n-bit permutation S-boxes generated by S(0,0), S(1,0), ..., S(i,1), ..., S(2k-1,0), S(0,1), S(1,0), ..., S(i,1). The n-bit permutation S-box generated by S(2k-1,0), S(0,0), S(1,1), ..., S(i,1), ..., S(2k-1,0), S(0,1), S(1,1), ..., S(i,1), ..., S(2k-1,0), ..., S(0,1), S(1,1), ..., S(i,1), ..., S(2k-1,1), etc. i If all n-bit permutation S-boxes satisfy the preset second property A2, then regenerate S(i,1). If they satisfy, then let i = i + 1, until the output of 2k basic permutation S-boxes that satisfy all conditions are determined: S(0,0), S(0,1), S(1,0), S(1,1), ..., S(i,0), S(i,1), ..., S(2k-1,0), S(2k-1,1).

[0084] In summary, this invention provides a dynamic permutation S-box and its generation method. Based on a dynamic control data selection method, it generates a dynamic large-scale permutation S-box from a small-scale basic permutation S-box, and the resulting series of permutation S-boxes have the same key cryptographic properties. This can be used for the construction of symmetric cryptographic functions, the design and analysis of symmetric cryptographic algorithms, and provides a secure dynamic nonlinear component for symmetric cryptographic algorithms such as block ciphers, stream ciphers, and hash ciphers, further enhancing the security of cryptographic algorithms. Furthermore, the generation process of the dynamic permutation S-box of this invention is simple, and the properties of the generated dynamic permutation S-box are controllable, making it easy to implement in both hardware and software.

[0085] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0086] It should be understood that the embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0087] The technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0088] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0089] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

[0090] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above 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.

[0091] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for generating a dynamically permuted S-box, wherein the dynamically permuted S-box is an n-bit permutation, characterized in that, The generation method includes at least: Generate 2k sets of mutually independent basic permutation S-boxes, each set of basic permutation S-boxes including at least two b-bit permutation S-boxes; divide the generated 2k sets of mutually independent basic permutation S-boxes into k sets of first-level basic permutation S-boxes and k sets of second-level basic permutation S-boxes; wherein, one set of first-level basic permutation S-boxes corresponds to one set of second-level basic permutation S-boxes; A control module is set up, which includes 2k control data, each corresponding to one of the 2k groups of the basic permutation S-boxes; the control data is used to arbitrarily call one of the b-bit permutation S-boxes from a group of the basic permutation S-boxes. A dynamic permutation S-box is generated based on the basic permutation S-box and the control data; Where n = k × b, k = 2 t t is a positive integer; Methods for generating 2k independent basic permutation S-boxes include: In each group of the basic permutation S-boxes, only one independent b-bit permutation S-box is generated, resulting in 2k b-bit permutation S-boxes. Determine whether all b-bit permutation S-boxes satisfy the first property in turn; if not, generate 2k new b-bit permutation S-boxes; if they satisfy, determine whether the dynamic permutation S-box generated based on the 2k b-bit permutation S-boxes satisfies the second property; if not, generate 2k new b-bit permutation S-boxes. If satisfied, add a b-bit permutation S-box and determine whether all current b-bit permutation S-boxes satisfy the first property; if not satisfied, regenerate the current b-bit permutation S-box; if satisfied, merge the current b-bit permutation S-box into the first group of basic permutation S-boxes, and determine whether any dynamic permutation S-box generated based on the current b-bit permutation S-box and the b-bit permutation S-boxes called by other groups except the first group satisfies the second property; if not satisfied, regenerate the current b-bit permutation S-box. If the condition is met, then add another b-bit permutation S-box, and so on, until 2k sets of mutually independent basic permutation S-boxes are generated.

2. The method for generating a dynamic permutation S-box as described in claim 1, characterized in that, The generation method further includes: A linear transformation module is provided to convert the output b-bit data of the first-layer basic permutation S-box into the input b-bit data of the second-layer basic permutation S-box.

3. The dynamic displacement S-box as described in claim 1, characterized in that, The first property and the second property are set based on input and output bits; The first property includes one or more of differential probability, linear probability, and algebraic immune order; the second property includes one or more of differential probability, linear probability, and algebraic immune order.

Citation Information

Patent Citations

  • Generation method of dynamic S box based on chaos and irreducible polynomial

    CN116192356A

  • Methods and apparatus for keystream generation

    WO2001039417A2