Dynamic Latin square construction method, computer equipment and computer readable storage medium

By dynamically controlling parameters to select different Latin squares for transformation, the problem of storage space and security when the input scale is large is solved, and an efficient and safe Latin square construction is achieved under large input scales, which is suitable for high-security symmetry. cryptographic algorithms.

CN118869191AInactive Publication Date: 2024-10-29WUHAN SHIP COMM RES INST (NO 722 RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410892823.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has problems of excessive storage space and low security when processing Latin square transformations with large input scales.

Method used

Using the dynamic Latin square construction method, the eight 2n-order Latin squares are equally divided into two groups, and different Latin squares are selected for transformation according to the dynamic control parameters to achieve dynamic changes in the Latin square, reduce storage requirements and improve security.

Benefits of technology

It achieves the reduction of storage space and improvement of security when the input scale is large. It has excellent cryptographic properties such as high differential probability, linear probability and algebraic degree, and is suitable for the design of high-security symmetric cryptographic algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869191A_ABST
    Figure CN118869191A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of symmetric cryptographic algorithms, and discloses a dynamic Latin square construction method, computer equipment, a computer readable storage medium and a computer program product in order to solve the problems of overlarge storage space and low security of Latin square transformation with a relatively large input scale in the prior art. The method comprises the following steps: acquiring eight 2n-order Latin squares, and averagely dividing the eight 2n-order Latin squares into two groups; input variables are obtained and averagely divided into a first input variable, a second input variable, a third input variable and a fourth input variable, and the input variables are 4n bits; obtaining dynamic control parameters; respectively selecting a first target Latin party and a second target Latin party from the four Latin parties of the first group and the second group according to the values of the first dynamic control parameter and the second dynamic control parameter; and inputting any two of the first, second, third and fourth input variables to the first or second target Latin square to obtain an output variable which is a 2n bit number. By adopting the method, the dynamic change of the Latin party can be realized, and the method has the advantages of high safety and low conversion cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of symmetric cryptographic algorithms, and more specifically, to a dynamic Latin square construction method, a computer device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Latin square transformation is a commonly used component in symmetric cryptographic algorithm design, which plays a role in obfuscation and diffusion in cryptographic algorithms. However, on the one hand, when the input scale of Latin square transformation is large, the storage scale is large, which is not conducive to algorithm implementation; on the other hand, the cryptographic algorithm adopts fixed cryptographic component design and is prone to deterministic attacks.

[0003] Therefore, the existing Latin square transformation for large input size still has the defects of excessive storage space and low security. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a dynamic Latin square construction method, a computer device, a computer-readable storage medium and a computer program product, which can be applicable to situations where the input scale is large. The dynamic change of the Latin square can be achieved by changing the dynamic control parameters, and has the advantages of high security and low conversion cost.

[0005] To achieve the above object, according to a first aspect of the present invention, a dynamic Latin square construction method is provided, the method comprising:

[0006] Get 8 2 n Latin square of order, divide it into two groups equally, n≥4 and n is an integer;

[0007] Obtain an input variable, and divide it equally into a first input variable, a second input variable, a third input variable, and a fourth input variable, the input variable is 4n bits, and the first input variable, the second input variable, the third input variable, and the fourth input variable are all n bits;

[0008] Obtain a dynamic control parameter, and divide it equally into a first dynamic control parameter and a second dynamic control parameter, the dynamic control parameter is a 4-bit number, and the first dynamic control parameter and the second dynamic control parameter are both 2 bits;

[0009] According to the value of the first dynamic control parameter, a first target Latin square is selected from the four Latin squares of the first group; according to the value of the second dynamic control parameter, a second target Latin square is selected from the four Latin squares of the second group;

[0010] Any two of the first input variable, the second input variable, the third input variable and the fourth input variable are input into the first target Latin square or the second target Latin square to obtain an output variable, where the output variable is a 2n-bit number.

[0011] Furthermore, any two of the first input variable, the second input variable, the third input variable and the fourth input variable are input into the first target Latin square or the second target Latin square to obtain an output variable, including inputting the first input variable and the second input variable into the first target Latin square to obtain a first intermediate variable, the first intermediate variable is n bits; inputting the first intermediate variable and the third input variable into the second target Latin square to obtain a second intermediate variable, the second intermediate variable is n bits; inputting the second intermediate variable and the fourth input variable into the first target Latin square to obtain a second output variable, the second output variable is n bits; inputting the second output variable and the first intermediate variable into the second target Latin square to obtain a first output variable, the first output variable is n bits; and cascading the first output variable and the second output variable to obtain the output variable.

[0012] Further, according to the value of the first dynamic control parameter, a first target Latin square is selected from the four Latin squares of the first group; according to the value of the second dynamic control parameter, a second target Latin square is selected from the four Latin squares of the second group, including when the value of the first dynamic control parameter is set to 0, the first Latin square is selected from the four Latin squares of the first group as the first target Latin square; when the value of the first dynamic control parameter is set to 1, the second Latin square is selected from the four Latin squares of the first group as the first target Latin square; when the value of the first dynamic control parameter is set to 2, the third Latin square is selected from the four Latin squares of the first group as the first target Latin square; when the value of the first dynamic control parameter is set to When the value of the control parameter is 3, the fourth Latin square is selected from the four Latin squares in the first group as the first target Latin square; when the value of the second dynamic control parameter is set to 0, the first Latin square is selected from the four Latin squares in the second group as the second target Latin square; when the value of the second dynamic control parameter is set to 1, the second Latin square is selected from the four Latin squares in the second group as the second target Latin square; when the value of the second dynamic control parameter is set to 2, the third Latin square is selected from the four Latin squares in the second group as the second target Latin square; when the value of the second dynamic control parameter is set to 3, the fourth Latin square is selected from the four Latin squares in the second group as the second target Latin square.

[0013] Furthermore, 8 2 n The difference probabilities of the Latin squares of order n all meet the requirements of good difference probabilities, and the requirements of good difference probabilities include: when n=4, the Latin square difference probability ≤0.0625.

[0014] Furthermore, 8 2 n The linear probability of the Latin square of order n meets the requirements of good linear probability. The requirements of good linear probability include: when n=4, the linear probability of the Latin square is ≤0.15625.

[0015] Furthermore, 8 2n The algebraic degree of the Latin square of order 2n-2 satisfies the requirements of good algebraic degree, which include: the algebraic degree of the Latin square is 2n-2.

[0016] According to a second aspect of the present invention, there is also provided a computer device, which includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of any one of the above methods.

[0017] According to a third aspect of the present invention, there is also provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0018] According to a fourth aspect of the present invention, there is also provided a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.

