Color image optical encryption method

文档序号:86370 发布日期:2021-10-08 浏览:44次 中文

阅读说明:本技术 一种彩色图像光学加密方法 (Color image optical encryption method ) 是由 吴军 王刚 沈伊人 于 2021-05-31 设计创作,主要内容包括:本发明涉及图像处理技术领域,公开了一种彩色图像光学加密方法,整体可视为两次加密操作:首次加密操作利用菲涅尔衍射将彩色图像RGB通道分量转换成一幅实值计算全息图以实现明文图像像素信息的隐藏,并通过综合设置衍射距离、参考光方向参数以调整各通道分量再现像位置来克服RGB通道分量间的信息串扰,从而确保解密过程能准确恢复出每个通道色彩分量;第二次加密操作是利用改造的Logistic混沌系统对计算全息图像素进行置换与扩散,获得一幅无意义的白噪声图像作为最终的密文图像,该次加密操作借助于混沌系统特性及扩散机理增强密文对明文变化的敏感性、增强了密文对统计攻击与唯密文攻击的抵御能力,进一步提升系统安全性。(The invention relates to the technical field of image processing, and discloses an optical encryption method for a color image, which can be regarded as twice encryption operations as a whole: the first encryption operation converts RGB channel components of a color image into a real-value calculation hologram by utilizing Fresnel diffraction so as to realize the hiding of pixel information of a plaintext image, and overcomes information crosstalk among the RGB channel components by comprehensively setting diffraction distance and reference light direction parameters to adjust the position of a reproduced image of each channel component, thereby ensuring that the color component of each channel can be accurately recovered in the decryption process; the second encryption operation is to utilize the modified Logistic chaotic system to carry out displacement and diffusion on the pixels of the computed hologram image to obtain a meaningless white noise image as a final ciphertext image, and the encryption operation enhances the sensitivity of the ciphertext to plaintext change, enhances the resistance of the ciphertext to statistical attack and ciphertext-only attack by means of the characteristics of the chaotic system and a diffusion mechanism, and further enhances the system safety.)

1. A color image optical encryption method, characterized in that the encryption process comprises the steps of:

acquiring RGB channel components of an image to be encrypted, superposing random phase noise, respectively performing Fresnel diffraction calculation on the three channel components, and superposing the three channel components after interference with reference light to obtain a corresponding gray real-value hologram;

and generating a random sequence based on the modified Logistic chaotic mapping and the key parameter thereof, and carrying out two-round encryption on the pixel value of the gray real-value hologram.

2. The color image optical encryption method of claim 1, wherein the method further comprises:

and constructing a spatial coordinate system where a holographic surface and a reconstructed image surface are located, wherein a z axis is perpendicular to the holographic surface and the reconstructed image surface, calculating the gray-scale real-value hologram by utilizing the vertical irradiation of plane waves with set wavelengths, respectively obtaining RGB three-channel component reconstructed images at three different distances, wherein the direction pointing to the central coordinate of the reconstructed image from the origin of the holographic surface coordinate is the reference light direction interfering with Fresnel diffraction of any channel component.

3. The color image optical encryption method of claim 1, wherein the method further comprises:

the RGB channel component reproduction images are regularly distributed and all fall in a first quadrant on a reconstruction image surface, wherein: the y coordinates of the centers of the R channel component reproduced image and the G channel component reproduced image are the same, and the x coordinate interval is larger than the width of the reproduced image; the x coordinate of the center of the R-channel component reproduced image is the same as that of the center of the B-channel component reproduced image, and the y coordinate interval is larger than the height of the reproduced image.

4. The optical encryption method for color images according to claim 1, wherein a random sequence is generated based on the modified Logistic chaotic mapping and key parameters thereof, and two rounds of encryption are performed on pixel values of the gray-scale real-value hologram, comprising:

iterating the Logistic chaotic mapping for multiple times, discarding iteration values for multiple times, then starting recording, reconstructing the Logistic chaotic mapping based on a set reconstruction rule, and obtaining a random sequence within the range of [0,255] after processing;

and based on the current iteration times, performing two rounds of encryption on the gray real value hologram by using a random sequence to corresponding key values to obtain an encrypted image.

5. The color image optical encryption method of claim 4, wherein two rounds of encrypting the gray-scale real-valued hologram with a random sequence on the corresponding key value based on the current iteration number to obtain an encrypted image comprises:

encrypting the first iteration, encrypting the first pixel value in the gray-scale real-value hologram by using the second bit key value in the random sequence, encrypting the pixel value corresponding to the current iteration by using the key value with the same number of bits as the current iteration until all the pixel values are encrypted, and completing the first round of encryption to obtain an intermediate image;

and based on the current iteration times, encrypting the corresponding pixel values by using the key values under the same digits corresponding to the current iteration times until all the pixel values are encrypted, and completing the second round of encryption to obtain an encrypted image.

6. The color image optical encryption method of claim 1 wherein said color image optical encryption method further comprises a decryption process comprising the steps of:

generating a random sequence by using the key parameters and the modified Logistic chaotic mapping, and performing two rounds of decryption processes on the encrypted image based on a reverse sequence form;

illuminating the decrypted computed hologram by using a light source with the same wavelength as that in the encryption process, and sequentially performing hologram reconstruction on RGB channel components by using corresponding diffraction distance keys and incidence angle keys;

and (3) normalizing the brightness of the reproduced image of each channel component, linearly amplifying the brightness to the range of [0,255] and then performing color synthesis to finish the decryption process.

Technical Field

The invention relates to the technical field of image processing, in particular to an optical encryption method for a color image.

Background

Existing color image encryption methods can be roughly divided into two categories: multi-channel encryption and single-channel encryption. The multichannel encryption is mainly based on the principle of color three primary colors, RGB channels are regarded as three sub-gray level images, and each channel component is independently processed in the encryption and decryption processes, and the method has the defects that the encryption (decryption) system is higher in implementation cost, the key storage space is increased along with the increase of the number of phase masks, and the key storage, distribution and practical application are not convenient; in addition, although the mutual independence of the encryption and decryption processes among channels increases the key space (correct plaintext information cannot be obtained as long as the decryption key on one channel is unknown), the high correlation among the RGB channels due to the strong spectral relationship forms a potential security attack "vulnerability", and the increase of the number of keys also increases the possibility of secret leakage.

Different from a multi-channel encryption process, single-channel encryption is to perform encryption and decryption processing on RGB channels coupled in different modes integrally, and the key is how to ensure that crosstalk does not occur in information when the RGB channels are coupled and information can be decomposed to obtain a lossless color plaintext image after decryption. In general, compared with a multi-channel encryption algorithm, single-channel encryption can avoid color information loss of a color image in a conversion process and can prevent security attack by utilizing RGB channel correlation; in addition, the whole processing of the real-valued matrix after the RGB channel coupling is also beneficial to reducing the complexity of an encryption system and having higher encryption and decryption speed.

The chaotic cryptography and the optical information security technology are key research directions in the field of image encryption at present, have advantages and disadvantages respectively, have attraction by combining the image encryption algorithm with better construction performance of the chaotic cryptography and the optical information security technology, and the direct relation between a plaintext and a ciphertext enables a single pixel value of the plaintext to be diffused to the whole ciphertext, so that the security can be reduced by reversely pushing a key and an intermediate value through the plaintext and the ciphertext.

Disclosure of Invention

The invention aims to provide a color image optical encryption method, which improves the safety.

In order to achieve the above object, the present invention provides an optical encryption method for color images, the encryption process comprises the following steps:

acquiring RGB channel components of an image to be encrypted, superposing random phase noise, respectively performing Fresnel diffraction calculation on the three channel components, and superposing the three channel components after interference with reference light to obtain a corresponding gray real-value hologram;

and generating a random sequence based on the modified Logistic chaotic mapping and the key parameter thereof, and carrying out two-round encryption on the pixel value of the gray real-value hologram.

Wherein the method further comprises:

and constructing a spatial coordinate system where a holographic surface and a reconstructed image surface are located, wherein a z axis is perpendicular to the holographic surface and the reconstructed image surface, calculating the gray-scale real-value hologram by utilizing the vertical irradiation of plane waves with set wavelengths, respectively obtaining RGB three-channel component reconstructed images at three different distances, wherein the direction pointing to the central coordinate of the reconstructed image from the origin of the holographic surface coordinate is the reference light direction interfering with Fresnel diffraction of any channel component.

Wherein the method further comprises:

the RGB channel component reproduction images are regularly distributed and all fall in a first quadrant on a reconstruction image surface, wherein: the y coordinates of the centers of the R channel component reproduced image and the G channel component reproduced image are the same, and the x coordinate interval is larger than the width of the reproduced image; the x coordinate of the center of the R-channel component reproduced image is the same as that of the center of the B-channel component reproduced image, and the y coordinate interval is larger than the height of the reproduced image.

Generating a random sequence based on the improved Logistic chaotic mapping and key parameters thereof, and carrying out two-round encryption on the pixel value of the gray real-value hologram, wherein the method comprises the following steps:

iterating the Logistic chaotic mapping for multiple times, discarding iteration values for multiple times, then starting recording, reconstructing the Logistic chaotic mapping based on a set reconstruction rule, and obtaining a random sequence within the range of [0,255] after processing;

and based on the current iteration times, performing two rounds of encryption on the gray real value hologram by using a random sequence to corresponding key values to obtain an encrypted image.

Based on the current iteration times, performing two rounds of encryption on the gray-scale real-value hologram by using a random sequence to corresponding key values to obtain an encrypted image, and the method comprises the following steps:

encrypting the first iteration, encrypting the first pixel value in the gray-scale real-value hologram by using the second bit key value in the random sequence, encrypting the pixel value corresponding to the current iteration by using the key value with the same number of bits as the current iteration until all the pixel values are encrypted, and completing the first round of encryption to obtain an intermediate image;

