A method, device and equipment for double encryption protection of text privacy data

Through the double encryption protection method, hash value key decomposition and random chaotic information are combined with dynamic DNA coding and AES encryption algorithm to solve the problem of low security of text privacy data and ensure the security of privacy information in fields such as medical care and finance.

CN116418481BActive Publication Date: 2025-09-16HENAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310411957.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-18
Publication Date
2025-09-16
Estimated Expiration
2043-04-18

AI Technical Summary

Technical Problem

The encryption security of text privacy data in the existing technology is low, and it is easy to be stolen and tampered by attackers, posing a security risk.

Method used

A double encryption protection method is adopted. First, the keys W1, W2, W3 and W4 are generated by hash value key decomposition to perform the first encryption protection operation. Then, random chaotic information is used to perform the second encryption protection operation. Combined with dynamic DNA coding and AES encryption algorithm, security is improved.

Benefits of technology

It achieves high security for text privacy data during storage and transmission. Even if the encrypted data is stolen, it is difficult to restore. It is suitable for privacy information protection in fields such as medical care and finance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418481B_ABST
    Figure CN116418481B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and equipment for double encryption protection of text privacy data, belonging to the field of data privacy protection technology. The method comprises: calculating the hash value of the plaintext information to be encrypted, and obtaining keys W1, W2, W3 and W4 by hash value key decomposition; taking the plaintext information and keys W1 and W2 as inputs to participate in a first encryption protection operation; taking the operation result of step S2, key W3 and random chaotic information generated according to key W4 as inputs to participate in a second encryption protection operation to obtain ciphertext information. The method can be applied to fields such as medicine and finance. In response to the low security problem of encrypted text privacy data using currently commonly used block cipher algorithms such as DES and AES, the method uses double encryption methods to ensure the security of privacy information during storage and transmission; even if the encrypted data is stolen, it cannot be restored in the same way as the encryption and decryption methods.
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 privacy protection, and in particular to a method, device and equipment for double encryption protection of text privacy data. Background Art

[0002] With the increasing prevalence of science and technology, computer networks have facilitated the dissemination and reception of information, making information networks an indispensable infrastructure across all sectors of society. While this information has brought numerous conveniences to people's lives, it has also led to concerns about the security of private information. Sectors such as healthcare and finance place extremely high demands on the confidentiality of private data. Sharing this private information presents risks such as leakage, tampering, and counterfeiting. Once accessed by attackers, this poses significant security risks. Therefore, ensuring the security of this private data is paramount.

[0003] In view of the low security problem of text privacy data encrypted by commonly used block cipher algorithms such as DES and AES, it is necessary to design a text privacy data encryption method with higher security. Summary of the Invention

[0004] The purpose of the present invention is to provide a method, device and equipment for double encryption protection of text privacy data, which solves the problem of low security of privacy data encryption in the prior art.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] In a first aspect, the present invention provides a method for protecting text privacy data with double encryption, comprising the following steps:

[0007] S1. Calculate the hash value of the plaintext information to be encrypted, and decompose the hash value key to obtain the keys W1, W2, W3 and W4;

[0008] S2. Take the plaintext information and keys W1 and W2 as input and participate in the first encryption protection operation;

[0009] S3. Take the operation result of step S2, key W3 and random chaotic information generated according to key W4 as input, participate in the second encryption protection operation, and obtain ciphertext information.

[0010] Furthermore, the step S1 specifically includes:

[0011] The plaintext information to be encrypted is hashed using the SHA-256 function to generate a 64-bit calculation result W0. W0 is used as input to perform hash value key decomposition and then divided into 4 parts, namely Key1, Key2, Key3 and Key4;

[0012] Among them, Key1 is 1-32 bits of W0, and a coding scheme is selected for dynamic DNA encoding to obtain the key W1;

[0013] Key2 is bits 33-40 of W0. A coding scheme is selected for dynamic DNA encoding and cyclic left shift is performed to obtain the key W2.

[0014] Key3 is bits 44-56 of W0. Take every 4 bits of Key3 as a group, convert the hexadecimal to decimal and take the remainder to get the key W3.

[0015] Key4 is bits 57-64 of W0. Every 4 bits of data in Key4 are taken as a group and converted from hexadecimal to decimal. The conversion result is accumulated and modulo operation to obtain key W4.