[0019] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0020] The present invention provides a dynamic Latin square construction method, which constructs a Latin square with 4n bits input and 2n bits output based on 8 Latin squares with 2n bits (n≥4 and n is an integer) input and n bits output. The method is applicable to the case of a large input scale, that is, only 8 Latin squares with 2n bits input and n bits output need to be stored, and there is no need to store Latin squares with 4n bits input. Moreover, the Latin square changes with the change of dynamic control parameters, and the change from one Latin square to another can be achieved by changing the dynamic control parameters. Since the dynamic control parameters are 4 bits, there are 16 cases of Latin squares constructed by the method, and each Latin square has the advantages of high security and low conversion cost. In addition, since the 8 2 n The Latin squares of order have good cryptographic properties such as differential probability, linear probability, and algebraic degree. Therefore, each of the 16 Latin squares constructed by this method has good cryptographic properties such as differential probability, linear probability, and algebraic degree. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A schematic diagram of a flow chart of a dynamic Latin square construction method provided in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of a transformation operation step in a dynamic Latin square construction method provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0026] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0027] The Latin square is defined as: Let L(X,Y) be The function of L(X,Y) is 2 n Latin square of order, if L(X,Y) satisfies the following two conditions: ① For any L(X,Y) is a permutation on; ② for any L(X,Y) is a Replacement on.

[0028] 2 n The Latin square transform of order 2n is equivalent to a multi-output Boolean function with 2n-bit input and n-bit output. Therefore, the properties of the Latin square transform can be studied by studying the related tools of multi-output Boolean functions, such as differential probability, linear probability, algebraic degree, etc.

[0029] A Boolean function is a function over a binary field F2, denoted by f(x1,x2,...,x n ) is an n-variable function on F2, representing the n variables x1, x2, ..., x n All values ​​are in F2, and the value of function f also belongs to F2.

