A lightweight cryptographic implementation method and system for joint coding

By combining the ARX-type lightweight block algorithm with LDPC code encoding, the ARX-type lightweight block algorithm is optimized, a low-complexity parity check matrix is ​​constructed, and subkeys are dynamically generated, solving the problem of limited computing power in IoT devices and improving security and reliability.

CN116722967BActive Publication Date: 2026-11-10GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310272929.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2026-11-10
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

The limited computing power, storage resources, and power consumption of IoT devices make it difficult to run traditional cryptographic algorithms, resulting in insufficient data transmission security and privacy protection.

Method used

By combining the ARX-type lightweight block algorithm with LDPC code encoding, the SPN structure is used to optimize the ARX-type lightweight block algorithm, and a low-complexity parity check matrix is ​​constructed using the quasi-cyclic construction method. Subkeys are dynamically generated by combining bitwise AND and bitwise NAND operations to achieve lightweight joint encoding.

Benefits of technology

Provides security and reliability on resource-constrained devices, reduces computational complexity and latency, improves the security and reliability of data transmission, and enhances resistance to side-channel attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116722967B_ABST
    Figure CN116722967B_ABST
Patent Text Reader

Abstract

This invention discloses a lightweight joint coding cryptographic implementation method and system suitable for resource-constrained devices. When used for encryption, it includes the following steps: obtaining data to be encrypted of length L, and setting the iteration count to R+1 rounds; performing R rounds of operations on the data to be encrypted using an ARX-type lightweight block algorithm to obtain initial ciphertext, and expanding and updating the subkey in each of the first R-1 rounds; using the initial ciphertext as input for the R+1 round, and then sequentially performing LDPC encoding and key addition operations on the initial ciphertext to obtain the final ciphertext; each of the first R rounds sequentially performs round key addition, inductive nonlinear operation, and inductive column confusion operation. This invention utilizes a computationally simple and fast-spreading ARX-type lightweight block algorithm combined with LDPC encoding to effectively ensure the security and reliability of data transmission in resource-constrained devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer encryption, and specifically relates to a lightweight joint encoding cryptographic implementation method and system suitable for resource-constrained devices. Background Technology

[0002] With the development of Internet of Things (IoT) technology, the number of IoT devices applied in smart cities, smart transportation, smart homes, and other fields has exploded. However, this rapid growth in connected devices and ubiquitous communication in networks also poses a potential threat to data and privacy security. For example, wearable devices collect users' physiological privacy data regardless of time and place, and technological flaws can sometimes lead to a lack of control over data flow, resulting in the leakage of physiological privacy data. The lack of security and privacy protection measures will have a significant impact on the sustainable development of IoT technology. Therefore, how to improve the security of the transmission, processing, and storage of privacy-sensitive data in the IoT has become an urgent problem to be solved.

[0003] Cryptographic techniques are an excellent way to improve security. However, edge devices in the Internet of Things (IoT) are extremely limited in terms of computing power, storage resources, and power consumption, making it difficult to run traditional cryptographic algorithms. Therefore, this poses a great challenge to the network security of the IoT. This invention aims to overcome the impact of resource-constrained devices and provide a lightweight encryption and decryption algorithm suitable for resource-constrained devices in the IoT. It needs to ensure the security and reliability of information transmission while also meeting the characteristics of fast computing speed, low latency, and simple operation. Summary of the Invention

[0004] The purpose of this invention is to address the security and reliability issues of information transmission in resource-constrained devices (edge ​​devices in the Internet of Things), improve the security of transmission, processing, and storage of privacy-sensitive data in the Internet of Things, and provide a lightweight joint coding cryptographic implementation method and system. The ARX-type lightweight block algorithm is characterized by its simple operation, fast computation speed, and low latency. Combining the ARX-type lightweight block algorithm with the high-performance, low-complexity LDPC code provides reliability while ensuring the security of data transmission in resource-constrained devices.

[0005] On the one hand, the present invention provides a lightweight joint coding cryptographic implementation method, which, when applied to encryption, includes the following steps:

[0006] Step 1: Obtain the data to be encrypted with a length of L, and set the number of iterations to R+1 rounds;

[0007] Step 2: Perform R rounds of operations on the data to be encrypted using the ARX lightweight block algorithm to obtain the initial ciphertext, and expand and update the subkey in each of the first R-1 rounds of operations;

[0008] In this process, the result of the previous round of operation is used as the data to be encrypted in the next round of operation, and the subkey that has been expanded and updated in the previous round of operation is used as the subkey that participates in the round key addition operation in the next round of operation.

[0009] Step 3: Use the initial ciphertext as the input for the (R+1)th round of operation, and then perform LDPC encoding and key addition operations on the initial ciphertext in sequence to obtain the final ciphertext. The key addition operation is to perform an XOR operation between the result of the LDPC encoding and the given key2 of length 2L.

[0010] The cryptographic implementation method provided by this invention is composed of a concatenated ARX-type lightweight block cipher algorithm and LDPC code encoding. It fully utilizes the advantages of the ARX-type lightweight block cipher algorithm—simple operation and fast computation speed—while combining it with an LDPC code encoding method that has low computational complexity and is easy to implement in hardware. This effectively ensures the security and reliability of data transmission in resource-constrained devices. Specifically, in the encryption process, the initial ciphertext is encoded using LDPC code, which reduces the complexity and latency of the lightweight joint encoding encryption algorithm while ensuring the security and reliability of information transmission. Correspondingly, in the decryption process, LDPC code decoding is used to correct errors that occur during data transmission. It has excellent characteristics that can approach the Shannon limit, is simple to describe, has great flexibility and low error rate characteristics, low decoding complexity, and is suitable for hardware implementation.

[0011] Alternatively, the LDPC code encoding process in the (R+1)th round of operation is as follows:

[0012] The initial ciphertext is divided into the following order from the most significant bit to the least significant bit: One data unit;

[0013] Then, from left to right, sequentially... The result of multiplying each data unit by an 8×16 generating matrix G is A 1×16 matrix, the Each 1×16 matrix is ​​a codeword obtained by encoding the LDPC code;

[0014] The generator matrix G is calculated as follows: First, an 8×16 parity-check matrix H is initialized with a coding rate of 1 / 2; then, according to the formula HG... T =0 to calculate the generating matrix G;

[0015] The left half of the verification matrix H is constructed using a quasi-cyclic construction method, resulting in a matrix H with a row weight and column weight of 2. L The right half of the matrix H RIt consists of two 4×4 identity matrices E and two 4×4 zero matrices.

[0016] It should be understood that the technical solution of the present invention does not limit the block length of the data to be encrypted, wherein different block lengths correspond to different numbers of data units. For example, if the block length L is 64 bits, then in the LDPC code encoding and decoding process, it is divided into 8 data units in 8-bit units; if L is 128 bits, then in the LDPC code encoding and decoding process, it is divided into 16 data units in 8-bit units. Regardless of the value of the block length, the size of the corresponding generator matrix is ​​fixed at 8×16, that is, the generator matrix is ​​applicable to data to be encrypted with different block lengths.