[0016] Furthermore, the step S2 specifically includes:

[0017] S21, performing dynamic DNA encoding on the plaintext information;

[0018] S22, byte filling based on dynamic DNA coding;

[0019] S23. Based on the byte padding result and the keys W1 and W2, the AES encryption algorithm is used to implement DNA sequence encryption, including a byte substitution step, a row shift step, a column mixing step, and a round key addition step.

[0020] Furthermore, the step S21 specifically includes:

[0021] The plaintext information is converted into the ASCII value corresponding to the character, and a DNA encoding scheme is randomly selected for the decimal ASCII value to perform dynamic DNA encoding to obtain input1 data.

[0022] Furthermore, the step S22 specifically includes:

[0023] S221, the input1 data after dynamic DNA encoding is divided into blocks according to 64-bit DNA sequences, with each block corresponding to a row of data;

[0024] S222. If the length of the last block of data is less than 64 bits, perform byte padding in a preset manner until the end of 64 bits; if the length of the last block of data is 64 bits, pad a line of 64-bit data after input1.

[0025] Furthermore, the byte replacement step includes:

[0026] The S-box and inverse S-box substitutions of the AES algorithm correspond to the input of a 4-bit DNA sequence and the output of a 4-bit DNA sequence; the first two digits of the DNA sequence correspond to the number of rows, and the last two digits correspond to the number of columns;

[0027] Perform S-box replacement on the byte-filled input1 data, and the result obtained after all data bytes are replaced is the input2 data.

[0028] Furthermore, the row shifting step includes:

[0029] The input2 data after byte replacement is divided into blocks to obtain 16 blocks of data, each containing 4 bits of DNA sequence;

[0030] The first row of shift schemes is randomly selected from the four AES algorithm row shift schemes, the second row of shift schemes is randomly selected from the remaining three schemes, the third row of shift schemes is randomly selected from the remaining two schemes, and the fourth row of shift schemes is the last remaining scheme.

[0031] Furthermore, step S3 includes:

[0032] S31, after the hash value key is decomposed, a key W4 is generated as the initial value of the Logistic map, and a random chaotic information input6 is generated through the Logistic map;

[0033] S32, using the first encryption protection operation result input5, the random chaotic information input6 and the key W3 as the input of the second encryption protection operation;

[0034] S33, using the key W3 to generate Chen's hyperchaotic sequence and convert it into an operation sequence (X, Y, Z, H);

[0035] S34, after the sequence conversion is completed, the first encryption protection operation result input5 and the random chaotic information input6 are respectively divided into R blocks;

[0036] S35, using an operation sequence to sequentially perform random encoding, random operation, random diffusion, and random decoding operations on each block of data to obtain data input9;

[0037] S36. Convert the data input 9 into ASCII to obtain the output of the second encryption protection algorithm as ciphertext information.

[0038] In a second aspect, the present invention further provides a double encryption protection device for text privacy data, comprising:

[0039] The key generation module is used to calculate the hash value of the plaintext information to be encrypted and obtain the keys W1, W2, W3 and W4 by decomposing the hash value key;

[0040] A first encryption protection module, configured to take the plaintext information and keys W1 and W2 as input and participate in a first encryption protection operation;

[0041] The second encryption protection module is used to take the operation result of the first encryption protection module, the key W3 and the random chaotic information generated according to the key W4 as input, participate in the second encryption protection operation, and obtain ciphertext information.

[0042] In a third aspect, the present invention further provides a computer device comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0043] Memory for storing computer programs;

[0044] The processor, when used to execute the program stored in the memory, can implement a double encryption protection method for text privacy data as described in the first aspect.

[0045] The description of the second to third aspects of the present invention can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second to third aspects can refer to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] An embodiment of the present invention provides a method for dual encryption protection of textual privacy data, comprising: calculating a hash value of the plaintext information to be encrypted, and obtaining keys W1, W2, W3, and W4 through hash value key decomposition; using the plaintext information and keys W1 and W2 as inputs to participate in a first encryption protection operation; and using the result of step S2, key W3, and random chaotic information generated based on key W4 as inputs to participate in a second encryption protection operation to obtain ciphertext information. This method can be applied to fields such as medicine and finance. To address the low security of encrypted textual privacy data using currently commonly used block cipher algorithms such as DES and AES, this method employs dual encryption to ensure the security of the privacy information during storage and transmission. Even if the encrypted data is stolen, it cannot be restored as with encryption and decryption methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of a method for double encryption protection of text privacy data provided by an embodiment of the present invention;