[0030] n-dimensional Boolean function f(x1,x2,...,x n ) can be uniquely expressed as a function of n variables x1, x2, ..., x on F2. n The polynomial is:

[0031]

[0032] The above formula is called the algebraic normal form of the Boolean function f, where a0, a i ,a ij ,...,a 12...n ∈F2, is the addition operation on F2. The number of non-zero monomials in the algebraic normal form of a Boolean function f is called the number of terms of the Boolean function f, and the maximum number of variables contained in all non-zero monomials is called the algebraic degree deg(f) of the Boolean function f.

[0033] For multi-output Boolean functions The algebraic degree of a multi-output Boolean function f(x) is:

[0034]

[0035] In the above formula, 0 m express

[0036] For any The symbol M(α,β) represents the number of solutions to the equation α·x=β·f(x), that is, Then the linear probability of the multi-output Boolean function f(x) is 0 m express

[0037] For any The symbol N(α,β) is used to represent the number of solutions of the equation f(x⊕α)⊕f(x)=β, that is, Then the differential probability of the multi-output Boolean function f(x) is 0 n express

[0038] For the cryptographic properties of Latin squares such as differential probability, linear probability, and algebraic degree, the same analysis as above shows that for a Latin square, it has a good differential probability, that is, when n=4, the Latin square differential probability ≤0.0625.

[0039] The Latin square has a good linear probability, that is, when n=4, the Latin square linear probability is ≤0.15625.

[0040] The Latin square has a good algebraic degree, that is, the algebraic degree of the Latin square is 2n-2.

[0041] like Figure 1 As shown, a dynamic Latin square construction method is provided, which can be executed by a terminal or by a server communicating with the terminal through a network. The terminal can be, but is not limited to, various personal computers, laptops, etc. The server can be an independent server, or a server cluster composed of multiple servers can be used to implement it. Taking the application of the method to a terminal as an example, the method includes the following steps:

[0042] Step 101, get 8 2 n The Latin square is divided into two groups equally.

[0043] For example, the terminal selects 8 The Latin squares with good cryptographic properties such as differential probability, linear probability, algebraic degree, etc. (that is, 2n-bit input and n-bit output, n≥4 and n is an integer) are divided into two groups with 4 squares in each group, and the 4 Latin squares l0, l1, l2, l3 in the first group and g0, g1, g2, g3 in the second group are obtained.

[0044] Step 102, obtain an input variable, and divide it equally into a first input variable, a second input variable, a third input variable and a fourth input variable, the input variable is 4n bits, and the first input variable, the second input variable, the third input variable and the fourth input variable are all n bits.

[0045] Exemplarily, the terminal obtains an input variable x, where x is 4n bits, and divides it equally into a first input variable x0, a second input variable x1, a third input variable x2 and a fourth input variable x3, denoted as x=x0||x1||x2||x3, where x0, x1, x2 and x3 are all n bits.

[0046] Step 103 , obtain a dynamic control parameter, and divide it equally into a first dynamic control parameter and a second dynamic control parameter, the dynamic control parameter is a 4-bit number, and the first dynamic control parameter and the second dynamic control parameter are both 2 bits.

[0047] The dynamic control parameter is a 4-bit number, and its value can be 16. The first dynamic control parameter and the second dynamic control parameter are both 2-bit numbers, and their values ​​can be 4, namely: 0, 1, 2 or 3.

[0048] Exemplarily, the terminal obtains a dynamic control parameter c, and divides it equally into a first dynamic control parameter c0 and a second dynamic control parameter c1, which is recorded as c=c0||c1.

[0049] Step 104 , selecting a first target Latin square from the four Latin squares of the first group according to the value of the first dynamic control parameter; selecting a second target Latin square from the four Latin squares of the second group according to the value of the second dynamic control parameter.

[0050] The first target Latin square is the Latin square corresponding to the value of the first dynamic control parameter among the four Latin squares in the first group, and the second target Latin square is the Latin square corresponding to the value of the second dynamic control parameter among the four Latin squares in the second group.

[0051] Step 105 , input any two of the first input variable, the second input variable, the third input variable and the fourth input variable into the first target Latin square or the second target Latin square to obtain an output variable, where the output variable is a 2n-bit number.

