Function periodic property automatic discrimination method and device based on structural characteristics, medium and program product

By converting the periodic properties of the function into periodic properties of the structure and shrinking instance functions, and using classic search methods for automatic discrimination, the problem of low efficiency in discrimination of the periodic properties of the function in the packet cipher in the prior art is solved, and a rapid and automated periodic properties discrimination is achieved.

CN119814282AActive Publication Date: 2025-04-11NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411865766.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

The prior art is difficult to automatically determine the periodic properties of functions constructed based on multi-branch cipher structures in packet ciphers within an effective time, especially when the definition domain space is large.

Method used

By converting the periodic properties of the function into the periodic properties of the structure, and further converting it into the periodic properties of the randomly generated shrinkage instance function, the classical search method is used for automatic discrimination.

Benefits of technology

It realizes rapid and automated discrimination of the periodic properties of functions under classical computing conditions, avoids the tedious process of manual derivation, significantly improves the discrimination efficiency, and is suitable for the construction of quantum differentiators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814282A_ABST
    Figure CN119814282A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of block cipher, and provides a function periodic property automatic discrimination method and device based on structural characteristics, a medium and a program product, which are used for quantum discrimination of block cipher, and the method comprises the following steps: analyzing a corresponding structure F for a function f; selecting a shrinkage width b and a repetition frequency Num; generating Num random numbers; setting an initial sequence number i = 1; setting the branch width to be b, and performing shrinkage instantiation on the structure F by using a random number to obtain a shrinkage instance function fi of the structure F; judging whether the shrinkage instance function fi is a periodic function or not: if not, judging that the structure F does not have the periodic property, and judging that the function f is not the periodic function; if yes, i is made to be equal to i + 1; and if i is less than or equal to Num, returning, otherwise, judging that the structure F has a periodic property, then judging that the function f under the structure F is a periodic function, and ending the judgment process. According to the method, a periodic property judgment conclusion can be given for a function with a known structure within the time capable of being effectively calculated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of block ciphers, and in particular to a method, device, medium and program product for automatically distinguishing the periodic properties of a function based on structural characteristics, which can be used for constructing a block cipher quantum distinguisher. Background Art

[0002] The security analysis of block cipher algorithms mainly includes the following three aspects: First, the security of the algorithm is studied based on mathematical methods; second, the security of the algorithm is studied in combination with physical implementation methods; and third, the security of the algorithm under different usage modes is studied. We usually study the security of the algorithm based on mathematical methods, which mainly includes two aspects: First, study how to distinguish the cryptographic algorithm from random permutation. In cryptanalysis, for the same indicator, first calculate its value under random permutation, and then calculate the corresponding value in a certain cryptographic algorithm. If the two values ​​are significantly different, then the indicator can distinguish the cryptographic algorithm from random permutation. In cryptanalysis, if the corresponding ciphertext follows a special rule for some specific forms of plaintext input, it is said that an effective distinguisher of the algorithm is found. Second, study how to obtain the key information of the algorithm. For iterative block ciphers, the cryptanalyst first finds an effective distinguisher of the algorithm corresponding to the simplified round number, and then guesses the value so that the value obtained after decryption does not meet the requirements of the distinguisher. In this case, the guessed value is an incorrect key. After excluding all incorrect keys, the remaining ones may be candidate correct keys.

[0003] Generally speaking, for a given block cipher algorithm, if an effective distinguisher of the cipher algorithm can be found, part or all of its key information can usually be obtained. Therefore, finding an effective distinguisher is a major problem in cryptanalysis. For example, differential cryptanalysis and linear cryptanalysis are to crack the cipher algorithm by finding the differential and linear distinguishers of the cipher algorithm. Commonly used analysis methods under classical computing include differential analysis, high-order differential analysis, truncated differential analysis, impossible differential analysis, linear analysis, meet-in-the-middle attack, collision attack, square attack, integral attack, interpolation attack, non-surjective attack, algebraic attack, sliding attack, related key attack, related cipher attack, differential-linear analysis, Boomerang attack, etc.