[0017] The quasi-cyclic construction method (QC-LDPC) constructs an 8×8 matrix H with a row weight and a column weight of 2. L Includes the following steps:

[0018] B1: Given an 8×8 matrix H L The initial value is Where E is matrix H L The sub-identity matrix has a size of 4×4;

[0019] B2: Construct a 2×2 matrix by randomly selecting four elements (with repetition) from the element field {0, 1, 2, 3}.

[0020] B3: Matrix H L The top-left 4×4 identity matrix then cyclically shifts to the right by a. 00 The lower left 4×4 identity matrix is ​​then cyclically shifted to the right by 'a'. 10 The 4×4 identity matrix in the upper right corner is then cyclically shifted to the right by 'a'. 01 The lower right 4×4 identity matrix is ​​then cyclically shifted to the right by 'a'. 11 Bit;

[0021] B4: Determine the matrix H after the previous step. L Does a 4-ring exist? If it does, return to step B2 and execute again. If it does not exist, then this matrix can be used as the left half of the verification matrix H.

[0022] The 8×8 matrix H R for Where E is matrix H R The sub-unit matrix is ​​of size 4×4.

[0023] The technical solution of this invention utilizes a quasi-cyclic construction method to construct a class of low-complexity, high-performance parity-check matrices to achieve LDPC code encoding and decoding. It combines the ARX-type lightweight block encryption algorithm with LDPC code encoding to effectively ensure the security and reliability of data transmission in resource-constrained devices.

[0024] Further optionally, in step 2, when performing R rounds of operations on the data to be encrypted using the ARX-type lightweight block algorithm, each round of operations involves sequentially performing round key addition, nonlinear combination, and column confusion operations on the data to be encrypted.

[0025] Existing ARX-type lightweight block ciphers generally employ Feistel or generalized Feistel structures because their nonlinear components lack inverse operations; otherwise, decryption cannot be completed. However, constrained by the Feistel structure, existing ARX-type lightweight block ciphers often suffer from weak keys, and most exhibit slow diffusion after initial plaintext and key injection of all 0s / Fs. This invention optimizes the ARX-type lightweight block cipher by adopting an SPN structure, overcoming the limitations of Feistel and generalized Feistel structures. Furthermore, the SPN structure internally employs integrative components (integrative nonlinear operations and integrative column confusion operations), improving the diffusion effect of the ARX-type lightweight block cipher while requiring minimal additional resources for decryption; the encryption module can be used in reverse order.

[0026] As can be seen from the above, the data processing process for the first R rounds of computation is different from that for the R+1th round of computation.

[0027] Further, optionally, the process of the integrative nonlinear operation is as follows:

[0028] The result of the current round key addition operation is divided into 8 branches in order from the most significant bit to the least significant bit, and represented as L0||L1||L2||L3||L4||L5||L6||L7;

[0029] Perform an XOR operation between branches L0, L1, L2, and L3 and branches L6, L7, L4, and L5 respectively to obtain...

[0030] The Executing the leftward shift by α bits and the leftward shift by β bits respectively yields the results.

[0031] Will and and Performing bitwise AND operations respectively yields as well as and and Perform bitwise NAND operations respectively to obtain

[0032] Then Performing an XOR operation with branches L1 and L5 respectively yields δ1 and δ5; and... Perform an XOR operation with branches L2 and L6 respectively to obtain δ2 and δ6;

[0033] Will Perform the integrative P1 permutation operation, and the result is represented as M0||M1||M2||M3||M4||M5||M6||M7;

[0034] Then, perform a cyclic left shift of α positions and a cyclic left shift of β positions on M0, M3, M4, and M7 respectively to obtain...

[0035] Then and and Performing bitwise AND operations respectively yields Will and and Performing bitwise NAND operations respectively yields the following results:

[0036] Then Performing an XOR operation with M1 and M5 respectively yields ε1 and ε5; and... Perform an XOR operation with M2 and M6 respectively to obtain ε2 and ε6;

[0037] Finally, perform an XOR operation between M0, ε1, ε2, and M3 and ε6, M7, M4, and ε5 respectively. The result is expressed as follows:

[0038] in, This is to combine the results of nonlinear operations.

[0039] The technical solution of this invention designs an inductive nonlinear layer based on ARX operations such as bitwise AND (&) and bitwise AND NOT (~&), which avoids the lookup table and weak key design based on S-box, and increases the resilience against side-channel attacks.

[0040] Further, optionally, the process of the column confusion operation is as follows:

[0041] The data, after undergoing inversion nonlinear operation, is divided into 16 data units in order from the most significant bit to the least significant bit.

[0042] The 16 data units are combined sequentially into a 4th-order matrix, and then the combined matrix is ​​confused. The composition affine operation between the 4th order matrix and the matrix over a finite field is performed using the following formula:

[0043]

[0044] Among them, S i This is the result of a composite affine operation, specifically the result of the inverse column confusion operation. For example, it can be the inverse column confusion matrix used in the Midori algorithm.

[0045] Optionally, the subkeys participating in the first round of operation are selected by choosing the first L bits of the initial key; the subkeys participating in the second to Rth rounds of operation are all subkeys obtained by expansion and update in their respective previous rounds of operation.

[0046] Here, an initial key key1 of length 2L is given, and is represented as k0||k1…k 2L-1 ||k 2L-1 ;

[0047] The extended update process is as follows:

[0048] Combine the n-bit round constant count with the high n-bit k0||k1…k of the initial key for the current round. n-4 ||k n-3 ||k n-2 ||k n-1 Perform round constant addition, and then use the result of the round constant addition to update k0||k1…k n-4 ||k n-3 ||k n-2 ||k n-1 , of which 0 <n<8,n∈N;

[0049] Then based on the updated k0||k1…k n-4 ||k n-3 ||k n-2 ||k n-1 Data is dynamically selected from the initial key of the current round of computation to generate a data generator of length [length missing]. x and y; where, according to k n-4 ||k n-3 The value is dynamically selected from the initial key to generate x, based on k. n-2 ||k n-1 The value y is generated by dynamically selecting data from the initial key;

[0050] Perform the F function operation on x||y to obtain x||y', and replace the value of y in the initial key with the value of y'; where x||y' is the subkey that is expanded and updated in the current round of operation.

[0051] Perform a P2 permutation on the replaced initial key, and the result will be the initial key for the next round of expansion and update operations.

[0052] In the key expansion stage, the technical solution of this invention dynamically selects data of length L from the initial key to perform round key addition operation based on the XOR condition of the round constant and the key, thereby reducing the correlation between two consecutive round sub-keys and increasing the attack difficulty coefficient.

[0053] The process of operating the F function is as follows:

