Bit plane image compression encryption algorithm based on hyperchaotic system and DNA coding

文档序号:1878174 发布日期:2021-11-23 浏览:23次 中文

阅读说明:本技术 基于超混沌系统和dna编码的位平面图像压缩加密算法 (Bit plane image compression encryption algorithm based on hyperchaotic system and DNA coding ) 是由 王丽丹 石航 于 2021-09-07 设计创作,主要内容包括:本发明提供了一种新的基于超Lorenz系统,同时结合了二维压缩感知算法,图像的位平面分解法以及DNA编码的多过程图像压缩加密算法。该方法的主要步骤包括:根据压缩比,采用压缩感知算法对明文图像进行采样:基于压缩后的图像,通过超Lorenz系统得到指定长度的4组伪随机序列:对压缩后的图像进行分解得到8个位平面,结合整数化伪随机序列分别对其进行置乱,将置乱后的8个位平面重组得到置乱图像:对置乱图像以及整数化伪随机序列进行DNA编码,对两者应用基于DNA编码的异或运算,得到密文图像。本发明所提供的加密算法具有很强的明文相关性,在保证安全性的同时也提高了算法的执行效率。(The invention provides a novel super-Lorenz-based system, which is combined with a two-dimensional compressed sensing algorithm, an image bit plane decomposition method and a DNA coding multi-process image compression encryption algorithm. The method mainly comprises the steps of sampling a plaintext image by adopting a compressed sensing algorithm according to a compression ratio, obtaining 4 groups of pseudo-random sequences with specified length through a hyper-Lorenz system based on the compressed image, decomposing the compressed image to obtain 8 bit planes, scrambling the 8 bit planes by combining with an integer pseudo-random sequence, recombining the 8 bit planes after scrambling to obtain a scrambled image, carrying out DNA coding on the scrambled image and the integer pseudo-random sequence, and carrying out XOR operation based on the DNA coding on the scrambled image and the integer pseudo-random sequence to obtain a ciphertext image. The encryption algorithm provided by the invention has strong plaintext correlation, and the execution efficiency of the algorithm is improved while the security is ensured.)

1. A bit plane image compression encryption algorithm based on a hyperchaotic system and DNA coding is characterized in that: the method comprises the following steps:

step 1, taking a gray level image as a plaintext image P, and adopting a two-dimensional compressed sensing algorithm to carry out a group of symmetries on the plaintext image PCompressing the image to generate a compressed pixel matrix t1The compression formula is as follows:

t1=Φ×P

is a random measurement matrix, CR is the compression ratio,is of a size of Is long and N is wide;

step 2, the pixel matrix t needs to be aligned1Carrying out normalization treatment to make the value of the element always be in [0,255%]Within this interval, a canonical pixel matrix t is generated2The rounding formula is as follows:

wherein the content of the first and second substances,denotes a rounding-down operation, t2Is t1The pixel matrix after normalization processing;

step 3, generating 4 groups of pseudo-random sequences s by using a hyperchaotic system1、s2、s3And s4

Step 4, the standard pixel matrix t is processed2The pixel values in the three-dimensional array are converted into 8-bit unsigned binary numbers, and the binary numbers are sequentially put into 8 matrixes from the lowest bit to the highest bit, wherein the 8 matrixes are t2The corresponding bit-plane image. Pseudo-random sequence generated for hyperchaotic systems1And s2Performing first integer to generate an integer pseudorandom sequence S1And S2Reuse of the integer pseudorandom sequence S1And S2Pixel position scrambling of 8 bit-plane images;

step 5, recombining 8 scrambled plane images into a new pixel matrix t3

Step 6, pixel matrix t after scrambling3Rearranged to 1-dimensional length ofSequence t of4

Step 7, for the pseudo-random sequence s1、s2、s3And s4Performing second integer to obtain an integer pseudorandom sequence I1、I2、I3、I4