[0004] With the development of quantum computing technology, some new analysis methods have also been proposed. Quantum differentiation attack based on Simon algorithm is a new quantum analysis method, which gives different security conclusions for various block cipher structures and working modes than those in classical computing situations. For example, the three-round Feistel structure can be regarded as a pseudo-random permutation under classical computing conditions, but in the quantum computing environment, there is a quantum differentiation attack in polynomial time. The core of the quantum analysis method based on Simon algorithm is to construct a periodic function for the cryptographic algorithm that can be used for differentiation attack, and use the accelerated solution of the Simon algorithm to the problem of period discovery, so as to give differentiation in polynomial time.

[0005] Block ciphers often have complex structures. In order to provide quantum distinguishing attacks on block ciphers, how to find a suitable periodic function construction is an important issue. If a function under a specific construction can be quickly judged to have periodic properties, it will undoubtedly accelerate the search process. The existing judgment methods are mainly divided into two categories. One is to use the classical search method to find the period of the function, and to judge whether a specific value is the period of the function through exhaustive search. The advantage of this method is that computers can be used to realize automatic search. The disadvantage is that when the domain space of the function is large, the existing computing resources are not enough to complete the search within the effective time. The second method is to perform theoretical deduction based on the expression of the function, and finally get the conclusion of whether it is a periodic function. The advantage of this method is that it is not affected by the size of the domain space, and the correctness of the judgment result can be verified by theory. The disadvantage is that the derivation method is manual derivation, the process is cumbersome, time-consuming and labor-intensive. When a large number of functions need to be judged, the time and manpower consumed are unacceptable. Summary of the invention

[0006] When searching for the construction of a periodic function in a block cipher, it is often necessary to identify the periodic properties of a large number of functions under different constructions, and the two identification methods in the above-mentioned prior art do not meet this requirement. In order to overcome the problem in the prior art that the period identification of functions constructed based on a multi-branch cipher structure is relatively complicated, the present invention provides a method, device, medium and program product for automatically identifying the periodic properties of functions based on structural characteristics, which can give a periodic property identification conclusion for a function of a known structure within an effectively computable time.

[0007] The present invention provides a method for automatically distinguishing the periodic properties of a function based on structural characteristics, comprising the following steps:

[0008] Step 1: For a function f with a known structure, analyze and give its corresponding structure F;

[0009] Step 2: Select the contraction width b and the number of repetitions Num;

[0010] Step 3: Select a random seed seed and generate Num random numbers from it;

[0011] Step 4: Set the starting sequence number i=1;

[0012] Step 5: Set the branch width to the contraction width b, use the random number to instantiate the structure F, and obtain a contraction instance function of the structure F, denoted as f i ;

[0013] Step 6: Determine the shrinkage instance function f i Is it a periodic function?

[0014] If not, it is determined that the structure F does not have a periodic property. Under this framework, it is determined that the function f is not a periodic function, and then the process goes to step eight;

[0015] If yes, set i=i+1 and go to step 7;

[0016] Step 7: Determine whether i is less than or equal to Num:

[0017] If yes, return to step 5;

[0018] If not, then the Num times of randomly generated contraction instance functions are all judged to be periodic functions, and thus the structure F is judged to have periodic properties, and then the function f under the structure F is judged to be a periodic function, and then the process goes to step eight;

[0019] Step 8: The identification process ends.

[0020] In some embodiments, in step 2, the contraction width b and the number of repetitions Num are selected based on the probability of collision and the search efficiency.

[0021] In some embodiments, in step 5, when the structure F is instantiated by shrinking using the random number:

[0022] For the linear operation components, use the contraction bit components with the same logic as in the original function f to replace them;

[0023] For nonlinear components or relatively complex logic operation components, random functions or random permutations generated by random numbers are used as replacements.

[0024] In some embodiments, the desired random permutation is achieved by generating a random exchange sequence and then applying the identity permutation in sequence.

[0025] In some embodiments, in step 6, the shrinkage instance function f is determined using a classical search method. i Is it a periodic function, in {0,1} b \{0} traverses the search for the period t to be judged, and then traverses x∈{0,1} in turnb And identify Is it established? If it appears This means that t is not a function f i (x) cycle, and enter the judgment of the next t.