[0049] Figure 2 A flowchart of a method for double encryption protection of text privacy data provided by an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of a hash value key decomposition process provided by an embodiment of the present invention;

[0051] Figure 4 A schematic diagram of a key expansion process provided by an embodiment of the present invention;

[0052] Figure 5 A schematic diagram of byte filling based on DNA coding provided by an embodiment of the present invention;

[0053] Figure 6 A schematic diagram of the S-box of the redesigned AES algorithm provided in an embodiment of the present invention;

[0054] Figure 7 A schematic diagram of the inverse S-box of the redesigned AES algorithm provided in an embodiment of the present invention;

[0055] Figure 8 A schematic diagram of the row shifting process of the double encryption protection algorithm for text privacy data provided by an embodiment of the present invention;

[0056] Figure 9 A schematic diagram of the round key addition process of the double encryption protection algorithm for text privacy data provided by an embodiment of the present invention;

[0057] Figure 10 A schematic diagram of the mixing process of the double encryption protection algorithm for text privacy data provided by an embodiment of the present invention;

[0058] Figure 11 A schematic diagram of the mixing process of the second heavy encryption protection algorithm provided in an embodiment of the present invention;

[0059] Figure 12 This is a block diagram of a device for double encryption protection of text privacy data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below in conjunction with specific implementation methods.

[0061] In the description of the present invention, it should be noted that the terms "upper," "lower," "inner," "outer," "front end," "rear end," "both ends," "one end," "the other end," and the like, indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0062] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "provided with," "connected," etc., should be understood in a broad sense. For example, "connected" may refer to a fixed connection, a detachable connection, or an integral connection; it may refer to a mechanical connection or an electrical connection; it may refer to a direct connection or an indirect connection through an intermediate medium; it may refer to internal communication between two components. Those skilled in the art will be able to understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0063] Example 1:

[0064] Reference Figure 1-2 As shown, the present invention provides a double encryption protection method for text privacy data, comprising:

[0065] S1. Calculate the hash value of the plaintext information to be encrypted, and decompose the hash value key to obtain the keys W1, W2, W3 and W4;

[0066] S2. Take the plaintext information and keys W1 and W2 as input and participate in the first encryption protection operation;

[0067] S3. Take the operation result of step S2, key W3 and random chaotic information generated according to key W4 as input, participate in the second encryption protection operation, and obtain ciphertext information.

[0068] This method can be applied to fields such as healthcare and finance, using double encryption to ensure the security of private information during storage and transmission. Even if the encrypted data is stolen, it cannot be restored using encryption and decryption methods. For example, it can be used to encrypt and protect patient pathology information and financial payment data, as well as other areas such as text, images, audio, video, or any other combination of information.

[0069] The following is a detailed description of each of the above steps.

[0070] In the above step S1, the key is generated:

[0071] The SHA-256 hash function can convert information of varying lengths into a 64-bit hexadecimal number. The 64-bit result generated by the function after the plaintext is input is W0. Using W0 as input, the hash value key decomposition process yields the key W1-W4. The hash value key decomposition algorithm is shown in Algorithm 1:

[0072]

[0073]

[0074] It can be seen from the key decomposition algorithm that the hash value W0 of the plaintext information will be divided into 4 parts, Key1 is 1-32 bits of W0, Key2 is 33-40 bits of W0, Key3 is 44-56 bits of W0, and Key4 is 57-64 bits of W0. According to the above algorithm 1, one of the 8 coding schemes is selected for Key1 to be dynamically DNA-encoded to obtain the key W1. Key2 is also selected from one of the 8 coding schemes to be dynamically DNA-encoded and cyclically left-shifted to obtain the key W2. Every 4 bits of data in Key3 are taken as a group, and the hexadecimal to decimal conversion is performed and the remainder is taken. The obtained x0, y0, z0, h0 is the key W3. Every 4 bits of data in Key4 are taken as a group, and the hexadecimal to decimal conversion is performed. The conversion result x0 obtained by accumulation and remainder operation is the key W4. The hash value key decomposition process is illustrated as follows Figure 3 shown.