[0052] In the above dynamic Latin square construction method, based on 8 (i.e. 2n bits input and n bits output) Latin square, constructs a (i.e. 4n-bit input and 2n-bit output) Latin square, therefore, the Latin square constructed by this method can be applied to the case of large input scale, and only 8 Latin squares with 2n-bit input and n-bit output need to be stored, instead of the Latin square with 4n-bit input. Moreover, the Latin square changes with the change of dynamic control parameters, and the change from one Latin square to another can be realized by changing the dynamic control parameters. Since the dynamic control parameters are 4 bits, there are 16 cases of Latin square constructed by this method, and each Latin square has the advantages of high security and low conversion cost. In addition, since the 8 2 n The Latin squares of order have good cryptographic properties such as differential probability, linear probability, and algebraic degree. Therefore, each of the 16 Latin squares constructed by this method has good cryptographic properties such as differential probability, linear probability, and algebraic degree.

[0053] In one embodiment, Figure 2 As shown, step 105, inputting any two of the first input variable, the second input variable, the third input variable and the fourth input variable into the first target Latin square or the second target Latin square to obtain an output variable, includes the following steps:

[0054] Input the first input variable and the second input variable into the first target Latin square to obtain a first intermediate variable, which is an n-bit number, that is, x0,

[0055] The first intermediate variable and the third input variable are input into the second target Latin square to obtain the second intermediate variable, which is an n-bit number, that is,

[0056] The second intermediate variable and the fourth input variable are input into the first target Latin square to obtain the second output variable, which is an n-bit number, that is, x3,

[0057] The second output variable and the first intermediate variable are input into the second target Latin square to obtain the first output variable. The first output variable is n bits, that is,

[0058] The first output variable and the second output variable are cascaded to obtain an output variable, that is, z=z0||z1.

[0059] In this embodiment, by inputting the first input variable, the second input variable, the third input variable and the fourth input variable of n bits into the first target Latin square or the second target Latin square according to the above rules, the purpose of constructing an output variable of 2n bits can be achieved, and the constructed Latin square has the advantage of high security and is suitable for the design of a high-security symmetric encryption algorithm.

[0060] In one embodiment, step 104, selecting a first target Latin square from the four Latin squares of the first group according to the value of the first dynamic control parameter; selecting a second target Latin square from the four Latin squares of the second group according to the value of the second dynamic control parameter, includes:

[0061] When the value of the first dynamic control parameter is set to 0, the first Latin square is selected from the four Latin squares in the first group as the first target Latin square, that is, when c0=0, l0 is selected as the first target Latin square

[0062] When the value of the first dynamic control parameter is set to 1, the second Latin square is selected from the four Latin squares in the first group as the first target Latin square, that is, when c0=1, l1 is selected as the first target Latin square l c0 ;

[0063] When the value of the first dynamic control parameter is set to 2, the third Latin square is selected from the four Latin squares in the first group as the first target Latin square, that is, when c0=2, l2 is selected as the first target Latin square l c0 ;

[0064] When the value of the first dynamic control parameter is set to 3, the fourth Latin square is selected from the four Latin squares in the first group as the first target Latin square, that is, when c0=3, l3 is selected as the first target Latin square l c0 ;

[0065] When the value of the second dynamic control parameter is set to 0, the first Latin square is selected from the four Latin squares in the second group as the second target Latin square, that is, when c1=0, g0 is selected as the second target Latin square g c1 ;

[0066] When the value of the second dynamic control parameter is set to 1, the second Latin square is selected from the four Latin squares in the second group as the second target Latin square, that is, when c1=1, g1 is selected as the second target Latin square g c1 ;

[0067] When the value of the second dynamic control parameter is set to 2, the third Latin square is selected from the four Latin squares in the second group as the second target Latin square, that is, when c1=2, g2 is selected as the second target Latin square g c1 ;

[0068] When the value of the second dynamic control parameter is set to 3, the fourth Latin square is selected from the four Latin squares in the second group as the second target Latin square, that is, when c1=3, g3 is selected as the second target Latin square g c1 .

[0069] The present application also provides a computer device, whose internal structure diagram can be as follows: Figure 3 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a dynamic Latin square construction method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0070] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0071] like Figure 3 As shown, the present application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps in the above-mentioned method embodiments.