Step 8, adding I2As a pair of rule items I4Converting the DNA code to obtain a base sequence t5Is shown by3As a pair of rule items t4Converting the DNA code to obtain a base sequence R4

Step 9, using the rule of bitwise XOR operation of base sequences to determine t5And R4Reintegrated into a new base sequence R;

step 10, with I1The base sequence R is subjected to DNA decoding conversion as a rule item to obtain a binary sequence bR

Step 11, calculating the sum t of pixel points of the plaintext image P, converting the decimal number t into 8-bit unsigned binary number, and then performing the binary sequence bRCarrying out XOR operation to obtain a binary sequence t6Then, t is further determined6Conversion into a decimal sequence t7Finally, the one-dimensional sequence t is applied7Rearranging to a matrix form to obtain a ciphertext image C.

2. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 3, the plain texts are combined simultaneouslyThe Hash value and the external secret key of the image P are generated into 4 groups of pseudo-random sequences s by using a super Lorenz system1、s2、s3And s4The expression of the superlorenz system is as follows:

wherein, a, b, c and d are system parameters, a is 10, b is 8/3, c is 28, r is-1, w, x, y and z are system variables, and initial values w are system variables0、x0、y0、z0Can be artificially set by changing w after disturbance0、x0、y0、z0Substituting the above equation to perform iteration for a number of iterations greater than or equal to the standard pixel matrix t2To obtain 4 sets of equal-length pseudo-random sequences s1(x1、x2、x3、x4、…)、s2(y1、y2、y3、y4、…)、s3(z1、z2、z3、z4、…)、s4(w1、w2、w3、w4…), where x is1As x2Input of (a) y1As y2Input of z1As z2Input of w1As w2Is input.

3. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 4, the specific method comprises the following steps:

step 4.1, the 1 st digit from the left of each 8-bit unsigned binary number is put into the first bit plane image, the 2 nd digit from the left is put into the second bit plane image, and so on, and the pixel matrix t after normalization is carried out2Decomposed into 8 bit plane images Bi (i ═ 1,2, …, 8);

step 4.2, assigning a pseudo-random sequence s1、s2Using a formula pair s1Front ofTerm is integer, pair s2The first N terms of (a) are first integer, and the formula is as follows:

wherein, | | represents absolute value operation to obtain integer pseudorandom sequence S1And S2

Step 4.3, Using the integer pseudorandom sequence S1And S2The method comprises the following steps of performing position scrambling on rows and columns of 8 bit plane images according to a formula to obtain 8 bit plane images after scrambling, and finally recombining 8 bit plane matrixes after scrambling into a new pixel matrix, wherein the specific method and the formula are as follows:

wherein B isi(j,: represents the jth line of the ith bit-plane image,<<a cyclic left-shift operation is shown,>>denotes a shift down operation of a cycle, S1(j) (or S)1(k) The value of) represents the number of bits left (bottom) shifted in the row cycle.

4. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 5, the 8 scrambled bit plane images are recombined into the pixel matrix t3The combination method is the inverse operation of step 4.1, i.e. binary values at each corresponding position from the first plane to the eighth plane are combined and converted into 1 decimal number, so as to obtain a new decimal pixel matrix t3

5. The bit-plane image compression encryption algorithm based on hyperchaotic system and DNA coding as claimed in claim 1, characterized in thatThe method comprises the following steps: in said step 6, the pixel matrix t3Conversion into a one-dimensional sequence of pixels t4The specific method comprises the following steps: arranging the second row behind the tail of the first row, then arranging the third row behind the tail of the second row, arranging the fourth row behind the tail of the third row, and so on until the last row is arranged behind the tail of the last but one row, thereby forming a one-dimensional pixel sequence t4

6. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 8, 4 groups of pseudo-random sequences s are subjected to1、s2、s3、s4Performing second integer treatment to obtain I1、I2、I3、I4The integer equation is as follows:

wherein I1、I2、I3Is in the range of 1 to 8, and I4The value range of (1) is 0-255.

7. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 8, I is selected2As t4Rule of (1) selecting item (I)3As I4Respectively obtain t5And R4Wherein t is5And R4All base sequences, the operational formula of DNA sequence coding and their corresponding coding and decoding rules are as follows:

wherein I2And I3The value of (b) indicates the coding rule number.

8. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 9, the base sequence t is determined according to the rule of XOR operation of the base sequences5And R4And (3) carrying out operation to obtain a new base sequence R, wherein an operation formula is as follows according to an XOR operation rule:

R=bitxor(t5,R4)。

9. the bit-plane image compression encryption algorithm based on the hyperchaotic system and DNA coding according to claim 1 or 7, characterized in that: in the step 11, a pseudo-random integer sequence I1As a decoding rule of the base sequence R, a binary sequence b is obtained by calculationRThe decoding operation formula of the base sequence is as follows:

bR=decode(R,rule(I1))

i.e. I1Using the value of (a) as a decoding rule selection item to retrieve a binary sequence bR

10. The bit-plane image compression encryption algorithm based on the hyperchaotic system and the DNA coding as claimed in claim 1, is characterized in that: in the step 12, all the pixel points of the plaintext image P are added to obtain a constant t, and the constant t is converted into an 8-bit unsigned binary number tbBinary constant tbAnd then with a binary sequence bRPerforming a bit exclusive-or operation, wherein the correlation formula is as follows:

the specific operation method comprises the following steps: the binary values are added, the same is 0, the different is 1, the rule is as follows

XOR operation rule table

Technical Field

The invention relates to the technical field of image encryption, in particular to a bit plane image compression encryption method based on a hyperchaotic system and DNA coding.

Background

Since the last 90 s, the rapid development of computer-based information science and technology has brought about a great change to people's lives, and meanwhile, media for information storage and transmission are gradually developing towards diversification and convenience, and digital images gradually replace texts by virtue of the characteristics of abundant information storage capacity, intuitive information expression capacity, convenience in network transmission and the like, so that the method becomes one of the important information storage and transmission modes in the current society.

Therefore, in the present day of rapid development of computer science technology, encryption algorithms for digital images are becoming a research hotspot.

However, in recent years, individuals and organizations have suffered from losses due to leakage of image information, because the digital images and texts have great differences in storage modes, file coding and the like, and traditional encryption standards or technologies such as AES, DES and RSA cannot provide effective protection for information stored in the digital images. Meanwhile, due to the limitation of computer power and slow development of theories and standards related to digital image encryption, some old digital image encryption algorithms often have the defects of insufficient security, incapability of resisting decoding attacks from the outside and the like.

Disclosure of Invention

In order to solve the problems, a bit plane image compression encryption algorithm (using a hyper-Lorenz system in a hyper-chaos system) based on a hyper-chaos system and DNA coding is specially introduced, so that the encryption process can be ensured to be safe and random, and the operation method can be simplified.

Taking the gray level image P as a plaintext image, compressing a group of symmetrical edges of the plaintext image P by adopting a two-dimensional compressive sensing algorithm, and generating a compressed pixel matrix t1The compression formula is as follows:

t1=Φ×P

due to t after compression1The value of the medium element jumps in a large range, which is not beneficial to the subsequent processing and needs to be carried out on t1Carrying out normalization treatment to make the value of the element always be in [0,255%]This regionIn the middle range, a normalized pixel matrix t is generated2The normalization process is as follows:

wherein the content of the first and second substances,denotes a rounding-down operation, t2Is t1The pixel matrix after normalization processing;

generating 4 groups of pseudo-random sequences s by combining the hash value of the plaintext image P and external key information and utilizing a super Lorenz system1、s2、s3And s4Wherein the expression of the superLorenz system is as follows:

wherein, a, b, c and d are system parameters, a is 10, b is 8/3, c is 28, r is-1, w, x, y and z are system variables, and initial values w are system variables0、x0、y0、z0Can be artificially set by changing w after disturbance0、x0、y0、z0Substituting the above equation to perform iteration for a number of iterations greater than or equal to the standard pixel matrix t2To obtain 4 sets of equal-length pseudo-random sequences s1、s2、s3And s4