[0054] Perform a leftward circular shift of x by α bits and a leftward circular shift of x by β bits respectively, and the result is represented as x <<<α x <<<β Then for x <<<α With x <<<β Performing a bitwise NAND operation, the result is represented as Will Perform an XOR operation with y, and the result is represented as y';

[0055] Where x||y' is the subkey that is expanded and updated in the current round of operation.

[0056] For example, if the length of the data to be encrypted is 64 bits, and n = 5, then when data is dynamically selected from the initial key based on the values ​​of k1||k2 to generate x, and data is dynamically selected from the initial key based on the values ​​of k3||k4 to generate y, the specific rules are as follows:

[0057] When k1||k2 or k3||k4 is 0, select k0||k1||…||k 30 ||k 31 When k1||k2 or k3||k4 is 0 or 1, choose k. 32 ||k 33 ||…||k 62 ||k 63 When k1||k2 or k3||k4 is 10, choose k. 64 ||k 65 ||…||k 94 ||k 95 When k1||k2 or k3||k4 is 11, choose k. 96 ||k 97 ||…||k 126 ||k127 .

[0058] The P2 permutation operation process described above is as follows:

[0059] First, divide the initial key to be subjected to the P2 permutation operation into 16 units in order from the most significant bit to the least significant bit, represented as b0||b1||b2||…||b 13 ||b 14 ||b 15 And represented by a 4th-order matrix γ:

[0060]

[0061] Then, shift each row of matrix γ cyclically one unit to the left to obtain matrix γ':

[0062]

[0063] The transpose of matrix γ' is then the final result of the P2 permutation operation.

[0064]

[0065] Secondly, the present invention provides a lightweight joint coding cryptographic implementation method, which, when applied to decryption, includes the following steps:

[0066] Step S1: Perform an XOR operation between the final ciphertext and the given key key2 of length 2L;

[0067] Step S2: Divide the result of the XOR operation into... Group, and according to the formula s = Hc T In sequence, determine whether each group is affected by noise interference during channel transmission and thus malfunctions. H is the parity check matrix, and c T This indicates the transpose of each group of data after grouping the results of the XOR operation;

[0068] When s equals zero vector, it means that the corresponding set of data has no errors during channel transmission and proceeds to the next step. When s is not equal to zero vector, the set of data is corrected for errors. After the error correction is completed, the next step is initiated.

[0069] Step S3: Select the c-th value sequentially from the calculation results of step S2. 16i Position c 16i+7 The data consists of bits, where i takes...

[0070] Step S4: Based on the ARX lightweight block decryption algorithm, perform R rounds of decryption operations on the data of length L selected in step S3 to obtain the plaintext;

[0071] The result of the previous decryption operation is used as the data to be decrypted in the next decryption operation.

[0072] Thirdly, the present invention provides a system based on the cryptographic implementation method, which, when applied to encryption, includes:

[0073] The initialization setting module is used to obtain the data to be encrypted with a length of L and set the number of iterations to R+1 rounds;

[0074] The round operation module is used to perform R round operations on the data to be encrypted using the ARX type lightweight block algorithm to obtain the initial ciphertext;

[0075] The key expansion module is used to expand and update the subkey in each round of the first R-1 rounds of computation;

[0076] In this process, the result of the previous round of computation is used as the data to be encrypted in the next round of computation, and the subkey that has been expanded and updated in the previous round of computation is used as the subkey in the next round of computation.

[0077] The LDPC encoding module is used to sequentially perform LDPC encoding on the initial ciphertext;

[0078] The key addition module is used to perform a key addition operation on the result of LDPC encoding and a given key key2 of length 2L to obtain the final ciphertext.

[0079] Fourthly, the present invention provides a system based on the cryptographic implementation method, which, when applied to decryption, includes:

[0080] The key addition module is used to perform an XOR operation on the ciphertext and a given key of length 2L, key2.

[0081] The LDPC code decoding module is used to divide the result of the XOR operation into... Group, and according to the formula s = Hc T Each group is sequentially checked for noise interference during channel transmission to determine if it has malfunctioned, and error correction is performed. The c-th group is then selected sequentially from the error-corrected calculation results. 16i Position c 16i+7 The data consists of bits, where i takes...

[0082] When s equals zero vector, it means that the data set has no errors during channel transmission and proceeds to the next step. When s is not equal to zero vector, error correction is performed on the data set, and after the error correction is completed, proceeds to the next step.

[0083] The round operation module is used to perform R rounds of decryption operations on the data of length L selected by the LDPC code decoding module based on the ARX type lightweight block algorithm to obtain the plaintext;

[0084] The result of the previous decryption operation is used as the data to be decrypted in the next decryption operation.

[0085] Fifthly, the present invention provides a computer-readable storage medium storing a computer program, which is invoked by a processor to implement:

[0086] The steps of the described lightweight joint coding cryptographic implementation method.

[0087] In a sixth aspect, the present invention provides an electronic terminal comprising: one or more processors and a memory storing one or more computer programs;

[0088] The processor calls the computer program to implement:

[0089] The steps of the described lightweight joint coding cryptographic implementation method.

[0090] Beneficial effects

[0091] 1. The lightweight joint coding cryptographic implementation method provided by the technical solution of the present invention is composed of ARX-type lightweight block algorithm and LDPC code encoding concatenation. It fully leverages the advantages of ARX-type lightweight block algorithm, which has the advantages of simple operation, fast operation speed and low latency, and the advantages of LDPC code encoding, which has low computational load and easy hardware implementation. By combining ARX-type lightweight block algorithm with LDPC code, reliability is provided while ensuring the data transmission security of resource-constrained devices.

[0092] 2. The present invention preferably employs a quasi-cyclic construction method to construct a class of parity-check matrices with low complexity and excellent decoding performance to implement LDPC encoding and decoding. In addition, LDPC code decoding is used to correct errors that occur during data transmission and has the excellent characteristic of being able to approach the Shannon limit. It is simple to describe, has great flexibility and low error code characteristics, and has low decoding complexity, making it suitable for hardware implementation.

[0093] 3. The preferred technical solution of this invention optimizes the ARX-type lightweight block cipher. Its overall architecture adopts an SPN structure, overcoming the shortcomings of the ARX-type lightweight block cipher design, which is limited to the Feistel and generalized Feistel structures. Furthermore, the SPN structure internally employs integrative components (integrative nonlinear operations and integrative column confusion operations), improving the diffusion effect of the ARX-type lightweight block cipher while requiring minimal additional resources for decryption; the encryption module can be used in reverse order. Especially when constructing the integrative nonlinear layer based on ARX operations such as bitwise AND (&) and bitwise NAND (~&), it avoids the need for lookup tables and weak keys related to S-box design, increasing resilience against side-channel attacks.

[0094] 4. In the key expansion stage, the technical solution of the present invention dynamically selects data from the initial key to generate a subkey based on the XOR condition of the round constant and the key, thereby reducing the correlation between subkeys in two consecutive rounds, increasing the attack difficulty coefficient, and improving the security of the cryptographic algorithm. Attached Figure Description

