Rapid construction method and system of random-number-free first-order mask scheme
Through the combination of component allocation strategy and partial property tables, the problem of long construction time and lack of universality of the first-order mask scheme without random numbers in the existing technology is solved, and the rapid construction of a variety of S-boxes is achieved. Mask solution improves construction efficiency and versatility.
Patent Information
- Application Number
- CN202410770149.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-11-01
AI Technical Summary
It is difficult to quickly build a first-order masking scheme without random numbers, especially for PRINCE S-box, and the construction process takes a long time and lacks universality.
Using component allocation strategy and pre-constructed partial properties tables, a first-order masking scheme without random numbers is quickly constructed through a combination of offline and online stages. The specific steps include determining the algebraic degrees and monomial abbreviation of the coordinate function, deriving the component allocation method, looking up some properties tables, judging the mask properties, and forming a mask scheme.
It realizes the rapid construction of multiple S-box first-order masking schemes, including PRINCE S-box, which improves the construction efficiency and speed and is highly versatile.
Smart Images

Figure CN118890164A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of masks, and in particular relates to a method and system for quickly constructing a first-order masking scheme without random numbers. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of IoT technology, a large number of connected devices have appeared in our daily lives. As they are easily accessible, these devices are facing a series of physical attacks, especially side-channel attacks. Side-channel attacks can use physical information such as power consumption, electromagnetics, and temperature of the device to extract secret information from the device.
[0004] In order to resist side channel attacks, researchers have proposed a large number of countermeasures, among which the masking scheme is the most widely used one. The masking scheme can make the intermediate values of the algorithm operation independent of the secret variables, so as to break the relationship between the secret data and the energy consumption of the device.
[0005] Thanks to a good theoretical foundation, threshold implementation has become a widely used hardware mask implementation strategy. In a threshold implementation of a Boolean function, a secret variable is divided into at least td+1 components, where t is the algebraic degree of the Boolean function and d is the security order of the masking scheme. Since the number of components is related to the algebraic degree and security order, the hardware area occupied by a threshold implementation with a high algebraic degree and a high security order is very large.
[0006] To address the hardware resource issue, some literature has proposed a mask implementation scheme that only requires d+1 components to achieve d-order security. In this scheme, random numbers are essential to ensure the security of the entire mask scheme. For example, a first-order secure two-input AND gate requires at least a 1-bit random number.
[0007] In order to get rid of the dependence on random numbers, Shahmirzadi et al. proposed a methodology in 2021 to construct a 2-component first-order secure masking scheme without random numbers. In the above work, the authors gave many first-order masking schemes without random numbers for S-box, such as Midori and PRESENT. The inventors noticed that there are two points for improvement in the above scheme: one is that the methodology of Shahmirzadi et al. cannot give a first-order masking scheme without random numbers for PRINCE S-box. The other is that it takes a lot of time to build an S-box, which takes up to 30 minutes. Summary of the invention
[0008] In order to solve the above problems, the present invention proposes a method and system for quickly constructing a first-order masking scheme without random numbers. The present invention can quickly construct a first-order masking scheme without random numbers and has universality.
[0009] According to some embodiments, the present invention adopts the following technical solutions:
[0010] A method for quickly constructing a first-order masking scheme without random numbers includes the following steps:
[0011] Based on a given S-box, determine the number of input variables and the algebraic degree of each coordinate function, determine the abbreviated notation of the monomial of the corresponding algebraic degree in the coordinate function according to the algebraic degree, and derive all possible component allocation methods according to each coordinate function of the given S-box using the component allocation strategy;
[0012] According to the number of input variables, the algebraic degree of each coordinate function, the corresponding abbreviated notation and all possible component allocation methods, a pre-constructed partial property table is consulted to determine the mask property and obtain a first-order masking scheme without random numbers for a given S-box;
[0013] Among them, the construction process of the partial property table includes determining the number of input variables and algebraic degree of the Boolean function, calculating the abbreviated notation of all monomials of the corresponding algebraic degree according to the number of input variables and the algebraic degree, deriving all possible component allocation methods according to the monomials corresponding to the abbreviated notation, initializing each component function, judging the mask property, storing the combination of component functions that satisfy the mask property, and forming a partial property table.
[0014] As an optional implementation, the construction process of the partial property table is performed offline in advance.
[0015] As an optional implementation, based on a given S-box, the process of obtaining a first-order masking scheme without random numbers for a given S-box is performed online.
[0016] As an optional implementation, the component allocation strategy is a strategy for deriving all possible component allocation methods of a Boolean function. Each term of the Boolean function and each component of the corresponding term are allocated to different component functions to obtain multiple different types of component allocation methods. For each type of component allocation method, multiple different component allocation methods are derived.
[0017] As a further step, for each type of component allocation, δ different component allocations are derived, where:
[0018]
[0019] m is the number of component functions, is the binomial coefficient.
[0020] As an optional implementation, a pre-constructed partial property table is consulted, and in the process of judging the mask property, the mask properties considered include correctness and joint uniformity, wherein correctness requires that the result of the XOR operation of the two output components of the compression layer is equal to each coordinate function of the S-box;
[0021] Traverse all the secret inputs and all the components of the secret inputs of the S-box, and calculate the output of the masking scheme. If for each secret output, the number of occurrences of all possible component forms is equal, then the masking scheme satisfies the joint uniformity.
[0022] As an optional implementation, in the process of constructing the partial property table, the mask properties considered include independent joint probability distribution and balance, wherein the independent joint probability distribution is any value of each secret variable, and the joint probability distribution of each component function is unchanged;
[0023] The balance property is that no matter what the value of the secret variable is, the count of the Boolean function taking the value 0 and the count of 1 are the same.
[0024] As an optional implementation, the partial property table is a lookup table T[Niv][Algdeg][Markterms][Sat] composed of four indexes, wherein Niv is the number of input variables of the target Boolean function, Algdeg is the algebraic degree of the target Boolean function, Markterms is the abbreviated notation for all monomials with algebraic degree of Algdeg in the target Boolean function, and Sat is the component allocation method after the above three variables are determined.
[0025] A fast construction system for a random number-free first-order masking scheme, including:
[0026] The component allocation method derivation module is configured to determine the number of input variables and the algebraic degree of each coordinate function based on a given S-box, determine the abbreviated notation of the monomial of the corresponding algebraic degree in the coordinate function according to the algebraic degree, and derive all possible component allocation methods according to each coordinate function of the given S-box using the component allocation strategy;
[0027] A first-order masking scheme construction module is configured to refer to a pre-constructed partial property table according to the number of input variables, the algebraic degree of each coordinate function, the corresponding abbreviation and all possible component allocation modes, determine the masking properties, and obtain a first-order masking scheme without random numbers for a given S-box;
[0028] The partial property table construction module is configured to determine the number of input variables and algebraic degree of the Boolean function, calculate the abbreviated notation of all monomials of the corresponding algebraic degree according to the number of input variables and the algebraic degree, derive all possible component allocation methods according to the monomials corresponding to the abbreviated notation, initialize each component function, determine the mask property, store the combination of component functions that satisfy the mask property, and form a partial property table.
[0029] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.
[0030] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] The present invention applies the component allocation strategy and can construct more S-box masking schemes, such as PRI NCE S-box, with strong versatility.
[0033] The present invention utilizes a working mode combining an offline stage and an online stage, and the time consumption for providing a masking scheme in the online stage is very short, thereby effectively improving the efficiency and speed of constructing the masking scheme.
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0036] Figure 1 The flowchart of an embodiment is shown in FIG. DETAILED DESCRIPTION
[0037] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0038] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0039] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0040] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.
[0041] Embodiment 1
[0042] A method for quickly constructing a first-order masking scheme without random numbers includes the following steps:
[0043] Online stage: Based on a given S-box, determine the number of input variables and the algebraic degree of each coordinate function, determine the abbreviated notation of the monomial of the corresponding algebraic degree in the coordinate function according to the algebraic degree, and derive all possible component allocation methods according to each coordinate function of the given S-box using the component allocation strategy;
[0044] According to the number of input variables, the algebraic degree of each coordinate function, the corresponding abbreviated notation and all possible component allocation methods, a pre-constructed partial property table is consulted to determine the mask property and obtain a first-order masking scheme without random numbers for a given S-box;
[0045] Offline stage: The construction process of the partial property table includes determining the number of input variables and algebraic degree of the Boolean function, calculating the abbreviated notation of all monomials of the corresponding algebraic degree according to the number of input variables and algebraic degree, deriving all possible component allocation methods according to the monomials corresponding to the abbreviated notation, initializing each component function, judging the mask property, storing the combination of component functions that satisfy the mask property, and forming a partial property table.
[0046] In some embodiments, the offline phase only needs to be performed once, and in subsequent processes, only the online phase needs to be performed.
[0047] A detailed description is given below.
[0048] First, the component allocation strategy is explained, which can derive all possible component allocations of a Boolean function masking scheme. This technology is applied in both offline and online stages.
[0049] The component allocation strategy is a strategy for deriving all possible component allocation methods for Boolean functions. Component allocation methods are situations where the components of several secret variables are allocated to several component functions. As shown below, formula (1) allocates the component a of the secret variables a, b, c, d to0 / 1 ,b 0 / 1 ,c 0 / 1 ,d 0 / 1 Assigned to 8 component functions f i (.), a component allocation method with 0≤i≤7. Combine the components of each component function and abbreviate it as 02468BCF in hexadecimal. f0(a0,b0,c0,d0),f1(a0,b0,c1,d0),f2(a0,b1,c0,d0),f3(a0,b1,a1,d0),f4(a1,b0,c0,d0),f5(a1,b0,c1,d1),f6(a1,b1,c0,d0),f7(a1,b1,c1,d1).(1)
[0050] The following uses the Boolean function f(a,b,c,d)=c+bd+abc as an example to describe the details of the component allocation strategy. Since f(.) is a Boolean function of 4 variables with algebraic degree of 3, the goal of the component allocation strategy is to allocate the components of the 4 variables to 2 3 The component function f i (.),0≤i≤7.
[0051] The strategy consists of two steps. The first step is to determine which components or combinations of components should appear in the component function. The second step is to consider the order of component allocation and optimize some equivalent allocation methods.
[0052] The following is a detailed description of the first step. In order to ensure the incompleteness and correctness of the masking scheme, some components or combinations of components must appear in the component allocation method. For the linear term c of the Boolean function f(.), its components c0 and c1 should be allocated to different component functions. For the square term bd, its component combinations b0d0, b0d1, b1d0, b1d1 should be allocated to different component functions. Similarly, for the cubic term abc, its component combinations a0b0c0, a0b0c1, a0b1c0, a0b1c1, a1b0c0, a1b0c1, a1b1c0, a1b1c1 should appear in different component functions. Considering the above constraints, we can obtain 196 different component allocation methods, one of which is shown in formula (1).
[0053] In the second step, the present invention presents two observations and a conclusion.
[0054] Observation 1: Considering the two properties of the masking scheme (i.e., independent joint probability distribution and balance), the order of the component allocation of the component functions f0(.),…,f3(.) has no effect on the above two properties. Similarly for the component functions f4(.),…,f7(.). In other words, assuming there are m component functions fi (.),0≤i≤m, component function The order in which the components are allocated has no effect on the independent joint probability distribution and balance. Similarly, for the component functions For example, formulas (1), (2) and (3) are equivalent.
[0055] Observation 2: Considering the other two properties of the masking scheme (i.e., correctness and joint uniformity), swapping the order of the component assignments of the component functions f0(.),…,f3(.) and f4(.),…,f7(.) has no effect on the above two properties. In other words, assuming there are m component functions f i (.), 0≤i≤m, exchange component function and The order in which the components are allocated has no effect on correctness and joint uniformity. For example, equations (1) and (4) are equivalent.
[0056] Based on the above:
[0057] f0(a0,b0,c1,d0),f1(a0,b0,c0,d0),f2(a0,b1,c0,d0),f3(a0,b1,c1,d0),f 4(a1,b0,c0,d0),f5(a1,b0,c1,d1),f6(a1,b1,c0,d0),f7(a1,b1,c1,d1).(2)
[0058] f0(a0,b0,c0,d0),f1(a0,b0,c1,d0),f2(a0,b1,c0,d0),f3(a0,b1,c1,d0),f 4(a1,b0,c1,d1),f5(a1,b0,c0,d0),f6(a1,b1,c0,d0),f7(a1,b1,c1,d1).(3)
[0059] f0(a1,b0,c0,d0),f1(a1,b0,c1,d1),f2(a1,b1,c0,d0),f3(a1,b1,c1,d1),f 4(a0,b0,c0,d0),f5(a0,b0,c1,d0),f6(a0,b1,c0,d0),f7(a0,b1,c1,d0).(4)
[0060] From these two observations, we can deduce a conclusion: for each type of component allocation, a total of δ different component allocation methods can be derived, among which:
[0061]
[0062] m is the number of component functions, is the binomial coefficient.
[0063] For the Boolean function f(a, b, c, d) = c + bd + abc, m = 8, each type of component allocation has δ = 35 allocation methods, and there are a total of 196*35 = 6860 component allocation methods.
[0064] Next, we will introduce the pre-calculated partial property table in the offline stage.
[0065] Constructing a Boolean function masking scheme can be transformed into the problem of searching for a set of Boolean functions that satisfy the masking properties, including non-completeness, independent joint probability distribution, balance, correctness, and joint uniformity. Since some masking properties are not directly related to the target Boolean function, some lookup tables that satisfy these masking properties can be constructed in the offline stage, called partial property tables.
[0066] For ease of description, the partial property table is a lookup table T[Niv][Algdeg][Markterms][Sat] consisting of four indexes, namely Niv: the number of input variables of the target Boolean function, Algdeg: the algebraic degree of the target Boolean function, Markterms: a shorthand notation for all monomials with algebraic degree of Algdeg in the target Boolean function, and Sat: the component allocation method after the above three variables are determined.
[0067] The construction process of the partial property table is divided into three steps, namely, determining variables, initializing component functions, and judging mask properties.
[0068] Step 1 (determine variables): Based on the truth table or algebraic standard form of a Boolean function, it is easy to determine its number of input variables Nic and algebraic degree Algdeg. Note that if the above Boolean function is a coordinate function of an S-box in a cryptographic algorithm, then the maximum value of Algdeg is Niv-1.
[0069] The following uses Niv = 4, Algdeg = 3 as an example to describe the values of Markterms and Sat. Algdeg = 3 corresponds to the case of cubic terms. As shown in Table 1, there are 15 cases of cubic terms, and the corresponding values of Markterms are {1, 2, …, 14, 15}. Taking the cubic terms corresponding to Markterms as the input of the component allocation strategy, we can deduce all possible component allocation methods, which is exactly the case of Sat.
[0070] Step 2 (Initialize component functions): Once Niv, Algdeg, Markterms and Sat are known, the specific form of each component function can be initialized, that is, the highest-order term is the case corresponding to Markterms, and the other monomials are arbitrary.
[0071] For example, when Niv = 4, Algdeg = 3, Markterms = 1, Sat = 02468BCF, the highest order term of the first component function is a0b0c0, the highest order term of the second component function is a0b0c1, and the situation of the remaining 6 component functions is similar. In addition to the highest order term, since there are 6 quadratic terms and 4 linear terms, each component function has a total of 2 6+4 kind of situation.
[0072] Step 3 (determine the nature of the mask): Under the glitch expansion detection model, a probe placed at the output of the compression layer will be expanded to 2 Algdeg-1 A probe is placed at the output of the register, where the register stores 2 Algdeg-1 The value of the component function.
[0073] The above situation requires us to search for 2 Algdeg-1 The specific expressions of the component functions make these component functions have independent joint probability distributions. In other words, for any value of the secret variables a, b, ..., the component functions The joint probability distribution of is unchanged. Similarly, when a probe is placed at the other output of the compression layer, this requires that the component function Have independent joint probability distribution. That is, no matter what the values of the secret variables a, b, ... are, the component function The joint probability distribution of is unchanged.
[0074] In addition to the independent joint probability distribution, this step also requires judging another masking property, which is balance. Since balance is an essential property to ensure the subsequent properties of the masking scheme, it is necessary to ensure that the output of the compression layer of the masking scheme is balanced. In other words, no matter what the values of the secret variables a, b, ... are, the Boolean function The counts for values 0 and 1 are the same. Similarly, the Boolean function Balance is also required.
[0075] Store combinations of component functions that satisfy the above two properties To the corresponding partial property table T[Niv][Algdeg][Markterms][Sat].
[0076] Table 1: Case of 15 cubic terms for Niv=4, Algdeg=3.
[0077]
[0078]
[0079] Next, we will introduce the online stage:
[0080] Taking the S-box of the cryptographic algorithm as input, constructing the first-order masking scheme is an online stage.
[0081] This construction process consists of three parts: determining variables, consulting partial property tables, and judging mask properties.
[0082] Step 1 (determine variables): The variables that need to be determined in this step include Niv, Algdeg, Markterms and Sat. Since the input here is an S-box, the value of Niv is the number of input variables of this S-box. The value of Algdeg is the algebraic degree of each coordinate function of this S-box. The value of Markterms is a shorthand notation for the case where the algebraic degree of the monomial in the coordinate function is Algdeg. Taking each coordinate function of this S-box as the input of the component allocation strategy, we can derive all possible component allocation methods, which is the value of Sat.
[0083] Step 2 (check partial property table): Based on the variables determined above, the partial property table constructed in the offline stage can be checked to obtain some combinations of component functions that satisfy the partial mask property. These component functions satisfy independent joint probability distribution and balance.
[0084] Step 3 (determine the mask properties): In addition to the two mask properties in the partial property table, correctness and joint uniformity are also important properties of the mask scheme.
[0085] Correctness requires that the XOR result of the two output components of the compression layer is equal to the target Boolean function. In other words, the Boolean function The result is equal to the target Boolean function, that is, each coordinate function of the S-box. For each coordinate function of the S-box, repeat the above process of determining variables, consulting the partial property table, and judging the mask property, and we can get the mask scheme for each coordinate function.
[0086] Taking the S-box as a whole, we need to find a combination (one for each coordinate function) that satisfies the joint uniformity property. In other words, we traverse all the secret inputs of the S-box and all the components of the secret inputs, and calculate the output of the masking scheme. If for each secret output, the number of occurrences of all possible component forms is equal, then the masking scheme satisfies the joint uniformity property.
[0087] In summary, this embodiment can quickly construct a large number of mask schemes for a given S-box by constructing a partial property table offline and constructing a mask scheme online.
[0088] Embodiment 2
[0089] A fast construction system for a random number-free first-order masking scheme, including:
[0090] The component allocation method derivation module is configured to determine the number of input variables and the algebraic degree of each coordinate function based on a given S-box, determine the abbreviated notation of the monomial of the corresponding algebraic degree in the coordinate function according to the algebraic degree, and derive all possible component allocation methods according to each coordinate function of the given S-box using the component allocation strategy;
[0091] A first-order masking scheme construction module is configured to refer to a pre-constructed partial property table according to the number of input variables, the algebraic degree of each coordinate function, the corresponding abbreviation and all possible component allocation modes, determine the masking properties, and obtain a first-order masking scheme without random numbers for a given S-box;
[0092] The partial property table construction module is configured to determine the number of input variables and algebraic degree of the Boolean function, calculate the abbreviated notation of all monomials of the corresponding algebraic degree according to the number of input variables and the algebraic degree, derive all possible component allocation methods according to the monomials corresponding to the abbreviated notation, initialize each component function, determine the mask property, store the combination of component functions that satisfy the mask property, and form a partial property table.
[0093] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] The present invention is described with reference to flowcharts and / or block diagrams of 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes 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.
[0095] 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 including 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.
[0096] 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 in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] 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 by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.
Claims
1. A fast construction method for a first-order masking scheme without random numbers, characterized in that: The following steps are involved: Based on a given S-box, determine the number of input variables and the algebraic degree of each coordinate function, determine the abbreviated notation of the monomial of the corresponding algebraic degree in the coordinate function according to the algebraic degree, and derive all possible component allocation methods according to each coordinate function of the given S-box using the component allocation strategy; According to the number of input variables, the algebraic degree of each coordinate function, the corresponding abbreviated notation and all possible component allocation methods, a pre-constructed partial property table is consulted to determine the mask property and obtain a first-order masking scheme without random numbers for a given S-box; Among them, the construction process of the partial property table includes determining the number of input variables and algebraic degree of the Boolean function, calculating the abbreviated notation of all monomials of the corresponding algebraic degree according to the number of input variables and the algebraic degree, deriving all possible component allocation methods according to the monomials corresponding to the abbreviated notation, initializing each component function, judging the mask property, storing the combination of component functions that satisfy the mask property, and forming a partial property table.
2. A method for rapidly constructing a first-order masking scheme without random numbers as claimed in claim 1, characterized in that: The construction process of the partial property table is carried out offline in advance; Based on a given S-box, the process of obtaining a first-order masking scheme without random numbers for a given S-box is performed online.
3. The method for rapidly constructing a first-order masking scheme without random numbers as claimed in claim 1, characterized in that: The component allocation strategy is a strategy for deriving all possible component allocation methods of a Boolean function. Each term of the Boolean function and each component of the corresponding term are allocated to different component functions to obtain multiple different component allocation methods. For each type of component allocation method, multiple different component allocation methods are derived.
4. A method for rapidly constructing a first-order masking scheme without random numbers as claimed in claim 3, characterized in that: For each type of component allocation, δ different component allocation methods are derived, where: m is the number of component functions, is the binomial coefficient.
5. The method for rapidly constructing a first-order masking scheme without random numbers as claimed in claim 1, characterized in that: Refer to the pre-built partial property table. In the process of judging the mask properties, the mask properties considered include correctness and joint uniformity. Among them, correctness requires that the result of the XOR operation of the two output components of the compression layer is equal to each coordinate function of the S-box. Traverse all the secret inputs and all the components of the secret inputs of the S-box, and calculate the output of the masking scheme. If for each secret output, the number of occurrences of all possible component forms is equal, then the masking scheme satisfies the joint uniformity.
6. A method for rapidly constructing a first-order mask scheme without random numbers as claimed in claim 1 or 5, characterized in that: In the process of constructing the partial property table, the mask properties considered include independent joint probability distribution and balance, where the independent joint probability distribution is any value of each secret variable, and the joint probability distribution of each component function is unchanged; The balance property is that no matter what the value of the secret variable is, the count of the Boolean function taking the value 0 and the count of 1 are the same.
7. A method for rapidly constructing a first-order masking scheme without random numbers as claimed in claim 1, characterized in that: The partial property table is a lookup table T[Niv][Algdeg][Markterms][Sat] composed of four indexes, wherein Niv is the number of input variables of the target Boolean function, Algdeg is the algebraic degree of the target Boolean function, Markterms is the abbreviated notation for all monomials with algebraic degree of Algdeg in the target Boolean function, and Sat is the component allocation method after the above three variables are determined.
8. A fast construction system for a first-order masking scheme without random numbers, characterized in that: include: The component allocation method derivation module is configured to determine the number of input variables and the algebraic degree of each coordinate function based on a given S-box, determine the abbreviated notation of the monomial of the corresponding algebraic degree in the coordinate function according to the algebraic degree, and derive all possible component allocation methods according to each coordinate function of the given S-box using the component allocation strategy; A first-order masking scheme construction module is configured to refer to a pre-constructed partial property table according to the number of input variables, the algebraic degree of each coordinate function, the corresponding abbreviation and all possible component allocation modes, determine the masking properties, and obtain a first-order masking scheme without random numbers for a given S-box; The partial property table construction module is configured to determine the number of input variables and algebraic degree of the Boolean function, calculate the abbreviated notation of all monomials of the corresponding algebraic degree according to the number of input variables and the algebraic degree, derive all possible component allocation methods according to the monomials corresponding to the abbreviated notation, initialize each component function, determine the mask property, store the combination of component functions that satisfy the mask property, and form a partial property table.
9. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are completed.