and based on the current iteration times, encrypting the corresponding pixel values by using the key values under the same digits corresponding to the current iteration times until all the pixel values are encrypted, and completing the second round of encryption to obtain an encrypted image.

The color image optical encryption method further comprises a decryption process, and the method comprises the following steps:

generating a random sequence by using the key parameters and the modified Logistic chaotic mapping, and performing two rounds of decryption processes on the encrypted image based on a reverse sequence form;

illuminating the decrypted computed hologram by using a light source with the same wavelength as that in the encryption process, and sequentially performing hologram reconstruction on RGB channel components by using corresponding diffraction distance keys and incidence angle keys;

and (3) normalizing the brightness of the reproduced image of each channel component, linearly amplifying the brightness to the range of [0,255] and then performing color synthesis to finish the decryption process.

The invention relates to a color image optical encryption method, which can be integrally regarded as twice encryption operations: the first encryption operation converts RGB channel components of a color image into a real-value calculation hologram by utilizing Fresnel diffraction so as to realize the hiding of pixel information of a plaintext image, overcomes information crosstalk among the RGB channel components by comprehensively setting diffraction distance, reference light direction parameters and reproduction image positions of the channel components, and realizes spatial domain overlapping and frequency domain separation of RGB three channels, thereby ensuring that the color components of each channel can be accurately recovered in the decryption process; the second encryption operation is to utilize the modified Logistic chaotic system to carry out displacement and diffusion on the pixels of the computed hologram image to obtain a meaningless white noise image as a final ciphertext image, and the encryption operation enhances the sensitivity of the ciphertext to plaintext change and enhances the resistance of the ciphertext to statistical attack and ciphertext-only attack by means of the characteristics of the chaotic system and the diffusion mechanismAnd the system safety is further improved. Simulation experiments and safety analysis results aiming at color images show that besides a traditional chaotic system key, the algorithm of the application increases a key space (about 10) by taking the Fresnel diffraction distance, the reference light wavelength and the incidence angle direction cosine as key keys249) And has a smaller key volume; the decrypted image has high fidelity and the evaluation indexes such as the correlation of adjacent pixels, the information entropy, the pixel number change rate, the normalized change strength and the like are close to ideal values; the histogram of the ciphertext image is flat, the gray level distribution is uniform, the gray level and the color information of the original color image are completely hidden, the method has generality and confusion in the transmission and storage processes, and has important application value in the field of information security.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a flowchart of an encryption step of an optical encryption method for color images according to the present invention.

Fig. 2 is an encryption flow chart of an optical encryption method for color images provided by the present invention.

Fig. 3 is a flowchart of the decryption step of the optical color image encryption method provided by the present invention.

Fig. 4 is a decryption flow chart of the optical encryption method for color images provided by the invention.

FIG. 5 is a schematic diagram of a simulated optical path for color image computed hologram generation provided by the present invention.

FIG. 6 is a schematic diagram of the reconstruction optical path and parameter setting of the color image calculation hologram provided by the present invention.

FIG. 7 is a schematic diagram of the distribution of RGB channels of a color image on a hologram reconstruction image plane provided by the present invention.

FIG. 8 is a schematic diagram of the reconstruction of RGB channel components of a computed hologram under reference light of different incident angles and the color synthesis thereof provided by the present invention.

FIG. 9 is a schematic diagram showing the comparison of random sequences generated before and after Logistic transformation provided by the present invention.

FIG. 10 is a schematic diagram of the encryption and decryption results of the Lena test image and the text method provided by the present invention.

FIG. 11 shows the correlation between adjacent pixels before and after the encryption of the Lena image provided by the present invention.

Fig. 12 is a histogram of Lena images before and after encryption provided by the present invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.

In the description of the present invention, it is to be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Further, in the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.

Referring to fig. 1 and fig. 2, the present invention provides an optical encryption method for color images, the encryption process includes the following steps:

s101, acquiring RGB channel components of an image to be encrypted, superposing random phase noise, respectively performing Fresnel diffraction calculation on the three channel components, and superposing the three channel components after interference with reference light to obtain a corresponding gray real-value hologram.

Specifically, given a color image to be encrypted, the process of generating a computer generated hologram is shown in fig. 1, first extracting RGB channel components as three grayscale images and placing them on an input surface, then superimposing random phase noise psi to make the initial field amplitude proportional to the image grayscale, and then respectively obtaining Z distances through the distanceR、ZG、ZBReaches the output surface and finally reaches the output surface respectively at an incidence angle thetaR、θG、θBThe reference light having a wavelength λ interferes. The whole process can be expressed as:

O'R(u,v)=FrT[OR(x,y)ψ(x,y),ZR,λ]+RR(u,v) (1-1)

O'G(u,v)=FrT[OG(x,y)ψ(x,y),ZG,λ]+RG(u,v) (1-2)

O'B(u,v)=FrT[OB(x,y)ψ(x,y),ZB,λ]+RB(u,v) (1-3)