[0095] Figure 1 This is a flowchart illustrating the cryptographic implementation method described in this invention. Detailed Implementation

[0096] The present invention will be further described below with reference to embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0097] Example 1:

[0098] This embodiment uses a 64-bit length L of data to be encrypted as an example for illustration. However, in other feasible embodiments, encrypting data of other lengths is also applicable to the technical concept of this invention. Therefore, this embodiment provides a lightweight joint encoding cryptographic implementation method, including the following steps:

[0099] a1: Obtain 64-bit data to be encrypted, determine the iteration number as R+1 rounds, and set the initial value of the round number control signal to 1.

[0100] a2: The ARX-type lightweight block cipher algorithm is used to perform R rounds of operations on the data to be encrypted to obtain the initial ciphertext, and the subkey is expanded and updated in each of the first R-1 rounds. That is, it is determined whether the current round number control signal count is equal to the round number R. If it is not equal, count = count + 1, and the next round of operation is performed; otherwise, proceed to step a3.

[0101] In this embodiment, when the ARX-type lightweight block cipher is used to perform R rounds of operations on the data to be encrypted, each round of operations involves sequentially performing round key addition, inductive nonlinear operation, and inductive column obfuscation operation on the data to be encrypted. The result of the inductive column obfuscation operation in the previous round is used as the data to be encrypted in the next round, and the expanded and updated subkey from the previous round is used as the subkey participating in the round key addition operation in the next round. That is, this embodiment optimizes the ARX-type lightweight block cipher, and its overall architecture adopts an SPN structure, with each SPN structure employing inductive components (inductive nonlinear operation and inductive column obfuscation operation).

[0102] a3: Using the result of round R as the input of round R+1, perform LDPC encoding and key addition operations sequentially, and then output the final ciphertext. The key addition operation involves XORing the LDPC encoding result with the given 128-bit key2; the result is the final ciphertext.

[0103] Regarding the participation of subkeys in round key addition operations:

[0104] The round key addition operation in the first round of operation is as follows: the first 64 bits of the 128-bit initial key key1 are added to the data to be encrypted in the first round of operation in order from the most significant bit to the least significant bit.

[0105] The round key addition operation in rounds 2 through R is as follows: the 64-bit subkey updated in the previous round is added to the corresponding data to be encrypted in the current round. That is, the subkey participating in rounds 2 through R is the 64-bit subkey dynamically obtained in the previous round based on the key expansion operation rules. The process of dynamically obtaining the 64-bit subkey based on the key expansion operation rules is as follows:

[0106] b1. Perform a round constant addition operation on the 5-bit round constant count and the high 5 bits k0||k1||k2||k3||k4 in the initial key of the current round operation, and then use the result of the round constant addition operation to update k0||k1||k2||k3||k4.

[0107] b2. Dynamically select 32 bits from the 128-bit initial key based on the value of k1||k2 to obtain x, and dynamically select 32 bits from the 128-bit initial key based on the value of k3||k4 to obtain y;

[0108] b3. Perform a circular left shift of x by α positions (<<<α) and a circular left shift of x by β positions (<<<β) respectively, and express the result as x. <<<α x <<<β ;

[0109] b4.x <<<α With x <<<β Perform a bitwise NAND operation and represent the result as follows: Then Perform an XOR operation with y, and the result is represented as y'. Replace the value of y in the key with the value of y'; where x||y' is the subkey that is expanded and updated in the current round of operation;

[0110] In this embodiment, k0||k1||…||k is preferably selected when k1||k2 or k3||k4 is 00. 30 ||k 31When k1||k2 or k3||k4 is 0 or 1, choose k. 32 ||k 33 ||…||k 62 ||k 63 When k1||k2 or k3||k4 is 10, choose k. 64 ||k 65 ||…||k 94 ||k 95 When k1||k2 or k3||k4 is 11, choose k. 96 ||k 97 ||…||k 126 ||k 127 .

[0111] Assuming the value of the four bits k1||k2||k3||k4 after the round constant addition operation is 0010, then k1||k2=00, k3||k4=10; based on k1||k2=00, first select k0||k1||…||k 29 ||k 31 Given a 32-bit key x, then select k based on k3||k4=10. 64 ||k 65 ||…||k 94 ||k 95 Once the 32-bit data is y, the keys x||y obtained before and after are used in the F function operation. The specific operation process is as follows:

[0112] k0||k1||…||k 29 ||k 31 Circularly shifting left by 1 bit and circularly shifting left by 3 bits respectively yields k1||k2||…||k 31 ||k0, k3||k4||…||k0||k1||k2;

[0113] Let k1||k2||…||k 31 Perform bitwise AND and NOT operations on ||k0 and k3||k4||…||k0||k1||k2;

[0114] Compare the result of the previous step with k 64 ||k 65 ||…||k 94 ||k 95 Perform an XOR operation;

[0115] Then k0||k1||…||k 29 ||k 31 The result of XORing with the previous step is x||y'.

[0116] In the first R rounds of operation, the subkey for each round is obtained using the method described above, and then added to the data to be encrypted in the current round using the round key. The formula is as follows: Where, state i This indicates the data to be encrypted.

[0117] It should also be noted that in the above b1-b4 process, the preferred initial key for each round of computation is to perform a P2 permutation on the key after step b4. The result of this permutation is the initial key for the next round of expansion and update computation. The P2 permutation process is as follows:

[0118] The 128-bit key to be subjected to the P2 permutation operation is divided into 16 units in order from the most significant bit to the least significant bit, represented as b0||b1||b2||…||b 13 ||b 14 ||b 15 And represented by a 4th-order matrix γ:

[0119]

[0120] Shift each row of matrix γ cyclically to the left by one byte to obtain matrix γ':

[0121]

[0122] The transpose of the γ' matrix is ​​the final result of the P2 permutation operation;

[0123]

[0124] The process of the integrative nonlinear operation in this embodiment is as follows:

[0125] c1: Divide the result of the round key addition operation into 8 branches in 8-bit units, from the most significant bit to the least significant bit, and represent them as L0||L1||L2||L3||L4||L5||L6||L7.

[0126] c2: Perform an XOR operation between branches L0, L1, L2, and L3 and branches L6, L7, L4, and L5 respectively to obtain...

[0127] c3: the aforementioned By performing a circular shift left by α positions (<<<α) and a circular shift left by β positions (<<<β), we obtain... In this embodiment, the α bit and β bit are set to 1 and 3 respectively; in other feasible embodiments, adjustments can be made according to actual needs and effects.

[0128] c4: will and and Performing bitwise AND operations respectively yields as well as and and Perform bitwise NAND operations respectively to obtain

[0129] c5: will Performing an XOR operation with branches L1 and L5 respectively yields δ1 and δ5; and... Perform an XOR operation with branches L2 and L6 respectively to obtain δ2 and δ6.

