Image encryption method based on RNA coding and three-dimensional dynamic S-box
Through the image encryption method based on RNA encoding and three-dimensional dynamic S box, the hash value and chaotic sequence are used to generate keys and dynamic S boxes, combined with RNA encoding and shuffling algorithms, the key update is not timely and in the conventional image encryption method, the key update is not timely and The problem of low complexity of S-box achieves high security and reliability image encryption.
Patent Information
- Application Number
- CN202210777849.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-07-04
AI Technical Summary
The key update of conventional image encryption methods is not timely, the security and reliability are poor, the S-box update is not timely and the complexity is low, resulting in insufficient encryption security during network transmission.
Using image encryption methods based on RNA encoding and three-dimensional dynamic S box, hash values are generated through the computer's current system time and plaintext images, the initial values are generated and the chaotic sequences are iterated, and the dynamic S box is constructed for replacement, combining RNA encoding and shuffling algorithms for Diffusion, generate encrypted images.
Realize timely update of keys and high security, improve the security and reliability of encryption during network transmission, solve the problem of low complexity of S-box updates in time, and the experimental results show extremely high security and reliability. .
Smart Images

Figure CN115150059B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an information encryption technology, in particular to an image encryption method. Background Art
[0002] In recent years, people have paid more and more attention to the security issues of networks and information systems. Images have become an important information carrier in people's daily lives. They can convey a large amount of information intuitively and vividly, and are widely used in communications, military and medical fields. However, due to the openness of the Internet, information is easily intercepted or leaked during network transmission. Data hiding and image encryption are common methods to keep images secure, but the former is subject to some limitations due to insufficient embedding capabilities. In contrast, image encryption can effectively protect images. Therefore, how to encrypt images effectively and securely becomes very important.
[0003] Because images have large data capacity and high correlation between pixels and data redundancy, traditional data encryption methods cannot encrypt digital images. In recent years, various encryption methods based on chaos have been proposed, such as chaos-based image encryption, compressed sensing-based image encryption, and genetic algorithm-based image encryption. With the advent of the big data era, network information transmission capabilities have also been improved, and the requirements for the efficiency and security of encryption methods have also been further improved.
[0004] In order to solve the problems of untimely key update, poor security and reliability, untimely S-box update and low complexity in conventional image encryption methods and improve the security of encryption during network transmission, an image encryption method based on RNA coding and three-dimensional dynamic S-box was proposed. Summary of the invention
[0005] The purpose of the invention is to solve the problems of untimely key update, poor security and reliability, untimely S-box update and low complexity in conventional image encryption methods, and to improve the security of encryption during network transmission. An image encryption method based on RNA coding and three-dimensional dynamic S-box is proposed.
[0006] Technical solution of the present invention: To achieve the above-mentioned purpose of the invention, the technical solution adopted is an image encryption method based on RNA coding and three-dimensional dynamic S-box, and the encryption steps are described in detail as follows:
[0007] Step 1: Key generation: Let the current system time of the computer be T , plaintext image I 1 size is m × n ,right T and I 1Execute the SHA-256 algorithm to generate two hash values with a length of 256 bits each H 1=j 1, j 2, …, j 256 and H 2= k 1, k 2,…, k 256 ; Take H 1 and H 2 and combine them to generate a 256-bit hash value H ,
[0008] H = h 1, h 2, …, h 32 , (1)
[0009] in, h 1, h 2, …, h 32 The length of each is 8 bits; the external parameters are randomly selected c 1, c 2, c 3, c 4 as the user key, the initial value can be calculated x 0, y 0, z 0, v 0 gets:
[0010] , (2)
[0011] Among them, mod(•) represents the modulus function, log(•) represents the logarithmic function, bin 2 dec (•) represents the binary to decimal function, ⊕ represents the XOR operation;
[0012] Step 2: Chaotic sequence generation: using initial values x 0, y 0, z 0, v 0 Iterate the four-dimensional Rossler hyperchaotic system shown in formula (3) 1024 times, and you can get four chaotic sequences with a length of 1024. X , Y , Z , V ,
[0013] ; (3)
[0014] Step 3: Integerization of chaotic sequence: Use formula (4) to convert X ,Y , Z , V Integerization,
[0015] , (4)
[0016] in, floor (•) is the floor function, X 1 , Y 1 , Z 1 , V 1 is the generated integer chaotic sequence;
[0017] Step 4: Dynamic Chaotic S-Box Generation: X 1 , Y 1 , Z 1 , V 1 By performing the four-equal division operation respectively, 16 chaotic subsequences with a length of 256 bits can be obtained. W 1 , W 2 , …, W 16 ;Will W 1 , W 2 , …, W 16 Transformed into 16 S-boxes of size 16×16 S 1, S 2, …, S 16 , which can form a 16×16×16 three-dimensional dynamic S-box S D ;
[0018] Step 5: S-Box Replacement: I 1 is represented by an 8-bit binary number, and the first 4 bits of each pixel are selected as S D The row coordinate value of the element to be replaced in, and the last 4 digits are used as S D The column coordinate value of the replacement element in the middle 4 bits determines S D The number of layers, that is, the S 1, S 2, …, S 16 Choose which S-box; use SD right I 1, we can get a pixel of size m × n Replacement image for I 2;
[0019] Step 6: Design RNA coding rules: Calculation,
[0020] , (5)
[0021] Step 7: RNA sequence shuffle: RNA encoding rules are:
[0022]
[0023] Exploiting RNA coding rules r 1 pair I 2 RNA encoding can be obtained with a length of 4 mn RNA-seq L 2. Use Fisher-Yates shuffle algorithm to shuffle L 2, we get a length of 4 mn Scrambled RNA sequences L 3;
[0024] Step 8: RNA diffusion: The RNA addition operation rule is:
[0025]
[0026] The RNA subtraction algorithm is as follows:
[0027]
[0028] Will L 3 is converted to 4. m × n RNA Matrix R 1 , R 2 , R 3 , R 4 ,calculate,
[0029] , (6)
[0030] in, represents RNA addition and RNA subtraction operations, R 1 e , R 2 e , R 3 e, R 4 e is the RNA matrix after diffusion; according to the RNA decoding rules r 2 pairs R 1 e , R 2 e , R 3 e , R 4 e Decoding can get a size of m × n Encrypted image of E .
[0031] In the decryption process, the encrypted image is decrypted using the same chaotic sequence to restore the original image. The decryption process is the inverse process of encryption.
[0032] Beneficial effects: Improve the security of encryption during network transmission. A method for image encryption based on RNA and dynamic chaotic S-box is proposed. The main contributions are as follows: (1) Generate a key by using the hash value of the plaintext image and the current time, and realize “one Figure 1 (1) The proposed method uses the "one-time one-password" and "one-time one-password" techniques to achieve timely key update; (2) A dynamic chaotic S-box is designed for replacement to solve the problem that the S-box in conventional image encryption methods is not updated in a timely manner and has low complexity; (3) Experimental results and comparative analysis show that the proposed method has extremely high security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 : Encryption flow chart;
[0034] Figure 2 : original image;
[0035] Figure 3 : Encrypted image. DETAILED DESCRIPTION
[0036] The implementation process of the present invention is further described in detail below with reference to specific drawings and examples.
[0037] Figure 1 It is the encryption flow chart of this method.
[0038] The programming software used is Matlab R2016a, Figure 2 The grayscale image with a size of 512×512 is shown as the experimental object.
[0039] Step 1: Key generation: Let the current system time of the computer be T , plaintext image I 1 size is 512×512, T andI 1Execute the SHA-256 algorithm to generate two hash values with a length of 256 bits each H 1= j 1, j 2, …, j 256 and H 2= k 1, k 2, …, k 256 ; Take H 1 and H 2 and combine them to generate a 256-bit hash value H ; Randomly select external parameters c 1, c 2, c 3, c 4 as the user key, the initial value can be calculated using formula (2) x 0, y 0, z 0, v 0.
[0040] Step 2: Chaotic sequence generation: using initial values x 0, y 0, z 0, v 0 Iterate the four-dimensional Rossler hyperchaotic system shown in formula (3) 1024 times, and you can get four chaotic sequences with a length of 1024. X , Y , Z , V .
[0041] Step 3: Integerization of chaotic sequence: Use formula (4) to convert X , Y , Z , V Integerization, X 1 , Y 1 , Z 1 , V 1 is the generated integer chaotic sequence.
[0042] Step 4: Dynamic Chaotic S-Box Generation: X 1 , Y 1 , Z 1 , V 1By performing the four-equal division operation respectively, 16 chaotic subsequences with a length of 256 bits can be obtained. W 1 , W 2 , …, W 16 ;Will W 1 , W 2 , …, W 16 Transformed into 16 S-boxes of size 16×16 S 1, S 2, …, S 16 , which can form a 16×16×16 three-dimensional dynamic S-box S D .
[0043] Step 5: S-Box Replacement: I 1 is represented by an 8-bit binary number, and the first 4 bits of each pixel are selected as S D The row coordinate value of the element to be replaced in, and the last 4 digits are used as S D The column coordinate value of the replacement element in the middle 4 bits determines S D The number of layers, that is, the S 1, S 2, …, S 16 Choose which S-box; use S D right I 1, we can get a replacement image of size 512×512. I 2.
[0044] Step 6: Design RNA coding rules: Use formula (5) to calculate RNA coding rules.
[0045] Step 7: RNA sequence shuffling: using RNA coding rules r 1 pair I 2 RNA encoding can obtain an RNA sequence with a length of 1048576 L 2. Use Fisher-Yates shuffle algorithm to shuffle L 2. We can get a scrambled RNA sequence with a length of 1048576 L 3.
[0046] Step 8: RNA Diffusion: L 3 is converted into 4 RNA matrices of size 512×512R 1 , R 2 , R 3 , R 4 , using formula (6) to calculate the RNA matrix after diffusion R 1 e , R 2 e , R 3 e , R 4 e ; According to RNA decoding rules r 2 pairs R 1 e , R 2 e , R 3 e , R 4 e Decoding can get an encrypted image of size 512×512 E ,like Figure 3 shown.
[0047] During the decryption process, the same chaotic sequence is used to encrypt the image. E The original image can be restored by performing a decryption operation. The decryption process is the reverse process of encryption.
Claims
1. An image encryption method based on RNA coding and three-dimensional dynamic S-box, characterized in that: The encryption process includes the following steps: Step 1: Key generation: Let the current system time of the computer be T , plaintext image I 1 size is m × n ,right T and I 1Execute the SHA-256 algorithm to generate two hash values with a length of 256 bits each H 1= j 1, j 2, …, j 256 and H 2= k 1, k 2, …, k 256 ; Take H 1 and H 2 and combine them to generate a 256-bit hash value H , H = h 1, h 2, …, h 32 , (1) in, h 1, h 2, …, h 32 The length of each is 8 bits; the external parameters are randomly selected c 1, c 2, c 3, c 4 as the user key, the initial value can be calculated x 0, y 0, z 0, v 0 gets: , (2) Among them, mod(•) represents the modulus function, log(•) represents the logarithmic function, bin 2 dec (•) represents the binary to decimal function, ⊕ represents the XOR operation; Step 2: Chaotic sequence generation: using initial values x 0, y 0, z 0, v 0 Iterate the four-dimensional Rossler hyperchaotic system shown in formula (3) 1024 times, and you can get four chaotic sequences with a length of 1024. X , Y , Z , V , ; (3) Step 3: Integerization of chaotic sequence: Use formula (4) to convert X , Y , Z , V Integerization, , (4) in, floor (•) is the floor function, X 1 , Y 1 , Z 1 , V 1 is the generated integer chaotic sequence; Step 4: Dynamic Chaotic S-Box Generation: X 1 , Y 1 , Z 1 , V 1 By performing the four-equal division operation respectively, 16 chaotic subsequences with a length of 256 bits can be obtained. W 1 , W 2 , …, W 16 ;Will W 1 , W 2 , …, W 16 Transformed into 16 S-boxes of size 16×16 S 1, S 2, …, S 16 , which can form a 16×16×16 three-dimensional dynamic S-box S D ; Step 5: S-Box Replacement: I 1 is represented by an 8-bit binary number, and the first 4 bits of each pixel are selected as S D The row coordinate value of the element to be replaced in, and the last 4 digits are used as S D The column coordinate value of the replacement element in the middle 4 bits determines S D The number of layers, that is, the S 1, S 2, …, S 16 Choose which S-box; use S D right I 1, we can get a pixel of size m × n Replacement image for I 2; Step 6: Design RNA coding rules: Calculation, , (5) Step 7: RNA sequence shuffle: RNA encoding rules are: Exploiting RNA coding rules r 1 pair I 2 RNA encoding can be obtained with a length of 4 mn RNA-seq L 2. Use Fisher-Yates shuffle algorithm to shuffle L 2, we get a length of 4 mn Scrambled RNA sequences L 3; Step 8: RNA diffusion: The RNA addition operation rule is: The RNA subtraction algorithm is as follows: Will L 3 is converted to 4. m × n RNA Matrix R 1 , R 2 , R 3 , R 4 ,calculate, , (6) in, represents RNA addition and RNA subtraction operations, R 1 e , R 2 e , R 3 e , R 4 e is the RNA matrix after diffusion; according to the RNA decoding rules r 2 pairs R 1 e , R 2 e , R 3 e , R 4 e Decoding can get a size of m × n Encrypted image of E .
