Image encryption method based on RNA and pixel depth

文档序号:1802373 发布日期:2021-11-05 浏览:21次 中文

阅读说明:本技术 基于rna和像素深度的图像加密方法 (Image encryption method based on RNA and pixel depth ) 是由 张晓强 闫轩岗 于 2021-07-26 设计创作,主要内容包括:一种基于RNA和像素深度的图像加密方法,属于信息加密领域。当前网络传输安全问题日益严峻,为保护网络交互图像内容,本发明提出一种基于RNA和像素深度的图像加密方法。本发明首先将明文图像分层后进行RNA编码;其次,利用混沌序列对分层RNA图像进行置乱,并对置乱结果进行三维自适应Arnold变换和RNA解码可得置乱图像;再次,对置乱图像进行RNA编码;从次,用被选择的RNA混沌矩阵与置乱RNA图像利用RNA运算符进行扩散;最后,对扩散结果进行RNA解码,可得最终密文图像。实验结果表明:该方法适用范围广,加密效果良好,安全性高,可保证图像在网络平台下安全可靠传输。(An image encryption method based on RNA and pixel depth belongs to the field of information encryption. The current network transmission safety problem is increasingly severe, and in order to protect network interactive image content, the invention provides an image encryption method based on RNA and pixel depth. Firstly, layering a plaintext image and then carrying out RNA (ribonucleic acid) coding; secondly, scrambling the layered RNA image by using the chaotic sequence, and performing three-dimensional adaptive Arnold transformation and RNA decoding on the scrambling result to obtain a scrambled image; thirdly, RNA encoding is carried out on the scrambled image; secondly, diffusing the selected RNA chaotic matrix and the scrambled RNA image by using an RNA operator; and finally, carrying out RNA decoding on the diffusion result to obtain a final ciphertext image. The experimental results show that: the method has the advantages of wide application range, good encryption effect and high safety, and can ensure safe and reliable transmission of the image under a network platform.)

1. The image encryption method based on the RNA and the pixel depth is characterized by comprising the following steps:

step 1: and (3) key generation: let the plaintext image beI m n×Pixel depth ofdRandom selection ofx ' 0, y ' 0, z ' 0, u ' 0, v ' 0, w ' 0,μ ', e', t 'As user key input, using SHA-256, plaintext image is calculated respectivelyI m n×And current system timeSCorresponding 256 bit hash valueH 1=j 1, j 2, …, j 256AndH 2=k 1, k 2, …, k 256will beH 1AndH 2respectively taking the first 128 bits and sequentially connecting the first 128 bits into a Hash code with the length of 256 bitsH=j 1, j 2, …, j 128, k 1, k 2, …, k 128And will beHDividing into blocks according to every 8 bitsH=h 1, h 2, …, h 32(ii) a Calculating initial values of Improved two-dimensional Logistic-Adjusted Sine Map (ILASM) shown in formula (1) and four-dimensional Chen hyperchaotic shown in formula (2) by using key generators shown in formulas (3) to (5)x 0, y 0, z 0, u 0, v 0, w 0And control parametersμ, eAnd the number of iterations of the three-dimensional adaptive Arnold transform as shown in equation (6)tAnd control parametersq 1, q 2

, (1)

Wherein the control parameterμ∈[0, 1]Value of statex i , y i ∈[0, 0.2];

, (2)

Wherein the parameter is controlleda=35,b=3,c=12,d=7 ande∈[0.085, 0.798]when the system is in a hyperchaotic state;

, (3)

, (4)

, (5)

, (6)

wherein the content of the first and second substances,mod (.) represents a modular operation,floor(.) represents a rounded-down function,bin2dec(.) indicates a binary converted decimal function, an indicates an exclusive-or operation;

step 2: chaotic sequence and matrix generation: according to the initial valuex 0, y 0And control parametersμIteration two-dimensional ILASM chaos 1000+m×n×d/2Abandoning the first 1000 iteration values to generate 2 chaotic sequencesX m n d/××2AndY m n d/××2(ii) a According to the initial valuez 0, u 0, v 0, w 0And control parameterseIteration four-dimensional Chen hyperchaotic 1000+m×nAnd discarding the first 1000 iteration values to generate 4 chaotic matrixesZ m n×, U m n×, V m n×AndW m n×