[0130] c6: will Perform the integrative P1 permutation operation, and the result is represented as M0||M1||M2||M3||M4||M5||M6||M7.

[0131] c7: M0, M3, M4, and M7 are respectively rotated left by α positions (<<<α) and rotated left by β positions (<<<β) to obtain...

[0132] c8: will and and Performing bitwise AND operations respectively yields and will and and Performing bitwise NAND operations respectively yields the following results:

[0133] c9: will Performing an XOR operation with M1 and M5 respectively yields ε1 and ε5; and... Perform an XOR operation with M2 and M6 respectively to obtain ε2 and ε6.

[0134] c10: M0, ε1, ε2, and M3 are XORed with ε6, M7, M4, and ε5 respectively, and the result is expressed as: in, This is to combine the results of nonlinear operations.

[0135] The P1 permutation operation in c6 refers to moving the data from the i-th branch (0≤i≤7) to the P1(i)-th branch: i is represented in decimal using 3 bits b2||b1||b0, with the middle bit b1 remaining unchanged, and b0 and b2 inverted respectively, to obtain... binary Convert to decimal P1(i), which means the data of the i-th branch is moved to the P1(i)-th branch.

[0136] Table 1 below shows the substitution table for P1.

[0137] Table 1. Replacement Table for P1

[0138]

[0139] Regarding the column obfuscation operation, the process of the column obfuscation operation set in this embodiment is as follows:

[0140] The 64-bit data, after undergoing nonlinear inversion, is divided into 16 data units, from the most significant bit to the least significant bit, in half-byte units. Where 1≤i≤R; then, the 16 data units are combined sequentially into a 4th order matrix, and then the combined array confusion matrix is... The composition affine operation between the 4th order matrix and the matrix over a finite field is performed using the following formula:

[0141]

[0142] In this embodiment, the incoherent near-MDS matrix M, which has low hardware resources and low latency in the Midori cryptography, is used as the incoherent column confusion matrix.

[0143]

[0144] Regarding the execution of LDPC code encoding: The LDPC code encoding set in this embodiment is as follows: the 64-bit data after the pairwise confusion transformation is divided into 8 data units in 8-bit units from the most significant bit to the least significant bit. The 8 data units are multiplied by the 8×16 generator matrix from left to right. The resulting 8 1×16 matrices are the codewords obtained by LDPC code encoding.

[0145] In other words, LDPC code encoding involves adding several parity bits without altering the original data unit. The codeword obtained through LDPC code encoding is derived by multiplying the data unit by the generator matrix. The construction of the 8×16 generator matrix for LDPC code encoding includes the following steps:

[0146] Assuming a coding rate of 1 / 2, an 8×16 parity-check matrix H is initialized; wherein, an 8×8 matrix H with a row weight and column weight of 2 is constructed using the quasi-cyclic construction method (QC-LDPC). L The left half of matrix H is formed by a matrix H; the right half of matrix H is formed by an 8×8 matrix H. R Composition (8×8 matrix H in this embodiment) R for Where E is H R The sub-unit matrix (4×4); finally, according to the formula HG T The generating matrix G can be obtained by setting 0. The generated matrix G obtained is not unique, but the product of the data cell and each generating matrix G is consistent. You can randomly select one of G.

[0147] Among them, the Quasi-Circular Construction Method (QC-LDPC) constructs an 8×8 matrix H with a row weight of 2 and a column weight of 2. L Includes the following steps:

[0148] d1: Given an 8×8 matrix H L The initial value is Where E is H L The sub-identity matrix has a size of 4×4;

[0149] d2: Construct a 2×2 matrix by randomly selecting four elements (with repetition) from the field {0, 1, 2, 3}.

[0150] d3: Matrix H L The top-left 4×4 identity matrix then cyclically shifts to the right by a. 00 The lower left 4×4 identity matrix is ​​then cyclically shifted to the right by 'a'. 10 The 4×4 identity matrix in the upper right corner is then cyclically shifted to the right by 'a'. 01 The lower right 4×4 identity matrix is ​​then cyclically shifted to the right by 'a'. 11 In this embodiment, a is a bit; 00 Position, a 10 Position, a 01 Position, a 11 The bits are set to 0, 0, 1, and 0 respectively.

[0151] d4: Determine the matrix H after the previous step. L Does a 4-ring exist? If it does, return to step d2 and re-execute. If it does not exist, then this matrix can be used as the left half of the verification matrix H.

[0152] The above 8×8 matrix H R for Where E is H R The sub-unit matrix is ​​of size 4×4.

[0153] In this embodiment, the selected 8×16 parity-check matrix H is:

[0154]

[0155] In this embodiment, the selected 8×16 generating matrix G is:

[0156]

[0157] It should be understood that a cryptographic algorithm includes an encryption process and a decryption process. The lightweight joint encoding cryptographic implementation method provided in this embodiment, when applied to decryption, includes the following steps:

[0158] Step S1: Perform an XOR operation between the final ciphertext and the given 128-bit key2.

[0159] Step S2: Divide the result of the XOR operation in step S1 into 8 groups of 16 bits each, and then use the formula s = Hc T The algorithm sequentially checks whether each group is affected by noise interference during channel transmission. When s equals zero vector, it means that the group is not erroneous during transmission and proceeds to the next step. When s is not equal to zero vector, error correction is required for the group. After error correction is completed, the algorithm proceeds to the next step.

[0160] Step S3: Select the c-th value from the calculation results of step S2. 16i Position c 16i+7 The bits, where i takes respectively

[0161] Step S4: Based on the ARX lightweight block cipher, perform R rounds of decryption on the 64-bit data selected in step S3 to obtain the plaintext. That is, sequentially perform column-wise obfuscation, nonlinear inversion, and round key addition on the obtained 64-bit data. At the same time, the subkey used in the encryption process is reversed and used in the round key addition, column-wise obfuscation, and the inverse of the nonlinear inversion are themselves.

[0162] In this process, it is determined whether the current round number control signal count is equal to round number 1. If it is not equal, count = count - 1 is set, and the result of the round key addition operation is used as the data to be decrypted in the next round operation. Then, the process returns to step S4. Otherwise, the plaintext is output.

[0163] The error correction method includes the following steps:

[0164] Calculate s T Multiplying by the parity check matrix H yields a vector containing 16 elements, which correspond to the codeword bits transmitted through the channel.

[0165] In the vector obtained in the previous step, count the positions where the element is greater than or equal to 2, and reverse the corresponding codeword bits.

[0166] Calculate s = Hc T If the vector is equal to the zero vector, the decoding is successful; otherwise, repeat the above steps until the decoding is successful.

[0167] If the maximum number of iterations is reached after performing the above operations, the decoding is considered to have failed.

