Lightweight encryption method based on binary multiplication expansion index

Through binary multiplication, the lightweight encryption method of expanding exponents is solved by using binary conversion and binary exclusive OR operation to solve the complex problem of large number multiplication operations in IoT devices, and achieves fast and lightweight encryption.

CN120301583APending Publication Date: 2025-07-11DONGGUAN UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510314215.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The prior art is complex when performing large-digit multiplication operations in IoT devices, especially carrying processing is difficult, making it difficult for devices with limited computing resources to effectively encrypt.

Method used

A lightweight encryption method that expands exponentials by binary multiplication is used to expand exponentials. Through binary conversion, encryption sequence length analysis, exponential integration screening and binary XOR operation, an exponential field type is generated for encryption, and it is divided into small segments for encryption. The ciphertext is generated using mod 64 addition or binary XOR operation.

Benefits of technology

It simplifies large-number multiplication operations, reduces computational complexity, and provides a fast path to encrypted sequence generation, suitable for IoT devices with limited resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301583A_ABST
    Figure CN120301583A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight encryption method based on a binary multiplication expansion index. The lightweight encryption method specifically comprises the following steps: step 1, binary conversion; 2, analyzing the length of the encrypted sequence; step 3, index integration and screening; step 4, encrypting plaintext information; the invention relates to the technical field of data encryption. According to the lightweight encryption method based on the binary multiplication expansion index, through binary XOR operation non-carry multiplication, the situation that carry processing is complex in large digit multiplication in the calculation process is avoided, the situation that large digit multiplication is difficult is overcome, meanwhile, encryption sequences can be rapidly generated, and the encryption efficiency is improved. And a convenient operation path is provided for lightweight encryption of plaintext information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data encryption, and specifically provides a lightweight encryption method based on expanding an exponent by binary multiplication. Background Art

[0002] A random code generator is a key component in encrypted communication and security systems. For example, in the data encryption method, system, device, and storage medium described in the application number 202210819562.3, it is proposed to use an exponential integer as a source of random codes. After expanding it, a large exponential field type containing multiple digits is obtained. Then, starting from the highest digit of the large exponential field type, the digits of the large exponential field type are divided into multiple integer arrays with a length of 10. Then, the integer arrays are integerized to obtain a position permutation sequence composed of multiple position permutation groups. The position permutation group is a completely uniformly distributed sequence, which is an ideal binary sequence of random codes. Starting from the first digit on the left, the elements of the data to be encrypted obtained are divided into multiple encrypted groups with a length of 10, and according to the preset grouping correspondence relationship, the elements in the corresponding encrypted groups are subjected to local position permutation within the group through the position permutation group to obtain encrypted data. This method has high confidentiality and requires few transmitted parameters, and can be widely applied to data encryption scenarios such as IoT data transmission encryption.

[0003] However, when this mechanism expands the exponential integer to obtain a large exponential field type containing multiple digits, it will encounter the need to perform multiplication operations on large numbers, that is, numbers exceeding hundreds of digits. The carry processing during the calculation process is relatively complex. For Internet of Things devices with small size, limited memory capacity, and limited computing resources or battery life, it is an urgent problem to implement large number multiplication operations. Summary of the Invention

[0004] In view of the deficiencies of the prior art, the present invention provides a lightweight encryption method based on expanding an exponent by binary multiplication, which solves the problem of difficult large number multiplication operations in encryption scenarios.

[0005] To achieve the above objectives, the present invention is realized through the following technical solutions:

[0006] On the one hand, a lightweight encryption method based on expanding an exponent by binary multiplication specifically includes the following steps:

[0007] Step 1. Binary conversion: Obtain the plaintext information and perform decimal code conversion, and then encode the decimal code into a binary representation using six binary letters;

[0008] Step 2. Analysis of the length of the encryption sequence: When encrypting the plaintext information, according to the total number of letters in the plaintext information, the value obtained by multiplying by six is set as M, and M is used as the minimum number of binary letters required for corresponding encryption;

[0009] Step 3, exponential integration and screening: Obtain the exponential integers that satisfy the exponential integers

[0010] Step 4, plaintext information encryption: Expand using binary exclusive OR operation and non-carry multiplication Obtain the encryption exponential field type, and divide every six bytes in the exponential field type into a small segment from left to right as the encryption binary sequence. Encrypt the binary representation in Step 1 one by one using the encryption binary sequence in the order from left to right.

[0011] The present invention is further configured that: The total number of letters in Step 2 includes the space bar between two English letters and the period.

[0012] The present invention is further configured that: The encryption method in Step 4 includes:

[0013] Combine several encryption binary sequences into an encryption sequence in the order from left to right, align the length of the encryption sequence with the binary representation in Step 1, and the bit length of the encryption sequence exceeding the binary representation in Step 1 is 6S, where S = 1 or 2;

[0014] Add S space bars at the end of the plaintext information to make the binary representation corresponding to the plaintext information consistent with the length of the encryption sequence, and obtain the processed plaintext information;

[0015] Convert several encryption binary sequences in the encryption sequence into decimal codes as the encryption key, and encrypt the decimal code converted from the processed plaintext information and the encryption key using mod 64 addition to obtain the ciphertext.

[0016] The present invention is further configured that: The decryption method for the ciphertext includes:

[0017] After converting the ciphertext into a decimal code, subtract the encryption key to obtain the processed plaintext information, and delete N space bars at the end to obtain the plaintext information.

[0018] On the other hand, the present invention is further configured that: The encryption method in Step 4 further includes:

[0019] Combine several encryption binary sequences into an encryption sequence in the order from left to right, align the length of the encryption sequence with the binary representation in Step 1, and the bit length of the encryption binary sequence exceeding the binary representation in Step 1 is 6S, where S = 1 or 2;

[0020] Add 6S zeros at the end of the plaintext information to make the binary representation corresponding to the plaintext information consistent with the length of the encryption sequence, and obtain the processed plaintext information;

[0021] After performing a binary exclusive OR operation on the binary representation corresponding to the processed plaintext information and the encryption sequence, perform a decimal code conversion to obtain the ciphertext.

[0022] The present invention is further configured such that the method for decrypting the ciphertext includes:

[0023] After performing a binary exclusive OR operation on the ciphertext and the encryption sequence, obtain the plaintext information.

[0024] The present invention provides a lightweight encryption method based on expanding the exponent by binary multiplication. It has the following

[0025] Beneficial effects:

[0026] Through the non-carry multiplication of binary exclusive OR operations, the present invention avoids the complex carry processing in large-number multiplication operations during the calculation process. While overcoming the difficulty of large-number multiplication operations, it is conducive to quickly generating the encryption sequence and provides a convenient operation path for the lightweight encryption of plaintext information. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a schematic diagram of the encryption process of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0029] Please refer to Figure 1 , the embodiments of the present invention provide the following two technical solutions:

[0030] Embodiment 1. A lightweight encryption method based on expanding the exponent by binary multiplication, specifically including the following steps:

[0031] Step 1. Binary conversion: Obtain the plaintext information and perform a decimal code conversion, and then encode the decimal code into a binary representation using six binary letters;

[0032] Step 2. Analysis of the length of the encryption sequence: When encrypting the plaintext information, according to the total number of letters in the plaintext information, multiply it by six times, and set the resulting value as M. M is used as the minimum number of binary letters required for the corresponding encryption. It should be noted that the total number of letters includes the space bar between two English words and the period;

[0033] Step 3. Exponent integration and screening: Obtain the exponential integer that satisfies

[0034] Step 4. Encryption of plaintext information: Use the non-carry multiplication of binary exclusive OR operations to expand Obtain the exponential field type for encryption, and divide every six bytes in the exponential field type into a small segment from left to right as the encrypted binary sequence. Combine several encrypted binary sequences into an encrypted sequence in the order from left to right. Align the length of the encrypted sequence with the binary representation in Step 1, and the bit length by which the encrypted sequence exceeds the binary representation in Step 1 is 6S, where S = 1 or 2;

[0035] Add S spaces at the end of the plaintext information to make the binary representation corresponding to the plaintext information consistent with the length of the encrypted sequence, and obtain the processed plaintext information;

[0036] Convert several encrypted binary sequences in the encrypted sequence into decimal codes as the encryption key, and encrypt the decimal code converted from the encryption key and the processed plaintext information using mod 64 addition to obtain the ciphertext.

[0037] Among them, the decryption method of the ciphertext includes:

[0038] After converting the ciphertext into a decimal code, subtract the encryption key to obtain the processed plaintext information, and delete N spaces at the end to obtain the plaintext information.

[0039] Example 2. A lightweight encryption method based on expanding the exponent by binary multiplication specifically includes the following steps:

[0040] Step 1. Binary conversion: Obtain the plaintext information and perform decimal code conversion, and then encode the decimal code into a binary representation using six binary letters;

[0041] Step 2. Analysis of the length of the encrypted sequence: When encrypting the plaintext information, multiply the total number of letters in the plaintext information by six times and set the value as M. M is used as the minimum number of binary letters required for corresponding encryption. It should be noted that the total number of letters includes the space between two English words and the period;

[0042] Step 3. Exponent integration and screening: Obtain the exponential integer that satisfies

[0043] Step 4. Encryption of plaintext information: Use binary exclusive OR operation and non-carry multiplication to expand Obtain the exponential field type for encryption, and divide every six bytes in the exponential field type into a small segment from left to right as the encrypted binary sequence. Combine several encrypted binary sequences into an encrypted sequence in the order from left to right. Align the length of the encrypted sequence with the binary representation in Step 1, and the bit length by which the encrypted binary sequence exceeds the binary representation in Step 1 is 6S, where S = 1 or 2;

[0044] Add 6S zeros at the end of the plaintext information to make the binary representation corresponding to the plaintext information consistent with the length of the encryption sequence, and obtain the processed plaintext information;

[0045] After performing a binary exclusive OR operation on the binary representation corresponding to the processed plaintext information and the encryption sequence, perform a decimal code conversion to obtain the ciphertext.

[0046] Among them, the method of decrypting the ciphertext includes:

[0047] Perform a binary exclusive OR operation on the ciphertext and the encryption sequence to obtain the plaintext information.

[0048] As a detailed description, the binary exclusive OR operation is a non-carrying multiplication represented by the symbol, and is separated from the traditional multiplication represented by the × symbol. The definition of the binary exclusive OR operation, that is, XOR, includes:

[0049]

[0050] Among them, as long as the number of "1"s is odd, regardless of the number of "0"s, the result of the binary exclusive OR operation is "1". On the contrary, if the number of "1"s is even, regardless of the number of "0"s, the result of the binary exclusive OR operation is "0".

[0051] For example:

[0052]

[0053] The result is It can be represented in a graphical way as the following process:

[0054]

[0055] Among them, the multiplication operation (×) part is based on normal binary multiplication. Since the multiplier 110101 has a six-bit length, after completing the normal binary multiplication, six sequences {1010001, 00000000, 10100010, 0000000000, 10100010000, 101000100000} are obtained. Next, perform a binary exclusive OR operation on these six sequences To combine, when the lengths of the sequences are different, zeros are filled in at the high - order positions on the left to make all binary sequences of the same length. Since the binary exclusive - OR operation is performed on the elements at the relative positions among multiple sequences, and for each position, the assigned value is only one of two values, "1" or "0", which is different from the addition operation of binary sequences, there is no carry problem. In this example, at the right - most position of the six sequences after filling with zeros, there are an odd number of "1"s, so the result of the last bit is "1". In this example, for the six sequences, the positions with an odd number of "1"s are also the 6th from the bottom and the first three positions from the left, so the results at these positions are all "1". At the 4th and 6th positions from the left, there are two "1"s each, so the results are "0". Finally, we get 111000100101.

[0056] When the above non - carry binary multiplication is extended to decimal multiplication, at this time, the binary exclusive - OR operation The symbol represents performing non - carry addition. For example:

[0057]

[0058] The graphical process and results of decimal non - carry multiplication are as follows:

[0059]

[0060] Based on the non - carry principle, taking 5×7 = 35 as an example, but We need to discard the 3 in decimal and only keep the single - digit value 5. It should be noted that when performing addition and combination at the fourth - last position, since Among them, 4 is discarded due to the non - carry principle, so at this position, it is 5 + 8 = 13, but considering non - carry, only the single - digit value on its right is retained, so it is Whether it is decimal or binary non - carry multiplication, the length of the resulting number is equal to the sum of the lengths of the multiplier and the multiplicand minus one. In this example, the length of 9087 is 4, the length of 605 is 3, and the length of 403205 is 6.

[0061] To further illustrate, when a positive integer x is represented in binary, it is defined as x₂ with subscript 2 for distinction, It represents a unit binary digit of length i. When performing the XOR operation on two binary sequences of different lengths, the shorter one needs to be filled with enough zeros in front to make their lengths the same before performing the operation:

[0062]

[0063] It can be seen that the non - carry multiplication and the XOR operation are commutative, that is They both satisfy

[0064]

[0065] The above results can be deduced as follows

[0066]

[0067] If the length of x2 is n, and there are multiple '1's located at multiple positions of the nth, jth,..., jth positions from the right, let the set of these positions be represented by A = {n, i,..., j} Therefore

[0068]

[0069] By analogy with the above results, the following conclusions can be obtained

[0070]

[0071] As a detailed description, for a decimal integer exponent x e , where x and e represent the base and the mantissa of the exponential integer respectively. After representing x in binary and setting its number of digits as n, represented by the absolute value symbol |x| = n, after performing the non-carrying multiplication of the binary exclusive OR operation e - 1 times, the length of the resulting sequence is e(n - 1) + 1 = ne - (e - 1). This length is the base of n. Assuming there are n - i '1's and i '0's in it, regardless of the positions of these '1's, after expanding it by performing the non-carrying multiplication of the binary exclusive OR operation, if its mantissa e = 2 k , k = 1, 2, 3,..., the resulting sequence will still maintain n - i '1's, and the rest are all composed of '0's

[0072] At this time The expanded sequence will maintain the same number of n - i '1's as the base, and the rest are all composed of '0's

[0073] Furthermore, the base has n - i '1's. How many '1's will there be in the expanded sequence of any other mantissa? For example, if the value of the mantissa is between two exponents with base 2, 2 k <e<2 k+1 , e ∈ {2 k + 1, 2 k + 2,..., 2 k+1 - 1}

[0074] The natural numbers are 2 0 , 2 1 , 3, 2 2 , 5, 6, 7, 2 3 , 9, 10,..., 15, 2 4 , 17, 18,... 31, 2 5, 33, …, which can be partitioned into the following subsets. The elements of these subsets all have an exponent with base 2 as a factor. The first element of each subset is odd. The subsets include:

[0075]

[0076] Taking the second subset above as an example, its first element is 3. As the argument of the exponential function, if the expanded sequence has n - i "1"s and the rest are "0"s, then for the other arguments belonging to this subset, e ∈ {3, 6, 12, 24, 48, …}, the expanded sequence still maintains n - i "1"s and the rest are "0"s.

[0077] and have the same n - i "1"s in the expanded sequence, and also have the same n - i "1"s. And so on, the following conclusion can be drawn:

[0078] Let e0 be any odd number. If the expanded sequence has n - i "1"s and the rest are "0"s, then for the other arguments belonging to this subset, e ∈ {e0×(2 0 , 2 1 , 2 2 , 2 3 , …, 2 l )}, the expanded sequence still maintains n - i "1"s and the rest are "0"s.

[0079] As a verification:

[0080] For a binary sequence of length n with two "1"s located at the nth and ith positions from the right as the base of the exponential integer, represented by , the results of this exponential integer for different arguments include:

[0081] Find the result of:

[0082]

[0083] verifies that also has two "1"s, but their positions are at 2n - 1 and 2i - 1 respectively;

[0084]

[0085] It becomes having four '1's, but their positions are respectively at 3n - 2, 2n + i - 2, n + 2i - 2, and 3i - 2;

[0086]

[0087] It is verified that There are also two '1's, but their positions are respectively at 4n - 3 and 4i - 3;

[0088]

[0089] There are four '1's, but their positions are respectively at 5n - 4, 4n + i - 4, n + 4i - 4, and 5i - 4.

[0090] Next, the results of the mantissas of higher powers can be obtained according to the following rules:

[0091] When the mantissa m is odd, take and The expanded sequence will maintain the same number of '1's, and their new relevant positions are allocated according to the following relationship

[0092]

[0093] For example, when m = 3, find the result when the mantissa 2m = 6:

[0094]

[0095] and There are also four '1's, but their positions respectively become 6n - 5, 4n + 2i - 5, 2n + 4i - 5, and 6i - 5 according to the above rules;

[0096] The result when the mantissa is 7:

[0097]

[0098] There are eight '1's, but their positions are respectively at 7n - 6, 6n + i - 6, 5n + 2i - 6, 4n + 3i - 6, 3n + 3i - 6, 2n + 5i - 6, n + 6i - 6, 7i - 6;

[0099]

[0100] However There are only four '1's, but their positions are respectively at 9n - 8, 8n + i - 8, n + 8i - 8, and 9i - 8;

[0101]

[0102]

[0103] The expanded sequence will maintain two "1"s, and their positions are allocated according to the following formula:

[0104]

[0105] The expanded sequence will maintain four "1"s, and their positions are allocated according to the following formula:

[0106]

[0107] On the premise that the base number has two "1"s, how many "1"s are there in the expanded sequences of two adjacent true numbers can be expanded using the following rules:

[0108]

[0109] When the expanded sequence maintains two "1"s but lacks one "1" in front, The number of "1"s in the expanded sequence successively includes:

[0110] 2 2 , 2 3 , …, 2 r , …, and their positions are allocated according to the following formula:

[0111]

[0112] Furthermore, when the base number of an integer has multiple "1"s, study the field patterns of the expanded sequences for different true numbers:

[0113] 1) When the base number has three "1"s, it is split into two parts, including the first two "1"s and the last single "1", represented by where A2 is represented by subscript 2 to indicate that it contains two "1"s. When the base number has three "1"s, the derivation process includes:

[0114]

[0115] Based on the above results, the following conclusions can be deduced according to whether the true number r is odd or even:

[0116]

[0117] 2) When the base number has four "1"s, it can be split into two parts, including the first three "1"s and the last single "1", represented by It means that the subscript 3 of A3 here refers to the part containing the previous three "1"s. By analogy with this principle, the relational expression for any k "1"s can be obtained:

[0118]

[0119] The above two formulas are deduced from the case of a small number of "1"s to the case of a large number of "1"s. Therefore, when the number of "1"s exceeds half of the length and belongs to the majority, the calculation efficiency using the above rules is relatively poor. At this time, it can be deduced from the opposite direction:

[0120] Take the base number with n - 2 "1"s as an example. At this time, assume that except for the two positions of the reciprocal i and j being "0", the rest of the positions are all "1". At this time, the base number can be expressed in the following way:

[0121]

[0122] At this time, use and to represent the sequences of consecutive n "1"s and only two "1"s respectively. The subscript 2 of D2 indicates that it is a sequence with two "1"s. We can deduce:

[0123]

[0124] When the true number r = 2

[0125]

[0126] According to the above results, it can be deduced that:

[0127]

[0128] By analogy, the following two general rules can be obtained:

[0129]

[0130] When the number of "1"s in the bit length n of the base number changes from n - 2 "1"s to n - i "1"s, only need to change D2 → D i That's it. Among them, for the n - i "1"s of D i when the true number is different, how many "1"s there are and how to configure the positions of these "1"s can be directly obtained according to the above results and Both of these have the same number of "1"s. The difference between the two is only that the latter needs to be padded with zeros in front to reach the length n.

[0131] In addition, the following two general rules also hold:

[0132]

[0133] Furthermore, taking as the base of the exponential integer and integrating them according to the above results, it can be deduced that There will be a total of 2 + 2 + 4 + 2 + 4 + 8 = 22 "1"s appearing in the sequence of length 7n - 6.

[0134]

[0135]

[0136] Taking n = 7 as an example, as shown in the above table, the base has two "1"s, which will change the ratio of the appearance of "1" from At this time, the number of the latter "1"s and "0"s approaches balance, meeting the conditions of a random sequence. Taking this example, the number of "1"s is 2, which is based on the relatively simple starting point of analysis. At this time, the positions of the 22 "1"s do not overlap. However, when there are multiple "1"s in the base, the probability of overlap will occur after expansion. When an even number of "1"s overlap, the value at that position becomes "0". At present, whether a general rule for the specific number of appearances of "1" and "0" can be summarized is not the key point, but the following three conclusions can be summarized:

[0137] If the true number e in

[0138] is odd, then the number of "1"s after its expansion will not be less than the number of "1"s in the base; n >e m holds, it does not mean that also holds. The following example can be cited as evidence.

[0139]

[0140] However

[0141] Adding and combining multiple exponential integers with the same base but different true numbers, for example It can balance the total number of "1"s and "0"s, making the generated sequence meet the conditions of an ideal random sequence.

[0142] For a decimal integer exponent x e , where x and e represent the base and the true number of the exponential integer, after representing x in binary, let its number of digits be where denotes taking the smallest integer not less than the input value, and |·| denotes taking its length or the number of binary codes. Therefore, Therefore, the number of binary codes for normal multiplication converted to binary is en. However, after performing the non-carrying multiplication based on binary XOR operation e - 1 times, the length of the resulting sequence is e(n - 1)+1. The two will differ by en-(e(n - 1)+1)=e - 1 digits. As shown in the following table, where the horizontal axis represents the value of the base digit n from 1 to d, and the vertical axis represents the true number e from 1 to c. The data in the middle of the table represents the length of the corresponding sequence e(n - 1)+1.

[0143]

[0144]

[0145] It can be clearly seen that a specific value of e(n - 1)+1 can be composed of different e and n. For example, 13 = 2(6)+1 = 3(4)+1 = 4(3)+1 = 1(12)+1 = 12(1)+1. Therefore, it is very likely to find two or more different exponential integers x e , for example However, after expanding by non-carrying multiplication based on binary XOR operation, the resulting sequence is the same such as:

[0146]