wherein, FrT [. Z, λ]Fresnel diffraction with a distance Z and a wavelength λ; o isR(x,y),OG(x, y) and OB(x, y) are color image three-channel components; ψ (x, y) is random phase noise; rR(u,v),RG(u, v) and RB(u, v) represents incident angles of θR、θG、θBComplex amplitude of reference light of wavelength λ; o's'R(u,v),O’G(u, v) and O'B(u, v) is the interference complex amplitude after the color image three-channel component modulation, and the intensity distribution of the hologram after superposition on the output surface is as follows:

E=ER+EG+EB (2)

ER=O'R(u,v)×O'R *(u,v),EG=O'G(u,v)×O'G *(u,v),EB=O'B(u,v)×O'B *(u,v)

wherein, O'R(u, v) represents conjugate light of O' (u, v), E is amplitude type (real value) calculation hologram generated after Fresnel diffraction of color image to be encryptedThe hologram completely hides the color and gray scale information of the original color image. FIG. 5 is a simulated reference light modulation system for color image computed hologram generation.

In the generation of the hologram, it is necessary to consider how to correctly restore the RGB channel components (reconstructed images) and automatically perform color synthesis, and here, information crosstalk between the RGB channel components is overcome by comprehensively setting the diffraction distance, the reference light direction parameter, and the reconstructed image position of each channel component. The spatial coordinate system of the defined holographic surface and the reconstructed image surface is shown in FIG. 6, the Z-axis is perpendicular to the holographic surface and the reconstructed image surface, the planar wave with the wavelength of lambda is used for vertical irradiation to calculate the hologram E, and the distance Z isR、ZG、ZBThe reproduced image of RGB three-channel components can be obtained respectively, the direction from the holographic surface coordinate origin to the center coordinate of the reproduced image is the reference light direction interfering with Fresnel diffraction of a certain channel component, and the reference light is transmitted according to the following cosine directions:

wherein (x)0,y0) Representing the centre coordinates, z, of a reproduction of a certain RGB channel component0The units are mm for the reproduction distance; and (cos alpha, cos beta, cos gamma) is the cosine of the included angle between the reference light direction and the spatial coordinate axis of the holographic surface. Therefore, is in (x)0,y0) And z0Under a known condition, the cosine of an included angle between the direction of the reference light and the spatial coordinate axis of the holographic surface can be given according to the formula (3), and the included angle gamma corresponding to the direction cosine cos gamma is the incident angle theta of the reference light.

The research result of the application shows that mutual information crosstalk can be effectively avoided when the RGB channel component reconstructed images on the reconstructed image plane do not overlap, and meanwhile, in consideration of conjugate images and zero-order diffraction during hologram reconstruction, the RGB channel component reconstructed images are required to be regularly distributed and all fall in a first quadrant on the reconstructed image plane as shown in fig. 7, wherein: the y coordinates of the centers of the R channel component reproduced image and the G channel component reproduced image are the same, and the x coordinate interval is larger than the width of the reproduced image; center of R-channel component reproduced image and B-channel component reproduced imageThe x-coordinates are the same and the y-coordinate spacing is greater than the reproduced image height. Further, given any RGB channel component reproduction image center coordinates (x)0,y0) Reference light wavelength λ and reproduction distance z0Then, the position (range) of the channel component reconstructed image on the reconstructed image plane is calculated as follows:

let the number of holographic surface pixels be M1×N1Physical width of pixel pix(mm), the reconstruction magnification is 1, the reference light wavelength is lambda, and the size L of the reconstructed image (object) surface1x、L1yRespectively as follows:

let the size of the color plaintext image be M0×N0Pixel, the length L of the reconstructed image on the reconstructed image plane0xWidth L of0yRespectively as follows:

therefore, the lateral range of any RGB channel component reproduction image on the reconstruction image surface is as follows:the longitudinal extent is:wherein p isix、L1x、L1y、L0x、L0yThe units are mm. Further, let the RGB channel component reproduction image center coordinates be (x) respectivelyR,yR),(xG,yG) And (x)B,yB) Reproduction image size of L0x×L0yThe size of the first quadrant of the object plane isThe image position settings are reproduced from the RGB channel components on the reconstructed image plane in FIG. 7, and the channel components are againThe central coordinate, the breadth size and the reconstruction image surface range of the existing image meet the following constraint conditions:

x-coordinate distance D between R channel and G channel reproduced image centerRG:DRG=xG-xR>L0x

R channel and B channel reproduction image center y coordinate distance DRB:DRB=yB-yR>L0y

The RGB channel component reproduction images are all located in a first quadrant of a reconstruction image surface and are provided with:

2xG+L0x<L1x,2yB+L0y<L1y;2xR>L0x,2yR>L0y