[0168] In the specific implementation of error correction, it is assumed that the correct codeword is 16-bit (1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1). During transmission, interference causes the received codeword to become (0,1,1,0,0,0,1,1,1,1,0,0,1,0,0,1).

[0169] Calculate s = Hc T =(1,1,0,0,1,1,0,0), which is not equal to the zero vector, requires error correction for this group of codewords;

[0170] Calculate s T Multiplying by the parity check matrix H yields a vector of 16 elements (2,2,0,0,1,2,1,0,1,1,0,0,1,1,0,0), which correspond to the codeword bits transmitted through the channel.

[0171] In the vector obtained in the previous step, the positions where the element is greater than or equal to 2 are the 1st, 2nd, and 6th positions. Then, in the corresponding codeword (0,1,1,0,0,0,1,1,1,1,0,0,1,0,0,1), the 1st, 2nd, and 6th positions are flipped to obtain (1,0,1,0,0,1,1,1,1,1,0,0,1,0,0,1).

[0172] Calculate s = Hc T =(1,0,0,0,0,1,0,0), which is not equal to the zero vector, requires error correction for this group of codewords;

[0173] Calculate s T Multiplying by the parity check matrix H yields a vector of 16 elements (1,1,0,0,0,2,0,0,1,0,0,0,0,1,0,0), which correspond to the codeword bits transmitted through the channel.

[0174] In the vector obtained in the previous step, the position where the element is greater than or equal to 2 is the 6th bit. Then, in the corresponding codeword (1,0,1,0,0,1,1,1,1,1,0,0,1,0,0,1), the 6th bit is flipped to obtain (1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1).

[0175] Calculate s = Hc T =(0,0,0,0,0,0,0,0), equal to the zero vector, error correction successful.

[0176] It should be noted that the cryptographic implementation method provided by the present invention is based on the ARX type lightweight block algorithm, which is simple to operate, fast to operate, and has low latency. The plaintext information is first encrypted, and then the initial ciphertext is encoded using LDPC code. This reduces the complexity and latency of the lightweight joint encoding encryption algorithm while ensuring the security and reliability of information transmission.

[0177] Example 2:

[0178] The system for implementing the cryptographic method provided in this embodiment, when applied to encryption, includes:

[0179] The initialization setting module is used to obtain the data to be encrypted with a length of L and set the number of iterations to R+1 rounds;

[0180] The round operation module is used to perform R round operations on the data to be encrypted using the ARX type lightweight block algorithm to obtain the initial ciphertext;

[0181] The key expansion module is used to expand and update the subkey in each round of the first R-1 rounds of computation;

[0182] The LDPC encoding module is used to sequentially perform LDPC encoding on the initial ciphertext;

[0183] The key addition module is used to perform a key addition operation on the result of LDPC encoding and a given key key2 of length 2L to obtain the final ciphertext.

[0184] Other feasible methods, when applied to decryption, include: a key addition module, used to perform an XOR operation on the ciphertext and a given key of length 2L, key2;

[0185] The LDPC code decoding module is used to divide the result of the XOR operation into... Group, and according to the formula s = Hc T Each group is sequentially checked for noise interference during channel transmission to determine if it has malfunctioned, and error correction is performed. The c-th group is then selected sequentially from the error-corrected calculation results. 16i Position c 16i+7 The data consists of bits, where i takes respectively...

[0186] When s equals zero vector, it means that the corresponding set of data has no errors during channel transmission and proceeds to the next step. When s does not equal zero vector, the set of data is corrected. After the correction is completed, the next step is initiated.

[0187] The round operation module is used to perform R rounds of decryption operations on the data of length L selected by the LDPC code decoding module based on the ARX type lightweight block algorithm to obtain the plaintext;

[0188] The result of the previous decryption operation is used as the data to be decrypted in the next decryption operation.

[0189] It should be understood that the implementation process of each module can be described with reference to the aforementioned method. The above division of functional modules is only a logical division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. At the same time, the above-mentioned integrated units can be implemented in hardware or in the form of software functional units.

[0190] Example 3:

[0191] This embodiment provides an electronic terminal, which includes:

[0192] One or more processors;

[0193] A memory that stores one or more computer programs;

[0194] The processor invokes the computer program to implement the steps of a lightweight joint encoding cryptographic implementation method.

[0195] Specifically, when used to encrypt plaintext, the following is executed:

[0196] Step 1: Obtain the data to be encrypted with a length of L, and set the number of iterations to R+1 rounds;

[0197] Step 2: Perform R rounds of operations on the data to be encrypted using the ARX lightweight block algorithm to obtain the initial ciphertext, and expand and update the subkey in each of the first R-1 rounds of operations;

[0198] In this process, the result of the previous round of operation is used as the data to be encrypted in the next round of operation, and the subkey that has been expanded and updated in the previous round of operation is used as the subkey that participates in the round key addition operation in the next round of operation.

[0199] Step 3: Use the initial ciphertext as the input for the (R+1)th round of operation, and then perform LDPC encoding and key addition operations on the initial ciphertext in sequence to obtain the final ciphertext. The key addition operation is to perform an XOR operation between the result of the LDPC encoding and the given key2 of length 2L.

[0200] When decrypting ciphertext, execute:

[0201] Step S1: Perform an XOR operation between the ciphertext and the given key key2 of length 2L;

[0202] Step S2: Divide the result of the XOR operation into... Group, and according to the formula s = HcT In sequence, determine whether each group is affected by noise interference during channel transmission and thus malfunctions. H is the parity check matrix, and c T This represents the transpose of each group of data after grouping the result of the XOR operation;

[0203] When s equals zero vector, it means that the corresponding set of data has no errors during channel transmission and proceeds to the next step. When s does not equal zero vector, the set of data is corrected. After the correction is completed, the next step is initiated.

[0204] Step S3: Select the c-th element sequentially from the results of step S2. 16i Position c 16i+7 The data consists of bits, where i takes respectively...

[0205] Step S4: Based on the ARX lightweight block decryption algorithm, perform R rounds of decryption operations on the data of length L selected in step S3 to obtain the plaintext.

[0206] Please refer to the explanation of the method above for the specific implementation process of each step.

[0207] The memory may include high-speed RAM, and may also include a non-volatile defibrillator, such as at least one disk storage device.

[0208] If the memory and processor are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an industry-standard architecture bus, an external device interconnect bus, or an extended industry-standard architecture bus, etc. The bus can be categorized as an address bus, data bus, control bus, etc.

[0209] Optionally, in a specific implementation, if the memory and processor are integrated on a single chip, the memory and processor can communicate with each other through an internal interface.

[0210] It should be understood that, in the embodiments of the present invention, the processor may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

[0211] Example 4:

[0212] This embodiment provides a computer-readable storage medium storing a computer program that is invoked by a processor to implement the steps of a lightweight joint encoding cryptographic implementation method.

[0213] Specifically, when used to encrypt plaintext, the following is executed:

[0214] Step 1: Obtain the data to be encrypted with a length of L, and set the number of iterations to R+1 rounds;