[0075] Depend on Figure 3 It can be seen that by dividing W0 into different lengths, Key1, Key2, Key3, and Key4 are obtained. After dynamic DNA encoding of Key1, the key matrix W1 for the round key addition process in the first-level encryption protection algorithm is obtained. After dynamic DNA encoding of each two hexadecimal digits in Key2, four 4-bit DNA sequences s1-s4 are obtained. After cyclic shifting these four DNA sequences, the left-side fixed matrix W2 for the column mixing process in the first-level encryption protection algorithm is obtained. After Key3 is converted through data calculation 1, the initial value W3 of the Chen hyperchaotic system is obtained, where W3 contains the four data x0, y0, z0, and h0. After Key4 is converted through data calculation 2, the initial value W4 of the logistic map is obtained.

[0076] in, Figure 3 W1 of size 4×16 needs to be key expanded to meet the requirements of the round key addition process in the double encryption protection algorithm for text privacy data. The key expansion algorithm of W1 is shown in Algorithm 2.

[0077]

[0078] It can be seen from Algorithm 2 that initially W1 is a matrix of 4 rows and 16 columns. Splitting each 4 columns of DNA sequence in W1 as a group, we can get W1[1], W1[2], W1[3], and W1[4]. The new data generated in each expansion operation is recorded as W1[i]. The expansion operation starts from i=5 and increases by 1 each time until i=44. If i-1 is a multiple of 4, it is necessary to participate in the operation of the T function before performing the XOR operation, otherwise the XOR operation can be performed directly. After the key expansion, W1 has a total of 44 groups of data, each group of data contains 4 columns of DNA sequences, so when output, W1 has a total of 4 rows and 44×4=176 columns of data. The key expansion process is illustrated as follows. Figure 4 shown.

[0079] Depend on Figure 4 It can be seen that after the key W1 is split, the data size of each block is 4×4. From the key expansion algorithm shown in Algorithm 2, it can be seen that when calculating the key W1[5], i=5 and i-1=4 are multiples of 4. Therefore, W1[5] needs to be operated on the T function first, and then XORed with W1[1]. The T function operation includes three processes: circular shift byte replacement and round constant XOR. The circular shift process is to move the first row of data to the last row, and the data of each of the remaining rows is moved up one row. The data after circular shift needs to be replaced by S box. The specific process of S box replacement will be given in the subsequent specific step S2.

[0080] Taking 'CAGG' as an example, it becomes 'TCCG' after S-box substitution. The data after S-box substitution needs to be XORed with the round constant. At this time, the round constant is RC[1]. At this point, the T function operation has been completed and the result is T(W1[4]). XORing W1[1] with T(W1[4]) can obtain the expanded key W1[5]. When calculating the key W1[6], i=6, i-1=5 is not a multiple of 4, so XORing W1[2] with W1[5] can obtain the expanded key W1[6]. The round constant (RC) used in the T function operation is shown in Table 1.

[0081] Table 1. Wheel constant (RC)

[0082]

[0083] As shown in Table 1, the RC[j] data varies when the value of variable j changes. Variable j and variable i in the key expansion satisfy the relationship j = (i-1) / 4. Based on the value of variable i during the T function operation, the corresponding RC[j] is selected to perform the round constant XOR operation.

[0084] The above step S2 specifically includes:

[0085] S21, performing dynamic DNA encoding on the plaintext information;

[0086] S22, byte filling based on dynamic DNA coding;

[0087] S23. Based on the byte padding result and the keys W1 and W2, the AES encryption algorithm is used to implement DNA sequence encryption, including a byte substitution step, a row shift step, a column mixing step, and a round key addition step.

[0088] The first-level encryption algorithm includes three steps: dynamic DNA encoding of plaintext information, byte padding based on DNA encoding, and dynamic DNA sequence encryption based on AES. The dynamic DNA sequence encryption algorithm based on AES adopts the framework of the AES encryption algorithm and includes four steps: byte substitution, row shift, column mixing, and round key addition, for a total of 10 rounds of encryption operations.

[0089] (1) In step S21, dynamic DNA encoding:

[0090] The plaintext (input) is the private data to be encrypted and serves as the input for the first encryption algorithm. The plaintext is converted to the ASCII value corresponding to the character. This decimal ASCII value is then dynamically encoded using a DNA encoding scheme randomly selected from eight encoding rules. The resulting data is (input1).

[0091] (2) In step S22, byte padding based on DNA encoding:

[0092] After dynamic DNA encoding, the length of data input1 may not be an integer multiple of 64 and cannot participate in subsequent operations. Therefore, before participating in the dynamic DNA sequence encryption based on AES, it is necessary to perform byte padding on the data with a length less than 64 bits at the end. The steps of the byte padding method based on DNA encoding are as follows:

[0093] Step 1: Divide the input1 data after dynamic DNA encoding into blocks according to the 64-bit DNA sequence, with each block corresponding to a row of data.

[0094] Step 2: If the last data block is less than 64 bits long, pad input1 with the 4-bit DNA code of the data length after 4, and then pad the remaining data with 'A' until the length reaches 64 bits. If the last data block is 64 bits long, pad input1 with 'ACAA' and 60 'A's, for a total of 64 bits. After byte padding, the data (input1) is obtained.

[0095] The filling method is illustrated as follows Figure 5 As shown. Figure 5 As can be seen, the original data (input1) is split into two rows after block processing. According to DNA encoding rule 1, if the last row of data only has 24 bits, bits 25-28 are padded with the 4-bit DNA code 'AACG' (24 / 4 = 6), and bits 29-64 are padded with 'A'. If the last row of data is exactly 64 bits, an additional 64 bits of data are padded below the last row of data, with the first 4 bits padded with 'ACAA' and the remaining 60 bits padded with 'A'.

[0096] (3) Step S23 includes a byte replacement step, a row shift step, a column mixing step, and a round key addition step.

[0097] 1) Byte replacement steps:

[0098] The double encryption protection algorithm for text privacy data redesigns the S-box and inverse S-box of the AES algorithm to adapt to the byte substitution in the algorithm. The new S-box is as follows: Figure 6 As shown, the new inverse S-box is Figure 7 shown.

[0099] Depend on Figure 6 and Figure 7 As can be seen, the S-box and inverse S-box substitutions in the double encryption algorithm for text privacy data both correspond to a 4-bit DNA sequence input and a 4-bit DNA sequence output. The first two digits of the DNA sequence correspond to the number of rows, and the last two digits correspond to the number of columns. Taking 'GTAC' as an example, the result after the S-box operation is 'TAGA', and the result after the inverse S-box operation is 'GTAC', successfully restoring the original data, thus proving that the inverse S-box is the inverse of the S-box operation. The S-box substitution is performed on the byte-padded data (input1), and the result after all data bytes are replaced is data (input2).

[0100] 2) Row shift steps:

[0101] When the row shift of the double encryption protection algorithm for text privacy data begins, the original data (input2) after byte replacement must be divided into blocks. The 16 blocks of data (input2) obtained after block processing, each of which contains a 4-bit DNA sequence. The row shift scheme of the traditional AES algorithm is fixed, and there are four schemes: no shift, circular left shift 1 bit, circular left shift 2 bits, and circular left shift 3 bits. In order to increase the randomness of the first heavy encryption protection algorithm, the first row shift scheme of the algorithm proposed in this embodiment selects one from the four schemes, the second row selects one from the remaining three schemes, and so on, for a total of 4! = 24 schemes. The row shift algorithm in the double encryption protection algorithm for text privacy data is shown in Algorithm 3, and the value of W0 is already in Figure 3 given.

[0102]

[0103]

[0104] As can be seen from Algorithm 3, the input of the row shift algorithm is the original data (input2) and W0. The new hexadecimal data a is '47' after extracting and combining the 5th and 1st characters in W0. Converting a to decimal and performing a modulo operation with 24 to obtain a1 is 24. Therefore, the 24th row shift scheme is selected, that is, the first row is not shifted, the second row is cyclically shifted left by 1 bit, the third row is cyclically shifted left by 2 bits, and the third row is cyclically shifted left by 3 bits. The row shift process of the double encryption protection algorithm for text privacy data is illustrated as follows: Figure 8 shown.