[0026] In some embodiments, in step three, the current system time is used as a random seed.

[0027] In a second aspect, the present invention provides an electronic device, comprising:

[0028] at least one processor; and a memory communicatively coupled to the at least one processor;

[0029] The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the above method by executing the instructions stored in the memory.

[0030] In a third aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store instructions, and when the instructions are executed, the above method is implemented.

[0031] In a fourth aspect, the present invention further provides a computer program product, which, when called by a computer, enables the computer to execute the above method.

[0032] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0033] 1. The present invention transforms the period determination of a function into the period property determination of a structure, thus avoiding the problem that it is difficult to achieve period determination of a function with a large domain space through a classical search method;

[0034] 2. The present invention further transforms the determination of the periodic properties of the structure into the determination of the periodic properties of several randomly generated shrinkage instance functions, thereby constructing an automated determination scheme under classical calculation;

[0035] 3. The present invention provides an automated identification scheme to replace theoretical derivation, which greatly improves the efficiency of identifying the periodic properties of functions and has great advantages in finding periodic function structures under specific structures;

[0036] 4. The discrimination method of the present invention is universal and can be used to construct quantum discriminators of symmetric cryptographic structures, and has high practical value and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 The present invention is a flowchart of a method for automatically determining the periodicity of a function based on structural characteristics in an embodiment of the present invention.

[0038] Figure 2 The flowchart is an example of a method for automatically determining the periodicity of a function based on structural characteristics in an embodiment of the present invention.

[0039] Figure 3 Schematic diagram of a MARS-like Feistel structure in an example of a method for automatically distinguishing periodic properties of functions based on structural characteristics in an embodiment of the present invention.

[0040] Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0042] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] Some definitions of periodic properties of functions are as follows:

[0044] (1) Define periodic properties and periods

[0045] Let f be a {0,1} n →{0,1} m A function whose domain is D, if there exists s≠0 such that for any x∈D, If it holds, then the function f is said to have a periodic property, or periodicity for short, and s is called the period of the function f.

[0046] (2) Define operation components, structures, and branches

[0047] In mathematics, a function is a special correspondence relationship, and its definition includes three elements: domain, correspondence law, and range. Among them, the correspondence law is the rule that determines the operational relationship between the independent variable and the dependent variable, which is usually expressed by a mathematical expression. When there are many variables involved in the operation, the operational relationship becomes more complicated. In order to simplify the mathematical expression of the function, some specific operations in the function can be abstractly represented by some fixed symbols. The specific operations represented by these symbols are called operation components, such as S-box and MDS transformation in cryptographic functions. In addition, the correspondence law of the function can also be formally represented by a graph representing the operational relationship of the variables. The graph or analytical expression representing the operational relationship between the independent variable and the dependent variable is called the structure of the function. The variables involved in the operation are divided according to the operational relationship, so that the independent variable and the dependent variable are divided into several independent sub-variables, and these sub-variables are called branches of the function. If the variable to which the branch belongs is the independent variable (corresponding to the input of the function), it is called an input branch. If the variable to which the branch belongs is the dependent variable (corresponding to the output of the function), it is called an output branch.

[0048] (3) Instantiation of defined structures

[0049] The structure of a function is a formal representation of the function operation relationship, omitting the calculation details of the operation components. The operation components in the function structure are assigned appropriate operation component instances, so that a function that can calculate the corresponding output from the input is obtained. This process is called structure instantiation.

[0050] (4) Define the contraction instantiation of the structure

[0051] In the representation of function structure, the description of the width of function branches and operation components is often insensitive. In this case, the function branches and corresponding operation components can be scaled synchronously to obtain function instances with different branch widths. By shrinking the branch width of the function to a size suitable for classical search, a suitable operation component instance is selected corresponding to the shrunken branch width to obtain a shrunken function instance. This process is called structural contraction instantiation. Correspondingly, the process of obtaining a function instance after enlarging the branch width is called expansion instantiation.

[0052] (5) Define the periodic properties of the structure