[0215] Step 2: Perform R rounds of operations on the data to be encrypted using the ARX lightweight block algorithm to obtain the initial ciphertext, and expand and update the subkey in each of the first R-1 rounds of operations;

[0216] In this process, the result of the previous round of operation is used as the data to be encrypted in the next round of operation, and the subkey that has been expanded and updated in the previous round of operation is used as the subkey that participates in the round key addition operation in the next round of operation.

[0217] Step 3: Use the initial ciphertext as the input for the (R+1)th round of operation, and then perform LDPC encoding and key addition operations on the initial ciphertext in sequence to obtain the final ciphertext. The key addition operation is to perform an XOR operation between the result of the LDPC encoding and the given key2 of length 2L.

[0218] When decrypting ciphertext, execute:

[0219] Step S1: Perform an XOR operation between the ciphertext and the given key key2 of length 2L;

[0220] Step S2: Divide the result of the XOR operation into... Group, and according to the formula s = Hc T In sequence, determine whether each group is affected by noise interference during channel transmission and thus malfunctions. H is the parity check matrix, and c T This indicates the transpose of each group of data after grouping the results of the XOR operation;

[0221] When s equals zero vector, it means that the corresponding set of data has no errors during channel transmission and proceeds to the next step. When s does not equal zero vector, the set of data is corrected. After the correction is completed, the next step is initiated.

[0222] Step S3: Select the c-th element sequentially from the results of step S2. 16i Position c 16i+7 The data consists of bits, where i takes...

[0223] Step S4: Based on the ARX lightweight block decryption algorithm, perform R rounds of decryption operations on the data of length L selected in step S3 to obtain the plaintext.

[0224] Please refer to the explanation of the method above for the specific implementation process of each step.

[0225] The readable storage medium is a computer-readable storage medium, which can be an internal storage unit of the controller described in any of the foregoing embodiments, such as the controller's hard drive or memory. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the controller. Further, the readable storage medium can include both the controller's internal storage unit and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.

[0226] Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0227] This invention provides a lightweight joint coding encryption implementation method suitable for resource-constrained devices. The encryption process is composed of ARX-type lightweight block encryption and LDPC code encoding concatenation.

[0228] First, the overall architecture of the ARX-type lightweight block cipher adopts an SPN structure, overcoming the limitations of ARX-type lightweight block ciphers in designing only Feistel and generalized Feistel structures. Second, the ARX-type lightweight block cipher process employs a combination of nonlinear and linear layers. This improves the diffusion effect of the ARX-type lightweight block cipher while requiring minimal additional resources for decryption; the encryption modules can be used in reverse order. Furthermore, the combination of nonlinear layers is constructed based on ARX operations such as bitwise AND (&) and bitwise NOT (~&), avoiding lookup tables and weak keys associated with S-box design and increasing resilience against side-channel attacks. In the key expansion stage, 64 bits are dynamically selected from the 128-bit key for round key addition based on the XOR operation between the round constant and the key, reducing the correlation between consecutive round sub-keys and increasing the attack difficulty.

[0229] Secondly, an LDPC code encoding method with low computational complexity and easy hardware implementation is constructed based on an 8×16 quasi-cyclic sparse matrix. LDPC code decoding is used to correct errors that occur during data transmission. It has excellent properties that can approach the Shannon limit. Its description is simple, it has great flexibility and low error code characteristics, and its decoding complexity is low, making it suitable for hardware implementation.

[0230] Finally, by combining the ARX-type lightweight block cipher algorithm with LDPC code encoding, the security and reliability of data transmission in resource-constrained devices are effectively guaranteed.

[0231] The algorithm test vectors are shown in Table 2, using the method provided in the embodiments of this invention.

[0232] Table 2 Test vectors of the algorithm described in this invention

[0233]

[0234] The encryption algorithm described in this invention was logically verified on ModelSim SE 6.1fEvaluation and simultaneously simulated on Synopsys Design Compiler Version B-2008.09. The synthesis technology library used was SMIC 0.13μm CMOS, and the area resource unit in the synthesis experiment was 1380GE.

[0235] The hardware resource report analysis of the algorithm described in this invention shows the specific resource consumption of each component in the encryption module algorithm as follows: 64-bit plaintext stored in a register requires 344GE; in the round key addition module, the round key XOR unit requires 128GE; the inverse nonlinear operation unit requires 328GE; the inverse column confusion operation unit requires 48GE; the LDPC code encoding unit requires 128GE; the last round key XOR unit requires 256GE; the key expansion and update unit requires 106GE; and the logic control resources require 42GE.

[0236] The implementation area of ​​the algorithm described in this invention is compared with that of some existing lightweight block cipher algorithms based on SPN structure, as shown in Table 3.

[0237] Table 3 Comparison of the implementation area of ​​lightweight block cipher algorithms

[0238]

[0239] This invention designs a computationally simple and fast-spreading ARX-type lightweight block cipher based on SPN and Feistel structures. Simultaneously, it constructs a high-performance, low-complexity LDPC code encoding method using quasi-circular matrices. Finally, the ARX-type lightweight block cipher algorithm is combined with LDPC code encoding to effectively ensure the security and reliability of data transmission in resource-constrained devices. Furthermore, a comparison with several classic cryptographic algorithms in terms of hardware resources shows that the algorithm described in this invention has a certain advantage in implementation area.

[0240] It should be emphasized that the examples described in this invention are illustrative rather than limiting. Therefore, this invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solutions of this invention, without departing from the spirit and scope of this invention, whether modifications or substitutions, are also within the protection scope of this invention.

Claims

1. A lightweight joint coding cryptographic implementation method, characterized in that: When applied to encryption, the following steps are included: Step 1: Obtain the data to be encrypted with a length of L, and set the number of iterations to R+1 rounds; Step 2: Perform R rounds of operations on the data to be encrypted using the ARX lightweight block algorithm to obtain the initial ciphertext, and expand and update the subkey in each of the first R-1 rounds of operations; In this process, the result of the previous round of operation is used as the data to be encrypted in the next round of operation, and the subkey that has been expanded and updated in the previous round of operation is used as the subkey that participates in the round key addition operation in the next round of operation. Step 3: Use the initial ciphertext as input for the (R+1)th round of computation, and then perform LDPC encoding and key addition operations on the initial ciphertext sequentially to obtain the final ciphertext. The key addition operation involves adding the LDPC encoded result to a given key of length 2L. Perform an XOR operation; No. The LDPC code encoding process described in the round operation is as follows: The initial ciphertext is divided into the following order from the most significant bit to the least significant bit: One data unit; Then, from left to right, sequentially... Each data unit and The product of the generating matrix G is obtained by multiplying the generating matrix G. indivual Matrix, the indivual The matrix is ​​a codeword obtained by encoding the LDPC code; The generator matrix G is calculated as follows: first, using the coding rate... As a premise, initialize a The verification matrix Then according to the formula Calculate the generating matrix G; The left half of the verification matrix H is constructed using a quasi-cyclic construction method, resulting in a matrix with a row weight and column weight of 2. The right half of the matrix It consists of 2 The identity matrix E and 2 The zero matrix is ​​composed of.