The canonical pixel matrix t2Each pixel value in the three-dimensional image is converted into 8-bit unsigned binary number, the binary number is put into 8 matrixes from the lowest bit to the highest bit in sequence according to corresponding coordinates, and the 8 matrixes are t2The pixel positions of the 8 bit plane images Bi (i is 1,2, …,8) are scrambled according to the 8 bit plane images, specifically:

selecting pseudo-random sequences s1 and s2, and applying a formula to s1Front ofTerm is integer, pair s2The first N terms of (A) are integers, and the formula is as follows:

wherein, | | represents absolute value operation to obtain integer pseudorandom sequence S1And S2

Step 4, utilizing an integer pseudorandom sequence S1And S2Performing position scrambling on the rows and columns of the 8 bit plane images according to a formula to generate 8 scrambled bit plane images, and finally recombining the 8 scrambled bit planes into a new pixel matrix, wherein the specific method and the formula are as follows:

wherein B isi(j,: denotes the jth line of the ith bit-plane image, < denotes a shift-left operation, < denotes a shift-down operation, < S > denotes a shift-down operation1(j) (or S)1(k) The value of) represents the number of bits left (bottom) shifted in the row cycle;

recombining the 8 scrambled bit-plane images into a scrambled pixel matrix t3The combination method is the inverse operation of the step 2, and each binary number at the corresponding position from the first plane to the eighth plane is combined and converted into a decimal pixel value;

the scrambled pixel matrix t is then applied3Rearranged to 1-dimensional length ofSequence t of4The specific method comprises the following steps: arranging the second row behind the tail of the first row, then arranging the third row behind the tail of the second row, arranging the fourth row behind the tail of the third row, and so on until the last row is arranged behind the tail of the last but one row, thereby forming a one-dimensional sequence t4

For 4 sets of pseudo-random sequences s1、s2、s3、s4Performing integer treatment to obtain I1、I2、I3、I4The integer equation is as follows:

wherein I1、I2、I3Is in the range of 1 to 8, and I4The value range of (1) is 0-255;

in biology, the DNA sequence consists of 4 nitrogenous bases "A", "T", "G" and "C". On the other hand, since pixels of a gray-scale image can be represented by 8-bit unsigned 2-ary numbers, and in the 2-ary numbers, "0" and "1" are complementary, then "00" and "11" and "01" and "10" are also complementary. Therefore, the pixel values of the gray-scale image can be represented by a base sequence of length 4, and the process of mapping the pixel values to a sequence entirely composed of bases is a DNA encoding process. However, there are only 8 coding rules corresponding to binary number representation of pixels of a gray scale image and satisfying the principle of DNA base complementation at the same time, and I is selected2As t4Rule of (1) selecting item (I)3As I4Respectively obtain t5And R4Wherein t is5And R4All are composed of basic groups, and the operation formula and the coding and decoding rules of the basic group sequence are as follows:

8 standard DNA sequence coding and decoding rules

Wherein I2The value of (A) indicates that the number of rules is chosen for DNA encoding;

the base sequence t is determined according to the rule of XOR operation of the base sequences5And R4And (3) carrying out operation to obtain a new base sequence R, wherein the operation formula and the XOR operation rule are as follows:

R=bitxor(t5,R4)

pseudo-random sequence I of integers1As a decoding rule of the base sequence R, a binary sequence b is obtained by calculationRThe decoding operation formula is as follows:

bR=decode(R,rule(I1))

the base sequence R is decoded according to the decoding rules of the DNA sequence I1Is used as a decoding rule selection item to obtain a binary coded sequence b againR

Adding all pixel points of the plaintext graph P to obtain a constant t, and converting the constant t into an 8-bit unsigned binary constant tbThen, t is further determinedbAnd binary sequence bRPerforming a bit exclusive-or operation, wherein the correlation formula is as follows:

the specific operation method comprises the following steps: the binary numbers are added, are both 0 and are different by 1, and the rule is as follows:

XOR operation rule table

Summing the pixel points of the plaintext image P to obtain a sum t, converting the decimal number t into an 8-bit unsigned binary number, and adding the binary numberAnd binary sequence bRCarrying out XOR operation to obtain a binary sequence t6Then, t is further determined6Conversion into a decimal sequence t7Finally, the one-dimensional sequence t is applied7Rearranging to a matrix form to obtain a ciphertext image C.

The beneficial effects are that: the chaotic system is introduced to generate a pseudo-random sequence to replace the traditional pseudo-random sequence algorithm, so that the algorithm flow is simplified and stronger randomness is obtained. The strong randomness of the chaotic system is introduced into an image sequence, the encryption of digital images is effectively realized, the concept of molecular biology is introduced into cryptography, and the image pixels are coded and operated by combining a pseudorandom sequence, so that the safety is further enhanced.

Drawings

FIG. 1 is a flow chart of the method of the present invention.

Fig. 2 is a schematic diagram of an image compression process based on compressed sensing theory.

Fig. 3 is a bifurcation diagram of the li-exponent of the superlorenz system as a function of the parameter a, wherein 3(a) shows the first 3 li-exponents of the system as a function of the parameter a, and 3(b) shows the bifurcation diagram as a function of the parameter a.

FIG. 4 is an exploded schematic view of an 8-bit plane of a gray scale image, such as a Lena image.

FIG. 5 is an image of the present invention used in a simulation experiment, wherein 5(a) is Lena, 5(b) is Pepper, and 5(c) is Cameraman.

Fig. 6 is a ciphertext image corresponding to Lena, Pepper, and Cameraman images under the condition that the compression ratio is 0.5, where 6(a) is the ciphertext image of Lena, 6(b) is the ciphertext image of Pepper, and 6(c) is the ciphertext image of Cameraman.

Fig. 7 is a decrypted image corresponding to each ciphertext image in fig. 6, where 7(a) is a decrypted image of Lena, 7(b) is a decrypted image of Pepper, and 7(c) is a decrypted image of Cameraman.

Fig. 8 is a grayscale histogram of each of the subgraphs in fig. 5, 6 and 7, in which fig. 8(a) is a grayscale histogram of the plaintext image of Lena, the ciphertext and the decrypted image at the compression ratio of 0.5, fig. 8(b) is a grayscale histogram of the plaintext image of Pepper, the ciphertext and the decrypted image at the compression ratio of 0.5, and fig. 8(c) is a grayscale histogram of the plaintext image of Cameraman, the ciphertext and the decrypted image at the compression ratio of 0.5.

Fig. 9 is a correlation diagram of each of the subgraphs of the bitmaps 5, 6 and 7, in which fig. 9(a), 9(b) and 9(c) are correlation diagrams of the plaintext image of Lena, the ciphertext image at the compression ratio of 0.5 and the decrypted image in the horizontal, vertical and oblique 3 directions, respectively, fig. 9(d), 9(e) and 9(f) are correlation diagrams of the plaintext image of Pepper, the ciphertext image at the compression ratio of 0.5 and the decrypted image in the horizontal, vertical and oblique 3 directions, respectively, and fig. 9(g), 9(h) and 9(i) are correlation diagrams of the plaintext image of Lena, the ciphertext image at the compression ratio of 0.5 and the decrypted image in the horizontal, vertical and oblique 3 directions, respectively.

Detailed Description

In order to better explain the technical solution of the present invention, the following description is made in conjunction with the accompanying drawings and the specific embodiments of the present invention.