[0072] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0073] The present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0074] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0075] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0076] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

[0077] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0078] It will be easily understood by those skilled in the art that the above description is only 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 in the protection scope of the present invention.

Claims

1. A dynamic Latin square construction method, characterized in that: include: Get 8 2 n Latin square of order, divide it into two groups equally, n≥4 and n is an integer; Obtain an input variable, and divide it equally into a first input variable, a second input variable, a third input variable, and a fourth input variable, wherein the input variable is 4n bits, and the first input variable, the second input variable, the third input variable, and the fourth input variable are all n bits; Obtain a dynamic control parameter, and divide the dynamic control parameter into a first dynamic control parameter and a second dynamic control parameter on average, wherein the dynamic control parameter is a 4-bit number, and both the first dynamic control parameter and the second dynamic control parameter are 2 bits; Selecting a first target Latin square from the four Latin squares in the first group according to the value of the first dynamic control parameter; Selecting a second target Latin square from the four Latin squares in the second group according to the value of the second dynamic control parameter; Input any two of the first input variable, the second input variable, the third input variable and the fourth input variable into the first target Latin square or the second target Latin square to obtain an output variable, where the output variable is a 2n-bit number.

2. The method according to claim 1, characterized in that The step of inputting any two of the first input variable, the second input variable, the third input variable, and the fourth input variable into the first target Latin square or the second target Latin square to obtain an output variable comprises: Inputting the first input variable and the second input variable into the first target Latin square to obtain a first intermediate variable, where the first intermediate variable is an n-bit number; Inputting the first intermediate variable and the third input variable into the second target Latin square to obtain a second intermediate variable, where the second intermediate variable is an n-bit number; Inputting the second intermediate variable and the fourth input variable into the first target Latin square to obtain a second output variable, where the second output variable is an n-bit number; Inputting the second output variable and the first intermediate variable into the second target Latin square to obtain a first output variable, where the first output variable is an n-bit number; The first output variable and the second output variable are cascaded to obtain an output variable.

3. The method according to claim 1, characterized in that selecting a first target Latin square from four Latin squares in a first group according to the value of the first dynamic control parameter; According to the value of the second dynamic control parameter, selecting a second target Latin square from the four Latin squares of the second group includes: When the value of the first dynamic control parameter is set to 0, a first Latin square is selected from the four Latin squares of the first group as a first target Latin square; When the value of the first dynamic control parameter is set to 1, a second Latin square is selected from the four Latin squares of the first group as a first target Latin square; When the value of the first dynamic control parameter is set to 2, a third Latin square is selected from the four Latin squares of the first group as a first target Latin square; When the value of the first dynamic control parameter is set to 3, a fourth Latin square is selected from the four Latin squares of the first group as the first target Latin square; When the value of the second dynamic control parameter is set to 0, a first Latin square is selected from the four Latin squares of the second group as a second target Latin square; When the value of the second dynamic control parameter is set to 1, a second Latin square is selected from the four Latin squares of the second group as a second target Latin square; When the value of the second dynamic control parameter is set to 2, a third Latin square is selected from the four Latin squares of the second group as a second target Latin square; When the value of the second dynamic control parameter is set to 3, the fourth Latin square is selected from the four Latin squares of the second group as the second target Latin square.

4. The method according to claim 1, characterized in that The 8 2 n The difference probabilities of the Latin squares of order n all meet the requirements of good difference probability, and the requirements of good difference probability include: when n=4, the Latin square difference probability ≤0.0625.

5. The method according to claim 1, characterized in that The 8 2 n The linear probabilities of the Latin squares of order n all meet the requirements of good linear probability, and the requirements of good linear probability include: when n=4, the linear probability of the Latin square is ≤0.15625.

6. The method according to claim 1, characterized in that The 8 2 n The algebraic degree of the Latin square of order 2n-2 satisfies the requirement of good algebraic degree, and the requirement of good algebraic degree includes: the algebraic degree of the Latin square is 2n-2.

7. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Dynamic S box construction method and system

    CN117459217A

  • Eight-bit S box construction method based on Latin square and application

    CN117499018A

  • Method for producing latin square

    JP2000285101A