and step 3: generation of coding rules: according to the initial value of chaosx 0, y 0, z 0, u 0, v 0, w 0And pixel depthdThe rules for generating the RNA codec using equations (7) - (12) are:

r 1=mod(d+floor(x 0×1014), 8)+1, (7)

r 2=mod(d+floor(y 0×1014), 8)+1, (8)

r 3=mod(d+floor(z 0×1014), 8)+1, (9)

r 4=mod(d+floor(u 0×1014), 8)+1, (10)

r 5=mod(d+floor(v 0×1014), 8)+1, (11)

r 6=mod(d+floor(w 0×1014), 8)+1; (12)

and 4, step 4: three-dimensional RNA cube generation: using RNA coding rulesr 1To pairI m n×Coding RNA to obtainI 3DThickness pair according to one RNA codeI 3DLayering to obtain RNA layered imageI j Rj=1, 2, …, d2); using chaotic sequencesXTo pairI j Rj=1, 2, …, d/2) performing interlayer scrambling to obtaind2 pieces of size ofm×nOf (2) planeI j 1j=1, 2, …, d2); each plane isI j 1Converted into corresponding one-dimensional vectorsV j 1And connected end to obtain a large one-dimensional vectorV 1Using chaosYTo pairV 1Carry out integral scrambling to obtainV 2(ii) a Will be provided withV 2Is converted intol×l×lThree-dimensional RNA cube ofI 3DCIf the third power can not be fully opened, zero codes are filled at the tail to the length which accords with the full third power;

, (13)

wherein the content of the first and second substances,ceil (.) represents an rounding-up function;

and 5: adaptive stereo scrambling: to pairI 3DCThe three-dimensional adaptive Arnold transformation shown in the formula (6) is performed to obtain the scrambled RNA cubeI 3DAWill be three-dimensionalI 3DAConversion to one-dimensional RNA sequencesV 3After deleting redundant zero codes, utilizer 2To pairV 3Performing RNA decoding and converting into the size ofm×nTwo-dimensional scrambled image ofI 2

Step 6: defining the RNA operation rule: the rules for addition (+), subtraction (-), exclusive or (≧) and exclusive or (☉) of RNA are defined as follows:

and 7: operator selection: respectively selectI 2Middle 4 vertexes and using coding rulesr 3RNA coding is carried out on the upper six bits of the pixel value, and the operator +, -, (ii) or ☉ is selected according to the distribution condition of the coding result in the amino acid sequence generation table;

and 8: selecting a chaotic matrix: according todThe calculation result of/8 determines the selection rule and selects the chaos matrixZ, U, VAndWparticipating in operation, and selecting the rule as follows: if it isdAnd 8=1, selecting the first chaotic matrixZParticipating in operation; if it isd8=2, then the first two chaotic matrixes are selectedZAndUparticipating in operation; if it isd8=3, then the first three chaotic matrices are selectedZ, UAndVparticipating in operation; if it isd8=4, then all four chaotic matrices are selectedZ, U, VAndWparticipating in operation;

and step 9: selective diffusion: will scramble the imageI 2Becomes an image every 8 bitsI i 2i=1, 2, …, d/8) use ofr 4To pairI i 2i=1, 2, …, d/8) coding of RNAI i 3i=1, 2, …, d8); by usingr 5To pairZUVAndWcoding RNAZ 1U 1V 1AndW 1then, according to the operator selected in step 7, the two are subjected to diffusion operation as shown in formula (14) to obtain a layered encrypted imageI 1 e, I 2 e, I 3 eAndI 4 ewill beI 1 e, I 2 e, I 3 eAndI 4 ecombining to obtain encrypted RNA imageI e(ii) a Finally, user 6To pairI ePerforming RNA decoding to obtain ciphertext imageI c

, (14)

Whereinoperator1,operator2,operator3 andoperator4 represents one of the four operators, +, -, and ☉.