[0147] This example shows that two or more different exponential integers may generate the same binary sequence after expanding by non-carrying multiplication based on binary XOR operation. From the perspective of the corresponding function, this is a many-to-one mapping relationship. However holds. We can deduce e from x represented by the formula . However, we cannot deduce x from e . In other words holds, but does not hold.

[0148] This property shows that the exponential integer is a one-way function after expanding by non-carrying multiplication based on binary XOR operation. holds, but does not hold. Therefore, we cannot deduce the base and true number of the exponential integer from the generated encrypted binary sequence. This is a good characteristic that can ensure the confidentiality of two shared private integers.

[0149] As an optional embodiment, the coding table is shown in the following table:

[0150]

[0151] Among them, the set plaintext information is all composed of the numbers, English letters, and symbols in the first column. Currently, there are 64 of them in total, which can be corresponded to the decimal letter values from 00 to 63 in a one-to-one manner. If the subsequent plaintext covers other symbols, this table can be extended and set, placed in the second column of the table. Their maximum value is 63, and they can be encoded into binary expressions using six binary letter lengths. The results are placed in the third column of binary digital codes. When encrypting the plaintext information, according to the total number of letters (including the space bar between two English letters and the period) in the plaintext, the value obtained by multiplying by six is set as M. This value is used to map the minimum number of binary letters required for encryption. In other words, the length of the binary sequence for encryption is determined according to to decide. The next step is to divide the binary sequence expanded from into segments of every six bytes from left to right for the encryption sequence, and one-to-one encryption with the binary sequence composed of the plaintext can be generated.

[0152] Let the plaintext be "2024Olympic was held in Paris.", which consists of 31 letters. First, convert it to decimal codes and then to a binary sequence with 186 bits. The conversion process is represented by the arrow symbol →:

[0153] 2024Olympic was held in Paris.

[0154] →02,00,02,04,10,51,22,35,23,26,19,13,10,33,11,29,10,18,15,22,14,10,19,24,10,52,11,28,19,29,63

[0155] Furthermore, the 31 decimal numbers can be converted into a binary sequence with 186 bits:

[0156]

[0157] Generate the encryption sequence, and there are exponential integers that meet the conditions, such as:

[0158] (e,n)=(17,13),(19,12),(13,17),(7,35),(35,7),…,

[0159] Among them, x e =5733 17 can be found such that:

[0160]

[0161] Expand its exponential field pattern:

[0162] x e = 5733 17 =(1011001100101) 17

[0163] = 10110011001010000000000000000000101100110010100010 11001100101000000000000000000000000000000000001011 00110010100010110011001010000000000000000000000000 00000000001011001100101000000000000000000010110011

[0167] 00101 (205 bits)

[0168] Since there are cases where multiple consecutive "0"s appear in this field pattern sequence, there are concerns about directly using it as plaintext for encryption. This problem can be improved by adding the following exponential integer field pattern:

[0169]

[0170]

[0171] The above combined form of The bit length after expanding the exponential integer by non-carry multiplication is still Select the first 198 binary codes of it, convert them into decimal numbers in units of six bits, and directly add them to the 186 binary codes of the plaintext, which are converted into decimal numbers in units of six bits. Specifically, add two space keys (10, 10) at the end of the original plaintext to make it the same length as the encryption key, and perform mod 64 addition on the two to encrypt. In this example, the selected encryption sequence is 198 binary codes, which is only 12 bits longer than the plaintext. This function is to achieve the purpose of hiding the actual length of the plaintext and further enhance the challenge of being cracked. In terms of the flexibility of the implementation level, it allows us to use a longer encryption sequence to encrypt shorter plaintext information. From the perspective of brute-force cracking the ciphertext, the longer ciphertext has a stronger security level.

[0172] The results of showing the 198 binary codes converted into decimal numbers in units of six bits are as follows:

[0173] 101100,110010,100000,000000,000000,001011,001100,101000,101100,110010,100000,000000,101110,101101,111101,101111,011101,111000,101011,000111,100110,111100,110100,001010,011101,001011,001111,000100,010001,110111,111001,111101,000100

[0174] →C d =(44,50,32,00,00,11,12,40,44,50,32,00,46,45,61,47,29,56,43,07,38,60,52,10,29,11,15,04,17,55,57,61,04)

[0175] Use C d to represent this decimal encryption key, and directly perform a 64 - modulo (mod 64) addition with the decimal plaintext M s The resulting ciphertext after the operation is as follows. This result can be converted to the corresponding English version for comparison to check the differences.

[0176] S d =(C d +M s )(mod 64)