the RGB channel components can be automatically extracted from the reconstructed image plane according to the above reconstructed image coordinate range (position). Generally, the brightness of the RGB channel component reproduction image has different degrees of linear scaling when the hologram is reproduced due to the change of the diffraction distance, and the color difference between the decrypted image and the plaintext image can be eliminated by normalizing the brightness of each channel component reproduction image and linearly amplifying the brightness to the range of [0,255] before the color image is synthesized. Fig. 8 shows RGB channel component reconstructed image results of Lena fresnel diffraction holograms of online images and color synthesis effects thereof, in which (a) R channel reconstructed image extraction (B) G channel reconstructed image extraction (c) B channel reconstructed image extraction (d) synthesized color images; the successful separation of RGB channel components is realized, and the assumption that the algorithm of the application realizes the spatial domain superposition and the frequency domain separation of color images by utilizing optical Fresnel diffraction is verified.

S102, generating a random sequence based on the improved Logistic chaotic mapping and the key parameter thereof, and carrying out two-round encryption on the pixel value of the gray-scale real-value hologram.

Specifically, the chaotic system can generate a plurality of reproducible chaotic sequences, and the generated chaotic sequences are in non-correlation and noise-like random uniform distribution and are widely applied to the field of information security. The Logistic mapping is one of chaos mappings commonly used for image encryption, a random sequence is generated by utilizing a one-dimensional nonlinear chaos function Logistic mapping, and the Logistic mapping is defined as follows:

xn+1=μ×xn×(1-xn) (5)

in the formula: x is the number ofn∈[0,1]Is a random iteration value when the parameter mu is equal to [3.5699456,4 ∈]In time, Logistic mapping works in a chaotic state. Parameters mu, x0The small change of the key generates different random iteration values to form a non-periodic and non-convergent chaotic sequence, in order to eliminate the harmful effect brought by the transient process and enhance the sensitivity of an initial key, the Logistic mapping is iterated for N times, the previous iteration values are abandoned for N times and then the recording is started, and the random sequence directly generated by the one-dimensional Logistic mapping is transformed according to the following formula and is subjected to certain treatment to obtain [0,255] considering that singular points exist and the distribution is not uniform enough]Random sequence R within rangeseqReplacement and diffusion of hologram pixels:

Rseq[i]=mod((X[i]-floor(X[i]))×10000,256) (6)

wherein R isseq[i]Denotes the reconstructed random sequence, X [ i ]]Representing a random sequence generated directly from a one-dimensional Logistic chaotic map. Fig. 9 shows a schematic comparison of random sequences generated before and after Logistic transformation, where fig. 9(a) is a random sequence value obtained by Logistic mapping iteration, and the random sequence value has singular points and is not uniformly distributed; fig. 9(b) is a modified random sequence, which eliminates singular points and distribution defects of the original chaotic sequence.

Let m-row and n-column matrixes represent the hologram P, the intermediate ciphertext image C and the final ciphertext image D, and the pixel values are arranged in the progressive scanning order, i.e., { P [ i ] }, { C [ i ] }, { D [ i ] }, where i ═ 1, 2. The first round of encryption operation can be described by steps 1 to 3:

step 1i is 1; using the 2 nd key value R of the key sequenceseq[2]For the 1 st pixel P [1] of the hologram P]Generating an intermediate value using equation (7-1) and then using the 1 st key value R of the key sequenceseq[1]The following encryption operation is performed.

ttemp1=mod((P[1]+Rseq[2]),256),C[1]=bitxor(Rseq[1],ttemp1) (7-1)

Step 2i ═ i + 1; an intermediate value is generated and an encryption operation is performed on the ith pixel P [ i ] of the plaintext image by using equation (7-2).

ttemp1=mod((P[i]+Rseq[i+1]),256),ttemp2=mod((Rseq[i]+C[i-1]),256)

C[i]=bitxor(ttemp1,ttemp2) (7-2)

Step 3 repeats step 2 until i ═ m × n, and the first round of encryption operation is completed. In the above formula, bitxor (x, y) performs bit exclusive or operation on x and y according to binary values of x and y; mod (x, y) is a modulo operation; t is ttempIs the median value of this step, ttemp∈[0,255];P[i]、C[i]Respectively, the value of the ith pixel of the original image and the intermediate encrypted image.

The second round of encryption operation is described by steps 4 to 6:

step 4i is 1; and generating an intermediate value for the 1 st pixel C1 of the intermediate ciphertext image by adopting an equation (8-1) and carrying out encryption operation.

ttemp1=mod((C[1]+Rseq[2]),256),ttemp2=mod((Rseq[1]+C[m×n]),256)

D[1]=bitxor(ttemp1,ttemp2) (8-1)

Step 5i ═ i + 1; and generating an intermediate value for the ith pixel Ci of the intermediate ciphertext image by adopting an equation (8-2) and carrying out encryption operation.

ttemp1=mod((C[i]+Rseq[i+1]),256),ttemp2=mod((Rseq[i]+D[i-1]),256),

D[i]=bitxor(ttemp1,ttemp2) (8-2)

Step 6 repeats step 5 until i is m × n, resulting in the final ciphertext image. Where Ci and Di are the values of the ith pixel in the intermediate and final ciphertext images, respectively.