The invention relates to a bit plane image compression encryption method based on a hyperchaotic system and DNA coding, and a flow chart is shown in figure 1, which can be divided into 4 parts. Part 1 is an image compression process based on a compressed sensing algorithm; part 2 is a process of obtaining a pseudorandom sequence by iterative generation using a secret key and a super Lorenz system; the 3 rd part is mainly a process of respectively scrambling the rows and the columns of 8 bit plane images obtained by decomposing a plaintext image by using 2 groups of pseudo-random sequences generated in the previous part and recombining the rows and the columns into a complete image; the 4 th part is a pixel diffusion process based on DNA coding and base-level bitwise XOR operation, and the final ciphertext image can be obtained by recombining the results of the process into a matrix form.

1. Image compression algorithm based on compressed sensing theory

Fig. 2 shows a process of compressing an image by using an image compression algorithm based on the compressive sensing theory under the condition that the compression ratio is 0.5, taking a Lena image as an example. For a plaintext image P of size M × N, P is randomly sampled by the following equation using a gaussian random matrix of size (CR × M) × N as a measurement matrix Φ.

t1=Φ×P

Wherein, t1For compressing the image, the size of which isCR∈[0.1,0.9]Is a predefined compression ratio. The Lena image with a size of 512 × 512 is compression-sampled with a compression ratio CR of 0.5 as an example, and the simplified process and the compression result are shown in fig. 1. In addition, consider t1The span of the value of the medium element is large, which is not beneficial to the algorithm processing aiming at the image pixel, so the t is processed according to the following formula1Normalizing t1The value of the medium element is limited in the interval of 0,255]And (4) the following steps.

Wherein the content of the first and second substances,denotes a rounding-down operation, t2Is t1The pixel matrix after normalization processing;

2. pseudo-random sequence generator based on external secret key, plaintext hash value and ultra-Lorenz system

For easy understanding, K, K are used respectively1And K2To represent the complete key, the external key, and the internal key. Wherein, K1Is a 2-ary sequence (input in the form of a 64-bit 16-ary number) of length 256, K2It is the hash value of the plaintext image calculated by the SHA-256 algorithm, and the integrity key K is represented by K1And K2Is spliced directly and has the length of 512. And converting the key K into a 10-system sequence to obtain a 64-system 10-system key d, and disturbing the preset initial value of the super Lorenz system by using d according to the following formula.

Where SUM () is a summation function. The initial value x after the disturbance is obtained0、y0、z0And w0Substituted into the super Lorenz system equation shown below.

Where a is 10, b is 8/3, c is 28, r is-1, fig. 3(a) shows the first 3 li-exponent diagrams of the hyper Lorenz system, which indicates that the system is indeed a hyper-chaotic system, and fig. 3(b) shows the bifurcation diagram of the system. The system was iterated using the Runge-Kutta method to obtain 4 sets of lengthsPseudo-random sequence s of1,s2,s3And s4. It is worth mentioning that the 4 sets of pseudo-random sequences obtained by the iteration of the superLorenz system all have good randomness as s1For example, it passed the NIST SP800-20 randomness test as shown in Table 1 (same reason for the remaining 3 groups).

TABLE 1 NIST SP800-20 randomness test results

Note that when the p value > 0.01, the sequence is considered to pass the randomness test, and in addition, "+" indicates that the test result contains more than 2 p values, but since they are all greater than 0.1, the sequence passes the test.

3. Pixel scrambling procedure based on bit-plane decomposition and cyclic shift operation of image

As shown in fig. 4, taking Lena image as an example, 8 bit-plane images consisting of only 0 and 1 can be obtained by decomposing the Lena image, and the pixel scrambling process is as follows.

Choosing a pseudorandom sequence s1Front ofItem and s2The first N term of (a), which is integer according to the following formula:

where, | | represents an absolute value operation. Normalizing the pixel matrix t2Decomposed into 8 bit-plane images, each consisting of only 0 and 1. For bit-plane image Bi(i 1, 2.., 8) using an integer pseudorandom sequence S according to the following equation1And S2The method is respectively carried out with row scrambling and column scrambling, and the formula is as follows:

wherein B isi(j,: denotes the jth line of the ith bitplane image, < denotes a cyclic left shift operation, and Bi(j) It represents the number of bits that the row is cyclically left shifted. In the same way, wherein Bi(: k) denotes the kth column of the ith bit-plane image, which denotes the cyclic right (lower) shift operation, and Bi(k) It represents the number of bits that the column is cyclically shifted right (down). For example, when i is 2 and S1(10) is 100, it means that the 10 th line of the 2 nd bit plane image is shifted by 100 bits to the left cycle; similarly, when i is 4 and S2(100) is 32, this indicates that the 100 th column of the 4 th bit plane image is shifted down by 32 bits in a cycle. The 8 bit plane images after the row scrambling and the column scrambling are recombined to obtain a scrambled image t3

The present embodiment is a shift left operation and a shift down operation, but does not exclude other shift right operation and shift up operation.

4. Pixel diffusion process based on DNA coding and base operation

In biology, the DNA sequence consists of 4 nitrogenous bases "A", "T", "G" and "C". On the other hand, since pixels of a gray-scale image can be represented by 8-bit unsigned 2-ary numbers, and in the 2-ary numbers, "0" and "1" are complementary, then "00" and "11" and "01" and "10" are also complementary. Therefore, the pixel values of the gray-scale image can be represented by a base sequence having a length of 4, and the process of mapping the pixel values to the base sequence is a DNA encoding process. However, there are only 8 kinds of encoding rules corresponding to 2-ary number representation of pixels of a gray-scale image and satisfying the principle of DNA base complementarity at the same time, as shown in Table 2.

TABLE 28 DNA sequence coding and decoding rules for standards

The pixel diffusion process is as follows. Re-aligning the pseudorandom sequence s according to1,s2,s3And s4And carrying out integer processing.

Respectively mixing I2And I3As a rule in the DNA coding process to select sequences for t4And I4DNA encoding to obtain a base sequence t5And R4That is, the sequence of only bases "A", "T", "G" and "C" is calculated as follows.

The integer formation is not limited to the above two and the order thereof.

I1、I2、I3And I4Are all integer pseudorandom sequences, wherein I1、I2And I3Has a value in the range of 1 to 8, and I4The value range of (1) is 0-255. The scrambled image t3Rearranged to length ofThe value range and I of the one-dimensional array4The same is true. Then, I is mixed2And I3Respectively as in the process of DNA codingRule of (3) select sequence, for t4And I4DNA encoding was carried out to obtain a sequence T consisting of only the sequences of bases "A", "T", "G" and "C5And R4The operation process is as follows.

Wherein encode () represents a DNA coding operation on a binary sequence, e.g., when t4(320)=124,I2(320) 4, then encode (t)4(320),I2(320) Then it means that the pixel value 124 at bit 320 (binary value 01111100) is encoded according to rule 4, resulting in a "GAAT". Similarly to the 2-ary sequence, the base sequence can be subjected to addition, subtraction, and exclusive OR, and the exclusive OR rule of the DNA sequence is shown in Table 3.

TABLE 3 rule of XOR operation for DNA sequences

A nucleotide sequence t5And R4The new nucleotide sequence R is obtained by calculation according to the rule of bitwise XOR of the nucleotides, and the calculation process is as follows.

R=bitxor(t5,R4)

Wherein bitxor () represents a bitwise exclusive or operation. For example, when t is5(96) Is ═ T "and R4(96) When it is "G", xor (t)5(96),R4(96) ) represents t5(96) And R4(96) The result of the exclusive OR operation is the base "C". Then, the pseudo-random integer sequence I1Selecting a sequence as a decoding rule, and decoding the base sequence R to obtain a binary sequence bRNamely:

bR=decode(R,rule(I1))

wherein decode () represents a DNA decoding operation for a base sequence, for example: let R (127) ═ A ",I1(127) 3, then decode (R (127), I)1(127) "indicates that base" A "is decoded according to rule 3, i.e., the result is a combination of 2 and 11". Then, for bRThe further operation is performed as follows:

adding all pixel points in the plaintext image P to obtain a constant t, and converting the constant t into an 8-bit unsigned binary constant tbThen, t is further determinedbAnd binary sequence bRPerforming a bit exclusive-or operation, wherein the correlation formula is as follows:

the specific operation method comprises the following steps: the binary numbers are added, are both 0 and are different by 1, and the rule is as follows:

XOR operation rule table

Summing the pixel points of the plaintext image P to obtain a sum t, converting the decimal number t into an 8-bit unsigned binary number, and then comparing the binary number with a binary sequence bRCarrying out XOR operation to obtain a binary sequence t6Then, t is further determined6Conversion into a decimal sequence t7Finally, the one-dimensional sequence t is applied7Rearranging to a matrix form to obtain a ciphertext image C.

The decryption process of the image is the reverse process corresponding to the encryption process, and is not described herein again.

To further verify the effectiveness of the present invention, the present invention was tested for effectiveness using Windows 10(Intel (R) core (TM) i7-6700HQ,2.60GHz, RAM 16GB) and MATLAB 2020a as experimental platforms. FIG. 5 is a plain image used during the simulation experiment: 5(a) Lena, 5(b) Pepper, 5(c) Cameraman; fig. 6 is a ciphertext image corresponding to 3 plaintext images in fig. 5 under the premise that the compression ratio is 0.5: 6(a) a ciphertext image of Lena, 6(b) a ciphertext image of Pepper, 6(c) a ciphertext image of Cameraman; fig. 7 is a decrypted image corresponding to the 3 ciphertext images in fig. 6: 7(a) Lena's decrypted image, 7(b) Pepper's decrypted image, 7(c) Cameraman's decrypted image; fig. 8 is a gray level histogram corresponding to each sub-graph in fig. 5, 6, and 7: a (1) is a plaintext of Lena, a (2) is a ciphertext of Lena, a (3) is a gray histogram of a decrypted image of Lena, b (1) is a plaintext of Pepper, b (2) is a ciphertext of Pepper before encryption, after encryption and after decoding, b (3) is a gray histogram of a dense image of Pepper, c (1) is a plaintext of Cameraman, c (2) is a ciphertext of Cameraman, and c (3) is a gray histogram of a decrypted image of Cameraman; fig. 9 is a correlation diagram corresponding to each of the subgraphs in fig. 5, 6 and 7: a (1), a (2) and a (3) are plaintext before Lena encryption, encrypted and decoded, b (1), b (2) and b (3) are ciphertext before Lena encryption, encrypted and decoded, c (1), c (2) and c (3) are correlation diagrams of decrypted images before Lena encryption, encrypted and decoded, d (1), d (2) and d (3) are plaintext before Pepper encryption, encrypted and decoded, e (1), e (2) and e (3) are ciphertext before Pepper encryption, encrypted and decoded, f (1), f (2) and f (3) are correlation diagrams of decrypted images before Pepper encryption, after encryption and decoded, g (1), g (2) and g (3) are plaintext before Cameraman encryption, encrypted and decoded, h (1), h (2) and h (3) are Cameraman encryption, plaintext after encryption and decoded, and camera before h (1), h (2) and h (3) are Cameraman encryption diagrams, The ciphertext i (1), the ciphertext i (2) and the ciphertext i (3) after encryption and decoding are correlation graphs of the decrypted images before, after and after Cameraman encryption. It can be considered from the results shown in fig. 6 to fig. 9 that the compression and encryption of the input plaintext image can be realized by combining the high-dimensional present invention, which effectively disturbs the information such as the pixel distribution of the plaintext image and the correlation between the adjacent pixel points. Meanwhile, the invention can realize the reconstruction of the original plaintext image information in the decryption process. In conclusion, according to the results of the simulation experiments, the invention can be proved to have good compression and encryption effects.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种AES&SM4可重构掩码S盒硬件电路

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!