[0105] Depend on Figure 8 As can be seen, the original data (input2) needs to be divided into blocks for every 16-bit DNA sequence. Bits 1-16 form the first row of the block, bits 17-32 form the second row, and so on, resulting in the block-based original data (input2). The encoding scheme in this case is to cyclically shift the first row left by one bit, the second row unchanged, the third row left by three bits, and the fourth row left by two bits. The result after shifting according to the encoding scheme is (input3).

[0106] 3) Column mixing step:

[0107] The column mixing operation of the AES algorithm requires two types of operations: multiplication and XOR. In order to simplify the column mixing calculation steps and improve encryption efficiency, the column mixing in the double encryption protection algorithm for text privacy data only requires the corresponding numerical XOR operation. The fixed matrix on the left side of the column mixing is W2 obtained through the hash value key decomposition process. It and the original data after row shift (input3) serve as the two inputs in the column mixing process. The column mixing operation is illustrated as follows: Figure 9 shown.

[0108] Depend on Figure 9 It can be seen that the column mixing process is to perform DNA XOR operation on the key W2 after block division with the original data (input3), where the value of the key W2 is already in Figure 3 Given. P1 in the column mixed result (input4) 2,1 For example, the data is the base sequence 'AGAT' with the position coordinates (1,2) in W2 and the data P with the position coordinates (2,1) in input3. 2,1 The result of XOR, and so on, can get the column mixing result of all data (input4).

[0109] 4) Round key adding steps:

[0110] The input of the round key addition in the double encryption protection algorithm for text privacy data is the original data (input4) obtained by column mixing and the key W1. Each operation uses 4 columns of W1 data. The round key addition process is illustrated as follows Figure 10 shown.

[0111] Depend on Figure 10 It can be seen that the data in columns 41 to 44 of key W1 are involved in the round key addition operation. 2,1 For example, the data P in input4 has the coordinates (2,1). 2,1 The result of XORing the DNA sequence 'ACTC' at position (2,1) in W1 is obtained. Similarly, the round key addition result for all data (input5) is obtained. The first-level encryption algorithm ends, and the generated first-level encrypted ciphertext is (input5).

[0112] In the above step S3, the second encryption protection algorithm is:

[0113] To further enhance the security of private text data, the ciphertext (input 5) obtained after the first round of encryption requires a second round of encryption. This second round of encryption uses random chaotic information generated by the logistic map as one of its inputs. The random sequence generated by the Chen hyperchaotic system determines the specific scheme of the second round of encryption algorithm's encoding, calculation, diffusion, and decoding processes, thereby increasing the uncertainty and unpredictability of the second round of encryption for private text data.

[0114] The key W4 generated after the hash value key decomposition is used as the initial value of the Logistic Map. The Logistic Map generates a random chaotic information (input6), which is used as one of the inputs of the second encryption protection algorithm. The algorithm for generating random chaotic information is shown in Algorithm 4:

[0115]

[0116] It can be seen from the random chaotic information generation algorithm that the chaotic sequence P generated by the Logistic map needs to discard the first 1500 items to obtain better randomness. The ASCII range of the generated Logistic sequence information (input6) is 0-255, which is consistent with the size and ASCII range of the ciphertext information (input5) generated by the first encryption protection algorithm. The ciphertext information (input5) generated by the first encryption protection algorithm, the random Logistic information (input6) and the key W4 generated after the hash value key decomposition are used as the input of the second encryption protection algorithm and participate in the second encryption protection operation. The second encryption protection algorithm process is as follows: Figure 11 shown.

[0117] Depend on Figure 11 It can be seen that the key W3 is the initial value of Chen's hyperchaotic system. After the operation of Chen's hyperchaotic system, four hyperchaotic sequences X, Y, Z, and H are generated. The hyperchaotic sequence needs to undergo a sequence conversion process to become the operation pattern sequence X, Y, Z, and H. The sequence conversion algorithm is shown in Algorithm 5.

[0118]

[0119] From Algorithm 5, we can see that after sequence conversion, the range of X and Y is 0-7, corresponding to 8 DNA encoding methods, the range of Z is 0-3, corresponding to 4 DNA operation methods, and the range of H is 0-7, corresponding to 8 DNA decoding methods.