2. The cryptographic implementation method according to claim 1, characterized in that: In step 2, when the ARX lightweight block algorithm is used to perform R rounds of operations on the data to be encrypted, each round of operations involves sequentially performing round key addition, nonlinear combination, and column confusion operations on the data to be encrypted.

3. The cryptographic implementation method according to claim 2, characterized in that: The process of the integrative nonlinear operation is as follows: Divide the result of the current round key addition operation into 8 branches according to the order of the most significant bits from highest to lowest, and represent them as follows: ; Branch , , , Each and branch , , , Performing an XOR operation yields , , , ; The , , , Execute the loop to move left respectively Bitwise AND loop shifts to the left Position obtained , , , , , , , ; Will , and Performing bitwise AND operations respectively yields , ; as well as and , and Perform bitwise NAND operations respectively to obtain , ; Then , Each and branch , Performing an XOR operation yields , ; and will , Each and branch , Performing an XOR operation yields , ; Will Execution of the pair The result of a permutation operation is expressed as: ; Among them, the combination Permutation operation refers to the operation of substituting the first... The data from the branch is moved to the first... Branches: those to be represented in decimal. Use 3 bits Indicates that the middle position constant, and Invert each one to obtain ; to binary Convert to decimal That is, the first The data from the branch is moved to the first... One branch, ; Then, to , , , Execute the loop to move left respectively Bitwise AND loop shifts to the left Position obtained , , , , , , , ; Then and , and Performing bitwise AND operations respectively yields , ;Will and , and Performing bitwise NAND operations respectively yields the following results: , ; Then , respectively with , Performing an XOR operation yields , ; and will , respectively with , Performing an XOR operation yields , ; Finally , , , respectively with , , , Performing an XOR operation, the result is expressed as , , , ; in, This is to combine the results of nonlinear operations.

4. The cryptographic implementation method according to claim 1, characterized in that: The subkeys participating in the first round of operation are selected by taking the first L bits of the initial key for the first round of operation; the subkeys participating in the second to Rth rounds of operation are all subkeys obtained by expansion and update in the previous round of operation. Wherein, an initial key of length 2L is given. And expressed as ; The extended update process is as follows: n-bit round constants The high n bits of the initial key in the current round of computation Perform round constant addition, and then update the result of the round constant addition. ,in ; Then based on the updated Data is dynamically selected from the initial key of the current round of computation to generate a data generator of length [length missing]. x and y; where, according to The value is dynamically selected from the initial key to generate x, according to... The value y is generated by dynamically selecting data from the initial key; right Executing the F function yields ,Will Replace the value in the initial key The value of; where, This refers to the subkey that is expanded and updated in the current round of computation; Execute the replaced initial key The result of the permutation operation is the initial key for the next round of expansion and update operations; The The permutation operation process is as follows: First, proceed with the work to be carried out. The initial key for the permutation operation is divided into 16 units in order from the most significant bit to the least significant bit, represented as follows: and with a 4th order matrix Represented as: Then, the matrix Each row is cyclically shifted one unit to the left to obtain the matrix. : Then the matrix The transpose of the matrix is ​​the final The result of the permutation operation; 。 5. A lightweight joint coding cryptographic implementation method, characterized in that: When used for decryption, the following steps are included: Step S1: Combine the final ciphertext with the given key of length 2L. Perform an XOR operation; Step S2: Divide the result of the XOR operation into... Group, and according to the formula Each group is sequentially checked to determine whether it was corrupted by noise during channel transmission. H is the parity check matrix. This represents the transpose of each group of data after grouping the XOR operation result. The left half of the parity check matrix H is constructed using a quasi-cyclic construction method, resulting in a matrix with a row weight and column weight of 2. The right half of the matrix It consists of 2 The identity matrix E and 2 The zero matrix is ​​composed of; Among them, when When the vector equals zero, it indicates that the corresponding data set was transmitted without error through the channel, and proceed to the next step. When the vector is not equal to zero, the set of data is corrected, and then the next step is performed after the correction is completed. Step S3: Select the first from the results of step S2 in sequence. Ranked first The data consists of bits, where i takes... ; Step S4: Based on the ARX lightweight block decryption algorithm, perform R rounds of decryption operations on the data of length L selected in step S3 to obtain the plaintext; The result of the previous decryption operation is used as the data to be decrypted in the next decryption operation.

6. A system based on the cryptographic implementation method of claim 1, characterized in that: When applied to encryption, it includes: The initialization setting module is used to obtain the data to be encrypted with a length of L and set the number of iterations to R+1 rounds; The round operation module is used to perform R round operations on the data to be encrypted using the ARX type lightweight block algorithm to obtain the initial ciphertext; The key expansion module is used to expand and update the subkey in each round of the first R-1 rounds of computation; In this process, the result of the previous round of operation is used as the data to be encrypted in the next round of operation, and the subkey that has been expanded and updated in the previous round of operation is used as the subkey that participates in the round key addition operation in the next round of operation. The LDPC encoding module is used to sequentially perform LDPC encoding on the initial ciphertext; The key addition module is used to combine the LDPC code encoded result with a given key of length 2L. Perform a key addition operation to obtain the final ciphertext.

7. A system based on the cryptographic implementation method of claim 5, characterized in that: When applied to decryption, it includes: The key addition module is used to add the final ciphertext to a given key of length 2L. Perform an XOR operation; The LDPC code decoding module is used to divide the result of the XOR operation into... Group, and according to the formula The algorithm sequentially determines whether each group is affected by noise interference during channel transmission, performs error correction, and selects the corrected group from the results of the error correction calculation. Ranked first Bits of data, where Take respectively ; Among them, when When the vector equals zero, it indicates that the corresponding data set was transmitted without error through the channel, and proceed to the next step. When the vector is not equal to zero, the set of data is corrected, and then the next step is performed after the correction is completed. The round operation module is used to perform R rounds of decryption operations on the data of length L selected by the LDPC code decoding module based on the ARX type lightweight block algorithm to obtain the plaintext; The result of the previous decryption operation is used as the data to be decrypted in the next decryption operation.

8. A computer-readable storage medium, characterized in that: The computer program is stored and is invoked by the processor to implement: The steps of a lightweight joint coding cryptographic implementation method as described in any one of claims 1-5.

9. An electronic terminal, characterized in that: include: One or more processors; A memory that stores one or more computer programs; The processor calls the computer program to implement: The steps of a lightweight joint coding cryptographic implementation method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Encryption method capable of processing large data packets

    CN105337732A

  • TWDM-PON system physical layer security method based on MD5 verification and AES encryption

    CN111786773A