2. The method of claim 1, wherein: in the step 4, a disorder finger is arranged between layers: use ofsort(.) pairs of functionsXSequencing to obtain new sequenceX 'And a sequence of index valuesP 1

[X ', P 1]=sort(X(j)), j=1, 2, …, d/2, (15)

Using index valuesP 1To pairI 3DIs scrambled to obtainI j 1

I j 1=I P1(j) Rj=1, 2, …, d/2 (16)。

3. The method of claim 1, wherein: in the step 4, overall random finger placement: use ofsort(.) pairs of functionsYSequencing to obtain new sequenceY 'And a sequence of index valuesP 2

[Y ', P 2]=sort(Y(k)),k=1, 2, …, m×n×d/2, (17)

The scrambled plane of each layerI j 1Converted into corresponding one-dimensional vectorsV j 1And are connected end to obtain a large one-dimensional vectorV 1

V 1=V 1 1 V 2 1V j 1, (18)

Reusing index valuesP 2To pairV 1Scrambling to obtainV 2

V 2(k)=V 1(P 2(k)),k=1, 2, …, m×n×d/2 (19)。

Technical Field

The method relates to an information encryption technology, in particular to an image encryption method.

Background

With the development of network technology, the communication mode is changed greatly, a large number of digital images are transmitted through a network, but the openness of a network system and a network protocol have defects, so that image information leakage events occur frequently; based on this, researchers have proposed various image encryption methods, and these methods have the problems of weak encryption security or low efficiency; in combination with technologies such as an RNA theory, two-dimensional Improved Logistic-Adjusted-Sine Map (ILASM) chaos, pixel depth, four-dimensional Chen hyperchaos and the like, the image encryption method based on the RNA and the pixel depth is designed for improving the safety and the efficiency of the image encryption method and ensuring the safe and efficient transmission of image contents; the method utilizes the good randomness and complexity of the chaotic system, and can effectively protect the network transmission and storage safety of the interactive image.

Disclosure of Invention

The purpose of the invention is as follows: the image encryption method based on the RNA and the pixel depth is provided aiming at the problems that most of current image encryption algorithms are not universal, cannot be applied to images with different pixel depths, cannot achieve one-image one-key and one-time one-key, and is low in safety performance.

The technical scheme of the invention is as follows: in order to realize the purpose, the technical scheme adopted is an image encryption method based on RNA and pixel depth.

The encryption steps are as follows:

step 1: and (3) key generation: let the plaintext image beI m n×Pixel depth ofdRandom selection ofx ' 0, y ' 0, z ' 0, u ' 0, v ' 0, w ' 0,μ ', e', t 'As the user key input, the initial values of the two-dimensional ILASM and the four-dimensional Chen hyperchaotic are calculated by using the key generatorx 0, y 0, z 0, u 0, v 0, w 0And control parametersμ, eAnd the number of iterations of the three-dimensional adaptive Arnold transformtAnd control parametersq 1, q 2

Step 2: chaotic sequence and matrix generation: according to the initial valuex 0, y 0And control parametersμGenerating 2 two-dimensional ILASM chaotic sequencesX m n d/××2AndY m n d/××2(ii) a According to the initial valuez 0, u 0, v 0, w 0And control parameterseGenerating 4 four-dimensional Chen hyperchaotic matrixesZ m n×, U m n×, V m n×AndW m n×

and step 3: generation of coding rules: the 8 kinds of coding and decoding of RNA are shown in figure 1 according to the initial value of chaosx 0, y 0, z 0, u 0, v 0, w 0And pixel depthdPerform certain operation generationr 1, r 2, r 3, r 4, r 5, r 6Six encoding and decoding rules;

and 4, step 4: three-dimensional RNA cube generation: using RNA coding rulesr 1To pairI m n×Coding RNA to obtainI 3DThickness pair according to one RNA codeI 3DLayering to obtain RNA layered imageI j Rj=1, 2, …, d2); using chaotic sequencesXTo pairI j Rj=1, 2, …, d/2) interlayer scrambling is performedd2 pieces of size ofm×nOf (2) planeI j 1 j=1, 2, …, d2); each plane isI j 1Converted into corresponding one-dimensional vectorsV j 1And connected end to obtain a large one-dimensional vectorV 1Using chaotic sequencesYTo pairV 1Carry out integral scrambling to obtainV 2(ii) a Will be provided withV 2Is converted intol×l×lThree-dimensional RNA cube ofI 3DC