[0177] =((44,50,32,00,00,11,12,40,44,50,32,00,46,45,61,47,29,

[0178] 56,43,07,38,60,52,10,29,11,15,04,17,55,57,61,04)

[0179] +(02,00,02,04,10,51,22,35,23,26,19,13,10,33,11,29,10,

[0180] 18,15,22,14,10,19,24,10,52,11,28,19,29,63,10,10))(mod 64)

[0181] =(46,50,34,04,10,62,34,11,03,12,51,13,56,14,08,12,39

[0182] (10, 58, 29, 52, 06, 07, 34, 39, 63, 26, 32, 36, 20, 56, 07, 14) (mod 64)

[0183] → JNx4 Zxa3bOcTd8bC VsP67xC.pvzjT7d

[0184] In other words, there is an obvious difference between the plaintext and the ciphertext. It is very difficult for a third party to crack the ciphertext without the key.

[0185] 2024 Olympic was held in Paris. (plaintext M s )

[0186] → JNx4 Zxa3bOcTd8bC VsP67xC.pvzjT7d (ciphertext S d )

[0187] In terms of decoding, simply subtract the encryption sequence from the ciphertext S d to restore the plaintext information. The operation process is as follows:

[0188] S d - C d = (C d + M s - C d )(mod64) = M s (mod64)

[0189] M s = (S d - C d )(mod64)

[0190] = ((46, 50, 34, 04, 10, 62, 34, 11, 03, 12, 51, 13, 56, 14, 08, 12, 39

[0191] 10, 58, 29, 52, 06, 07, 34, 39, 63, 26, 32, 36, 20, 56, 07, 14)

[0192] - (44, 50, 32, 00, 00, 11, 12, 40, 44, 50, 32, 00, 46, 45, 61, 47, 29,

[0193] 56, 43, 07, 38, 60, 52, 10, 29, 11, 15, 04, 17, 55, 57, 61, 04))(mod 64)

[0194] =(02,00,02,04,10,51,22,-29,-41,-38,19,13,10,-31,-53,-35,10,

[0195] -46,15,22,14,-54,-45,24,10,52,11,28,19,-35,-54,00,10))(mod 64)

[0196] =(02,00,02,04,10,51,22,35,23,26,19,13,10,33,11,29,10,

[0197] 18,15,22,14,10,19,24,10,52,11,28,19,29,63,10,10))(mod 64)

[0198] →The 2024 Olympics was held in Paris.

[0199] As another optional embodiment, the first 198 binary codes of the encryption sequence are directly XORed with the 186 binary codes of the plaintext to generate the ciphertext. However, the latter must be appended with 12 "0"s at its backend, and the result includes:

[0200]

[0201] In other words, there are obvious differences between the plaintext and the ciphertext. It is very difficult for a third party to crack the ciphertext without the encryption key.

[0202] 2024Olympic washeld in Paris.(plaintext)

[0203] →JNx4 TpaWDOczbRNmFzgDRChm.4n2F6Y4(cyphertext S b )

[0204] Although the same encryption sequence is used to encrypt the same plaintext, the ciphertexts generated by the two encryption methods are not exactly the same. C d +M d =S d ≠S b =C b +M b , and the reasons for the partial differences between the two include:

[0205] First, the former generates the ciphertext by taking the (mod 64) addition operation of decimal characters, which will cause problems such as carry in addition and taking (mod 64), while the latter generates the ciphertext by performing XOR operation on binary bits;

[0206] Second, the former original plaintext finally adds two space keys (10, 10) to make it have the same number of characters as the encryption key, while the latter processes by appending 12 "0"s to the end of the plaintext.

[0207] In terms of decoding, just perform an exclusive OR operation on the ciphertext S b and the encryption sequence to restore the plaintext information.

[0208] As an extended explanation, the above lightweight encryption method can also be applied to assist in distributing and managing AES encryption keys. Specifically, the Advanced Encryption Standard AES uses 128, 192, or 256-bit keys. In a public platform with n users, n different keys are required, but the number of keys that need to be exchanged is n(n - 1) / 2 to enable communication with each other. How to save, distribute, and manage so many keys poses a great challenge for Internet of Things terminal devices. Let c = (c 256 c 255 … c1) be the symmetric key of AES-256, {c1, c2, …, c 255 , c 256} ∈ {0, 1}, and the binary encryption sequence expanded by exponential integers is s = (d N d N-1 … d1), {d1, d2, …, d N-1 , d N} ∈ {0, 1}. Select N large enough, N > 256, and then perform an exclusive OR operation on the two to generate a new further encrypted symmetric key s c , which can be directly transmitted to the intended receiving end through a public channel:

[0209]