[0120] After sequence conversion, the ciphertext (input5) and random logistic information (input6) generated by the first encryption algorithm need to be partitioned into R blocks. Since both are of the same size, they can be divided into R blocks. The number of blocks R can be expressed as: R = M × N / 16, where M and N represent the number of rows and columns of input5, respectively. After partitioning, input5 and input6 undergo random encoding, random computation, random diffusion, and random decoding operations. Each computation is performed only on the i-th block of data, requiring a total of R cycles.

[0121] The operation mode sequence X(i) determines the encoding method of the i-th block in input5, the operation mode sequence Y(i) determines the encoding method of the i-th block in input6, and the operation mode sequence Z(i) determines the operation method of the i-th block of input5 and the i-th block of input6. The result after random operation is input7.

[0122] The diffusion operation for block i consists of combining input 7 of block i with input 7 of block i-1 to produce input 8. The random diffusion operation is determined by the operation mode sequence Z(i). The operation mode sequence H(i) determines the decoding method for block i in input 8, resulting in input 9. After DNA decoding, input 9 is converted to data in the range [0, 255]. Converting this data to ASCII yields the output of the second-level encryption algorithm. This concludes the second-level encryption algorithm, and the output represents the double-encrypted private text data.

[0123] Example 2:

[0124] The present invention also provides a double encryption protection device for text privacy data, such as Figure 12 Shown, including:

[0125] The key generation module is used to calculate the hash value of the plaintext information to be encrypted and obtain the keys W1, W2, W3 and W4 by decomposing the hash value key;

[0126] A first encryption protection module, configured to take the plaintext information and keys W1 and W2 as input and participate in a first encryption protection operation;

[0127] The second encryption protection module is used to take the operation result of the first encryption protection module, the key W3 and the random chaotic information generated according to the key W4 as input, participate in the second encryption protection operation, and obtain ciphertext information.

[0128] The device can be used in fields such as medicine and finance. It ensures the security of private information during storage and transmission by using double encryption on private data. Even if the encrypted data is stolen, it cannot be restored like the encryption and decryption method.

[0129] Example 3:

[0130] The present invention further provides a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0131] Memory for storing computer programs;

[0132] The processor, when used to execute the program stored in the memory, can implement a double encryption protection method for text privacy data as described in Example 1.

[0133] Example 4:

[0134] Based on the same inventive concept, an embodiment of the present invention provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal, a double encryption protection method for text privacy data as described in the above-mentioned embodiment 1 can be implemented.

[0135] Computer-readable storage media, for example, can be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In this embodiment, computer-readable storage media may be any tangible media that can contain or store a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0136] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0137] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0138] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0140] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A double encryption protection method for text privacy data, characterized in that: The following steps are involved: S1, calculate the hash value of the plaintext information to be encrypted, and decompose the key W1 by the hash value key. W2, W3 and W4; S2, taking the plaintext information and keys W1 and W2 as input, and participating in the first encryption protection operation Calculate; S3, the calculation result of step S2, key W3 and the random chaotic signal generated according to key W4 are combined into a random chaotic signal. The information is used as input to participate in the second encryption protection operation to obtain the ciphertext information; Wherein, the step S1 specifically includes: The plaintext information to be encrypted is hashed using the SHA-256 function to generate a 64-bit calculation result W0. W0 is used as input to perform hash value key decomposition and then divided into 4 parts, namely Key1, Key2, Key3 and Key4; Among them, Key1 is 1-32 bits of W0, and a coding scheme is selected for dynamic DNA encoding to obtain the key W1; Key2 is bits 33-40 of W0. A coding scheme is selected for dynamic DNA encoding and cyclic left shift is performed to obtain the key W2. Key3 is bits 44-56 of W0. Take every 4 bits of Key3 as a group, convert the hexadecimal to decimal and take the remainder to get the key W3. Key4 is bits 57-64 of W0. Every 4 bits of data in Key4 are taken as a group and converted from hexadecimal to decimal. The conversion result is accumulated and modulo operation to obtain key W4.

2. A double encryption protection method for text privacy data according to claim 1, characterized in that: The step S2 specifically includes: S21, performing dynamic DNA encoding on the plaintext information; S22, byte filling based on dynamic DNA coding; S23. Based on the byte padding result and the keys W1 and W2, the AES encryption algorithm is used to implement DNA sequence encryption, including a byte substitution step, a row shift step, a column mixing step, and a round key addition step.