From the above mentioned encryption formula, since there is no direct connection between D [ i ] and P [ i ] in the 2 nd round of encryption operation, X [ i ] can not be deduced reversely depending on the formulas (7) and (8), it is difficult for attacker to break the key sequence from the special plaintext, ciphertext pair < P [ i ], D [ i ] > and so on; in addition, in each round of encryption operation, the simple XOR operation relationship between the ciphertext, the plaintext (or the intermediate ciphertext) and the key is not included, and the nonlinear modular operation is also included, so that the encryption algorithm can resist the attack of selecting the plaintext.

As can be seen from the above algorithm principle, the color image encryption key of the present application includes two parts: a) optical key, diffraction distance (Z) for RGB three-channel componentR,ZG,ZB) Three sets of directional cosines (cos α, cos β, cos γ) of the reference light wavelength λ and the reference light incident angle; b) chaotic system key, mapping parameter x for Logistic0Mu, N. Because the chaotic system can generate completely different random iteration values when the parameters slightly change, the encryption system has high key sensitivity and small volume, and simultaneously, the Fresnel diffraction distance, the reference light wavelength and the incidence angle direction cosine are used as key keys to increase the key space, thereby further improving the system safety. Besides the above key features, the color image encryption technology advantages of the present application in combination with optics and chaotic cryptography are also embodied in:

the inherent information diffusion and hiding capability of the optical process is utilized to make up the defects of strong linear relation between the plain text and the cipher text after pixel replacement and diffusion and weak capability of resisting attack of selecting the plain text in the traditional image chaotic encryption. The color image calculation hologram (plaintext) generated by Fresnel diffraction has no direct pixel corresponding relation with the ciphertext, and the pixel value distribution has no obvious texture characteristic and has certain puzzlement;

the hologram is encrypted into a meaningless white noise image by the replacement and diffusion of the pixel value of the hologram by the chaotic system, so that the resistance of a ciphertext to statistical attack and ciphertext-only attack is enhanced, and the safety is further improved. In addition, nonlinear operation adopted by chaotic encryption is also beneficial to resisting attack of selecting plaintext, and the diffusion mechanism enhances the sensitivity of ciphertext to plaintext change, so that the chaotic encryption has the function of one-time pad.

Referring to fig. 3 and 4, the present invention further provides a decryption process, including the following steps:

s201, generating a random sequence by using key parameters and the modified Logistic chaotic mapping, and performing two rounds of decryption processes on the encrypted image based on a reverse order form.

Specifically, the decryption process and the encryption process are inverse processes to each other, specifically:

pixel scrambling and diffusion decryption. First using a key parameter (x)0Mu, N) and the modified Logistic chaotic map to generate a random sequence Rseq. Let the decrypted image be represented by a matrix P ' whose pixel values are arranged in progressive order in the form { P ' [ i ' [ I ]]I ═ 1, 2., mxn }, the order of pixel operations targeted at decryption is in reverse order (i.e., starting with the last pixel and looping to the 1 st pixel in turn). The two rounds of decryption operation consist of 8 steps, and the first round of decryption operation is described by the following steps 1 to 4:

step 1i ═ m × n.

And 2, generating an intermediate value for the ith pixel D [ i ] of the ciphertext image by adopting an equation (9-1) and decrypting the intermediate value.

ttemp1=mod((Rseq[i]+D[i-1]),256),ttemp2=mod((Rseq[i]+D[i-1]),256)

C[i]=mod(ttemp2+256-Rseq[i+1],256) (9-1)

Step 3 i-1, judging a new i value: if i > 1, performing step 2; otherwise, step 4 is executed.

And 4, generating an intermediate value for the 1 st pixel D [1] of the ciphertext image by adopting a formula (9-2) and performing decryption operation to finish the first round of decryption.

ttemp1=mod((Rseq[1]+D[m×n]),256),ttemp2=bitxor(D[1],ttemp1)

C[1]=mod(ttemp2+256-Rseq[2],256) (9-2)

The second round of decryption operation consists of the following steps 5 to 8.

Step 5i ═ m × n.

And 6, respectively generating intermediate values for the ith pixel C [ i ] of the intermediate ciphertext image by adopting an equation (10-1) and decrypting:

ttemp1=mod((Rseq[i]+C[i-1]),256),ttemp2=bitxor(C[i],ttemp1)

P'[i]=mod(ttemp2+256-Rseq[i+1],256) (10-1)

step 7 i-1, judging a new i value: if i > 1, performing step 6; otherwise, step 8 is performed.

And 8, generating an intermediate value for the 1 st pixel C1 of the intermediate ciphertext image by adopting a formula (10-2), decrypting and finishing decryption to obtain a decrypted hologram.

ttemp2=bitxor(C[1],Rseq[1]),

P'[1]=mod(ttemp2+256-Rseq[2],256) (10-2)

S202, illuminating the decrypted computed hologram by using a light source with the same wavelength as that in the encryption process, and sequentially performing hologram reconstruction on RGB channel components by using corresponding diffraction distance keys and incidence angle keys.

Specifically, the hologram is reproduced (decrypted). And (3) using a light source with the same wavelength as the encryption process to irradiate and decrypt the obtained computed hologram, sequentially performing hologram reconstruction on the RGB channel components by using corresponding diffraction distance keys and incidence angle (direction cosine) keys, and computing the central coordinates and the range of the reconstructed image of the corresponding channel components on a reconstructed image plane according to the formulas (3) to (4).

S203, normalizing the brightness of the reproduced image of each channel component, linearly amplifying to the range of [0,255] and then performing color synthesis to finish the decryption process.

Specifically, the RGB channel reproduction image is automatically extracted and a color image is synthesized. The brightness of the reproduced image is linearly changed due to the change of the diffraction distance, and the brightness of the reproduced image of each channel component is subjected to normalization processing, then linearly amplified to the range of [0,255] and subjected to color synthesis, so that the color difference between the decrypted image and the plaintext image is eliminated.

In order to verify the effectiveness and feasibility of the algorithm, the system simulation is carried out by adopting MATLAB2014a, an online Lena color image is selected as a test (plaintext) image, and the key parameter settings are listed in Table 1, wherein: the diffraction distance Z is in mm and the reference light wavelength λ is in nm, whichThe complementary parameters are dimensionless, the cosine of the reference light direction (cos alpha, cos beta, cos gamma) combines the diffraction distance Z and the set RGB channel component reproduction image center coordinate (x)0,y0) It is given. Fig. 10 shows the encryption and decryption results of the method of the present application for the test image, where: (a) the image is a plaintext image, (b) is a ciphertext image, (c) is a hologram decrypted from the ciphertext image, and (d) is a color decrypted image synthesized by extracting RGB channel components from a hologram reproduction image. As can be seen from fig. 10, the ciphertext image obtained by the encryption algorithm is disordered, fine and non-textured, so that an attacker is difficult to obtain plaintext information from the ciphertext image, the decrypted image is highly consistent with the plaintext image, and the effectiveness of the algorithm is proved and the algorithm is lossless.

