A binary linear complementary pair generation method, system and device based on Belov code
By constructing linear complementary code pairs (C, D) based on Belov codes, the problems of limited parameter range and high minimum distance in existing technologies are solved. This enables the construction of a wider range of parameter sets and dual security protection capabilities, thereby improving the coding efficiency and security of the data security protection system.
Patent Information
- Application Number
- CN202610319934.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-03
AI Technical Summary
Existing methods for constructing binary linear complementary codes suffer from limitations in parameter range, high minimum distance requirements, and insufficient construction flexibility.
A Belov-based construction method is adopted. By obtaining initial parameters, selecting vector dimension and subspace size, calculating equivalent Solomon-Stiffler code parameters, constructing Solomon-Stiffler and Belov generation matrices, and performing matrix transformation operations, linear complementary code pairs (C, D) are generated.
It breaks through the lower limit of existing technologies, expands the construction range of optimal binary LCPs, and the generated code pairs can maintain optimality at a smaller minimum distance. It provides dual protection against fault injection attacks and side-channel attacks, and improves coding efficiency and construction success rate.
Smart Images

Figure CN122339488A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security technology, and in particular relates to a method, system and device for generating binary linear complementary code pairs based on Belov codes. Background Technology
[0002] Channel coding is one of the most fundamental problems in communication theory, originating from the need for reliable communication over noisy channels. With the deepening of digitization, coding theory, as the mathematical cornerstone for ensuring reliable and secure information transmission, has become increasingly important. Linear complementary code pairs (LCPs) are an important concept in coding theory, consisting of two linear codes C and D. In practical applications, LCPs are not only used for communication error correction but also widely applied in cryptography. In particular, the direct-sum mask algorithm based on LCPs can simultaneously resist side-channel attacks and fault injection attacks. The minimum distance d(C) of code C measures the protection against fault injection attacks, and the minimum distance d(D) of the dual code of code D... ⊥ This measures protection against side-channel attacks. Therefore, a method is constructed with maximum security parameters min{d(C), d(D)}. ⊥ Linear complementary code pairs of )} have become a key technical requirement in the fields of coding and cryptography.
[0003] To address the aforementioned needs, existing technologies have proposed various methods for constructing LCPs. These methods mainly include: constructing LCPs using non-special divisors over the Kummer expansion function domain; constructing base domain LCPs from extended domain LCPs using concatenation and generalized concatenation techniques; generating LCPs from given algebraic geometric codes using multiplier transformations; algebraic construction methods based on trace functions and definition sets; construction methods based on Simplex codes; and construction methods based on Solomon-Stiffler (SS) codes. While the SS code-based method can generate a series of optimal binary LCPs, it has a high requirement for minimum distance, limiting the range of constructable code lengths and dimensions, making it impossible to obtain many optimal binary LCPs with small minimum distances using this method. Furthermore, existing technologies generally suffer from the following drawbacks: first, they rely on the generator matrix of existing codes for construction, limiting the flexibility of parameters such as code length and dimension; second, they require specific conditions for code length and dimension, lacking universality; and third, the constructed code length has a lower bound, making it impossible to obtain codewords with smaller lengths.
[0004] To address the limitations of existing binary linear complementary code pair construction methods, such as restricted parameter range, high minimum distance requirements, and insufficient construction flexibility, this invention provides a method, system, and device for generating binary linear complementary code pairs based on Belov codes. Summary of the Invention
[0005] This invention proposes a method, system, and device for generating binary linear complementary code pairs based on Belov codes, in order to at least solve the problems of limited parameter range, high minimum distance requirement, and insufficient construction flexibility in existing binary linear complementary code pair construction methods.
[0006] According to an embodiment of the present invention, a method for generating binary linear complementary code pairs based on Belov codes is provided, which is applied to an encoding device in a data security protection system, comprising:
[0007] Step S01: Obtain the initial Belov code parameters, including the dimension k and the target minimum distance d. Belov ;
[0008] Step S02: Select Belov code construction parameters, including setting the vector dimension θ and the size of the subspace A, |A|.
[0009] Step S03: Based on the minimum target distance d Belov The parameters of the equivalent Solomon-Stiffler code are calculated using the Belov code construction parameters, including the minimum distance d. SS Repeatability factor h, construction parameter u i ;
[0010] Step S04: Construct the generator matrix of the Solomon-Stiffler code, including constructing the inverse code subspace F of the Solomon-Stiffler code and generating the generator matrix G of the Solomon-Stiffler code using a direct allocation strategy. SS ;
[0011] Step S05: Construct the generator matrix of the Belov code, including constructing the Belov deletion set F1, ensuring F∩F1=∅, thereby generating the generator matrix G of the Belov code. Belov ;
[0012] Step S06: Based on the generator matrix G of the Belov code Belov Constructing a linear complementary code pair (C, D) includes G Belov Converting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D;
[0013] Step S07: Verify the invertibility condition. If it is satisfied, determine that (C, D) constitutes a linear complementary code pair. Otherwise, return to step S02 to reselect the Belov code construction parameters.
[0014] Step S08: Output the generator matrix of the linear complementary code pair (C, D) for use in configuring the data security protection system.
[0015] In a preferred embodiment, the calculation of the parameters of the equivalent Solomon-Stiffler code in step S03 includes:
[0016] Based on the target minimum distance d Belov The vector dimension θ and the size of the subspace A, |A|, determine the redundancy parameter ε;
[0017] The minimum distance d of the equivalent Solomon-Stiffler code is calculated based on the redundancy parameter ε. SS ;
[0018] Based on the minimum distance d SS Calculate the repetition factor h;
[0019] Based on the minimum distance d SS The construction parameter u is calculated using the repetition factor h. i .
[0020] In a preferred embodiment, constructing the inverse code subspace F of the Solomon-Stiffler code in step S04 includes:
[0021] Select subspace sequence U i Previously u i The standard basis vectors are used as U i The base;
[0022] Constructing the inverse code subspace .
[0023] In a preferred embodiment, the subspace sequence U i The standard basis vectors, which are constrained by the coordinates of the copies to which they are assigned, and their linear combinations are generated and assigned to different copies for deletion. All Solomon-Stiffler deletion operations are restricted to the first t copies, thus achieving structured control over the deletion position.
[0024] In a preferred embodiment, constructing the Belov deletion set F1 in step S05 includes:
[0025] Select vectors that do not exist in the inverse code subspace F to form a subspace W of dimension θ;
[0026] Construct a Belov deletion set F1 based on a subset A of subspace W; all vector sets in subset A with a cardinality not exceeding θ are linearly independent.
[0027] In a preferred embodiment, in step S06, G is... Belov Converting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D, including:
[0028] G Belov Transform the system into the systematic form G=(I) using column permutation. k |M);
[0029] Swap the two preset columns x1=(1,1,...,1) in the information bit matrix M. T and x2=(0,1,...,1) T Location;
[0030] Performing a cyclic row shift operation on the swapped matrix yields the transformation matrix N. T ;
[0031] The generator matrix of the constructed code C is G=(I k |M), the generator matrix of the constructed code D is H=(N|I) n-k ).
[0032] In a preferred embodiment, the invertibility condition in step S07 is the judgment matrix I. k Is +MN reversible?
[0033] According to another embodiment of the present invention, a binary linear complementary code pair generation system based on Belov codes is provided, which is applied in data security protection equipment, comprising:
[0034] The parameter acquisition module is used to obtain the initial Belov code parameters, which include the dimension k and the target minimum distance d. Belov ;
[0035] The parameter selection module is used to select Belov code construction parameters, including setting the vector dimension θ and the size of the subspace A, |A|.
[0036] The parameter calculation module is used to calculate the minimum distance d to the target. Belov The parameters of the equivalent Solomon-Stiffler code are calculated using the Belov code construction parameters, including the minimum distance d. SS Repeatability factor h, construction parameter u i ;
[0037] The first matrix construction module is used to construct the generator matrix of the Solomon-Stiffler code, including constructing the inverse code subspace F of the Solomon-Stiffler code and generating the generator matrix G of the Solomon-Stiffler code using a direct allocation strategy. SS ;
[0038] The second matrix construction module is used to construct the generator matrix of Belov codes, including constructing the Belov deletion set F1, ensuring F∩F1=∅, and thereby generating the generator matrix G of the Belov codes. Belov ;
[0039] The code pair construction module is used to construct the code pair based on the generator matrix G of the Belov code. Belov Constructing a linear complementary code pair (C, D) includes G Belov Converting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D;
[0040] The reversibility verification module is used to verify the reversibility condition. If the condition is met, it is determined that (C, D) constitutes a linear complementary code pair; otherwise, the parameter selection module is triggered to reselect the parameters.
[0041] The output module is used to output the generation matrix of the linear complementary code pair (C, D) for configuring the data security protection device.
[0042] According to another embodiment of the present invention, a data security protection device is provided, comprising:
[0043] One or more processors;
[0044] Memory, used to store one or more programs;
[0045] When the one or more programs are executed by the one or more processors, the one or more processors implement the Belov code-based binary linear complementary code pair generation method of the present invention, and use the generated binary linear complementary code pairs to encode data to resist side-channel attacks and fault injection attacks.
[0046] According to another embodiment of the present invention, a computer-readable storage medium is provided that stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the method for generating binary linear complementary code pairs based on Belov codes as described above.
[0047] The advantages of the Belov-based binary linear complementary code generation method, system, and device of this invention are:
[0048] (1) The construction method of the present invention based on Belov codes breaks through the lower limit of SS codes by introducing an additional subspace deletion operation. Compared with the traditional construction method based on Solomon-Stiffler codes, it can maintain the optimality of the code at a smaller minimum distance, thereby expanding the construction range of optimal binary LCPs to a wider parameter set and covering the parameter region that cannot be covered by the existing technology.
[0049] (2) By improving the structure of Belov codes, this invention can construct optimal binary LCPs with shorter code lengths while still reaching the Griesmer bound under the same dimension, compared with the traditional SS code-based construction method which is limited by the parameter constraints of the SS code itself. This improves coding efficiency and is suitable for data security protection scenarios with limited resources.
[0050] (3) In constructing the Belov code generation matrix, the present invention places the Solomon-Stiffler inverse code subspace at the initial coordinates, while arranging the Belov extended inverse code subspace at the last θ coordinates to form a complementary layout structure. At the same time, by selecting standard basis vectors from the subspace to form a subset, the Belov deletion set F1 is composed of a linear combination of non-standard basis vectors. Compared with the traditional construction strategy, this construction strategy effectively avoids the vector conflict between F and F1, ensures that the condition F∩F1=∅ is naturally satisfied, simplifies the complexity of the construction process, and improves the construction success rate.
[0051] (4) In constructing the Solomon-Stiffler code, the present invention adopts a direct allocation strategy, which allocates each subspace U i It generates standard basis vectors and their linear combinations that are constrained by the coordinates of the assigned copies, and restricts all Solomon-Stiffler deletion operations to the first t copies. Compared with existing construction methods that delete positions with uncertain positions, it achieves structured control over the deletion positions, making the construction process of the generated matrix more deterministic and controllable, and facilitating its implementation and verification in practical systems.
[0052] (5) The binary linear complementary code pair (C, D) generated by this invention can simultaneously provide protection against fault injection attacks and side-channel attacks. The minimum distance d(C) of code C directly corresponds to the protection level against fault injection attacks, and the minimum distance d(D) of the dual code of code D... ⊥ This provides protection against side-channel attacks. Compared to existing high-order masking schemes that can only resist side-channel attacks, it achieves built-in dual security protection capabilities, thereby improving the overall security of the data security protection system. Attached Figure Description
[0053] Figure 1 This is a flowchart of a method for generating binary linear complementary code pairs based on Belov codes according to an embodiment of the present invention.
[0054] Figure 2 This is a flowchart illustrating the calculation of the parameters of the equivalent Solomon-Stiffler code in step S03 of an embodiment of the present invention.
[0055] Figure 3This is a flowchart of constructing the inverse code subspace F of the Solomon-Stiffler code in step S04 of an embodiment of the present invention.
[0056] Figure 4 This is a flowchart of constructing the Belov deletion set F1 in step S05 of an embodiment of the present invention.
[0057] Figure 5 This is a flowchart of step S06 in an embodiment of the present invention.
[0058] Figure 6 This is a schematic diagram of the structure of the binary linear complementary code pair generation system based on Belov codes in an embodiment of the present invention.
[0059] Figure 7 This is a schematic diagram of the logical structure of a data security protection device according to an embodiment of the present invention. Detailed Implementation
[0060] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention. The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. No specific limitations are made in this application depending on the specific settings of the actual application environment.
[0061] According to an embodiment of the present invention, a method for generating binary linear complementary code pairs based on Belov codes is provided, which is applied to the encoding device in a data security protection system. The flowchart is as follows. Figure 1 As shown, it includes:
[0062] Step S01: Obtain the initial Belov code parameters, including the dimension k and the target minimum distance d. Belov ;
[0063] Step S02: Select Belov code construction parameters, including setting the vector dimension θ and the size of the subspace A, |A|.
[0064] Step S03: Based on the minimum target distance d Belov The parameters of the equivalent Solomon-Stiffler code are calculated using the Belov code construction parameters, including the minimum distance d. SS Repeatability factor h, construction parameter u i ;
[0065] Step S04: Construct the generator matrix of the Solomon-Stiffler code, including constructing the inverse code subspace F of the Solomon-Stiffler code and generating the generator matrix G of the Solomon-Stiffler code using a direct allocation strategy. SS ;
[0066] Step S05: Construct the generator matrix of the Belov code, including constructing the Belov deletion set F1, ensuring F∩F1=∅, thereby generating the generator matrix G of the Belov code. Belov ;
[0067] Step S06: Based on the generator matrix G of the Belov code Belov Constructing a linear complementary code pair (C, D) includes G Belov Converting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D;
[0068] Step S07: Verify the invertibility condition. If it is satisfied, determine that (C, D) constitutes a linear complementary code pair. Otherwise, return to step S02 to reselect the Belov code construction parameters.
[0069] Step S08: Output the generator matrix of the linear complementary code pair (C, D) for use in configuring the data security protection system.
[0070] Belov codes are a generalization of SS codes and are a class of optimal linear codes that can reach the Griesmer bound. By introducing additional subspace deletion operations, they can maintain their optimality even with a smaller minimum distance. Based on this excellent property of Belov codes, this invention generates binary linear complementary code pairs through steps such as constructing a Solomon-Stiffler code generator matrix, constructing a Belov code generator matrix, performing matrix transformation operations, and verifying invertibility conditions. Compared with existing technologies, this invention can break through the lower bound limitation of SS codes, extending the construction range of optimal binary LCPs to a wider range of parameter sets. It constructs optimal binary LCPs with shorter code lengths while still reaching the Griesmer bound under the same dimension. Simultaneously, it employs a deletion set construction strategy with complementary layouts to avoid vector collisions, achieving structured control over deletion positions, improving construction success rate and coding efficiency. The generated LCPs can simultaneously provide dual protection against fault injection attacks and side-channel attacks.
[0071] In this embodiment, the initial Belov code parameters are input in step S01: dimension k, target minimum distance d. Belov Determine the size of the LCPs to be constructed.
[0072] In this embodiment, in step S02, the following parameters are selected: vector dimension 3≤θ≤u1, and the size of subspace A: θ−1<|A|≤θ+1.
[0073] In a preferred embodiment, the parameters of the equivalent Solomon-Stiffler code are calculated in step S03, as shown in the flowchart below. Figure 2 As shown, it includes:
[0074] Step S031: Based on the target minimum distance d Belov The vector dimension θ and the size of the subspace A, |A|, determine the redundancy parameter ε;
[0075] Step S032: Calculate the minimum distance of the equivalent Solomon-Stiffler code based on the redundancy parameter ε;
[0076] Step S033: Based on the minimum distance d SS Calculate the repetition factor h;
[0077] Step S034: Based on the minimum distance d SS The construction parameter u is calculated using the repetition factor h. i .
[0078] In this embodiment, based on the target minimum distance d Belov The vector dimension θ and the size of the subspace A, |A|, determine the redundancy parameter ε. Based on the redundancy parameter ε, the minimum distance d of the equivalent Solomon-Stiffler code is calculated. SS As shown in equation (1).
[0079] (1)
[0080] Based on the minimum distance d SS The repetition factor h is calculated as shown in equation (2).
[0081] (2)
[0082] Based on the minimum distance d SS The construction parameter u is calculated using the repetition factor h. i That is, the initial simplex code S k The parameters of (h) are calculated as shown in the following formula to determine u. i The conditions for constructing SS codes are met, as shown in equation (3).
[0083] (3)
[0084] In a preferred embodiment, step S04 involves constructing the inverse code subspace F of the Solomon-Stiffler code, as shown in the flowchart below. Figure 3 As shown, it includes:
[0085] Step S041: Select subspace sequence U i Previously u i The standard basis vectors are used as U i The base;
[0086] Step S042: Construct the inverse code subspace .
[0087] In this embodiment, each subspace U i The dimension is determined by the parameter u i Decision, therefore U i i contains 2 ui−1 A non-zero vector, usually the first u is chosen. i The standard basis vectors are used as U i The basis of F. To ensure that the columns deleted from SS codes and Belov codes do not intersect under the condition F∩F1=∅, the vectors constituting F need to be carefully chosen.
[0088] In a preferred embodiment, the subspace sequence U i The standard basis vectors, which are constrained by the coordinates of the copies to which they are assigned, and their linear combinations are generated and assigned to different copies for deletion. All Solomon-Stiffler deletion operations are restricted to the first t copies, thus achieving structured control over the deletion position.
[0089] This invention employs a direct allocation strategy: each subspace U i The standard basis vectors, which are constrained by the coordinates of their assigned copies, and their linear combinations are generated and assigned to different copies for deletion. This method restricts all Solomon-Stiffler deletion operations to the first t copies, ensuring that operations on all subspaces only involve the first few coordinates, thereby achieving structured control over the deletion location.
[0090] Constructing the inverse code subspace in this way Generate the generator matrix of the Solomon-Stiffler code, as shown in equation (4).
[0091] (4)
[0092] In a preferred embodiment, step S05 involves constructing the Belov deletion set F1, as shown in the flowchart below. Figure 4 As shown, it includes:
[0093] Step S051: Select vectors that do not exist in the inverse code subspace F to form a subspace W of dimension θ;
[0094] Step S052: Construct a Belov deletion set F1 based on a subset A of the subspace W; any set of vectors in the subset A with a cardinality not exceeding θ are linearly independent.
[0095] In this embodiment, the improvement of Belov codes over SS codes is the introduction of a subspace W, which contains 2 θ−1 A non-zero vector. In the construction of SS codes, the subspace sequence U... i Given different initial coordinates, W is intentionally placed on the last θ coordinates for operation; this complementary arrangement is crucial for avoiding conflicts. When specifically choosing a vector for W, vectors that do not exist in the inverse code space F are preferred, ensuring that the intersection W∩F is as small as possible.
[0096] Next, we apply the selection criteria for subset A. The set A ⊂ W is a fundamental component of the Belov construction. Any set of vectors in A with a cardinality not exceeding θ must be linearly independent. Therefore, we include the θ standard basis vectors (unit vectors) in the subspace W into subset A, such that F1 = W\A is composed of linear combinations of those vectors in W that are not standard basis vectors.
[0097] In step S05, the Belov code generation matrix is generated based on the above set, as shown in equation (5).
[0098] (5)
[0099] In a preferred embodiment, the flowchart of step S06 is as follows: Figure 5 As shown, it includes:
[0100] Step S061, G Belov Transform the system into the systematic form G=(I) using column permutation. k |M);
[0101] Step S062: Swap the two preset columns x1=(1,1,...,1) in the information bit matrix M. T and x2=(0,1,...,1) T Location;
[0102] Step S063: Perform a cyclic row shift operation on the swapped matrix to obtain the transformation matrix N. T ;
[0103] Step S064: The generator matrix of the constructed code C is G=(I k |M), the generator matrix of the constructed code D is H=(N|I) n-k ).
[0104] In this embodiment, the generator matrix GBelov of the Belov code is converted into the systematic form G=(I k|M), swap two specific columns x1=(1,1,...,1) in the information bit matrix M. T and x2=(0,1,...,1) T After obtaining the position of σ1(M), perform a cyclic row shift on σ1(M) to obtain the transformation matrix N. T The generator matrix of the constructed code C is G=(I k |M), the generator matrix of code D is H=(N|I n-k ).
[0105] In a preferred embodiment, the invertibility condition in step S07 is the judgment matrix I. k Is +MN invertible? In this embodiment, if matrix I... k If +MN is invertible, then (C, D) constitutes a linear complementary code pair; otherwise, return to step S02 to reselect the Belov code construction parameters.
[0106] In step S08, the optimal binary LCPs are output: the security parameters min{d(C),d(D)} of the linear complementary code pair (C, D) ⊥ )}=d Belov And achieves the maximum and minimum distance d of the binary [n, k] linear code. L (n, k), where n = g(k, d) Belov ) Reach the Griesmer boundary.
[0107] In one specific implementation, the constructed partial generating matrix is as follows:
[0108] G=(I k |M) matrix M:
[0109]
[0110] The LCPs parameters generated by this method are shown in Tables 1 and 2:
[0111] Table 1. Experimental Comparison of Binary LCPs
[0112]
[0113] Table 2 Optimal safety parameters for binary LCPs
[0114]
[0115] This shows that the binary LCPs construction method based on Belov codes can construct LCPs with smaller code length and smaller minimum distance than the binary LCPs construction method based on Solomon-Stiffler codes.
[0116] Therefore, compared to existing construction methods based on Solomon-Stiffler codes, this invention significantly reduces the lower bound requirement for the minimum distance by utilizing Belov codes, thereby expanding the construction range of optimal binary linear complementary code pairs to smaller code lengths and lower minimum distances, filling the parameter gaps that the original methods could not cover. Simultaneously, this invention provides a complete deterministic construction process from Belov code parameter selection to LCP generation. The security parameters of the generated code pairs strictly reach the theoretical optimal values, that is, the maximum and minimum distances of linear codes under the corresponding dimensions and code lengths. This provides richer and more flexible coding options for secure applications that use direct sum masks to combat side-channel attacks and fault injection attacks, possessing clear practical value and significant cryptographic implications.
[0117] According to another embodiment of the present invention, a binary linear complementary code pair generation system based on Belov codes is provided, which is applied in data security protection equipment. A schematic diagram of the structure is shown below. Figure 6 As shown, it includes:
[0118] The parameter acquisition module is used to obtain the initial Belov code parameters, which include the dimension k and the target minimum distance d. Belov ;
[0119] The parameter selection module is used to select Belov code construction parameters, including setting the vector dimension θ and the size of the subspace A, |A|.
[0120] The parameter calculation module is used to calculate the minimum distance d to the target. Belov The parameters of the equivalent Solomon-Stiffler code are calculated using the Belov code construction parameters, including the minimum distance d. SS Repeatability factor h, construction parameter u i ;
[0121] The first matrix construction module is used to construct the generator matrix of the Solomon-Stiffler code, including constructing the inverse code subspace F of the Solomon-Stiffler code and generating the generator matrix G of the Solomon-Stiffler code using a direct allocation strategy. SS ;
[0122] The second matrix construction module is used to construct the generator matrix of Belov codes, including constructing the Belov deletion set F1, ensuring F∩F1=∅, and thereby generating the generator matrix G of the Belov codes. Belov ;
[0123] The code pair construction module is used to construct the code pair based on the generator matrix G of the Belov code. Belov Constructing a linear complementary code pair (C, D) includes G BelovConverting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D;
[0124] The reversibility verification module is used to verify the reversibility condition. If the condition is met, it is determined that (C, D) constitutes a linear complementary code pair; otherwise, the parameter selection module is triggered to reselect the parameters.
[0125] The output module is used to output the generation matrix of the linear complementary code pair (C, D) for configuring the data security protection device.
[0126] According to another embodiment of the present invention, a data security protection device is provided, the logical structure of which is shown in the schematic diagram below. Figure 7 As shown, it includes:
[0127] One or more processors;
[0128] Memory, used to store one or more programs;
[0129] When the one or more programs are executed by the one or more processors, the one or more processors implement the Belov code-based binary linear complementary code pair generation method of the present invention, and use the generated binary linear complementary code pairs to encode data to resist side-channel attacks and fault injection attacks.
[0130] According to another embodiment of the present invention, a computer-readable storage medium is provided that stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the method for generating binary linear complementary code pairs based on Belov codes as described above.
[0131] The methods described above according to the invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be stored as software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an AuIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the processes shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the processes shown herein.
[0132] Of course, those skilled in the art should recognize that the above embodiments are only used to illustrate the present invention and are not intended to limit the present invention. Any changes or modifications to the above embodiments that are within the scope of the present invention will fall within the protection scope of the present invention.
Claims
1. A method for generating binary linear complementary code pairs based on Belov codes, characterized in that, An encoding device applied in a data security protection system, the method comprising: Step S01: Obtain the initial Belov code parameters, including the dimension k and the target minimum distance d. Belov ; Step S02: Select Belov code construction parameters, including setting the vector dimension θ and the size of the subspace A, |A|. Step S03: Based on the minimum target distance d Belov The parameters of the equivalent Solomon-Stiffler code are calculated using the Belov code construction parameters, including the minimum distance d. SS Repeatability factor h, construction parameter u i ; Step S04: Construct the generator matrix of the Solomon-Stiffler code, including constructing the inverse code subspace F of the Solomon-Stiffler code and generating the generator matrix G of the Solomon-Stiffler code using a direct allocation strategy. SS ; Step S05: Construct the generator matrix of the Belov code, including constructing the Belov deletion set F1, ensuring F∩F1=∅, thereby generating the generator matrix G of the Belov code. Belov ; Step S06: Based on the generator matrix G of the Belov code Belov Constructing a linear complementary code pair (C, D) includes G Belov Converting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D; Step S07: Verify the invertibility condition. If it is satisfied, determine that (C, D) constitutes a linear complementary code pair. Otherwise, return to step S02 to reselect the Belov code construction parameters. Step S08: Output the generator matrix of the linear complementary code pair (C, D) for use in configuring the data security protection system.
2. The method for generating binary linear complementary code pairs based on Belov codes according to claim 1, characterized in that, The parameters for calculating the equivalent Solomon-Stiffler code in step S03 include: Based on the target minimum distance d Belov The vector dimension θ and the size of the subspace A, |A|, determine the redundancy parameter ε; The minimum distance d of the equivalent Solomon-Stiffler code is calculated based on the redundancy parameter ε. SS ; Based on the minimum distance d SS Calculate the repetition factor h; Based on the minimum distance d SS The construction parameter u is calculated using the repetition factor h. i .
3. The method for generating binary linear complementary code pairs based on Belov codes according to claim 1, characterized in that, The step S04 of constructing the inverse code subspace F of the Solomon-Stiffler code includes: Select subspace sequence U i , before u i The standard basis vectors are used as U i The base; Constructing the inverse code subspace .
4. The method for generating binary linear complementary code pairs based on Belov codes according to claim 3, characterized in that, The subspace sequence U i The standard basis vectors, which are constrained by the coordinates of the copies to which they are assigned, and their linear combinations are generated and assigned to different copies for deletion. All Solomon-Stiffler deletion operations are restricted to the first t copies, thus achieving structured control over the deletion position.
5. The method for generating binary linear complementary code pairs based on Belov codes according to claim 1, characterized in that, The construction of the Belov deletion set F1 in step S05 includes: Select vectors that do not exist in the inverse code subspace F to form a subspace W of dimension θ; Construct a Belov deletion set F1 based on a subset A of subspace W; all vector sets in subset A with a cardinality not exceeding θ are linearly independent.
6. The method for generating binary linear complementary code pairs based on Belov codes according to claim 1, characterized in that, In step S06, G will be... Belov Converting to system form, performing matrix transformation operations on the information bit matrix to obtain the transformation matrix, and using this to construct the generator matrices of code C and code D, including: G Belov Transform the system into the form G=(I) using column permutation. k |M); Swap the two preset columns x1=(1,1,...,1) in the information bit matrix M. T and x2=(0,1,...,1) T Location; Performing a cyclic row shift operation on the swapped matrix yields the transformation matrix N. T ; The generator matrix of the constructed code C is G=(I k |M), the generator matrix of the constructed code D is H=(N|I) n-k ).
7. The method for generating binary linear complementary code pairs based on Belov codes according to claim 1, characterized in that, The invertibility condition in step S07 is the judgment matrix I. k Is +MN reversible? 8. A binary linear complementary code pair generation system based on Belov codes, characterized in that, The system, used in data security protection equipment, includes: The parameter acquisition module is used to obtain the initial Belov code parameters, which include the dimension k and the target minimum distance d. Belov The parameter selection module is used to select Belov code construction parameters, including setting the vector dimension θ and the size of the subspace A, |A|; the parameter calculation module is used to calculate the minimum distance d to the target. Belov The parameters of the equivalent Solomon-Stiffler code are calculated using the Belov code construction parameters, including the minimum distance d. SS Repeatability factor h, construction parameter u i The first matrix construction module is used to construct the generator matrix of the Solomon-Stiffler code, including constructing the inverse code subspace F of the Solomon-Stiffler code and generating the generator matrix G of the Solomon-Stiffler code using a direct allocation strategy. SS The second matrix construction module is used to construct the generator matrix of Belov codes, including constructing the Belov deletion set F1, ensuring F∩F1=∅, and thereby generating the generator matrix G of the Belov codes. Belov The code pair construction module is used to construct the code pair based on the generator matrix G of the Belov code. Belov Constructing a linear complementary code pair (C, D) includes G Belov The system is converted to a system form, and a matrix transformation operation is performed on the information bit matrix to obtain a transformation matrix, which is then used to construct the generator matrices of codes C and D. The reversibility verification module is used to verify the reversibility condition. If the condition is met, it is determined that (C, D) constitutes a linear complementary code pair. Otherwise, the parameter selection module is triggered to reselect the parameters. The output module is used to output the generator matrix of the linear complementary code pair (C, D) for configuring the data security protection device.
9. A data security protection device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the Belov code-based binary linear complementary code pair generation method as described in any one of claims 1-7, and use the generated binary linear complementary code pairs to encode data to resist side-channel attacks and fault injection attacks.
10. A computer-readable storage medium storing a computer program for electronic data interchange, characterized in that, The computer program causes the computer to execute the method for generating binary linear complementary code pairs based on Belov codes as described in any one of claims 1-7.