3. A double encryption protection method for text privacy data according to claim 2, characterized in that: The step S21 specifically includes: The plaintext information is converted into the ASCII value corresponding to the character, and a DNA encoding scheme is randomly selected for the decimal ASCII value to perform dynamic DNA encoding to obtain input1 data.

4. A double encryption protection method for text privacy data according to claim 3, characterized in that: The step S22 specifically includes: S221, the input1 data after dynamic DNA encoding is divided into blocks according to 64-bit DNA sequences, with each block corresponding to a row of data; S222. If the length of the last block of data is less than 64 bits, perform byte padding in a preset manner until the end of 64 bits; if the length of the last block of data is 64 bits, pad a line of 64-bit data after input1.

5. A double encryption protection method for text privacy data according to claim 4, characterized in that: The byte replacement step includes: The S-box and inverse S-box substitutions of the AES algorithm correspond to the input of a 4-bit DNA sequence and the output of a 4-bit DNA sequence; the first two digits of the DNA sequence correspond to the number of rows, and the last two digits correspond to the number of columns; Perform S-box replacement on the byte-filled input1 data, and the result obtained after all data bytes are replaced is the input2 data.

6. A double encryption protection method for text privacy data according to claim 5, characterized in that: The row shifting step comprises: The input2 data after byte replacement is divided into blocks to obtain 16 blocks of data, each containing 4 bits of DNA sequence; The first row of shift schemes is randomly selected from the four AES algorithm row shift schemes, the second row of shift schemes is randomly selected from the remaining three schemes, the third row of shift schemes is randomly selected from the remaining two schemes, and the fourth row of shift schemes is the last remaining scheme.

7. A double encryption protection method for text privacy data according to claim 6, characterized in that: The step S3 comprises: S31, after the hash value key is decomposed, a key W4 is generated as the initial value of the Logistic map, and a random chaotic information input6 is generated through the Logistic map; S32, using the first encryption protection operation result input5, the random chaotic information input6 and the key W3 as the input of the second encryption protection operation; S33, using the key W3 to generate Chen's hyperchaotic sequence and convert it into an operation sequence (X, Y, Z, H); S34, after the sequence conversion is completed, the first encryption protection operation result input5 and the random chaotic information input6 are respectively divided into R blocks; S35, using an operation sequence to sequentially perform random encoding, random operation, random diffusion, and random decoding operations on each block of data to obtain data input9; S36. Convert the data input 9 into ASCII to obtain the output of the second encryption protection algorithm as ciphertext information.

8. A double encryption protection device for text privacy data, characterized in that: include: The key generation module is used to calculate the hash value of the plaintext information to be encrypted, and the hash value key Decompose to obtain keys W1, W2, W3 and W4; The first encryption protection module is used to take the plaintext information and keys W1 and W2 as input, Participate in the first level of encryption protection operation; The second encryption protection module is used to convert the calculation result of the first encryption protection module and the key W3 The random chaotic information generated according to the key W4 is used as input to participate in the second encryption protection operation to obtain the ciphertext information; The key generation module is specifically used to generate a 64-bit calculation result W0 using the hash function SHA-256 on the plaintext information to be encrypted, and then decompose the hash value key using W0 as input and split it into 4 parts, namely Key1, Key2, Key3 and Key4; Among them, Key1 is 1-32 bits of W0, and a coding scheme is selected for dynamic DNA encoding to obtain the key W1; Key2 is bits 33-40 of W0. A coding scheme is selected for dynamic DNA encoding and cyclic left shift is performed to obtain the key W2. Key3 is bits 44-56 of W0. Take every 4 bits of Key3 as a group, convert the hexadecimal to decimal and take the remainder to get the key W3. Key4 is bits 57-64 of W0. Every 4 bits of data in Key4 are taken as a group and converted from hexadecimal to decimal. The conversion result is accumulated and modulo operation to obtain key W4.

9. A computer device, characterized in that: The processor, the communication interface, the memory and the communication bus are connected to each other via the communication bus. Memory for storing computer programs; The processor is used to implement a double encryption protection method for text privacy data as described in any one of claims 1 to 7 when executing a program stored in the memory.