CN111723386A - Dynamic DNA color image encryption method based on SHA-512 - Google Patents
Dynamic DNA color image encryption method based on SHA-512 Download PDFInfo
- Publication number
- CN111723386A CN111723386A CN202010513355.6A CN202010513355A CN111723386A CN 111723386 A CN111723386 A CN 111723386A CN 202010513355 A CN202010513355 A CN 202010513355A CN 111723386 A CN111723386 A CN 111723386A
- Authority
- CN
- China
- Prior art keywords
- matrix
- dna
- chaotic
- chaotic system
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Abstract
The invention provides a dynamic DNA color image encryption method based on SHA-512, which comprises the following steps: generating a hash sequence of 512 bytes by utilizing SHA-512 and a plaintext image for calculating an initial value and intermittent parameters of the chaotic system, scrambling the converted plaintext color image by utilizing 2D-RT, and decomposing a scrambled result into three channels of red, green and blue; generating a chaotic sequence by using a four-wing chaotic system and a Lorenz system, and recombining the three channel matrixes and the chaotic matrix by combining intermittent parameters; calculating the Hamming distance of the DNA matrix, updating the initial values of the two chaotic systems, and generating a corresponding chaotic matrix to complete the diffusion operation of the DNA matrix; and decoding and decomposing the diffused DNA matrix, and scrambling the decomposed matrix to obtain an encrypted image. The invention adopts SHA-512 to generate the hash sequence, so that the method has enough key space to resist brute force attack.
Description
Technical Field
The invention relates to the field of bioinformatics and image encryption, in particular to a dynamic DNA color image encryption method based on SHA-512.
Background
With the advent of the internet age and big data age, research on images has attracted a large number of researchers. Images are extremely susceptible to copying, tampering, illegal distribution, and deliberate attack, and thus research demands for image security are increasing. Because image pixels have strong correlation, the effect and efficiency of directly applying the traditional encryption algorithm to the image are difficult to satisfy. The existing encryption technology for images mainly comprises a chaotic encryption technology, an encryption technology based on DNA coding, an information steganography technology, an encryption algorithm based on the optical field and the like. Although image encryption research has achieved a lot of results, some conventional encryption methods have serious security defects and cannot effectively resist a series of attacks such as statistical attack, plaintext attack, brute force attack and the like. Compared with other traditional methods, the encryption technology based on the DNA coding can better resist statistical attack and brute force attack, but some encryption systems based on the DNA coding also have the defects of incapability of resisting plaintext attack, time-consuming operation, incapability of fully playing DNA base relationship and the like. Aiming at the problems and the previous research results, the invention provides a dynamic DNA color image encryption method based on SHA-512, which can better solve the problems.
Disclosure of Invention
According to the technical problems that the existing encryption system based on the DNA coding can not resist the plaintext attack, is time-consuming in operation and can not give full play to the DNA base relationship, the dynamic DNA color image encryption method based on the SHA-512 is provided, a key space which is large enough to resist the brute force attack is possessed, meanwhile, the DNA matrix is diffused by adopting the unconventional operation, the algorithm complexity is reduced, and the operation time is saved.
The technical means adopted by the invention are as follows:
a dynamic DNA color image encryption method based on SHA-512 comprises the following steps:
sending a plaintext image into a first processing branch circuit to perform conversion operation based on an SHA-512 algorithm to generate a hash sequence, and calculating an initial value and intermittent parameters of a chaotic system according to the hash sequence, wherein the chaotic system comprises a four-wing chaotic system and a Lorentz chaotic system;
sending the plaintext image into a second processing branch to carry out scrambling operation based on a 2D-RT algorithm, and decomposing the obtained scrambling result into three channels of red, green and blue;
recombining the three channel matrixes of red, green and blue and the chaotic matrix generated by the four-wing chaotic system to generate a first intermediate matrix, wherein the chaotic matrix generated by the four-wing chaotic system is obtained by iterative conversion of an initial value of the four-wing chaotic system;
recombining chaotic matrixes generated by the Lorenz chaotic system to generate a second intermediate matrix, wherein the chaotic matrixes generated by the Lorenz chaotic system are obtained by iterative conversion of initial values of the Lorenz chaotic system;
respectively carrying out DNA encoding, DNA diffusion, DNA decoding and conversion on the first intermediate matrix and the second intermediate matrix to obtain a decimal matrix F and a decimal matrix X, and decomposing the decimal matrix F and the decimal matrix X;
and carrying out scrambling operation on the decomposition result so as to obtain an encrypted image.
Compared with the prior art, the invention has the following advantages:
1. according to the invention, the plaintext image is used for generating the hash sequence, and the hash sequence is used for determining the initial value and the intermittent parameter of the chaotic system, namely the initial value and the intermittent parameter of the system are indirectly determined by the plaintext image, so that the relation between the encryption system and the plaintext image is enhanced, the plaintext sensitivity is realized, and the encryption algorithm can more effectively resist plaintext attack.
2. The invention utilizes the hyperchaotic system and two rounds of scrambling-diffusing operations to effectively resist differential attack and eliminate the correlation among pixels, thereby leading the distribution histogram of each pixel value of the ciphertext image to be uniformly distributed and further effectively resisting statistical attack.
3. The invention adopts SHA-512 to generate the hash sequence, so that the method has enough key space to resist brute force attack.
4. The invention diffuses the DNA sequence operation different from the traditional DNA sequence operation on the DNA matrix, thereby reducing the complexity of the algorithm and saving the operation time.
5. The invention further strengthens the scrambling-diffusing effect of the image in the second round of scrambling-diffusing, thereby further improving the safety of the system.
For the above reasons, the present invention can be widely applied to the fields of image encryption and the like.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method.
Fig. 2 shows the encryption and decryption effects of Lena images under 256 × 256 pixels: wherein (a) is an original image, (b) is an encrypted image, and (C) is a decrypted image.
Fig. 3 is a graph of the effect of encrypting an image of Lena under the condition of 256 × 256 pixels under the correct key and the incorrect key, wherein (a) the encryption effect is under the use of a brand-new hash sequence, (b) the encryption effect under the last byte is changed for the original hash sequence, and (c) the encryption effect is under the original hash sequence.
Fig. 4 is a graph of the effect of decoding an image by a Lena image under a correct key and an incorrect key under a condition of 256 × 256 pixels, wherein (a) the effect is to use an entirely new hash sequence to perform encryption, (b) the effect is to change the encryption effect under the last byte for the original hash sequence, and (c) the effect is to decrypt the original hash sequence.
Fig. 5 is an image correlation scatter diagram of the R channel of the Lena image under the condition of 256 × 256 pixels, where (a) - (c) are original image horizontal, vertical and diagonal correlation scatter diagrams, respectively, and (d) - (f) are ciphertext image horizontal, vertical and diagonal correlation scatter diagrams.
Fig. 6 is an image correlation scatter diagram of the G channel of the Lena image under the condition of 256 × 256 pixels, where (a) - (c) are original image horizontal, vertical and diagonal correlation scatter diagrams, respectively, and (d) - (f) are ciphertext image horizontal, vertical and diagonal correlation scatter diagrams.
Fig. 7 is an image correlation scatter diagram of Lena image under the condition of 256 × 256 pixels in the B channel, where (a) - (c) are original image horizontal, vertical and diagonal correlation scatter diagrams, respectively, and (d) - (f) are ciphertext image horizontal, vertical and diagonal correlation scatter diagrams.
Fig. 8 is a pixel histogram of an image phase of a Lena image under a 256 × 256 pixel condition, where (a) - (c) are histograms of channels R, G, and B of the original image, respectively, and (d) - (f) are histograms of corresponding encryption channels.
Fig. 9 is a graph of the decryption effect of Lena images under 256 × 256 pixel conditions under different noise attacks, wherein (a) (b) are respectively ciphertext images with 0.02 gaussian noise intensity and decryption images thereof; (c) (d) the ciphertext image and the decrypted image thereof with the Gaussian noise intensity of 0.2 are included; (e) (f) the ciphertext image and the decrypted image of the ciphertext image with the SPN noise intensity of 0.00002; (g) (h) the ciphertext image and the decrypted image thereof under the SPN noise intensity of 0.00005; (i) and (j) the ciphertext image and the decrypted image thereof under the SPN noise intensity of 0.0001.
Fig. 10 is a graph of the decryption effect of Lena images under 256 × 256 pixel conditions under different data loss attacks, where (a) (c) (e) (g) are ciphertext images under the loss of 1/4 pixels in the upper left corner, 1/4 pixels in the lower right corner, 1/8 pixels in the lower left corner and 1/8 pixels in the upper right corner, respectively, and (b) (d) (f) (h) are corresponding decrypted images.
FIG. 11 is a schematic diagram showing the operation of DNA cycle replacement in which (a) is clockwise replacement and (b) is counterclockwise replacement.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As shown in FIG. 1, the invention provides a dynamic DNA color image encryption method based on SHA-512, when in execution, firstly, the SHA-512 and the plaintext image are utilized to generate a hash sequence of 512 bytes for calculating an initial value and an intermittent parameter of a chaotic system, the converted plaintext color image is scrambled by utilizing a 2D-RT, and the scrambled result is decomposed into three channels of red, green and blue; then, generating a chaotic sequence by using a four-wing chaotic system and a Lorenz system, and recombining the three channel matrixes and the chaotic matrix by combining intermittent parameters; calculating the Hamming distance of the DNA matrix, updating the initial values of the two chaotic systems, and generating a corresponding chaotic matrix to complete the diffusion operation of the DNA matrix; and decoding and decomposing the diffused DNA matrix, and scrambling the decomposed matrix to obtain an encrypted image.
Specifically, the method comprises the following steps:
step 1: reading in a plaintext picture PM×N×3(M and N respectively represent the width and height of a single image channel), and an SHA-512 hash algorithm is used for operating P to generate a hash sequence K, so that an initial value and intermittent parameters of the hyper-chaotic system are calculated.
(1) Reading a plaintext image P, and generating a hash sequence K of 512 bytes [ K ] by using SHA-5121,k2,...,k64]K is a value in the range of [0,255 ]]Decimal integer of (c).
(2) Calculating a parameter h for obtaining an initial value of the chaotic system1-h7The process is as follows:
(3) utilizing h in (2)1-h4Calculating an initial value x of the four-wing chaotic system0,y0,z0And w0The process is as follows:
utilizing h in (2)5-h7Calculating an initial value c of the Lorenz chaotic system1,c2And c3The process is as follows:
(4) calculating intermittent parameter index1-index8The process is as follows:
step 2: transforming a plaintext image P using a matrix-shaped reconstruction functionM×N×3Conversion to PM×3NPerforming the 2D-RT operation t times on P to generate a scrambled matrix PSTM×3NAnd decomposing it into R1,G1And B1。
The specific operation process of the 2D-RT is as follows:
encryption:
PST(x′,y′)=P(x,y) (6)
and (3) decryption:
P(x,y)=PST(x′,y′) (7)
where t is 5, a is 1, b is 3, c is 5, d is 16, rm is 4, and rn is 7, resulting in the scrambled matrix PSTM×3N。
And step 3: and 7 chaotic sequences are generated by utilizing a four-wing hyper-chaotic system and a Lorenz hyper-chaotic system.
(1) Using an initial value x0,y0,z0,w0Iterative four-wing hyper-chaotic system 4MN + l0(l01000) times, and remove the first l0Entry, four sequences X, Y, Z and W of length 4MN are generated. Next, using the sequences X, Y, Z, an isometric sequence X is generated1,Y1And Z1The process is as follows:
(2) using an initial value c1,c2And c3Iterative Lorenz hyper-chaotic system MN + l0Then (l)01000) and remove the first l0Term, generating three sequences C of length MN1,C2And C3. Subsequently, using the sequence C1,C2And C3Generating equal length sequences L1,L2And L3The process is as follows:
and 4, step 4: and recombining the scrambled image and the chaotic matrix.
(1) R is to be1,G1And B1Binary matrices R respectively converted into M × 8Nbin,GbinAnd Bbin. Using intermittent parameter index1Determining the value of the first intermediate matrix T, the size of which is 3M × 8N, and the process is as follows:
T=Ti(i ═ 1, 2.., 6), where i ═ index1And is and
(2) will sequence L1,L2And L3Conversion into three chaotic matrices of M × NL _1, L _2, and L _3 Next, L _1, L _2, and L _3 are converted into three binary matrices L1 of M × 8N by a matrix reconstruction functionbin,L2binAnd L3bin. Finally, the intermittent parameter index is utilized3The value of the second intermediate matrix CT, CT being 3M × 8N in size, is determined as follows:
CT=CTi(i ═ 1, 2.., 6), where i ═ index3
And 5: matrices T and CT are DNA encoded.
(1) Respectively using the matrix reconstruction function to obtain the sequences X in the step 31,Y1And Z1Converted into three chaotic matrices X _1, Y _1 and Z _1 of M × 4N by using intermittent parameter index2And mod (index)36) +1 DNA coding matrices ER _ T and ER _ CT are selected as follows:
ER_T=ERi,ER_CT=ERj,i=index2,′j=mod(index26) +1, i ═ 1, 2., 6}, j ═ 1, 2., 6}, where
(2) The matrix T and the matrix CT are encoded.
1) The first bit plane and the eighth bit plane in the matrix T are reorganized as follows: the first column of the first bit plane and the first column of the eighth bit plane are combined together left and right to form the first two columns of the new bit plane matrix T18, the second column of the first bit plane and the second column of the eighth bit plane are combined together left and right to form the third and fourth columns of the new bit plane matrix T18, and so on to form the whole new bit plane matrix T18; then, the same operations are performed on the second and seventh bit planes to constitute a matrix T27, the third and sixth bit planes to constitute a matrix T36, and the fourth and fifth bit planes to constitute a matrix T45. Similarly, the same operation is performed on the binary matrix CT to obtain four matrices CT18, CT27, CT36, and CT 45. The 8 new matrices are all 3 mx 2N in size.
2) T18, T27, T36 and T45 were encoded using the DNA coding matrix ER _ T, where ER _ T (: ,1: n) encoding T18 yields the matrix T _ DNA18, ER _ T (: n + 1: 2N) encoding T27 resulting in matrix T _ DNA27, ER _ T (: 2N + 1: 3N) encoding T36 yields matrix T _ DNA36, and ER _ T (: 3N + 1: 4N) encoding T45 resulting in matrix T _ DNA 45. The same operation was performed for encoding CT18, CT27, CT36, CT45 using the DNA encoding matrix ER _ CT, resulting in four matrices CT _ DNA18, CT _ DNA27, CT _ DNA36, and CT _ DNA 45. Finally, two 3M × 4N matrices, i.e., DNA _ T ═ T _ DNA18, T _ DNA27, T _ DNA36, T _ DNA45, were constructed using the above matrices
And DNA _ CT ═ CT _ DNA18, CT _ DNA27, CT _ DNA36, CT _ DNA 45.
The appropriate coding rules are selected and are shown in table 1.
Table 1: DNA encodes 8 rules
Step 6: the function HD is defined and the Hamming distance between DNA matrices is calculated.
The HD function is defined as follows:
wherein, A and B represent two different DNA matrixes respectively, and 3M and N represent the width and height of the DNA matrix respectively.
Next, Hamming distances d of the DNA matrices T _ DNA18, T _ DNA27, T _ DNA36, T _ DNA45, CT _ DNA18, DT _ DNA27, CT _ DNA36 and CT _ DNA45 are calculated according to the formulas (12) and (13)1-d8。
Then, the chaos system initial value parameter is updated by the formula (14).
And 7: and calculating a new chaotic sequence by using the updated initial value.
(1) From x'0,y′0,z′0And w'0Iterative four-wing chaotic system 4MN + l1(l11000), remove the first l1The term yields four sequences of length 4MN, X ', Y', Z ', and W'. The sequences X ', Y ' and Z ' are then used to generate three sequences X of equal length2,Y2And Z2。
(2) From c'1,c′2And c'34MN + l iteration Lorenz chaotic system1Next, and abandon the first1Item, generating three sequences C 'all 4MN in length'1,C′2And C'3. Subsequently, utilize C'1,C′2And C'3Generation of three equal length sequences L'1,L′2And L'3。
(3) Using an initial value of x ″)0,y″0,z″0And w ″)0Updating iterative four-wing hyper-chaotic system 4MN + l2(l21000) times, and abandon the first l2Four sequences X ', Y', Z 'and W' were generated at a time, all 4MN in length. Subsequently, three isometric sequences X are generated using the sequences X ', Y ' and Z '3Y and Z3。
And 8: the DNA matrices DNA _ T and DNA _ CT were subjected to a diffusion operation.
(1) The sequences W, W 'and W' are converted into three matrices W _1, W _2 and W _3 of size M × 4N, respectively, and then the interval parameter index is used5The time matrix constituting a 3M × 4N matrix forms a matrix of the number of Times DNA base complementation operations are performed.
Times={Timesi},i=index5(i=1,2,...,6)
Times=mod(floor(Times-fix(Times))×1014,4)+1 (19)
(2) The sequences X ', Y ' and Z ' are converted into three matrices X _3, Y _3 and Z _3, respectively, each of size M × 4N, then the pause parameter index is used6The three matrices are constructed into a matrix CR of size 3M × 4N.
CR={CRi},i=index6(i=1,2,...,6)
(3) DNA complementation operation is performed on the matrix DNA _ T, resulting in DNA matrix DNA _ N.
(4) Sequence L'1,L′2And L'3Respectively converted into three matrixes L _1 ', L _2 ' and L _3 ' with the size of M × 4N, and the interval parameter index is utilized7A matrix Cycle of size 3M × 4N was constructed.
Cycle={Cyclei},i=index7,i=1,2,...,6
(5) A DNA cycle replacement operation is performed on the matrix DNA _ CT, resulting in matrix DNA _ C.
1) And (5) DNA base complementation operation. The 6 DNA base complementary operation rules are defined as follows:
Rule 1:(AT)(TC)(CG)(GA)Rule 2:(AT)(TG)(GC)(CA)Rule 3:(AC)(CT)(TG)(GA)
Rule4:(AC)(CG)(GT)(TA)Rule 5:(AG)(GT)(TC)(CA)Rule 6:(AG)(GC)(CT)(TA)
from the above 6 rules, the DNA base complementation procedure has the following properties:
that is, only when the minor axis 4 is operated to 0, the base is not changed after the base complementation operation.
The DNA base complementary operation function is shown in formula (21)
DNAN(i,j)=
DNA_complementary_operation(DNA_T(i,j),Times(i,j),CR(i,j)) (21)
Wherein, i is 1,2,. 3M; j is 1, 2.
2) DNA cycle replacement operation
In order to solve the problem that the relationship between 4 bases cannot be sufficiently realized by a single substitution rule, a DNA cycle substitution operation is adopted, as shown in FIG. 11. The defined DNA cycle replacement procedure is as follows:
DNA_C(i,j)=DNA_cycle_operation(DNACT(i,j),Cycle(i,j)) (22)
the Cycle matrix is defined in (4) of step 8. Additionally, i is 1, 2.., 3M; j is 1, 2.
And step 9: the decoding operation is performed on the matrices DNA _ N and DNA _ C.
(1) Will sequence X2,Y2And Z2Conversion into three matrices X _2, Y _2 and Z _2 of M × N, using the pause parameter index4And mod (index)46) +1 to select the DNA decoding matrices DR _ T and DR _ CT.
DR_T=DRi1,DR_CT=DRi2,i1=index4,i2=mod(index4,6)+1(i1=1,2,...,6;i21, 2.., 6), wherein
(2) The matrixes DNA _ N and DNA _ C are respectively decoded by using the decoding matrixes DR _ T and DR _ CT, and are converted into corresponding decimal matrixes F and matrixes X, and the sizes of the decimal matrixes F and the matrixes X are 3M multiplied by N.
Step 10: the matrix F and the matrix X are decomposed separately.
(1) Using intermittent parameter index8Decomposition of matrix F into R2,G2And B2The sizes are both M × N.
F_1=F(1:M,:)F_2=F(M+1:2M,:)F_3=F(2M+1:3M,:)
(2) Using the intermittent parameter mod (index)86) +1 decomposes the matrix X, resulting in three matrices X _1, X _2, and X _3 of size M × N.
X_1=X(1:M,:)X_2=X(M+1:2M,:)X_3=X(2M+1:3M,:)
Step 11: and carrying out scrambling operation on the decomposed matrix to obtain an encrypted image.
Using M to R2,G2And B2Performing a conditional cyclic shift operation to generate R3,G3And B3。
Regarding the Mandelbrot set M and cyclic shift, the specific flow is as follows:
(1) mandelbrot set
W(i,j)=(i*j)+C(i=1,2,...,M,j=1,2,...,N) (23)
Wherein C is 1014。
(2) And (3) a conditional cyclic shift algorithm:
where i is 1, 2.., N, where i is the width of the matrix M. Let the maximum value of the ith column of the M set be maxiAnd a channel R2,G2And B2The maximum value of the ith row is maxri,maxgiAnd maxbi. Then, if maxiLess than maxbi. Then to R2Cycle i left shift maxiUnit, otherwise to R2Cyclically shift right maxiA unit; if maxiLess than maxriThen to G2Cycle i left shift maxiUnit, otherwise for G2Cyclically shift right maxiA unit; if maxiLess than maxgiThen to B2Cycle i left shift maxiUnit, otherwise pair B2Cyclically shift right maxiUnit of unit
Step 12: to R3,G3And B3Performing a second diffusion operation to obtain CR,CGAnd CBAnd A is combined to generate a final ciphertext image C.
The scheme and effect of the present invention will be further explained by specific application examples.
Example 1
This embodiment will be described using a color drawing of Lena 256 × 256.
(1) Reading in the image Lena, combining with SHA-512, generating 512 byte sequence
h=9f63791ec64b3bb5bcf1d6e1272557c9779b37575f33a72e0fbf73a8339bba94d0e3de2ab82ae305ee0a71a122123407227708ff0bc0296768566c2cc59e7d37。
Thus, the four initial values of the four-wing hyper-chaotic system generated according to the definition of the inventive method are expressed as
key1 ═ 1.8175, 1.6275, 2.3765, 2.1882. And three Lorenz chaotic system initial values are expressed as
key2 ═ 1.2824, 1.1429, 2.3939. There are also 8 intermittent parameters index ═ 6, 4, 2, 2, 3, 3, 1, 1.
(2) Lena is decomposed into R after 5 times of 2D-RT operations1,G1,B1Passages, i.e.
(3) By using key1 and key2 to respectively iterate the four-wing chaotic system 4 × 256 × 256+1000 times and 256 × 256+1000 times, the first 1000 times are discarded, and the following six sequences are generated:
X1=[3,3,6...,1],Y1=[4,2,6,...,6],Z1=[5,2,7,...,3]
L1=[223,229,18,...,227],L2=[214,184,184,...,138],
L3=[194,126,64,...,78]
(4) handle channel R1,G1,B1Converted to binary format and formed into a new matrix T using index1 ═ 6, i.e.
Subsequently, the sequence L1,L2,L3Respectively converted into M × N matrixes L _1, L _2 and L _3, further converted into binary matrixes by index3Constructing the matrix CT2, i.e.
(5) Using index 24 and mod (index)2+1, 6) +1 ═ 5, two groups of coding matrices ER are selected4And ER5Encoding T and CT separately yields:
(6) calculating the Hamming distance by using the DNA matrix, and updating the initial value of the system to obtain a new secret key:
key1’=[1.282,1.1882,1.5269,1.4685],
key2’=[0.9265,0.8804,1.2794],
key1”=[0.5082,0.484,0.5782,0.5545]
(7) the four-wing chaotic system and the Lorenz system are iterated by using key1 ' and key2 ' for 4 multiplied by 256 plus 1000 times respectively, and the first 1000 times are abandoned, so that seven sequences of the sequences X ', Y ', Z ', W ' and Z1 ', Z2 ', Z3 ' are generated respectively. The four-wing chaotic system is iterated by using key1 ' for 4 multiplied by 256+1000, and the first 1000 times are abandoned, so that the sequences X ', Y ', Z ' and W ' are generated.
1) Calculating a new sequence X using the sequence2,Y2,Z2,X3,Y3,Z3And L'1,L′2,L′3Here, only X is shown2
X2=[7,2,7,...,4]
2) The sequence is converted into an M × 4N matrix X _2, Y _2, Z _2, X _3, Y _3, Z _3, L _1 ', L _2 ', L _3 '. Here, X _2 and L _1 'are shown'
(8) The DNA matrices DNA _ T and DNA _ CT were subjected to a diffusion operation.
1) Converting the sequence W, W 'and W' into matrices W _1, W _2 and W _3 of an M × 4N matrix, using the pause parameter index5Construct and process the resulting matrix Times as 3, i.e.
2) Using intermittent parameter index6The matrix CR is constructed from 3 and the matrices X _3, Y _3 and Z _3, i.e.
3) Using intermittent parameter index7The matrices L _1 ', L _2 ' and L _3 ' form a matrix Cycle, i.e. the matrix Cycle is formed
4) Performing DNA replacement operation on DNA _ T by using Times and CR matrix, performing DNA cyclic replacement operation on DNA _ CT by using matrix Cycle, and generating new matrices DNA _ N and DNA _ C, namely
(9) Using index4=2,mod(index46) +1 ═ 3 and X _2, Y _2 and Z _2 two sets of decryption matrices DR are selected2And DR3And decodes DNA _ N and DNA _ C, respectively, to generate matrices F and X, i.e.
(10) Using the intermittent parameter index 81 and mod (index)8F, X is decomposed 6) +1 ═ 2, yielding the matrix R2,G2,B2And XR,XG,XB. Wherein the content of the first and second substances,
(11) computing Mandelbrot set M, for R2,G2And B2Performing conditional shift operation to generate matrix R3,G3And B3Wherein
(12)R3And XR,G3And XGAnd B3And XBAnd respectively XOR-ing and merging into a final image C. The R, G, B channels of C are as follows:
the decryption method only needs to execute the encryption method in a reverse order, only needs to pay attention to the fact that DNA complementary operation and DNA cyclic replacement operation need to be executed reversely in the decryption process, and the 2D-RT is the same. This achieves the effect of the implementation of fig. 2.
The safety of the present invention was analyzed as follows:
1. a key space. The key space mainly consists of system parameters of SHA-512, four-wing chaotic system k and 2D-RT, the size of the key space is 2512 × 214 × 5 × (102)6 is 1.0984 × 10171, which is far greater than 2100, so that the method can be considered to resist brute force attacks.
2. Key sensitivity. This method can be considered to be key sensitive if the keys and the encryption system are in one-to-one correspondence. In the present invention,
K1=a1100bff91ac78cb8910aafcea1290fc99a3001cbbac73ef31ff23dd1347f90c60ad23fe26bd4133bad0501a273f0170adfe301261dc3df034ad00ff127526ff
K2=9f63791ec64b3bb5bcf1d6e1272557c9779b37575f33a72e0fbf73a8339bba94d0e3de2ab82ae305ee0a71a122123407227708ff0bc0296768566c2cc59e7d38
and correct key
K=9f63791ec64b3bb5bcf1d6e1272557c9779b37575f33a72e0fbf73a8339bba94d0e3de2ab82ae305ee0a71a122123407227708ff0bc0296768566c2cc59e7d37。
As can be seen from fig. 4, the present invention has key sensitivity.
3. And (5) performing correlation research. If the strong correlation exists directly in the pixels of the encrypted ciphertext image after the image is encrypted, the encryption system cannot resist statistical attack. As shown in table 1 and fig. 5 to 7, the absolute values of the correlation coefficients of R, G, and B channels of the ciphertext image are all lower than 0.02, and it can be considered that the correlation of the ciphertext image of the present invention is eliminated, so that the ciphertext image can withstand statistical attacks.
4. Image pixel histograms. The image histogram reflects the gray value distribution, and if the ciphertext image histogram is uniformly distributed, the encryption system is considered to be safe. As shown in table 2 and fig. 8, the gray values of the ciphertext image under the present invention are uniformly distributed, and the variance is less than 293, so that the present invention is safe.
5. The entropy of the information. The gray value of the encryption system is uniformly distributed, and the information entropy of the encryption system is further explained to be necessarily close to the theoretical value, namely the gray value digit. The gray value of the image is 8 bits, so if the entropy of the information is close to 8, the encryption system can be considered to be safe and reliable. As shown in Table 3, the entropy of the information of the invention is close to 8, and the information is safe and reliable.
6. And (5) differential attack analysis. The differential attack is that an attacker slightly changes an original image and then attacks the original image according to the original encryption method, and if the attacker can find the association between the original image and the encrypted image, the encryption system cannot resist the differential attack. The common detection indexes of the differential attack are NPCR and UACI, and the theoretical safety values of the NPCR and the UACI are 99.6% and 33.4%. As can be seen from Table 4, the NPCR and UACI values of the present invention are close to the theoretical values, i.e. the present invention can withstand the differential attack
7. Noise attacks and brute force attacks. The image is inevitably subjected to noise and pixel value loss in the transmission process. If the decrypted image can still be identified under the condition that noise and pixel loss exist in image transmission, the system can be considered to resist noise attack and violent attack. As shown in table 5 and fig. 9-10, the decrypted image can still be distinguished when the ciphertext image suffers from different intensity noises and different degrees of pixel value loss, and the PSNR values are both greater than 27, so that the invention can be considered to resist noise attack and brute force attack.
Table 1: the color picture pixel is 256 multiplied by 256 relative numbers
Table 2: the image pixel is 256 multiplied by 256 of variance size of pixel distribution in the plaintext image and the ciphertext image
Table 3: information entropy size when image pixel is 256 multiplied by 256
Table 4: the image pixel has NPCR and UACI values of 256 × 256
Table 5: the Lena pixels of the image are 256 multiplied by 256 to obtain different noise intensities and different noise intensities under different data loss quantities
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (7)
1. A dynamic DNA color image encryption method based on SHA-512 is characterized by comprising the following steps:
sending a plaintext image into a first processing branch circuit to perform conversion operation based on an SHA-512 algorithm to generate a hash sequence, and calculating an initial value and intermittent parameters of a chaotic system according to the hash sequence, wherein the chaotic system comprises a four-wing chaotic system and a Lorentz chaotic system;
sending the plaintext image into a second processing branch to carry out scrambling operation based on a 2D-RT algorithm, and decomposing the obtained scrambling result into three channels of red, green and blue;
recombining the three channel matrixes of red, green and blue and the chaotic matrix generated by the four-wing chaotic system to generate a first intermediate matrix, wherein the chaotic matrix generated by the four-wing chaotic system is obtained by iterative conversion of an initial value of the four-wing chaotic system;
recombining chaotic matrixes generated by the Lorenz chaotic system to generate a second intermediate matrix, wherein the chaotic matrixes generated by the Lorenz chaotic system are obtained by iterative conversion of initial values of the Lorenz chaotic system;
respectively carrying out DNA encoding, DNA diffusion, DNA decoding and conversion on the first intermediate matrix and the second intermediate matrix to obtain a decimal matrix F and a decimal matrix X, and decomposing the decimal matrix F and the decimal matrix X;
and carrying out scrambling operation on the decomposition result so as to obtain an encrypted image.
2. The image encryption method according to claim 1, wherein the hash sequence is K ═ K [ K ═ K-1,k2,…,k64]Wherein k is1,k2,…,k64Is a value range of [0,255]Decimal integer of (1);
the step of calculating the initial value and the intermittent parameter of the chaotic system according to the Hash sequence mainly comprises the following steps:
(1) calculating a parameter h for obtaining an initial value of the chaotic system1-h7:
(2) Calculating an initial value x of the four-wing chaotic system0,y0,z0And w0:
(3) Calculating an initial value c of the Lorenz chaotic system1,c2And c3:
(4) Calculating intermittent parameter index1-index8:
3. The image encryption method according to claim 2, wherein the three channel matrices of red, green and blue and the chaotic matrix generated by the four-wing chaotic system are recombined to generate a first intermediate matrix, and specifically comprises:
performing binary conversion on the red, green and blue channel matrixes to obtain a matrix Rbin,GbinAnd Bbin;
Generating a first intermediate matrix T using the pause parameters according to the following calculation:
T=Ti(i ═ 1,2, …,6), where i ═ index1And is and
4. the image encryption method according to claim 2, wherein the reconstructing of the chaotic matrix generated by the lorentz chaotic system to generate the second intermediate matrix specifically comprises:
after the initial value iteration Lorenz chaotic system is utilized, an isometric sequence L is generated by processing1,L2And L3;
For the sequence L1,L2And L3Binary conversion is carried out to obtain a matrix L1bin,L2binAnd L3bin;
Generating a second intermediate matrix CT using the intermittent parameters according to the following calculation:
CT=CTi(i ═ 1,2, …,6), where i ═ index3
5. The image encryption method according to claim 1, wherein the DNA encoding is performed on the first intermediate matrix and the second intermediate matrix respectively, and specifically comprises:
acquiring DNA coding matrixes ER _ T and ER _ CT;
coding the first intermediate matrix T and the second intermediate matrix CT to obtain corresponding DNA matrixes:
DNA_T=[TDNA18,TDNA27,TDNA36,TDNA45]
and DNA _ CT ═ CT _ DNA18, CT _ DNA27, CT _ DNA36, CT _ DNA 45;
calculating the Hamming distance between the DNA matrixes, and updating the initial value parameters of the chaotic system by using the Hamming distance;
and calculating a new chaotic sequence by using the updated initial value.
6. The image encryption method according to claim 5, wherein the obtaining of the DNA coding matrices ER _ T and ER _ CT specifically comprises:
after the initial value iteration four-wing chaotic system is utilized, an isometric sequence X is generated by processing1,Y1And Z1;
Respectively reconstructing the sequence X by using a matrix reconstruction function1,Y1And Z1Converting into three chaotic matrixes X _1, Y _1 and Z _ 1;
using intermittent parameter index2And mod (index)36) +1 DNA coding matrices ER _ T and ER _ CT are obtained according to the following calculation:
ER_T=ERi,ER_CT=ERj,i=index2,j=mod(index26) +1, i ═ 1,2, …,6, and j ═ 1,2, …,6, where
7. The image encryption method according to claim 1, wherein the DNA diffusion operation includes: performing DNA complementary operation on the first intermediate matrix; and performing DNA cycle replacement operation on the second intermediate matrix.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010513355.6A CN111723386B (en) | 2020-06-08 | 2020-06-08 | SHA-512-based dynamic DNA color image encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010513355.6A CN111723386B (en) | 2020-06-08 | 2020-06-08 | SHA-512-based dynamic DNA color image encryption method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111723386A true CN111723386A (en) | 2020-09-29 |
CN111723386B CN111723386B (en) | 2023-09-26 |
Family
ID=72566578
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010513355.6A Active CN111723386B (en) | 2020-06-08 | 2020-06-08 | SHA-512-based dynamic DNA color image encryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111723386B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113034336A (en) * | 2021-03-29 | 2021-06-25 | 大连海事大学 | Encryption and steganography dual-image protection method based on 2D-TSCC chaotic system |
CN116886270A (en) * | 2023-09-05 | 2023-10-13 | 山东科技大学 | Three-band encryption method based on national encryption algorithm and double-chaotic system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030007635A1 (en) * | 2001-07-09 | 2003-01-09 | C4 Technology, Inc. | Encryption method, program for encryption, memory medium for storing the program, and encryption apparatus, as well as decryption method and decryption apparatus |
US20040202326A1 (en) * | 2003-04-10 | 2004-10-14 | Guanrong Chen | System and methods for real-time encryption of digital images based on 2D and 3D multi-parametric chaotic maps |
CN108365947A (en) * | 2018-03-05 | 2018-08-03 | 郑州轻工业学院 | A kind of image encryption method based on Feistel networks Yu dynamic DNA encoding |
CN108898025A (en) * | 2018-06-25 | 2018-11-27 | 河南大学 | New chaotic image encryption method based on dual scramble and DNA encoding |
CN109918923A (en) * | 2019-01-25 | 2019-06-21 | 哈尔滨理工大学 | A kind of multichannel color image chaos encrypting method based on DNA encoding |
CN110602346A (en) * | 2019-07-26 | 2019-12-20 | 广东工业大学 | Lossless color image encryption method based on hyperchaotic system |
CN110888321A (en) * | 2019-10-15 | 2020-03-17 | 长沙理工大学 | Four-dimensional four-wing memristor hyper-chaotic system generation method and shape synchronization method thereof |
-
2020
- 2020-06-08 CN CN202010513355.6A patent/CN111723386B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030007635A1 (en) * | 2001-07-09 | 2003-01-09 | C4 Technology, Inc. | Encryption method, program for encryption, memory medium for storing the program, and encryption apparatus, as well as decryption method and decryption apparatus |
US20040202326A1 (en) * | 2003-04-10 | 2004-10-14 | Guanrong Chen | System and methods for real-time encryption of digital images based on 2D and 3D multi-parametric chaotic maps |
CN108365947A (en) * | 2018-03-05 | 2018-08-03 | 郑州轻工业学院 | A kind of image encryption method based on Feistel networks Yu dynamic DNA encoding |
CN108898025A (en) * | 2018-06-25 | 2018-11-27 | 河南大学 | New chaotic image encryption method based on dual scramble and DNA encoding |
CN109918923A (en) * | 2019-01-25 | 2019-06-21 | 哈尔滨理工大学 | A kind of multichannel color image chaos encrypting method based on DNA encoding |
CN110602346A (en) * | 2019-07-26 | 2019-12-20 | 广东工业大学 | Lossless color image encryption method based on hyperchaotic system |
CN110888321A (en) * | 2019-10-15 | 2020-03-17 | 长沙理工大学 | Four-dimensional four-wing memristor hyper-chaotic system generation method and shape synchronization method thereof |
Non-Patent Citations (3)
Title |
---|
JAN SHER KHAN等: "DNA Sequence Based Medical Image Encryption Scheme", 2018 10TH COMPUTER SCIENCE AND ELECTRONIC ENGINEERING (CEEC) * |
全俊杰;蔡清波;: "一种基于Lorenz混沌系统的有效图像加密算法", 泉州师范学院学报, no. 02 * |
彭再平;王春华;林愿;骆小文;: "一种新型的四维多翼超混沌吸引子及其在图像加密中的研究", 物理学报, no. 24 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113034336A (en) * | 2021-03-29 | 2021-06-25 | 大连海事大学 | Encryption and steganography dual-image protection method based on 2D-TSCC chaotic system |
CN116886270A (en) * | 2023-09-05 | 2023-10-13 | 山东科技大学 | Three-band encryption method based on national encryption algorithm and double-chaotic system |
CN116886270B (en) * | 2023-09-05 | 2023-11-21 | 山东科技大学 | Three-band encryption method based on national encryption algorithm and double-chaotic system |
Also Published As
Publication number | Publication date |
---|---|
CN111723386B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chai et al. | Color image compression and encryption scheme based on compressive sensing and double random encryption strategy | |
Chai et al. | Hiding cipher-images generated by 2-D compressive sensing with a multi-embedding strategy | |
Guesmi et al. | A new efficient medical image cipher based on hybrid chaotic map and DNA code | |
Shankar et al. | RGB based multiple share creation in visual cryptography with aid of elliptic curve cryptography | |
Chen et al. | Compression-unimpaired batch-image encryption combining vector quantization and index compression | |
Yoon et al. | An image encryption scheme with a pseudorandom permutation based on chaotic maps | |
Demirtaş | A new RGB color image encryption scheme based on cross-channel pixel and bit scrambling using chaos | |
CN111723386B (en) | SHA-512-based dynamic DNA color image encryption method | |
CN115567186A (en) | Chaos-optimized depth window scrambling encryption method | |
CN115865431A (en) | Network security sharing method for private data | |
Almayyahi et al. | High-security image steganography technique using XNOR operation and fibonacci algorithm | |
Wade et al. | Distributed image encryption based on a homomorphic cryptographic approach | |
CN114157772B (en) | Digital image encryption method based on space-time chaotic system and half tensor product compressed sensing | |
CN113691362B (en) | Bit plane image compression encryption method based on hyperchaotic system and DNA coding | |
Gu et al. | A chaotic-cipher-based packet body encryption algorithm for JPEG2000 images | |
CN114915400A (en) | Synchronous time adjustable heterogeneous fractional order hyperchaotic system image encryption and decryption method | |
Naim et al. | New chaotic satellite image encryption by using some or all the rounds of the AES algorithm | |
CN112769545B (en) | Image encryption method based on adjacent pixel Joseph transformation and Mealy state machine | |
Li et al. | Plaintext-dependent selective image encryption scheme based on chaotic maps and DNA coding | |
Shakir et al. | A new four-dimensional hyper-chaotic system for image encryption | |
Qiu et al. | A case study for practical issues of DCT based bitmap selective encryption methods | |
CN116488792A (en) | Video stream parallel chaotic encryption method based on key frame and image compression | |
Muttoo et al. | A secure image encryption algorithm based on hill cipher system | |
Raghuvanshi et al. | Investigation of piecewise linear chaotic map as a diffusion model for image encryption | |
CN115134471A (en) | Image encryption and decryption method and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |