Color image encryption method and system based on three-dimensional dynamic pixel code replacement
By constructing a three-dimensional dynamic pixel replacement matrix, the R, G, and B channels of color images are replaced and diffused, which solves the problem of high channel correlation in the existing color image encryption algorithm, and improves the encryption effect and security.
Patent Information
- Application Number
- CN202510742590.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-05
AI Technical Summary
The existing color image encryption algorithm fails to fully utilize the characteristics of color images, ignores the high correlation between R, G, and B components, resulting in poor encryption effect.
A three-dimensional dynamic pixel replacement matrix is constructed, and a quadratic ciphertext image is generated by replacing three-dimensional rectangular coordinates of R, G, and B pixels of color images and performing diffusion operations.
Reduces the correlation between the channels of color images, improves the security and reliability of ciphertext images, and can resist differential attacks and select plaintext attacks.
Smart Images

Figure CN120263916A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security, and relates to a color image encryption method and system based on three-dimensional dynamic pixel coding replacement. Background Art
[0002] With the rapid development of network communication, information security technology has fully entered the digital age. Digital images are an important form of information transmission. Compared with traditional text information, images are more vivid and intuitive, and contain more information. Therefore, the encryption protection of image data information is not only about encrypting text information such as account passwords, nor can general text encryption technologies be used.
[0003] Currently, encryption and decryption algorithms for grayscale images have been widely studied. However, current color image encryption algorithms still have deficiencies. Many algorithms only repeat the grayscale image encryption algorithm three times in the three components, ignoring the inherent properties of color images themselves and R 、 G 、 B high correlations between components. How to make full use of the characteristics of various existing conditions and combine the characteristics of color images for encryption to design a more efficient and secure algorithm has great significance and application value for information security in the current environment. R, G, B Summary of the Invention
[0004] The object of the present invention is to provide a color image encryption method and system based on three-dimensional dynamic pixel coding replacement. By utilizing the characteristics of color images, a three-dimensional dynamic pixel replacement matrix for simultaneously replacing pixels in three channels is constructed, reducing the correlation between channels and achieving the effect of "one encryption", thereby enhancing the security and reliability of the encrypted image. R, G, B Figure 1
[0005] The technical solution for achieving the object of the present invention is as follows: A color image encryption method based on three-dimensional dynamic pixel coding replacement, comprising the following steps: S01: Encoding the color image to be encrypted; S02: Constructing a three-dimensional dynamic pixel replacement matrix using a random number sequence stream and generating a diffusion sequence required for secondary encryption; S03: Replacing the pixels of the encoded color image to be encrypted according to three-dimensional rectangular coordinates using the three-dimensional dynamic pixel replacement matrix, and performing a diffusion operation on the replacement result to complete secondary encryption, obtaining the encrypted image of the color image to be encrypted.
[0006] In a preferred technical solution, step S01 includes: Obtain a color image with a length of M and a width of N . For the pixel at the -th row and the -th column , there is ; where , , , respectively represent the intensities of the red, green, and blue channels at ; is for each pixel to add an encoding. Respectively encode the R, G, B channels as 00, 01, 10, and convert each pixel into a 2-bit channel encoding concatenated with an 8-bit original pixel encoding to obtain : ;
[0007] ;
[0008] Concatenate the encoded image into the form of a data stream D : .
[0009] In the preferred technical solution, the method for generating the random number sequence stream in step S02 includes: Use the SM3 algorithm to calculate the hash value of the sum of the color image to be encrypted and the binary number salt to obtain the initial key : ;
[0010] is a random variable sampled from the uniform distribution ; is the summation index of the salt value salt here, from 0 to 15; represents the hash value calculated by the SM3 algorithm; Divide into the secret key seed KEY and the random vector IV , and generate through the Zu Chongzhi algorithm L random number sequence streams . The obtained random number sequence stream Z : .
[0011] In the preferred technical solution, the method for constructing the three-dimensional dynamic pixel replacement matrix in step S02 includes: S21: After obtaining the random number sequence stream Z, convert Z into a decimal number Z 10 , and divide the decimal number Z 10 into a sequence of 4-bit decimal numbers in a group ; is the 4-bit decimal number for each group; S22: Calculate the replacement sequence : ;
[0012] From all the calculated , obtain the vector within the range of 0 - 767, index is a one-dimensional vector S Assign index values in order from 0 - 767; S23: After three-dimensional folding of the vector S , obtain the three-dimensional dynamic replacement matrix.
[0013] In the preferred technical solution, the method for three-dimensional folding of the vector S in step S23 includes: Generate a three-dimensional matrix Matrix[3]
[16]
[16] , arrange the vector S into Matrix[3]
[16]
[16] according to the method of the following formula, and assign its three-dimensional coordinates according to the following formula , that is: ;
[0014] ;
[0015] Among them, x, y, and z respectively correspond to the three-dimensional array subscripts, and Matrix is a sequence of three-dimensional replacement matrices in a rectangular coordinate system; After arranging the sequence S, obtain the three-dimensional dynamic replacement matrix.
[0016] In the preferred technical solution, the method for replacing the pixels of the encrypted color image to be encrypted according to the three-dimensional rectangular coordinates by using the three-dimensional dynamic pixel replacement matrix in step S03 includes: Represent each pixel in D in 10-bit encoding as: , divide it into the form of 2 bits, 4 bits, and 4 bits from high to low, convert them into decimal numbers respectively, and convert each pixel in D into a rectangular coordinate system : ;
[0017] Where k is the channel; Find its corresponding coordinates in the three-dimensional dynamic pixel replacement matrix and replace it with the pixels at the coordinate position. After the replacement is completed, the initial encrypted sequence is obtained. : ;
[0018] Matrix is a three-dimensional replacement matrix sequence in a rectangular coordinate system.
[0019] In the preferred technical solution, the method for completing the secondary encryption in step S03 includes: Convert the obtained random number sequence stream Z into binary Make Length and D Perform XOR operation on each bit of ; The initially encrypted sequence and Bitwise XOR: ;
[0020] Perform diffusion operation, That is the complete encrypted sequence, the pixel sequence recover: ;
[0021] ;
[0022] That is the ciphertext image.
[0023] In the preferred technical solution, during the decryption process, if the initially encrypted sequence Restore to original encoding D , you need to first decrypt the data Decompose into single pixels : ;
[0024] ;
[0025] Will Convert to , and traverse the 3D-DPRM, according to The value of finds the unique corresponding position in the three-dimensional dynamic pixel replacement matrix, and the coordinates of the position ( P , Q , R ) is Decimal representation of the original text: ;
[0026] Among them, P , Q , R are the subscripts of the three-dimensional array; Convert it to binary and splice it to get : ;
[0027] After reverse-replacing all pixels, Splice them in order to obtain the original code D : .
[0028] The present invention also discloses a color image encryption system based on three-dimensional dynamic pixel coding replacement, including: An original coding module for coding the color image to be encrypted; A calculation module for constructing a three-dimensional dynamic pixel replacement matrix by using a random number sequence stream and generating a diffusion sequence required for secondary encryption; An encryption module for replacing the pixels of the coded color image to be encrypted according to three-dimensional rectangular coordinates by using the three-dimensional dynamic pixel replacement matrix, and performing a diffusion operation on the replaced result to complete secondary encryption, thereby obtaining a ciphertext image of the color image to be encrypted.
[0029] The present invention also discloses a computer storage medium, on which a computer program is stored, and when the computer program is executed, the above-mentioned color image encryption method based on three-dimensional dynamic pixel coding replacement is implemented.
[0030] Compared with the prior art, the present invention has the following remarkable advantages: (1) Improve the security of the ciphertext: Based on the method of three-dimensional dynamic pixel coding replacement, the present invention performs secondary encryption on the plaintext image, which can resist password analysis methods such as differential attacks and chosen-plaintext attacks, and improves the security of the ciphertext during transmission.
[0031] (2) Reduce the correlation between channels: The present invention makes full use of the inherent properties of color images, uniformly codes and replaces the pixels of the R, G, and B channels of the color image, avoids the repetition of channel calculations during the encryption process, and reduces the high correlation between channels while improving efficiency and ensuring security.
[0032] (3) Based on the method of three-dimensional dynamic pixel coding replacement, the present invention studies an encryption method for color images, which promotes the application of commercial cryptographic algorithms. Description of the Drawings
[0033] Figure 1 Schematic flow chart of a color image encryption method and a decryption method based on three-dimensional dynamic pixel coding replacement provided by the present invention; Figure 2 Schematic flow chart of the encoding process of the original image by the present invention; Figure 3 Schematic flow chart of the process for generating a three-dimensional dynamic pixel replacement matrix 3D-DPRM by the present invention; Figure 4 Schematic diagram of the encryption and decryption of images by the present invention; Figure 5 Schematic diagram of the pixel distribution of the ciphertext image by the present invention; Figure 6 Schematic diagram of the correlation between pixels of the ciphertext image by the present invention. Detailed implementation manners
[0034] The principle of the present invention is as follows: This method performs specific encoding on a plaintext image, constructs a three-dimensional dynamic pixel replacement matrix (3D-DPRM) using a random number sequence stream, and generates a diffusion sequence required for secondary encryption. The pixels of the encoded plaintext image are replaced according to three-dimensional rectangular coordinates using the 3D-DPRM, and the diffusion operation is performed on the replaced result to complete the secondary encryption. The required initial secret key is calculated based on the color image to be encrypted itself, and the ciphertext image of the plaintext image to be protected is generated.
[0035] Example 1:
[0036] A color image encryption method based on three-dimensional dynamic pixel coding replacement includes the following steps: S01: Encode the color image to be encrypted; S02: Construct a three-dimensional dynamic pixel replacement matrix using a random number sequence stream and generate a diffusion sequence required for secondary encryption; S03: Replace the pixels of the encoded color image to be encrypted according to three-dimensional rectangular coordinates using the three-dimensional dynamic pixel replacement matrix, and perform a diffusion operation on the replaced result to complete the secondary encryption, obtaining the ciphertext image of the color image to be encrypted.
[0037] The working process of a color image encryption system based on three-dimensional dynamic pixel coding replacement is described below by taking a preferred example: As Figure 1 shown, the color image encryption method includes an encryption process and a decryption process: Steps of the encryption process: A1. Obtain a color image M × N in size. For each pixel , there is , there is ;
[0038] wherein , , respectively represent the intensities of the red, green, and blue channels at .
[0039] A2. Add coding to each pixel in , as shown in Figure 2 . Encode the R, G, B channels as 00, 01, and 10 respectively, and convert each pixel into a 2-bit channel coding concatenated with an 8-bit original pixel coding to obtain . As shown in formulas (1) and (2).
[0040] (1) (2) Next, concatenate the encoded image into the form of a data stream D , as shown in formula (3).
[0041] (3) A3. Use SM3 to calculate the hash value of the sum of and the binary number salt . Obtain the initial key . As shown in formula (4).
[0042] (4) A4. Divide the 256-bit into a key seed KEY and a random vector IV, each with 128 bits before and after. Then, generate an L-bit sequence stream of 16 hexadecimal 32-bit random numbers through the ZUC algorithm, where L is a manually input option. The formula is as shown in (5). For the detailed calculation process of the ZUC algorithm, refer to the national standard GB / T 33133.1 2016.
[0043] (5) A5. Calculate the three-dimensional dynamic substitution matrix and the diffusion sequence required for secondary encryption: Convert Z to decimal Z 10 . Divide the decimal number Z 10 into a sequence of 4-bit decimal numbers in a group , calculate according to the method of formula (6) , from all the calculated values, select the first 768 unique values and store them in the vector S . After S is three-dimensionally folded, a three-dimensional dynamic replacement matrix 3D-DPRM is obtained, as shown in Figure 3 . The folding process is as shown in step S2. Additionally, convert the random number sequence stream Z obtained in step A4 into binary , and ensure that each bit of the length can D perform an exclusive OR operation.
[0044] (6) A6. Each pixel in D with 10-bit encoding can be expressed as: , divided from high to low into the form of 2 bits, 4 bits, and 4 bits, convert them into decimal respectively, and convert each pixel in D into the form of a rectangular coordinate system , as shown in formula (7).
[0045] (7) where k is the channel; find its corresponding coordinates in 3D-DPRM, and replace it with the pixel at this coordinate position. After replacing one by one, a preliminarily encrypted sequence is obtained, where Matrix is a three-dimensional replacement matrix sequence in the rectangular coordinate system. As shown in the following formula (8).
[0046] (8) A7. XOR with bit by bit: (9) perform a diffusion operation, is the completely encrypted sequence. Restore the pixel sequence to obtain the ciphertext image . The formulas are as shown in (10)(11) below.
[0047] (10) (11) Decryption process steps: B1. Obtain the ciphertext image and the initial secret key . Calculate the random number sequence stream Z according to the method of step A4.
[0048] B2. According to step A5, obtain Z 10 , , , and calculate in the manner of step A5 , to obtain the initial vector of 3D-DPRM S . After S is three-dimensionally folded, a three-dimensional dynamic replacement matrix 3D-DPRM is obtained.
[0049] B3. As shown in the manner of formula (12), calculate , and perform an inverse diffusion operation on . Since the XOR operation is reversible, after receiving , use obtained in step B2 and to perform an operation, and obtain , as shown in formula (13).
[0050] (12) (13) B4. After obtaining , sequentially use 3D-DPRM to perform inverse replacement on each pixel in , and obtain . Furthermore, through formula (7), the binary encoding D of the original pixel can be restored. The detailed inverse replacement process is shown in step S4 below.
[0051] B5. After obtaining D, obtain the original image according to the following formula .
[0052] (14) Preferably, a three-dimensional dynamic pixel replacement matrix 3D-DPRM is designed. The generation, replacement, and inverse replacement methods of 3D-DPRM in steps A5, A6, and B4 include the following steps: S1. After obtaining the random number sequence stream Z according to steps A4 and A5, calculate to obtain Z 10 , , , and further obtain the vector within the range of 0 - 767, index assign index values to the one-dimensional vector S from 0 - 767 in sequence.
[0053] S2. Generate a three-dimensional matrix Matrix[3]
[16]
[16] with a total capacity of 768. Arrange S into Matrix[3]
[16]
[16] according to the method of formula (15) and assign it three-dimensional coordinates , and after arranging the sequence S, obtain 3D-DPRM.
[0054] (15) (16) S3. Replacement: Obtain the obtained by encoding D in step A2 in the manner of step A6, find the corresponding coordinates in 3D-DPRM, use the value at this coordinate position to replace its pixel value. After replacing all pixel values, obtain .
[0055] S4. Reverse replacement: During the decryption process, if is to be restored to the original encoding D , it is necessary to first decompose the data to be decrypted into single pixels .
[0056] (17) (18) Convert to in sequence, and traverse 3D-DPRM. According to the value, find the unique corresponding position in 3D-DPRM. The coordinates of this position ([[]] P , Q , R ) is the decimal representation of the original text. As shown in formulas (19) and (20), convert it to binary and splice to obtain .
[0057] (19) (20) Among them, P , Q , R are the subscripts of the three-dimensional array; After reverse-replacing all pixels, splice in order to obtain the original encoding D .
[0058] (21) The decryption steps of the image are the opposite of the above encryption process. Since the operations of each cryptographic component in this algorithm are reversible, it can be regarded as a symmetric encryption system. The receiving end obtains through the public channel , , and can calculate Z 10 , , , , and calculate in the way of step A5, and then obtain the 3D-DPRM through the same method as above.
[0059] Furthermore, calculate as shown in step B3. And perform an inverse diffusion operation on . Since the XOR operation is reversible, after receiving , use obtained in step B2 to perform an operation with to obtain .
[0060] After obtaining , sequentially convert each pixel in to in turn, and traverse the 3D-DPRM. According to the value of , find the uniquely corresponding position in the 3D-DPRM, convert its value to binary and splice it to obtain . After inversely replacing all pixels, splice in order to obtain the original encoded D. As in step S4. After obtaining D, in accordance with step B5, restore D to the original image .
[0061] Taking a color image with three channels of R, G, and B with a size of 512×512 as an example, apply this method. As Figure 4 shown in the schematic diagram of encrypted and decrypted images. The original image is an example image with a size of 512×512; the ciphertext image is the final encryption effect diagram using this method; the decrypted image is the decrypted image restored using this method.
[0062] Next, taking a TIFF format image as an example, obtain the encrypted ciphertext image and analyze the respective pixel ratios of the three channels of R, G, and B. As Figure 5 shown, taking the red channel histogram as an example, the abscissa pixel value is the ciphertext image pixel value 0-255, and the ordinate frequency is the frequency of each pixel value appearing. It is not difficult to find that in the R channel, the frequencies of each pixel value tend to be average.
[0063] Correspondingly, the frequencies of the pixel values in channels G and B are similar to those in the R channel (as Figure 5 ).
[0064] The algorithm performance analysis of the color image encryption method based on three-dimensional dynamic pixel coding replacement of the present invention is as follows: (1) Pixel correlation analysis: Randomly select 5000 pairs of pixel pairs for visualization and analysis, referring to Figure 6 shown, including: in, the horizontal, vertical, and diagonal correlations of each channel of R, G, and B. As Figure 6 shown in the schematic diagram of the correlation between ciphertext image pixels, in the nine sub-images of Figure 6 , from top to bottom, this time for the R, G, and B channels; from left to right, they are the horizontal, vertical, and diagonal correlations of the channel in turn. In the three directions, the correlation distribution of the ciphertext image is very uniform, and the correlation between adjacent pixels is approximately 0.
[0065] (2) Key sensitivity analysis: A good encryption scheme should be sensitive to changes in the key. A small change in the key should have a great impact on the output result, that is, it will produce completely different encrypted images, so that attackers cannot easily obtain the plaintext information. Changing 1 bit of K1, the decrypted image still remains in an unreadable noise-like state, indicating that the present invention has a very sensitive characteristic to small perturbations of the key.
[0066] (3) Information entropy test: The concept of entropy in physics is related to the unpredictability of the information source. The entropy of a digital image is a random estimate used to measure the sharpness of the histogram peak. For an image , its information entropy is defined as follows: (22) where represents the probability that the pixel value takes . According to this formula, the ideal value of the information entropy is 8. The closer it is to 8, the more secure the image information is. After multiple tests of the method of the present invention, the mean value always remains above 7.991, close to the ideal value of 8, indicating that the randomization effect of the ciphertext image obtained by the method of the present invention meets the requirements.
[0067] (4) Differential attack resistance analysis: Differential attack can analyze the impact of any change in the original image on the corresponding encryption result and establish the relationship between the two. A practical image encryption method must be able to resist differential attack. In the experiment, randomly change one pixel in the given image , generating 100 images( ), and obtaining 100 ciphertext images( ) after encryption. For each change in the ciphertext image, calculate its difference from The NPCR and UACI values are as follows in the formula. and Perform UACI and NPCR calculations, and the average value of NPCR is about 99.61%; the average value of UACI is 33.37%, which is very close to the ideal value, and the anti-differential performance is good.
[0068] (23) In another embodiment, a computer storage medium stores a computer program thereon, and when the computer program is executed, it implements the above-mentioned color image encryption method based on three-dimensional dynamic pixel coding replacement.
[0069] The specific encryption method adopts the above-mentioned color image encryption method based on three-dimensional dynamic pixel coding replacement, which will not be elaborated here.
[0070] In yet another embodiment, a color image encryption system based on three-dimensional dynamic pixel coding replacement includes: An original coding module that codes the color image to be encrypted; A calculation module that constructs a three-dimensional dynamic pixel replacement matrix using a random number sequence stream and generates a diffusion sequence required for secondary encryption; An encryption module that replaces the pixels of the coded color image to be encrypted according to three-dimensional rectangular coordinates using the three-dimensional dynamic pixel replacement matrix, and performs a diffusion operation on the replaced result to complete secondary encryption, obtaining the ciphertext image of the color image to be encrypted.
[0071] The specific implementation method adopts the above-mentioned color image encryption method based on three-dimensional dynamic pixel coding replacement, which will not be elaborated here.
[0072] The above embodiments are the preferred embodiments of the present invention, but the embodiments of the present invention are not limited by the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. A color image encryption method based on three-dimensional dynamic pixel coding replacement, characterized in that, It includes the following steps: S01: Encode the color image to be encrypted; S02: Construct a three-dimensional dynamic pixel replacement matrix using a random number sequence stream, and generate a diffusion sequence required for secondary encryption; S03: Use the three-dimensional dynamic pixel replacement matrix to replace the pixels of the encoded color image to be encrypted according to three-dimensional rectangular coordinates, and perform a diffusion operation on the replaced result to complete secondary encryption, obtaining the ciphertext image of the color image to be encrypted.
2. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 1, wherein Step S01 includes: Obtain a color image with a length of M and a width of N . For the pixel at the -th row and the -th column , there is , where ; among them, , , respectively represent the intensities of the red, green, and blue channels at . For each pixel in add encoding, respectively encode the channels as 00, 01, 10, and convert each pixel R, G, B into 2-bit to distinguish the channel encoding and splice it with the 8-bit original pixel encoding to obtain : , , The encoded image is spliced into the form of a data stream D : 。 3. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 1, wherein The generation method of the random number sequence stream in step S02 includes: Use SM3 the algorithm to calculate the hash value of the sum of the color image to be encrypted and the binary number salt to obtain the initial key : , wherein, is a random variable sampled from a uniform distribution ; is the summation index of the salt value salt, from 0 to 15; represents the calculation of the hash value through SM3 algorithm; Divide into a secret key seed KEY and a random vector IV , and generate through the Zu Chongzhi algorithm L random number sequence streams . The obtained random number sequence stream Z is as follows: 。 4. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 3, characterized in that The method of constructing the three-dimensional dynamic pixel replacement matrix in step S02 includes: S21: After obtaining the random number sequence stream Z, convert Z to decimal Z 10 , and divide Z 10 sequentially into sequences with each group being a 4-digit decimal number , which are 4-digit decimal numbers for each group; S22: Calculate the replacement sequence : , From all the calculated obtain a vector within the range of 0 - 767 , index which is a one-dimensional vector S and sequentially assign index values from 0 - 767; S23: After three-dimensional folding of the vector S a three-dimensional dynamic replacement matrix is obtained.
5. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 4, characterized in that The method of three-dimensionally folding the vector S in step S23 includes: Generate a three-dimensional matrix Matrix[3][16][16], and arrange the vector S into Matrix[3][16][16] according to the method of the following formula, and assign its three-dimensional coordinates according to the following formula , that is: , , x, y, z respectively correspond to the three-dimensional array subscripts, and Matrix is a sequence of three-dimensional replacement matrices in the rectangular coordinate system; Arrange the sequence S to obtain a three-dimensional dynamic replacement matrix.
6. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 2, wherein The method of using the three-dimensional dynamic pixel replacement matrix to replace the pixels of the encoded color image to be encrypted according to three-dimensional rectangular coordinates in step S03 includes: Each pixel in D is encoded in 10 bits as follows: , divided from high to low into the form of 2 bits, 4 bits, and 4 bits, respectively convert them to decimal, and D each pixel in is converted to a rectangular coordinate system : , Where k is the channel; Find its corresponding coordinates in the three-dimensional dynamic pixel replacement matrix and replace it with the pixel at this coordinate position, and successively After the replacement is completed, a preliminarily encrypted sequence is obtained : , Matrix is a sequence of three-dimensional replacement matrices in the rectangular coordinate system.
7. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 6, characterized in that, The method of completing secondary encryption in step S03 includes: Convert the obtained random number sequence stream Z into binary , such that the length is exclusive-OR operated with each bit of D ; The preliminarily encrypted sequence and are bitwise XORed: , Perform the diffusion operation, which is the fully encrypted sequence. For the pixel sequence Recovery: , , That is the ciphertext image.
8. The color image encryption method based on three-dimensional dynamic pixel coding replacement according to claim 1, wherein During the decryption process, if the initially encrypted sequence is to be restored to the original code D , the data to be decrypted needs to be decomposed into single pixels : , , Convert to in sequence, and traverse the 3D-DPRM. According to , find the unique corresponding position in the three-dimensional dynamic pixel replacement matrix. The coordinates of this position ( P , Q , R ) are the decimal representation of the original text: , Among them, P , Q , R are the subscripts of the three-dimensional array; Convert it to binary and splice to obtain :[[-END]] , After all pixels are replaced in reverse order, they are concatenated in sequence to obtain the original code D : 。 9. A color image encryption system based on three-dimensional dynamic pixel coding replacement, characterized in that, It includes: An original encoding module that encodes the color image to be encrypted; A calculation module that constructs a three-dimensional dynamic pixel replacement matrix using a random number sequence stream and generates a diffusion sequence required for secondary encryption; An encryption module that uses the three-dimensional dynamic pixel replacement matrix to replace the pixels of the encoded color image to be encrypted according to three-dimensional rectangular coordinates, and performs a diffusion operation on the replaced result to complete secondary encryption, obtaining the ciphertext image of the color image to be encrypted.
10. A computer storage medium, on which a computer program is stored, characterized in that, When the computer program is executed, it implements the color image encryption method based on three-dimensional dynamic pixel encoding and replacement described in any one of claims 1-8.
Citation Information
Patent Citations
Decryption method of encrypted image based on hyper-chaotic system and automatic cell machine
CN108898024A
Color image encryption method based on dynamic chaos and matrix convolution operation
CN110417539A
Chaotic sequence and DNA mutation image encryption method and device
CN112084514A
Color image encryption method and device
CN119071403A
Encryption And Decryption Method And Device Based On Random Hash And Bit Operation
US20220109566A1