[0053] Following the definition of periodic properties of functions, we give a definition of periodicity of structures. If all its instantiation functions and contraction and expansion instantiation functions have periodic properties, then the structure is called It has a cyclical nature.

[0054] Based on the above definition, if Figure 1 As shown, the embodiment of the present invention proposes an automatic determination method of function periodicity properties based on structural characteristics, including:

[0055] Step 1: For a function f with a known structure, analyze and give its corresponding structure F;

[0056] Step 2: Select the contraction width b and the number of repetitions Num so that the interference of collisions on the period determination results in the subsequent steps can be eliminated as much as possible without reducing the search efficiency too much;

[0057] Step 3: Select a random seed seed and generate Num random numbers r1, r2, …, r Num , requiring each random number r i The correlation between them is as small as possible;

[0058] Step 4: Set the starting sequence number i=1;

[0059] Step 5: Set the branch width to the contraction width b, and use the random number r i Perform contraction instantiation on structure F to obtain a contraction instance function of structure F, denoted as f i ;

[0060] Step 6: Use the classical search method to determine the contraction instance function f i Is it a periodic function?

[0061] If not, it is determined that the structure F does not have a periodic property. In this framework, it is determined that the function f is not a periodic function, and "No" is output, and then the process goes to step eight;

[0062] If yes, set i=i+1 and go to step 7;

[0063] Step 7: Determine whether i is less than or equal to Num:

[0064] If yes, return to step 5;

[0065] If not, then the Num times of randomly generated contraction instance functions are all judged to be periodic functions, and thus the structure F is judged to have periodic properties, and then the function f under the structure F is judged to be a periodic function, and "yes" is output, and then the process goes to step eight;

[0066] Step 8: The identification process ends.

[0067] In some embodiments, in step 2, the contraction width b and the number of repetitions Num are selected according to the probability of collision and the search efficiency. The value of the contraction width b should make the search easy to implement and make the probability of collision as small as possible. The value of the number of repetitions Num further ensures that the probability of collision is close to 0. For example, when the contraction width b=3, the probability of collision is very high, which seriously affects the determination of the periodic properties of the function; when the contraction width b=4, there is a small probability of collision. At this time, by increasing the value of the number of repetitions Num, the impact of the collision on the determination of the periodic properties of the function can be eliminated. When the number of repetitions Num=5, the probability of collision is close to 0; when the contraction width b=5, the probability of collision is close to 0, and the number of repetitions Num=3 is taken to ensure that the periodic property determination result is not affected by the collision.

[0068] In some embodiments, in step 5, when the structure F is instantiated by using the random number, in addition to synchronously shrinking the branch width of the structure, a corresponding operation component instance is also required. In order to make the periodic property of the shrink instance function and the original function f as similar as possible, the linear operation components such as MDS and P substitution are replaced by the shrink bit components with the same logic as that in the original function f; while for nonlinear components or operation components with relatively complex logic such as S boxes, the random number r is used. i The generated random function or random permutation is used as a replacement to ensure that the obtained contraction instance function is consistent with the original function f in terms of operation logic, and each random number r i The resulting shrink instance functions are all different.

[0069] In some embodiments, when generating the random permutation corresponding to the original function operation component of the contraction instantiation, the desired random permutation is obtained by generating a random exchange sequence and acting on the identity permutation in sequence, for example, generating a random exchange sequence Acting on the identity permutation {1,2,3,4}, the permutation {3,2,1,4} is obtained as the random permutation generated thereby. This random permutation is relatively simple to implement and has good randomness.

[0070] In some embodiments, in step 6, the shrinkage instance function f is determined using a classical search method. i Is it a periodic function, in {0,1} b \{0} traverses the search for the period t to be judged, and then traverses x∈{0,1} in turn b And identify Is it established? If it appears This means that t is not a function f i (x) cycle, and enter the judgment of the next t, thereby cutting off a large number of search branches, improving the search efficiency, and the time complexity is close to O(2b ).

[0071] It should be noted that since the present invention is an automatic method for determining the periodic properties of a function based on structural characteristics, the periodic properties of the original function are determined based on the periodic properties of the structure in steps six and seven. When the original function has periodic properties but the corresponding structure does not have periodic properties, the present invention cannot provide a determination result that the original function is a periodic function.