[0210] This example shows that the two parties wishing to conduct secure communication can share two positive integers (x, e), that is, the base number and the true number used to generate the exponential integer s = (d N d N-1 … d1) field type, which can replace the need to exchange a key c = (c 256 c 255 … c1) with a length of 256 bits. The key c = (c 256 c 255 … c1) is wrapped in the encryption sequence with a length of N, and an appropriate number of zeros can be added at its front or back to enhance its confidentiality. This symmetric key can be obtained at the receiving end after being expanded by the shared base number and true number s = (d N d N-1 … d1), and then c = (c 256 c 255…c1):

[0211]

[0212] For other unrelated third parties, since the password space has changed from 2 256 to 2 N in a higher dimension, and since a sufficiently large N >> 256 can be selected at this time, it can make brute force cracking by third parties impossible.

[0213] To run the above-mentioned purpose of confidential communication among all users on a public platform with n users, all users on the platform can each register a pair of private positive integers (x i , e i ), i = 1, 2,..., n, through a trusted third-party institution. When any two parties need to exchange, for example, the above-mentioned AES key, they can learn the base number and true number of the other party through this trusted third-party institution, and then complete the purpose of key exchange according to the above process. In addition, this trusted third-party institution can also link each pair of private positive integers (x i , e i ), i = 1, 2,..., n, to their AES keys one by one. In this way, the number of keys that need to be exchanged is n(n - 1) / 2 for mutual communication.

Claims

1. A lightweight encryption method based on expanding exponents by binary multiplication, characterized in that: Specifically, it includes the following steps: Step 1, binary conversion: Obtain the plaintext information and perform decimal code conversion, and then encode the decimal code into a binary representation using six binary letters; Step 2, encryption sequence length analysis: When encrypting the plaintext information, according to the total number of letters in the plaintext information, multiply it by six times and set the value as M, and M is used as the minimum number of binary letters required for corresponding encryption; Step 3. Exponential integration and screening: Obtain the exponential integers that satisfy ​ Step 4. Plaintext information encryption: Expand using binary exclusive OR operation and non-carry multiplication Obtain an exponential field type for encryption, divide every six bytes in the exponential field type into a small segment from left to right as an encrypted binary sequence, and perform one-to-one encryption on the binary representation in Step 1 using the encrypted binary sequence in the order from left to right.

2. The lightweight encryption method based on expanding an exponent by binary multiplication according to claim 1, wherein: The total number of letters in Step 2 includes the space bar between two English letters and the period.

3. A lightweight encryption method based on expanding an exponent by binary multiplication according to claim 1, characterized in that: The encryption method in Step 4 includes: Arrange several encrypted binary sequences into an encryption sequence in the order from left to right, align the length of the encryption sequence with the binary representation in Step 1, and the bit length by which the encryption sequence exceeds the binary representation in Step 1 is 6S, where S = 1 or 2; Add S space bars at the end of the plaintext information to make the binary representation corresponding to the plaintext information consistent with the length of the encryption sequence, and obtain the processed plaintext information; Convert several encrypted binary sequences in the encryption sequence into decimal codes as the encryption key, and encrypt the decimal code converted from the processed plaintext information and the encryption key using mod 64 addition to obtain the ciphertext.

4. A lightweight encryption method based on expanding an exponent by binary multiplication according to claim 3, characterized in that: The method for decrypting the ciphertext includes: After performing decimal code conversion on the ciphertext, subtract the encryption key to obtain the processed plaintext information, and delete N space bars at the end to obtain the plaintext information.

5. A lightweight encryption method based on expanding an exponent by binary multiplication according to claim 1, characterized in that: The encryption method in Step 4 also includes: Arrange several encrypted binary sequences into an encryption sequence in the order from left to right, align the length of the encryption sequence with the binary representation in Step 1, and the bit length by which the encrypted binary sequence exceeds the binary representation in Step 1 is 6S, where S = 1 or 2; Add 6S zeros at the end of the plaintext information to make the binary representation corresponding to the plaintext information consistent with the length of the encryption sequence, and obtain the processed plaintext information; Perform a binary exclusive OR operation on the binary representation corresponding to the processed plaintext information and the encryption sequence, and then perform decimal code conversion to obtain the ciphertext.

6. The lightweight encryption method based on binary multiplication expansion of exponents according to claim 5, characterized in that: The method for decrypting the ciphertext includes: Perform a binary exclusive OR operation on the ciphertext and the encryption sequence to obtain the plaintext information.

Citation Information

Patent Citations

  • Data encryption method, system and device and storage medium

    CN115333777A