And 5: self-adaptive stereo scrambling: to pairI 3DCScrambled RNA cuboids by three-dimensional adaptive Arnold transformationI 3DAWill be three-dimensionalI 3DAConversion to one-dimensional RNA sequencesV 3After deleting redundant zero codes, utilizer 2To pairV 3Performing RNA decoding and converting into sizem×nTwo-dimensional scrambling ofImage of a personI 2

Step 6: defining the RNA operation rule: defining the operation rules of RNA addition (+), subtraction (-), XOR (and ^) and XNOR (☉):

and 7: operator selection: respectively selectI 2Middle 4 vertices according to the coding ruler 3RNA coding is carried out on the upper six bits of the pixel value, and the operator +, -, (ii) or ☉ is selected according to the distribution condition of the coding result in the amino acid sequence generation table;

and 8: selecting a chaotic matrix: according todThe calculation result of/8 determines the selection rule and selects the chaos matrixZ, U, V, WA plurality of matrixes in (1) participate in the operation;

and step 9: selective diffusion: will scramble the imageI 2Becomes an image every 8 bitsI i 2i=1, 2, …, d/8) use ofr 4To pairI i 2i=1, 2, …, d/8) coding of RNAI i 3i=1, 2, …, d8); by usingr 5To pairZ, U, VAndWcoding RNAZ 1, U 1, V 1AndW 1then, according to the operator selected in step 7, the operator and the image are subjected to diffusion operation to obtain a layered encrypted imageI 1 e, I 2 e, I 3 eAndI 4 ewill beI 1 e, I 2 e, I 3 eAndI 4 ecombining to obtain encrypted RNA imageI e(ii) a Finally, user 6To pairI ePerforming RNA decoding to obtain ciphertext imageI c

Further, in step 1, the two-dimensional ILASM means

, (1)

Wherein the control parameterμ∈[0, 1]Value of statex i , y i ∈[0, 0.2]。

Further, in the step 1, the four-dimensional Chen hyperchaotic index

, (2)

Wherein the parameter is controlleda=35,b=3,c=12,d=7 ande∈[0.085, 0.798]when the system is in a hyperchaotic state.

Further, in step 1, in order to generate the key, the plaintext image is calculated by using SHA-256 respectivelyI m n×256 bit hash value corresponding to current system timeH 1=j 1, j 2, …, j 256AndH 2=k 1, k 2, …, k 256will beH 1AndH 2respectively taking the first 128 bits and sequentially connecting the first 128 bits into a Hash code with the length of 256 bitsH=j 1, j 2, …, j 128, k 1, k 2, …,k 128And will beHDividing into blocks according to every 8 bitsH=h 1, h 2, …, h 32

Further, in the step 1, initial values of the two-dimensional ILASM and the four-dimensional Chen hyperchaotic are calculatedx 0, y 0, z 0, u 0, v 0, w 0And control parametersμ, eAnd the number of iterations of the three-dimensional adaptive Arnold transformtAnd control parametersq 1, q 2

, (3)

, (4)

, (5)

Wherein the content of the first and second substances,mod(.) represents a modular operation,floor(.) represents a rounded-down function,bin2dec(.) indicates a binary converted decimal function, an exclusive or operation.

Further, in the step 2, according to the initial valuex 0, y 0And control parametersμIteration two-dimensional ILASM chaos 1000+m×n×d/Discarding the first 1000 iteration values to generate 2 chaotic sequencesX m n d/××2AndY m n d/××2(ii) a According to the initial valuez 0, u 0, v 0, w 0And control parameterseIteration four-dimensional Chen hyperchaotic 1000+m×nAnd discarding the first 1000 iteration values to generate 4 chaotic matrixesZ m n×, U m n×, V m n×AndW m n×

further, the six coding and decoding rules in step 3 refer to:

r 1=mod(d+floor(x 0×1014), 8)+1, (6)

r 2=mod(d+floor(y 0×1014), 8)+1, (7)

r 3=mod(d+floor(z 0×1014), 8)+1, (8)

r 4=mod(d+floor(u 0×1014), 8)+1, (9)

r 5=mod(d+floor(v 0×1014), 8)+1, (10)

r 6=mod(d+floor(w 0×1014), 8)+1 (11)。

further, in the step 4, a layer random finger is arranged: use ofsort(.) pairs of functionsXSequencing to obtain new sequenceX 'And a sequence of index valuesP 1

[X ', P 1]=sort(X(j)), j=1, 2, …, d/2, (12)

Using index valuesP 1To pairI 3DIs scrambled to obtainI j 1

I j 1=I P1(j) R, j=1, 2, …, d/2 (13)。

Further, in the step 4, the overall random finger is placed: use ofsort(.) pairs of functionsYSequencing to obtain new sequenceY 'And a sequence of index valuesP 2

[Y ', P 2]=sort(Y(k)),k=1, 2, …, m×n×d/2, (14)

The scrambled plane of each layerI j 1Converted into corresponding one-dimensional vectorsV j 1And are connected end to form a largeIs a one-dimensional vector ofV 1

V 1=V 1 1 V 2 1V j 1, (15)

Reusing index valuesP 2To pairV 1Scrambling to obtainV 2

V 2(k)=V 1(P 2(k)),k=1, 2, …, m×n×d/2, (16)

Will be provided withV 2Is converted intol×l×lThree-dimensional RNA cube ofI 3DCIf the third power can not be fully opened, zero padding is carried out at the tail until the length of the third power is matched:

, (17)

wherein the content of the first and second substances,ceil (.) represents an rounding-up function.

Further, in the step 5, the three-dimensional adaptive Arnold transformation means:

(18)。

further, in the step 8, the selection rule is: if it isdAnd 8=1, selecting the first chaotic matrixZParticipating in operation; if it isd8=2, then the first two chaotic matrixes are selectedZAndUparticipating in operation; if it isd8=3, then the first three chaotic matrices are selectedZ, UAndVparticipating in operation; if it isd8=4, then all four chaotic matrices are selectedZ, U, VAndWparticipating in operation; .

Further, in step 9, the diffusion operation means:

, (19)

whereinoperator1,operator2,operator3 andoperator4 represents one of the four operators, +, -, and ☉.

In the decryption process, the same chaotic sequence and a corresponding RNA coding mode are utilized to process the ciphertext image, the original image can be recovered, and the decryption process is the reverse process of encryption.

Has the advantages that: aiming at the problems that the current partial image encryption algorithm has no universality, cannot be applied to images with different pixel depths, cannot realize one-image one-cipher and one-time one-cipher, has low safety performance and the like, the image encryption method based on RNA and pixel depths is provided; the main contributions are: (1) in order to change the pixel position, a scrambling method suitable for different pixel depth images is constructed by combining an RNA encryption theory and a chaos theory; (2) in order to change the pixel value, a diffusion method suitable for different pixel depth images is designed by combining an RNA encryption theory, a chaos theory and a pixel depth correlation theory; (3) the method utilizes good randomness and complexity of a two-dimensional ILASM chaotic system and a four-dimensional Chen hyperchaotic system, and improves the encryption effect; therefore, the method has the characteristics of high efficiency, safety and good encryption effect, and can effectively protect the safety of network transmission and storage of the interactive images.

Drawings

FIG. 1: 8 coding/decoding rules for RNA sequences;

FIG. 2: RNA operation rules;

FIG. 3: amino acid type and operator correspondence table;

FIG. 4: amino acid codon table;

FIG. 5: a flow chart of an image encryption method based on RNA and pixel depth;

FIG. 6: a plaintext image;

FIG. 7: and (4) ciphertext images.

Detailed Description

The following detailed description of the embodiments of the present invention is provided in connection with the accompanying drawings and examples.

Fig. 5 is an encryption flow diagram of the present method.

The programming software adopted is Matlab R2016a, and 8BPP (bit Per Pixel) Lena gray scale images with the size of 512 x 512 shown in FIG. 6 are selected as experimental objects.

Step 1: respectively calculating hash values of a plaintext image and the current system time by using SHA-256H 1AndH 2(ii) a Will be provided withH 1AndH 2respectively taking the first 128 bits and integrating into 1 Hash code with the length of 256 bitsH=9390454675d1f5e55b046d30f05

a8ea1532c6b269a303ac19d3d0a906bb5e 250; and combined with selectedx ' 0=0.9865, y ' 0=1.4335, z ' 0=1.4977, u ' 0=0.5501, v ' 0=2.5159, w ' 0=1.3714, μ =1.6686, e '=0.2759, t '=2.5568 calculating initial values of two-dimensional ILASM and four-dimensional Chen hyperchaotic according to equations (3) - (5)x 0, y 0, z 0, u 0, v 0, w 0And control parametersμ, eAnd the number of iterations of the three-dimensional adaptive Arnold transformtAnd control parametersq 1, q 2

Step 2: according to the initial valuex 0, y 0And control parametersμIterating the two-dimensional ILASM chaos for 1000+512 multiplied by 4 times, discarding the first 1000 iteration values, and generating 2 chaos sequencesX, Y(ii) a According to the initial valuez 0, u 0, v 0, w 0And control parameterseIterating the four-dimensional Chen hyperchaotic 1000+512 × 512 times, discarding the first 1000 iteration values, and generating 4 chaos matrixesZ, U, V, W

And step 3: generation of coding rules: according to the initial value of chaosx 0, y 0, z 0, u 0, v 0, w 0And pixel depthd=8 generated by performing a predetermined operationr 1, r 2, r 3, r 4, r 5, r 6Six coding and decoding rules.

And 4, step 4: three-dimensional RNA cube generation: using coding rulesr 1To pairIRNA coding is carried out to obtain a three-dimensional RNA coding matrix with the size of 512 multiplied by 4I 3D(ii) a Making each layer one layer thick, using chaotic sequencesXTo pairI 3DThe interlamination can be carried out to obtain 4 planes with the size of 512 multiplied by 512I j 1j=1, 2, …, 4); each plane isI j 1Converted into corresponding one-dimensional vectorsV j 1And connected end to obtain a large one-dimensional vectorV 1Using chaotic sequencesYTo pairV 1Scrambling to obtainV 2(ii) a After zero padding, willV 2Conversion into three-dimensional RNA cubes of size 102X 102I 3DC

And 5: self-adaptive stereo scrambling: to pairI 3DCScrambled RNA cuboids by three-dimensional adaptive Arnold transformationI 3DAWill be three-dimensionalI 3DAConversion to one-dimensional RNA sequencesV 3After deleting redundant zero codes, utilizer 2To pairV 3Decoding RNA and converting into two-dimensional scrambled image with size of 512 x 512I 2

Step 6: defining the RNA operation rule: rules for RNA addition, subtraction, XOR and XNOR operations are defined.

And 7: operator selection: respectively selectI 2Middle 4 vertexes and rules the upper six bits of the pixel valuesr 3According to the distribution of the coding result in the amino acid sequence generation table, the corresponding operator is selected.

And 8: selecting a chaotic matrix: according tod/8=1, the first chaotic matrix is selectedZAnd (6) participating in operation.

And step 9: selective diffusion: will be provided withI 2Change of every 8 bitsImagingI i 2 i= 1) usingr 4Coding it with RNAI i 3(ii) a By usingr 5The chaos matrix participating in the operation is subjected to RNA coding to obtainZ 1Then, according to the operator selected in step 7, the operator and the image are subjected to corresponding diffusion operation to obtain a layered encrypted imageI 1 eI.e. encrypting RNA imagesI e(ii) a Finally, user 6To pairI eThe RNA decoding is performed to obtain a ciphertext image as shown in FIG. 7I c

According to the decryption process, the same key, the same index and the same chaos are used to decrypt the ciphertext image to obtain a decryption result, which is as shown in fig. 6.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于DSP图像编码处理的高精度图像处理系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类