[0072] An example:

[0073] Based on the problem of complex function period determination based on multi-branch cryptographic structure in the prior art, the embodiment of the present invention provides an automatic determination method of function period properties based on structural characteristics, such as Figure 2 As shown, the following steps are included:

[0074] Step 1: For a function f with a known structure, analyze and give its corresponding structure F;

[0075] When the input is (a0, a1, α b ,x), in the case Figure 3 The 4-branch MARS-like Feistel structure shown in the figure corresponds to the output of the 5th round Function constructed on

[0076] Write the expression of function f(x) as follows:

[0077]

[0078] In the formula, F i is the round function of the i-th round, and its structure F is shown in the above expression;

[0079] Step 2: Select contraction width b=5, number of repetitions Num=3;

[0080] Step 3: Use the current system time as the random seed, call the random function, and generate three different random numbers r0, r1, and r2 in sequence;

[0081] Step 4: Set the starting sequence number i=0;

[0082] Step 5: Set the branch width to the contraction width b=5, and use the random numbers r0, r1, r2 to instantiate the structure F:

[0083] The computing components in structure F include round functions F1, F2, F3 and F4 in each round, using random number r i As a random seed, the corresponding functions F1, F2, F3, F4 generate {0, 1} 5 →{0,1}5 The random permutations o1, p2, p3, p4 on the structure F are replaced by random permutations p1, p2, p3, p4 respectively under the branch with width 5 to obtain a contraction instance function of the structure F, denoted as f i ,have:

[0084]

[0085] At this time, the shrink instance function f i The domain of is x∈{0,1} 5 , a0, a1 and α b All are {0,1} 5 The constant on ;

[0086] Step 6: Use the classical search method to determine the contraction instance function f i Is it a periodic function?

[0087] In {0,1} 5 \{0} searches for the period t to be judged in turn, traversing x∈{0,1} 5 And identify Is it established? If it appears Then proceed to the next t judgment until we find a For {0,1} 5 t for all x above or after searching {0,1} 5 \{0} all t. If there is a t that satisfies the condition, the discriminant shrinkage instance function f i is a periodic function, let i=i+1, and then go to step 7; otherwise, determine the shrinkage instance function f i It is not a periodic function. It is determined that the structure F does not have a periodic property. Under this framework, it is determined that the function f is not a periodic function, and the output is "no", ending the judgment process;

[0088] Step 7: If i<3, then return to step 5; otherwise, determine that structure F has a periodic property and function f is a periodic function, output "yes", and go to step 8.

[0089] Step 8: End the discrimination process.

[0090] Based on the same technical concept, an embodiment of the present invention further provides an electronic device, which can implement the method flow of automatic identification of function periodicity based on structural characteristics provided in the above embodiment of the present application. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. Figure 4 As shown, the electronic device may include:

[0091] At least one processor, and a memory connected to the at least one processor. The specific connection medium between the processor and the memory is not limited in the embodiment of the present invention. Figure 4 The example in this article is that the processor and memory are connected through a bus. Figure 4 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into address bus, data bus, control bus, etc. Figure 4 In the diagram, only one thick line is used, but this does not mean that there is only one bus or only one type of bus. Alternatively, a processor can also be called a controller, and there is no limitation on the name.

[0092] In an embodiment of the present invention, the memory stores instructions that can be executed by at least one processor. The at least one processor can execute the above-mentioned method for automatically determining the periodicity of a function based on structural characteristics by executing the instructions stored in the memory. The processor can implement Figure 4 The functions of each module in the device shown.

[0093] Among them, the processor is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory and calling data stored in the memory, various functions of the device and processing data.

[0094] In an optional design, the processor may include one or more processing units, and the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor. In some embodiments, the processor and the memory may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0095] The processor may be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method for automatically distinguishing the periodic properties of a function based on structural characteristics disclosed in the embodiments of the present invention may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0096] As a non-volatile computer-readable storage medium, the memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present invention can also be a circuit or any other device that can realize a storage function, used to store program instructions and / or data.

[0097] By designing and programming the processor, the code corresponding to the method for automatically distinguishing the periodic properties of a function based on structural characteristics introduced in the above embodiment can be fixed into the chip, so that the chip can perform the steps of the method for automatically distinguishing the periodic properties of a function based on structural characteristics in the above embodiment when running. How to design and program the processor is a technology well known to those skilled in the art and will not be described in detail here.

[0098] Based on the same inventive concept, an embodiment of the present invention further provides a storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer executes the method for automatically determining the periodic properties of a function based on structural characteristics discussed above.

[0099] In some optional embodiments, the present application also provides various aspects of a method for automatically distinguishing the periodic properties of functions based on structural characteristics, which can also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of a method for automatically distinguishing the periodic properties of functions based on structural characteristics according to various exemplary embodiments of the present application described above in this specification.

[0100] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of a unit described above can be further divided into multiple units to be embodied. In addition, although the operation of the method of the present application is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0101] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0102] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a server, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0103] Program code for performing the operations of the present application may be written using any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0104] Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for automatically distinguishing the periodic properties of functions based on structural characteristics, used for quantum discrimination of block ciphers, characterized in that: The steps include: Step 1: For a function f with a known structure, analyze and give its corresponding structure F; Step 2: Select the contraction width b and the number of repetitions Num; Step 3: Select a random seed seed and generate Num random numbers from it; Step 4: Set the starting sequence number i=1; Step 5: Set the branch width to the contraction width b, use the random number to instantiate the structure F, and obtain a contraction instance function of the structure F, denoted as f i ; Step 6: Use the classical search method to determine the contraction instance function f i Is it a periodic function? If not, it is determined that the structure F does not have a periodic property. Under this framework, it is determined that the function f is not a periodic function, and then the process goes to step eight; If yes, set i=i+1 and go to step 7; Step 7: Determine whether i is less than or equal to Num: If yes, return to step 5; If not, then the Num times of randomly generated contraction instance functions are all judged to be periodic functions, and thus the structure f is judged to have periodic properties, and then the function f under the structure F is judged to be a periodic function, and then the process goes to step eight; Step 8: The identification process ends.

2. The method for automatically determining the periodicity of a function based on structural characteristics according to claim 1, characterized in that: In step 2, the contraction width b and the number of repetitions Num are selected according to the probability of collision and the search efficiency.

3. The method for automatically determining the periodicity of a function based on structural characteristics according to claim 1, characterized in that: In step 5, when the random number is used to shrink and instantiate the structure F: For the linear operation components, use the contraction bit components with the same logic as in the original function f to replace them; For nonlinear components or relatively complex logic operation components, random functions or random permutations generated by random numbers are used as replacements.

4. The method for automatically determining the periodicity of a function based on structural characteristics according to claim 3, characterized in that: The desired random permutation is obtained by generating a random exchange sequence and then acting on the identity permutation in sequence.

5. The method for automatically determining the periodicity of a function based on structural characteristics according to claim 1, characterized in that: Use the classical search method to identify the shrinkage instance function f i Is it a periodic function, in {0,1} b \{0} traverses the search for the period t to be judged, and then traverses x∈{0,1} in turn b And determine f i (x) = f i (x⊕t) is true, if f i (x)≠f i (x⊕t), then t is not a function f i (x) cycle, and enter the judgment of the next t.

6. The method for automatically determining the periodicity of a function based on structural characteristics according to claim 1, characterized in that: In step 3, use the current system time as the random seed.

7. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the method as described in any one of claims 1 to 6 by executing the instructions stored in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is implemented.

9. A computer program product, characterized in that When the computer program product is called by a computer, the computer executes the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Construction method and device of block cipher round function, electronic equipment and storage medium

    CN116208319A

  • Domain-specific language implementation method and device, equipment, medium and program product

    CN116560800A

  • Quantum forgery attack method and device for OTR structure, and storage medium

    CN116582290A

  • Quantum cryptographic analysis method for improved Type-III Feistel structure

    CN117768091A

  • Maximum quantile periodic sequence generation method and system based on multi-word single-circle T function

    CN118487743A