Method, device, medium and program product for automatically determining periodic properties of functions based on structural characteristics
Through a method based on structural characteristics, random numbers are used to generate contraction instance functions, combined with classical search methods, to automatically discriminate the periodic properties of functions, which solves the problem of inefficient function periodic property discrimination in the existing technology and achieves efficient periodic property discrimination, which is suitable for the construction of quantum discriminators for multi-branch cryptographic structures.
Patent Information
- Application Number
- CN202411865766.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Existing methods for determining the periodic properties of functions are inefficient when faced with large domain spaces, and manual derivation is cumbersome and time-consuming, making it difficult to meet the needs of quickly determining a large number of functions.
Through a method based on structural characteristics, random numbers are used to generate shrinkage instance functions, combined with classical search methods, to automatically determine the periodic properties of the function and transform it into the determination of the periodic properties of the structure, avoiding direct search of the function in a large domain space.
It realizes efficient and automatic discrimination of the periodic properties of functions under classical computing, improves the discrimination efficiency, is suitable for the construction of quantum discriminators for multi-branch cryptographic structures, and has high practical value.
Smart Images

Figure CN119814282B_ABST
Abstract
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 to construct a quantum distinguisher for a block cipher. Background Art
[0002] Security analysis of block ciphers primarily involves three aspects: first, studying the algorithm's security using mathematical methods; second, studying the algorithm's security using physical implementations; and third, studying the algorithm's security under different usage patterns. Mathematical methods are often used to study the security of algorithms, primarily encompassing two key aspects: first, studying how to distinguish a cryptographic algorithm from random permutations. During cryptanalysis, for the same metric, its value under random permutations is first calculated, and then its corresponding value in a specific cryptographic algorithm is calculated. If these two values are significantly different, the metric distinguishes the algorithm from random permutations. In cryptanalysis, if the corresponding ciphertext for a particular plaintext input follows a specific pattern, we are said to have found a valid discriminator for the algorithm. Second, we study how to obtain the algorithm's key information. For iterated block ciphers, the cryptanalyst first searches for a valid discriminator for the algorithm corresponding to the simplified number of rounds. Then, if a guess is made so that the decrypted value does not meet the discriminator's requirements, the guess is considered an incorrect key. After eliminating all incorrect keys, the remaining ones are likely candidates for the correct key.
[0003] Generally speaking, for a given block cipher, finding a valid discriminator for that cipher usually yields partial or complete key information. Therefore, finding a valid discriminator is a major problem in cryptanalysis. For example, differential cryptanalysis and linear cryptanalysis aim to crack a cipher by finding its differential and linear discriminators. Commonly used analysis methods in classical computing include differential analysis, higher-order differential analysis, truncated differential analysis, impossible differential analysis, linear analysis, meet-in-the-middle attacks, collision attacks, square attacks, integral attacks, interpolation attacks, non-surjective attacks, algebraic attacks, sliding attacks, related key attacks, related cipher attacks, differential-linear analysis, and boomerang attacks.
[0004] With the development of quantum computing technology, new analytical methods have been proposed. Quantum differentiation attacks based on the Simon algorithm are a new quantum analysis method that provides different security conclusions for various block cipher structures and operating modes than those in classical computing scenarios. For example, a three-round Feistel structure can be considered a pseudo-random permutation under classical computing conditions, but in a quantum computing environment, a polynomial-time quantum differentiation attack exists. The core of quantum analysis methods based on the Simon algorithm lies in constructing a periodic function for the cryptographic algorithm that can be used for differentiation attacks. The Simon algorithm accelerates the solution to the period discovery problem, thereby achieving differentiation in polynomial time.
[0005] Block ciphers often have complex structures. To defend against quantum-discriminatory attacks on block ciphers, finding a suitable periodic function construction is a crucial issue. Being able to quickly determine whether a function under a specific construction is periodic would undoubtedly accelerate this search process. Existing methods for determining this are primarily divided into two categories. The first uses classical search methods to find the period of a function. This exhaustive search determines whether a particular value is a periodic function. This method has the advantage of allowing automated computer-generated searches. However, its disadvantage is that when the function's domain is large, existing computing resources are insufficient to complete the search within a reasonable timeframe. The second method uses theoretical derivation based on the function's expression to determine whether it is periodic. This method is unaffected by the size of the domain, and the correctness of the determination can be theoretically verified. However, its disadvantage is that the derivation is manual, cumbersome, and time-consuming. When determining a large number of functions, the time and effort required is unacceptable. Summary of the Invention
[0006] When searching for the construction of periodic functions in block ciphers, it is often necessary to determine the periodic properties of a large number of functions with different constructions. Neither of the two existing methods for determination meets this requirement. To overcome the existing problem of the complexity of determining the periodicity of functions constructed based on multi-branch cipher structures, the present invention provides a method, device, medium, and program product for automatically determining the periodic properties of functions based on structural characteristics. These methods can determine the periodic properties of functions of known structures within a computationally efficient timeframe.
[0007] The present invention provides a method for automatically determining 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 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, thereby judging that the structure F has a periodic property, and then judging that the function f under the structure F is a periodic function, and then proceeding to step eight;
[0019] Step 8: The discrimination 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 component, use the contraction bit component with the same logic as the original function f to replace it;
[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 permutation sequence and sequentially applying the identity permutation.
[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 for storing instructions, which implement the above method when the instructions are executed.
[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 determination of a structure, thus avoiding the problem that it is difficult to use classical search methods to determine the period of a function with a large domain space.
[0034] 2. The present invention further transforms the identification of the periodic properties of the structure into the identification of the periodic properties of a number of randomly generated contraction instance functions, thereby constructing an automated identification scheme under classical calculations;
[0035] 3. This 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 flowchart of a method for automatically determining the periodic properties 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 an automatic method for determining periodic properties of a function based on structural characteristics in an embodiment of the present invention.
[0040] Figure 4 FIG. 4 is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only 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 herein 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 as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall 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 simply periodicity, 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. Its definition includes three elements: domain, correspondence rule, and range. The correspondence rule is the rule that determines the operational relationship between the independent and dependent variables, usually expressed as a mathematical expression. When a large number of variables are involved in the operation, the operational relationship becomes more complex. To simplify the mathematical expression of a function, certain specific operations within the function can be abstractly represented using fixed symbols. These specific operations are called operational components, such as the S-box and MDS transformation in cryptographic functions. Furthermore, the correspondence rule of a function can be formalized using a graph that represents the operational relationship between the variables. The graph or analytical expression that represents the operational relationship between the independent and dependent variables is called the structure of the function. The variables involved in the operation are divided according to the operational relationship, thereby dividing the independent and dependent variables into several independent subvariables. These subvariables are called branches of the function. If the variable belonging to a branch is the independent variable (corresponding to the input of the function), it is called an input branch; if the variable belonging to a branch is the dependent variable (corresponding to the output of the function), it is called an output branch.
[0048] (3) Instantiation of defined structures
[0049] A function structure is a formal representation of the function's operational relationships, omitting the computational details of its components. Assigning appropriate component instances to the components in a function structure creates a function that can compute the corresponding output from its input. This process is called structure instantiation.
[0050] (4) Define the contraction instantiation of the structure
[0051] In the representation of function structures, the widths of function branches and computational components are often insensitive. Therefore, the function branches and corresponding computational components can be scaled simultaneously to obtain function instances with different branch widths. This process is called structural contraction instantiation by shrinking the function branch width to a size suitable for classical search and selecting an appropriate computational component instance corresponding to the contracted branch width. Correspondingly, the process of obtaining a function instance by 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 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 the periodicity of a function based on structural characteristics, comprising:
[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 subsequent steps is eliminated as much as possible without reducing the search efficiency too much;
[0057] Step 3: Select a random 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 identify 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. Under 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 a periodic property. 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 discrimination process ends.
[0067] 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. The value of the contraction width b should make the search easy to implement while making 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 smaller 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, it is also necessary to provide a corresponding operation component instance at this time. In order to make the periodic properties 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 in the original function f; while for nonlinear components or operation components with relatively complex logic such as S-box, the random number r is used. i The generated random function or random permutation is used as a replacement to ensure that the resulting contraction instance function is consistent with the original function f in terms of operation logic, and each random number r i The resulting shrinkage instance functions are all different.
[0069] In some embodiments, when generating a 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 generated as a random permutation. This random permutation is 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, enters 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 functions based on structural characteristics, the periodic properties of the original function are determined in steps six and seven based on the periodic properties of the structure. 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 identification based on multi-branch cryptographic structure in the prior art, the embodiment of the present invention provides an automatic identification 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 5th round corresponds to the output Function constructed on
[0076] Write the expression of function f(x) as follows:
[0077]
[0078] Where, F i is the round function of round i, 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, and r2 to instantiate the structure F by contraction:
[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 used to replace the round functions F1, F2, F3 and F4 in the structure F under the branch with a width of 5, thereby obtaining a contraction instance function of the structure F, which is denoted as f i ,have:
[0084]
[0085] At this time, the shrink instance function f i The domain of the definition 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 identify 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 For {0,1} 5 t for all x above or search through {0,1} 5 All t in \{0}. If there is a t that meets the conditions, 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 determines that the structure F does not have a periodic property. Under this framework, it determines that the function f is not a periodic function, outputs "no", and ends the judgment process;
[0088] Step 7: If i<3, then return to step 5; otherwise, determine that the structure F has a periodic property and the 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 that can implement the method flow for automatically determining the periodicity of a function 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 embodiment of the present invention does not limit the specific connection medium between the processor and the memory. Figure 4 The example in this article is that the processor and memory are connected via a bus. Figure 4 The connections between the other components are shown in bold lines, which are only for illustration and not limiting. The bus can be divided into address bus, data bus, control bus, etc. Figure 4 The processor is represented by a single thick line, but this does not mean that there is only one bus or only one type of bus. Alternatively, the processor can also be called a controller, without any 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, the 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 primarily processes the operating system, user interface, and application programs, and the modem processor primarily processes wireless communications. It is understood that the modem processor may not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip, or in some embodiments, they may be implemented on separate chips.
[0095] The processor can 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 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method for automatically determining the periodicity of a function based on structural characteristics disclosed in the embodiments of the present invention can be directly implemented and executed by a hardware processor, or by a combination of hardware and software modules within the processor.
[0096] As a non-volatile computer-readable storage medium, memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory can include at least one type of storage medium, for example, can include 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. Memory is any other medium that can be used to carry or store 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, for storing program instructions and / or data.
[0097] By designing and programming a processor, the code corresponding to the method for automatically determining the periodic properties of a function based on structural characteristics described in the aforementioned embodiment can be embedded in the chip, allowing the chip to perform the steps of the method for automatically determining the periodic properties of a function based on structural characteristics described in the aforementioned embodiment during operation. Designing and programming a processor is well known to those skilled in the art and will not be further described 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 determining 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 determining 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 detailed description above, this division is merely exemplary and not mandatory. In fact, according to the embodiment of the present application, the features and functions of two or more units described above can be concretized in one unit. Conversely, the features and functions of a unit described above can be further divided into multiple units to be concretized. In addition, although the operations of the present application method are 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 results. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0101] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can 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 can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain 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 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 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 and / or block diagram. 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] The program code used to perform 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++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a stand-alone software package, partially on the user's 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., through the Internet using an Internet service provider).
[0105] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The 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 operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0107] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection 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 functions with known structures , analyze and give its corresponding structure ; Step 2: Select the shrink width and number of repetitions ; Step 3: Select a random seed and generate random numbers; Step 4: Set the starting sequence number ; Step 5. Set the branch width to the contraction width , using the random number pair structure Do contraction instantiation to get the structure A contraction instance function of ; Step 6: Use the classical search method to identify the shrinkage instance function Is it a periodic function? If not, determine the structure It does not have periodic properties. In this framework, the function is determined It is not a periodic function, then go to step eight; If so, then , then go to step seven; Among them, the classical search method is used to determine the shrinkage instance function Is it a periodic function? Traverse and search for the cycle to be judged , and then traverse in sequence and identify Is it established? If it appears , then it means Not a function cycle, enter the next 's judgment; Step 7: Judgment Is it less than or equal to : If yes, return to step 5; If not, then The randomly generated contraction instance functions are all judged to be periodic functions, and the structure is thus determined. Has periodic properties, and then determines the structure The following function is a periodic function, then proceed to step eight; Step 8: The discrimination 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 is selected based on the probability of collision and search efficiency. and number of repetitions .
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, the random number pair structure is used When doing shrink instantiation: For linear operation components, use the same function as the original function The contracted bit components with the same logic are used as replacements; 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 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: In step 3, use the current system time as the random seed.
6. 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 according to any one of claims 1 to 5 by executing the instructions stored in the memory.
7. 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 5 is implemented.
8. A computer program product, characterized in that When the computer program product is called by a computer, the computer is caused to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Construction method and device of block cipher round function, electronic equipment and storage medium
CN116208319A
Quantum cryptographic analysis method for improved Type-III Feistel structure
CN117768091A