Table 1 image encryption parameter settings

In order to objectively evaluate the performance of the algorithm, the application calculates the correlation coefficient C between the ciphertext image and the original image and between the decrypted image and the original imageCAs evaluation criteria:

wherein: n is a pixel pair (x)i,yi) The total number of (c);andare respectively xiAnd yiAverage value of (a).

Table 2 shows the correlation coefficients of the ciphertext and the plaintext image (converted into the gray image), and table 3 shows the correlation coefficients between the decrypted image and the corresponding RGB channel components of the plaintext image and the correlation coefficients after the color image is converted into the gray image. As can be seen from table 2, the correlation coefficient between the ciphertext image and the original image is close to 0, and the two are almost uncorrelated statisticallyThe method has the advantages that the encryption effect is good, and plaintext information is completely hidden; as can be seen from Table 3, the correlation coefficient C between the decrypted image and the plaintext imageCAnd the similarity is close to 1, which shows that the two are highly similar, namely the decrypted image has good restoration effect. Table 3 lists the correlation coefficient between the decrypted image and the corresponding RGB channel component of the plaintext image in the algorithm, and it can be seen that the method has good decrypted image restoration effect and almost no damage.

TABLE 2 statistics of correlation coefficients for ciphertext images and plaintext images

TABLE 3 statistics of correlation coefficients for decrypted images and plaintext images

And (4) analyzing a key space. The key space is used for measuring the security performance of the encryption algorithm, and the space size of the key space influences the security of the encrypted information. In the algorithm of the present application, the key space is composed of 16 parameters in total, wherein: mu is in the range of [3.5699456, 4%];x0The value range of (1) is (0); the value range of each cosine value of the three groups (cos alpha, cos beta and cos gamma) is [0, 1%];ZR、ZG、ZBThe value range is (— infinity, + ∞); the value ranges of N and lambda are (0, infinity); precision of floating point number 10-14Then, the key space of the algorithm of the present application is: 0.4301X 1014×1014×103×3×14×23×64×22×63=2.2967e+249≈10249. Generally, a higher security level can be obtained when the key space is more than or equal to 2100 ≈ 1030, so the algorithm can well resist exhaustive attacks.

And (5) carrying out plaintext sensitivity analysis. Plaintext sensitivity means that when a new ciphertext image with a small change is different from the original ciphertext image, the pixel number change rate (N) is usually usedPCR) And normalizing the change intensity (U)ACI)To measure, respectively represent randomly changing plaintext diagramThe percentage of the ciphertext image pixel value after a certain pixel value of the image changes and the degree of the change. Assuming that a plaintext image only changes a certain pixel value, the ciphertext images before and after the change are respectively E1(i, j) and E2(i, j), then NPCRAnd UACIThe calculation formula is as follows:

in the formula: when E is1(i,j)=E2And (i, j) F (i, j) is 0, and the other F (i, j) is 1. Table 4 shows N of the algorithm of the present applicationPCRAnd UACIThe values, which are close to their theoretical values (99.6094% and 33.4635%), indicate that the algorithm of the present application has strong plaintext sensitivity.

TABLE 4 encryption algorithm Pixel number Change Rate NPCR and normalized Change Strength UACI statistics

And (5) analyzing the correlation of adjacent pixels. An ideal encryption system should be robust to statistical attacks. In general, the correlation between adjacent pixels of the plaintext image is close to 1, and after the ideal encryption processing, the correlation between adjacent pixels of the ciphertext image should be low and tends to 0. Here, 10000 pixels are randomly selected from the plaintext image and the ciphertext image, respectively, and correlation coefficients of adjacent (horizontal, vertical, and diagonal directions) pixels thereof are calculated, tables 5 and 6 respectively give statistical results of the correlation coefficients, fig. 11 is a distribution of pixel values of adjacent pixels of the plaintext image, the hologram, and the ciphertext image, and points in the drawing respectively take pixel values of adjacent two points as an abscissa and an ordinate. (a) The original image R channel is transverse; (b) the R channel of the original image is longitudinal; (c) the R channel diagonal direction of the original image; (d) the original image G channel is transverse; (e) the G channel of the original image is longitudinal; (f) the G channel diagonal direction of the original image; (g) the channel B of the original image is transverse; (h) the channel B of the original image is longitudinal; (i) the channel B of the original image is in the diagonal direction; (j) the hologram is horizontal; (k) the hologram is longitudinal; (l) The hologram diagonal direction; (m) the ciphertext image landscape; (n) ciphertext image portrait; (o) the ciphertext image has an angular orientation.

From the results of tables 5 and 6, the correlation between adjacent pixels of the plaintext image in the horizontal, vertical and diagonal directions is high; although the distribution of the correlation among the adjacent pixels of the hologram after the first round of encryption is improved to a certain extent, the distribution is still not uniform enough, especially the correlation coefficient of the adjacent pixels in the diagonal direction is high, but the ciphertext image obtained after the second round of encryption has almost no correlation among the adjacent pixels in the horizontal direction, the vertical direction and the diagonal direction, which shows that the method provided by the application has strong resistance to statistical attack, and the necessity and the effectiveness of the second round of encryption by using a random key sequence generated by a chaotic system are also proved from the side.

TABLE 5 ciphertext image Adjacent Pixel correlation coefficient comparison

TABLE 6 statistics of correlation coefficients for neighboring pixels of plaintext images and holograms

And (5) information entropy analysis. Information entropy is an important metric that reflects information randomness and unpredictability. Assuming s represents an information source, the information entropy H of s can be calculated by the following formula:

wherein: p(s)i) The symbol siThe probability of occurrence, 2n, is the total number of states of the information source s. For a random source capable of sending 2n symbols, the information entropy is n, so that the ideal information entropy of a 256-level gray level image should be 8, and if a ciphertext image has an information entropy close to 8, the ciphertext image is close to random distribution. Watch (A)The information entropy of the ciphertext image and the hologram after the first round of encryption is given by 7, wherein the information entropy of the hologram is about 6.4, which shows that the probability distribution of the algorithm after the first round of encryption of the hologram is not uniform enough, and after the second round of encryption, the pixel distribution of the ciphertext image is further more random, so that the information entropy of the ciphertext image is very close to 8, and the algorithm has extremely high randomness, and the necessity and effectiveness of the second round of encryption are proved from the side.

TABLE 7 entropy statistics of ciphertext image information

And (5) analyzing a statistical histogram. To resist statistical attacks, the histogram of the ciphertext image must be flat and uniform and quite different from the histogram of the plaintext image. FIG. 12 is a histogram illustration of a plaintext image, a hologram, and a ciphertext image according to the method of the present application, (a) an original image R channel; (b) an original image G channel; (c) an original image B channel; (d) hologram (e) ciphertext image; it can be seen from the graph that each gray level histogram of the plaintext image has a certain statistical characteristic with a large fluctuation and a large change, although the color image is encrypted into the gray level hologram through the first round of encryption, the gray level distribution of the hologram still has an obvious and regular statistical characteristic, after the second round of encryption, the gray level histogram of the ciphertext image is evenly distributed and almost equal in height and is similar to a plane, the effectiveness of chaotic encryption is proved again, namely the occurrence probability of each gray level pixel in the ciphertext image is basically the same and does not have the statistical characteristic, and the encryption algorithm has a strong hiding effect on plaintext information. In general, the results of pixel statistical analysis in the above two rounds of decryption processes are combined to show that the first round of encryption realizes single-channel encryption of a color image by using an optical means, the second round of encryption improves the inherent limitations of the optical encryption technology and further enhances the safety performance of the algorithm, and the two rounds of encryption form complementation and inseparability for the whole algorithm.

While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于聚类分析的Web违规操作行为检测方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类