CN109660695B - Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping - Google Patents
Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping Download PDFInfo
- Publication number
- CN109660695B CN109660695B CN201811488743.2A CN201811488743A CN109660695B CN 109660695 B CN109660695 B CN 109660695B CN 201811488743 A CN201811488743 A CN 201811488743A CN 109660695 B CN109660695 B CN 109660695B
- Authority
- CN
- China
- Prior art keywords
- sequence
- image
- chaotic
- plaintext
- fitness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 230000000739 chaotic effect Effects 0.000 title claims abstract 31
- 238000000034 method Methods 0.000 title claims abstract 14
- 238000002922 simulated annealing Methods 0.000 title claims abstract 12
- 230000002068 genetic effect Effects 0.000 title claims abstract 8
- 238000013507 mapping Methods 0.000 title claims abstract 8
- 230000035772 mutation Effects 0.000 claims abstract 7
- 238000013139 quantization Methods 0.000 claims 3
- 239000013598 vector Substances 0.000 claims 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 claims 1
- 238000000137 annealing Methods 0.000 claims 1
- 238000000354 decomposition reaction Methods 0.000 claims 1
- 230000002452 interceptive effect Effects 0.000 claims 1
- 239000011159 matrix material Substances 0.000 claims 1
- 238000004088 simulation Methods 0.000 claims 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/008—Artificial life, i.e. computing arrangements simulating life based on physical entities controlled by simulated intelligence so as to replicate intelligent life forms, e.g. based on robots replicating pets or humans in their appearance or behaviour
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/001—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0863—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Robotics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Power Engineering (AREA)
- Multimedia (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
技术领域technical field
本发明涉及图像加密技术领域,具体是一种基于遗传模拟退火算法和混沌映射的彩色图像加密方法。The invention relates to the technical field of image encryption, in particular to a color image encryption method based on a genetic simulated annealing algorithm and chaotic mapping.
背景技术Background technique
图像加密技术不仅能够增强图像信息传输的安全性和可靠性,还可以提高图像的抗攻击能力,确保重要的图像信息更加安全地传输。然而,由于图像相邻像素具有高度相关性,使得针对常规文本设计的传统加密算法(如AES和DES等)并不适用于图像加密。此外,由于混沌系统具有复杂非线性动力学性能,其拥有良好的伪随机特性、轨道的不可预测性以及对初始状态和控制参数极端敏感等特性,因此混沌系统适用于图像加密。Image encryption technology can not only enhance the security and reliability of image information transmission, but also improve the image's anti-attack ability to ensure more secure transmission of important image information. However, the traditional encryption algorithms (such as AES and DES, etc.) designed for regular text are not suitable for image encryption due to the high correlation between adjacent pixels in the image. In addition, chaotic systems are suitable for image encryption due to their complex nonlinear dynamics, good pseudo-random properties, unpredictability of orbits, and extreme sensitivity to initial states and control parameters.
在基于混沌系统的图像加密算法中,“置乱-扩散”的图像加密框架被广泛运用。其中,置乱操作可以改变像素的位置,扩散操作可以改变像素的灰度值。然而,单纯的置乱或扩散操作存在安全性低,易被单独攻击等问题。In the image encryption algorithm based on chaotic system, the "scrambling-diffusion" image encryption framework is widely used. Among them, the scrambling operation can change the position of the pixel, and the diffusion operation can change the gray value of the pixel. However, simple scrambling or diffusion operations have problems such as low security and easy to be attacked alone.
发明内容SUMMARY OF THE INVENTION
本发明的目的是针对现有技术的不足,而提供一种基于遗传模拟退火算法和混沌映射的彩色图像加密方法。这种方法能增强图像信息的安全性,提高加密处理的效率,能增强图像的鲁棒性,这种方法安全性高,可以抵抗常见图像攻击。The purpose of the present invention is to provide a color image encryption method based on genetic simulated annealing algorithm and chaotic mapping, aiming at the deficiencies of the prior art. This method can enhance the security of image information, improve the efficiency of encryption processing, and enhance the robustness of images. This method has high security and can resist common image attacks.
实现本发明目的的技术方案是:The technical scheme that realizes the object of the present invention is:
一种基于遗传模拟退火算法和混沌映射的彩色图像加密方法,与现有技术不同处在于,包括如下步骤:A color image encryption method based on genetic simulated annealing algorithm and chaotic mapping, which is different from the prior art in that it includes the following steps:
1)生成整数序列:将明文图像I作为MD5哈希的输入生成与明文相关的密钥,并作为混沌系统的初始值,依据混沌系统初始值迭代生成混沌序列并对其执行量化操作,生成六条整数混沌序列X1、Y1、Z1、X2、Y2和Z2;1) Generate an integer sequence: take the plaintext image I as the input of the MD5 hash to generate a key related to the plaintext, and as the initial value of the chaotic system, iteratively generate the chaotic sequence according to the initial value of the chaotic system and perform quantization operations on it to generate six an integer chaotic sequence X 1 , Y 1 , Z 1 , X 2 , Y 2 and Z 2 ;
2)对明文图像I中的R、G、B三层进行选择和交叉操作:对步骤1)得到的整数序列X1、Y1、Z1和明文图像I中的R、G、B三层进行二进制位平面分解产生8个位平面并重新组成一维向量,生成混沌二进制位序列,然后设置混沌二进制序列为掩码,通过掩码中“0”和“1”来选择和交叉明文图像,最后再将选择和交叉操作后的二进制图像序列恢复到像素级,生成交叉序列;2) Select and cross the three layers of R, G, and B in the plaintext image I: perform the integer sequence X 1 , Y 1 , Z 1 obtained in step 1) and the three layers of R, G, and B in the plaintext image I Perform binary bit plane decomposition to generate 8 bit planes and reconstitute a one-dimensional vector to generate a chaotic binary bit sequence, then set the chaotic binary sequence as a mask, and select and cross the plaintext image by "0" and "1" in the mask, Finally, restore the binary image sequence after selection and cross operation to the pixel level to generate a cross sequence;
3)对交叉序列各层执行基于模拟退火算法的置乱操作:设明文图像I的长和宽分别为M和N,首先对步骤1)生成的三条整数混沌序列X2、Y2和Z2相互进行减法操作得到大小为M×N的目标函数序列L1、L2和L3,然后判断目标函数序列:如果L1(t)≥0,则最优解其中t为每个目标函数序列的索引,并且1≤t≤M×N;否则计算当前目标函数序列L1、L2和L3的阈值Pc和概率Pt,如果Pc≥Pt,则最优解否则计算最优解同理,最优解和可以由判断L2(t)与L3(t)获得,根据最优序列和对交叉序列I”R、I”G和I”B执行列置乱操作,得到置乱序列;3) Perform the scramble operation based on simulated annealing algorithm on each layer of the cross sequence: set the length and width of the plaintext image I to be M and N respectively, firstly perform the three integer chaotic sequences X 2 , Y 2 and Z 2 generated in step 1). Subtract each other to obtain the objective function sequence L 1 , L 2 and L 3 of size M×N, and then judge the objective function sequence: if L 1 (t)≥0, then the optimal solution where t is the index of each objective function sequence, and 1≤t≤M×N; otherwise, the threshold P c and probability P t of the current objective function sequence L 1 , L 2 and L 3 are calculated, if P c ≥ P t , the optimal solution Otherwise calculate the optimal solution Similarly, the optimal solution and It can be obtained by judging L 2 (t) and L 3 (t), according to the optimal sequence and Perform a column scrambling operation on the cross sequence I" R , I" G and I" B to obtain a scrambling sequence;
4)判断是否执行变异操作:计算明文图像I和置乱图像各层的适应度,并通过明文图像I和置乱图像的适应度来判断是否执行变异操作,如果明文图像I的适应度大于置乱图像的适应度,则重新选择参数生成混沌序列并重新执行选择、交叉和置乱操作;否则根据置乱图像的适应度计算混沌系统的初始值并迭代混沌系统获得混沌序列,并对混沌系统进行量化处理得到整数序列;4) Determine whether to perform mutation operation: calculate the fitness of each layer of plaintext image I and scrambled image, and judge whether to perform mutation operation by the fitness of plaintext image I and scrambled image, if the fitness of plaintext image I is greater than If the fitness of the chaotic image is determined, the parameters are reselected to generate the chaotic sequence and the selection, crossover and scrambling operations are performed again; otherwise, the initial value of the chaotic system is calculated according to the fitness of the scrambled image, and the chaotic system is iterated to obtain the chaotic sequence, and the chaotic system is Perform quantization processing to obtain an integer sequence;
5)获得最终加密图像E:将各层置乱序列执行交互式变异操作并将变异序列合并获得最终加密图像E。5) Obtain the final encrypted image E: perform an interactive mutation operation on the scrambled sequences of each layer and combine the mutated sequences to obtain the final encrypted image E.
所述步骤1)的过程为:The process of described step 1) is:
将明文图像I作为MD5哈希的输入,并把MD5哈希生成的128位密钥H分成32个子密钥,每个块的长度是4位,如公式(1)所示:The plaintext image I is used as the input of the MD5 hash, and the 128-bit key H generated by the MD5 hash is divided into 32 sub-keys, and the length of each block is 4 bits, as shown in formula (1):
H=h1,h2,h3,...,h32 (1),H=h 1 , h 2 , h 3 ,...,h 32 (1),
然后,定义x'1、y'1、z'1和x'2、y'2、z'2的值,因此混沌系统的初始值x1(1)、y1(1)、z1(1)和x2(1)、y2(1)、z2(1)可以由公式(2)得到,依据混沌系统初始值迭代生成两组混沌序列x1、y1、z1和x2、y2、z2,并对其执行量化操作得到整数序列X1、Y1、Z1和X2、Y2、Z2,如公式(3)所示:Then, define the values of x' 1 , y' 1 , z' 1 and x' 2 , y' 2 , z' 2 , so the initial values of the chaotic system x 1 (1), y 1 (1), z 1 ( 1) and x 2 (1), y 2 (1), z 2 (1) can be obtained from formula (2), and iteratively generates two sets of chaotic sequences x 1 , y 1 , z 1 and x 2 according to the initial value of the chaotic system , y 2 , z 2 , and perform quantization operations on them to obtain integer sequences X 1 , Y 1 , Z 1 and X 2 , Y 2 , Z 2 , as shown in formula (3):
所述步骤2)的过程为:The process of described step 2) is:
对整数序列X1、Y1、Z1和明文图像I各层IR、IG、IB进行二进制位平面分解产生8个位平面并重新组成一维向量,生成二进制位序列,然后设置混沌二进制序列为掩码,通过掩码中“0”和“1”来选择和交叉图像,如果掩码值是“1”,则保持图像的位不变;否则翻转该图像的位来获得新的位,最后再将选择和交叉操作后的二进制图像序列恢复到像素级,生成交叉序列I”R、I”G和I”B。Perform binary bit plane decomposition on the integer sequence X 1 , Y 1 , Z 1 and each layer IR , IG , IB of the plaintext image I to generate 8 bit planes and reconstitute a one-dimensional vector, generate a binary bit sequence, and then set the chaos The binary sequence is a mask, and the image is selected and intersected by "0" and "1" in the mask. If the mask value is "1", the bits of the image are kept unchanged; otherwise, the bits of the image are flipped to obtain a new bits, and finally restore the binary image sequence after the selection and interleaving operations to the pixel level to generate the interleaving sequences I" R , I" G and I" B .
所述步骤3)的过程为:The process of described step 3) is:
采用模拟退火算法设计最优伪随机序列对交叉图像进行置乱操作来获得置乱图像,基于模拟退火算法的图像置乱步骤如下:The simulated annealing algorithm is used to design the optimal pseudo-random sequence to scramble the crossed image to obtain the scrambled image. The image scrambling steps based on the simulated annealing algorithm are as follows:
首先产生目标函数序列,根据步骤1)生成的三条整数混沌序列X2、Y2和Z2相互进行减法操作得到大小为M×N的目标函数序列L1、L2和L3,其中t为每个目标函数序列的索引,并且1≤t≤M×N:First, the objective function sequence is generated, and the three integer chaotic sequences X 2 , Y 2 and Z 2 generated in step 1) are mutually subtracted to obtain the objective function sequences L 1 , L 2 and L 3 of size M×N, where t is The index of each objective function sequence, and 1≤t≤M×N:
然后判断目标函数,令t=1,执行以下操作:Then judge the objective function, let t=1, and perform the following operations:
a.可如果如果L1(t)≥0,则最优解否则依据公式(5)计算当前目标函数序列L1、L2和L3的阈值Pc和概率Pt,如果Pc≥Pt,则最优解否则依据公式(6)计算最优解同理,最优解和可以由判断L2(t)与L3(t)获得,1≤t≤M×N,M和N分别为明文图像I的长和宽,a. If L 1 (t) ≥ 0, then the optimal solution Otherwise, calculate the threshold P c and probability P t of the current objective function sequence L 1 , L 2 and L 3 according to formula (5). If P c ≥ P t , the optimal solution Otherwise, calculate the optimal solution according to formula (6) Similarly, the optimal solution and It can be obtained by judging L 2 (t) and L 3 (t), 1≤t≤M×N, M and N are the length and width of the plaintext image I, respectively,
b.令t=t+1,并返回a步骤,直到t=M×N,最终得到用于图像的置乱操作的三个最优序列和 b. Let t=t+1, and return to step a until t=M×N, and finally get three optimal sequences for image scrambling operations and
最后执行基于模拟退火算法的图像置乱操作,根据最优序列和对交叉序列I”R、I”G和I”B如公式(7)所示的列置乱,得到置乱序列和1≤i≤M×N:Finally, the image scrambling operation based on the simulated annealing algorithm is performed, and according to the optimal sequence and Scramble the columns of the cross sequences I" R , I" G and I" B as shown in formula (7) to obtain a scrambled sequence and 1≤i≤M×N:
所述步骤4)的过程为:The process of described step 4) is:
将明文和置乱图像视为一个整体来计算其适应度,如公式(8)所示,其中,F表示适应度函数,Im g表示明文或置乱图像矩阵,通过公式(8)可以得到明文图像各层IR、IG、IB和置乱图像和的适应度值FR2、FG2、FB2的适应度值FR1、FG1、FB1,Take the plaintext and scrambled image as a whole to calculate its fitness, as shown in formula (8), where F represents the fitness function, Im g represents the plaintext or scrambled image matrix, and the plaintext can be obtained by formula (8) Image layers IR, IG , IB and scrambled images and The fitness values F R2 , F G2 , and F B2 of the fitness values F R1 , F G1 , and F B1 ,
然后,依据明文图像和置乱图像的适应度来判断是否执行变异操作,如果(FR1+FG1+FB1)×En1>(FR2+FG2+FB2)×En2,En1和En2为明文图像和置乱图像的信息熵,则重新选择参数x'1、y'1、z'1和x'2、y'2、z'2并返回步骤1)重新选择、交叉和置乱图像,否则由公式(9)计算混沌系统的初始值x3(1)、y3(1)、z3(1)并迭代混沌系统获得混沌序列x3、y3和z3,然后依据公式(10)对混沌系统进行量化处理得到整数序列X3、Y3和Z3,Then, according to the fitness of the plaintext image and the scrambled image, it is judged whether to perform the mutation operation. If (F R1 +F G1 +F B1 )×En 1 >(F R2 +F G2 +F B2 )×En 2 , En 1 and En 2 is the information entropy of the plaintext image and the scrambled image, then reselect the parameters x' 1 , y' 1 , z' 1 and x' 2 , y' 2 , z' 2 and return to step 1) reselect, cross and the scrambled image, otherwise calculate the initial values x 3 (1), y 3 (1), z 3 (1) of the chaotic system by formula (9) and iterate the chaotic system to obtain the chaotic sequence x 3 , y 3 and z 3 , Then quantize the chaotic system according to formula (10) to obtain integer sequences X 3 , Y 3 and Z 3 ,
所述步骤5)的过程为:The process of described step 5) is:
将置乱序列和执行如公式(11)变异操作,其中变异序列的初始值ER(1)、EG(1)和EB(1)如公式(12)表示,最后,将变异序列ER、EG和EB合并获得最终加密图像E,will scramble the sequence and Perform the mutation operation as in formula (11), where the initial values ER (1), EG (1) and EB (1) of the mutated sequence are expressed as in formula (12), and finally, the mutated sequence ER , EG and E and B are merged to obtain the final encrypted image E,
本技术方案的有益效果体现在:The beneficial effects of this technical solution are reflected in:
1)混沌系统的初始值分别由明文图像I的MD5哈希值和明文和置乱图像的适应度生成,它们是交叉和选择、置乱和变异过程中的重要组成部分,因此加密图像非常依赖明文图像I,并且对抵抗已知攻击和选择明文攻击是安全的;1) The initial value of the chaotic system is generated by the MD5 hash value of the plaintext image I and the fitness of the plaintext and scrambled images, respectively. They are an important part in the process of crossover and selection, scrambling and mutation, so encrypted images are very dependent on plaintext image I, and is secure against known attacks and chosen-plaintext attacks;
2)本技术方案对明文图像I进行选择和交叉操作,然后利用模拟退火算法生成的最优序列对图像进行置乱,通过这三个操作可以使置乱图像的直方图达到均衡,从而可以抵抗统计攻击;2) This technical solution selects and crosses the plaintext image I, and then uses the optimal sequence generated by the simulated annealing algorithm to scramble the image. Through these three operations, the histogram of the scrambled image can be balanced, so that it can resist statistical attack;
3)为了增强图像各层的相关性,本技术方案利用彩色图像交互的方法对置乱图像进行交互式变异操作,该操作由明文图像I和置乱图像的适应度来进行判断是否执行;3) in order to enhance the correlation of each layer of the image, this technical scheme utilizes the method of color image interaction to carry out an interactive mutation operation on the scrambled image, and this operation is judged by the fitness of the plaintext image I and the scrambled image whether to execute;
4)相比传统的“置乱-扩散”加密框架相比,本技术方案不仅可以增加加密系统的复杂度,而且可以增强加密算法对明文图像I的敏感性。4) Compared with the traditional "scrambling-diffusion" encryption framework, the technical solution can not only increase the complexity of the encryption system, but also enhance the sensitivity of the encryption algorithm to the plaintext image I.
本技术方案的加密方法具有大密钥空间、高安全性和对明文图像的高敏感性,因此可以抵抗常见的图像攻击。The encryption method of the technical solution has large key space, high security and high sensitivity to plaintext images, so it can resist common image attacks.
这种方法能增强图像信息的安全性,提高加密处理的效率,能增强图像的鲁棒性,这种方法安全性高,可以抵抗常见图像攻击。This method can enhance the security of image information, improve the efficiency of encryption processing, and enhance the robustness of images. This method has high security and can resist common image attacks.
附图说明Description of drawings
图1为实施例方法的流程示意图;1 is a schematic flowchart of an embodiment method;
图2为实施例中选择交叉过程示意图。FIG. 2 is a schematic diagram of a selection crossover process in an embodiment.
具体实施方式Detailed ways
下面结合附图和实施例对本发明内容作进一步的阐述,但不是对本发明的限定。The content of the present invention will be further described below with reference to the accompanying drawings and embodiments, but it is not intended to limit the present invention.
实施例:Example:
参照图1,一种基于遗传模拟退火算法和混沌映射的彩色图像加密方法,包括如下步骤:1)生成整数序列:将明文图像I作为MD5哈希的输入生成与明文相关的密钥,并作为混沌系统的初始值,依据混沌系统初始值迭代生成混沌序列并对其执行量化操作,生成六条整数混沌序列X1、Y1、Z1、X2、Y2和Z2;Referring to Fig. 1, a kind of color image encryption method based on genetic simulated annealing algorithm and chaotic mapping, comprises the steps: 1) generate integer sequence: use plaintext image I as the input of MD5 hash to generate the key relevant to plaintext, and as The initial value of the chaotic system, iteratively generates the chaotic sequence according to the initial value of the chaotic system and performs quantization operations on it, and generates six integer chaotic sequences X 1 , Y 1 , Z 1 , X 2 , Y 2 and Z 2 ;
2)对明文图像I中的R、G、B三层进行选择和交叉操作:对步骤1)得到的整数序列X1、Y1、Z1和明文图像I中的R、G、B三层进行二进制位平面分解产生8个位平面并重新组成一维向量,生成混沌二进制位序列,然后设置混沌二进制序列为掩码,通过掩码中“0”和“1”来选择和交叉明文图像I,最后再将选择和交叉操作后的二进制图像序列恢复到像素级,生成交叉序列;2) Select and cross the three layers of R, G, and B in the plaintext image I: perform the integer sequence X 1 , Y 1 , Z 1 obtained in step 1) and the three layers of R, G, and B in the plaintext image I Perform binary bit plane decomposition to generate 8 bit planes and recompose a one-dimensional vector to generate a chaotic binary bit sequence, then set the chaotic binary sequence as a mask, and select and cross the plaintext image I through the "0" and "1" in the mask , and finally restore the binary image sequence after selection and cross operation to the pixel level to generate a cross sequence;
3)对交叉序列各层执行基于模拟退火算法的置乱操作:设明文图像I的长和宽分别为M和N,首先对步骤1)生成的三条整数混沌序列X2、Y2和Z2相互进行减法操作得到大小为M×N的目标函数序列L1、L2和L3,然后判断目标函数序列:如果L1(t)≥0,则最优解其中t为每个目标函数序列的索引,并且1≤t≤M×N;否则计算当前目标函数序列L1、L2和L3的阈值Pc和概率Pt,如果Pc≥Pt,则最优解否则计算最优解同理,最优解和可以由判断L2(t)与L3(t)获得,根据最优序列和对交叉序列I”R、I”G和I”B执行列置乱操作,得到置乱序列;3) Perform the scramble operation based on simulated annealing algorithm on each layer of the cross sequence: set the length and width of the plaintext image I to be M and N respectively, firstly perform the three integer chaotic sequences X 2 , Y 2 and Z 2 generated in step 1). Subtract each other to obtain the objective function sequence L 1 , L 2 and L 3 of size M×N, and then judge the objective function sequence: if L 1 (t)≥0, then the optimal solution where t is the index of each objective function sequence, and 1≤t≤M×N; otherwise, the threshold P c and probability P t of the current objective function sequence L 1 , L 2 and L 3 are calculated, if P c ≥ P t , the optimal solution Otherwise calculate the optimal solution Similarly, the optimal solution and It can be obtained by judging L 2 (t) and L 3 (t), according to the optimal sequence and Perform a column scrambling operation on the cross sequence I" R , I" G and I" B to obtain a scrambling sequence;
4)判断是否执行变异操作:计算明文图像I和置乱图像各层的适应度,并通过明文图像I和置乱图像的适应度来判断是否执行变异操作,如果明文图像I的适应度大于置乱图像的适应度,则重新选择参数生成混沌序列并重新执行选择、交叉和置乱操作;否则根据置乱图像的适应度计算混沌系统的初始值并迭代混沌系统获得混沌序列,并对混沌系统进行量化处理得到整数序列;4) Determine whether to perform mutation operation: calculate the fitness of each layer of plaintext image I and scrambled image, and judge whether to perform mutation operation by the fitness of plaintext image I and scrambled image, if the fitness of plaintext image I is greater than If the fitness of the chaotic image is determined, the parameters are reselected to generate the chaotic sequence and the selection, crossover and scrambling operations are performed again; otherwise, the initial value of the chaotic system is calculated according to the fitness of the scrambled image, and the chaotic system is iterated to obtain the chaotic sequence, and the chaotic system is Perform quantization processing to obtain an integer sequence;
5)获得最终加密图像E:为了增强图像各层的相关性,将各层置乱序列执行交互式变异操作并将变异序列合并获得最终加密图像E。5) Obtain the final encrypted image E: In order to enhance the correlation of each layer of the image, perform an interactive mutation operation on the scrambled sequences of each layer and combine the mutated sequences to obtain the final encrypted image E.
所述步骤1)的过程为:The process of described step 1) is:
将明文图像I作为MD5哈希的输入,并把MD5哈希生成的128位密钥H分成32个子密钥,每个块的长度是4位,如公式(1)所示:The plaintext image I is used as the input of the MD5 hash, and the 128-bit key H generated by the MD5 hash is divided into 32 sub-keys, and the length of each block is 4 bits, as shown in formula (1):
H=h1,h2,h3,...,h32 (1),H=h 1 , h 2 , h 3 ,...,h 32 (1),
然后,定义x'1、y'1、z'1和x'2、y'2、z'2的值,因此混沌系统的初始值x1(1)、y1(1)、z1(1)和x2(1)、y2(1)、z2(1)可以由公式(2)得到,依据混沌系统初始值迭代生成两组混沌序列x1、y1、z1和x2、y2、z2,并对其执行量化操作得到整数序列X1、Y1、Z1和X2、Y2、Z2,如公式(3)所示:Then, define the values of x' 1 , y' 1 , z' 1 and x' 2 , y' 2 , z' 2 , so the initial values of the chaotic system x 1 (1), y 1 (1), z 1 ( 1) and x 2 (1), y 2 (1), z 2 (1) can be obtained from formula (2), and iteratively generates two sets of chaotic sequences x 1 , y 1 , z 1 and x 2 according to the initial value of the chaotic system , y 2 , z 2 , and perform quantization operations on them to obtain integer sequences X 1 , Y 1 , Z 1 and X 2 , Y 2 , Z 2 , as shown in formula (3):
参照图2,所述步骤2)的过程为:Referring to Fig. 2, the process of described step 2) is:
对整数序列X1、Y1、Z1和明文图像各层IR、IG、IB进行二进制位平面分解产生8个位平面并重新组成一维向量,生成二进制位序列,然后设置混沌二进制序列为掩码,通过掩码中“0”和“1”来选择和交叉图像,如果掩码值是“1”,则保持图像的位不变;否则翻转该图像的位来获得新的位,最后再将选择和交叉操作后的二进制图像序列恢复到像素级,生成交叉序列I”R、I”G和I”B。Perform binary bit plane decomposition on the integer sequence X 1 , Y 1 , Z 1 and each layer IR , IG , IB of the plaintext image to generate 8 bit planes and reconstitute a one-dimensional vector to generate a binary bit sequence, and then set the chaotic binary The sequence is a mask, and the image is selected and intersected by "0" and "1" in the mask. If the mask value is "1", the bits of the image are kept unchanged; otherwise, the bits of the image are flipped to obtain new bits , and finally restore the binary image sequence after selection and cross operation to the pixel level to generate cross sequences I" R , I" G and I" B .
所述步骤3)的过程为:The process of described step 3) is:
采用模拟退火算法设计最优伪随机序列对交叉图像进行置乱操作来获得置乱图像,基于模拟退火算法的图像置乱步骤如下:The simulated annealing algorithm is used to design the optimal pseudo-random sequence to scramble the crossed image to obtain the scrambled image. The image scrambling steps based on the simulated annealing algorithm are as follows:
首先产生目标函数序列,根据步骤1)生成的三条整数混沌序列X2、Y2和Z2相互进行减法操作得到大小为M×N的目标函数序列L1、L2和L3,其中t为每个目标函数序列的索引,并且1≤t≤M×N:First, the objective function sequence is generated, and the three integer chaotic sequences X 2 , Y 2 and Z 2 generated in step 1) are mutually subtracted to obtain the objective function sequences L 1 , L 2 and L 3 of size M×N, where t is The index of each objective function sequence, and 1≤t≤M×N:
然后判断目标函数,令t=1,执行以下操作:Then judge the objective function, let t=1, and perform the following operations:
a.可如果如果L1(t)≥0,则最优解否则依据公式(5)计算当前目标函数序列L1、L2和L3的阈值Pc和概率Pt,如果Pc≥Pt,则最优解否则依据公式(6)计算最优解同理,最优解和可以由判断L2(t)与L3(t)获得,1≤t≤M×N,M和N分别为明文图像I的长和宽,a. If L 1 (t) ≥ 0, then the optimal solution Otherwise, calculate the threshold P c and probability P t of the current objective function sequence L 1 , L 2 and L 3 according to formula (5). If P c ≥ P t , the optimal solution Otherwise, calculate the optimal solution according to formula (6) Similarly, the optimal solution and It can be obtained by judging L 2 (t) and L 3 (t), 1≤t≤M×N, M and N are the length and width of the plaintext image I, respectively,
b.令t=t+1,并返回a步骤,直到t=M×N,最终得到用于图像的置乱操作的三个最优序列和 b. Let t=t+1, and return to step a until t=M×N, and finally get three optimal sequences for image scrambling operations and
最后执行基于模拟退火算法的图像置乱操作,根据最优序列和对交叉序列I”R、I”G和I”B如公式(7)所示的列置乱,得到置乱序列和1≤i≤M×N:Finally, the image scrambling operation based on the simulated annealing algorithm is performed, and according to the optimal sequence and Scramble the columns of the cross sequences I" R , I" G and I" B as shown in formula (7) to obtain a scrambled sequence and 1≤i≤M×N:
所述步骤4)的过程为:The process of described step 4) is:
将明文和置乱图像视为一个整体来计算其适应度,如公式(8)所示,其中,F表示适应度函数,Img表示明文或置乱图像矩阵,通过公式(8)可以得到明文图像各层IR、IG、IB和置乱图像和的适应度值FR2、FG2、FB2的适应度值FR1、FG1、FB1,Consider the plaintext and scrambled image as a whole to calculate its fitness, as shown in formula (8), where F represents the fitness function, Img represents the plaintext or scrambled image matrix, and the plaintext image can be obtained by formula (8). Layers IR, IG , IB and scrambled images and The fitness values F R2 , F G2 , and F B2 of the fitness values F R1 , F G1 , and F B1 ,
然后,依据明文图像和置乱图像的适应度来判断是否执行变异操作,如果(FR1+FG1+FB1)×En1>(FR2+FG2+FB2)×En2,En1和En2为明文图像I和置乱图像的信息熵,则重新选择参数x'1、y'1、z'1和x'2、y'2、z'2并返回步骤1)重新选择、交叉和置乱图像,否则由公式(9)计算混沌系统的初始值x3(1)、y3(1)、z3(1)并迭代混沌系统获得混沌序列x3、y3和z3,然后依据公式(10)对混沌系统进行量化处理得到整数序列X3、Y3和Z3,Then, according to the fitness of the plaintext image and the scrambled image, it is judged whether to perform the mutation operation. If (F R1 +F G1 +F B1 )×En 1 >(F R2 +F G2 +F B2 )×En 2 , En 1 and En 2 is the information entropy of the plaintext image I and the scrambled image, then reselect the parameters x' 1 , y' 1 , z' 1 and x' 2 , y' 2 , z' 2 and return to step 1) to reselect, Cross and scramble the image, otherwise calculate the initial values x 3 (1), y 3 (1), z 3 (1) of the chaotic system by formula (9) and iterate the chaotic system to obtain the chaotic sequence x 3 , y 3 and z 3 , and then quantize the chaotic system according to formula (10) to obtain integer sequences X 3 , Y 3 and Z 3 ,
所述步骤5)的过程为:The process of described step 5) is:
将置乱序列和执行如公式(11)变异操作,其中变异序列的初始值ER(1)、EG(1)和EB(1)如公式(12)表示,最后,将变异序列ER,、EG和EB合并获得最终加密图像E,will scramble the sequence and Perform the mutation operation as in formula (11), in which the initial values of the mutated sequence ER (1), EG (1) and EB (1) are expressed as formula (12), and finally, the mutated sequence ER , EG Merge with E B to obtain the final encrypted image E,
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811488743.2A CN109660695B (en) | 2018-12-06 | 2018-12-06 | Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811488743.2A CN109660695B (en) | 2018-12-06 | 2018-12-06 | Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109660695A CN109660695A (en) | 2019-04-19 |
CN109660695B true CN109660695B (en) | 2020-03-10 |
Family
ID=66112599
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811488743.2A Expired - Fee Related CN109660695B (en) | 2018-12-06 | 2018-12-06 | Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109660695B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110784619B (en) * | 2019-10-24 | 2021-08-10 | 广西师范大学 | Novel parallel image encryption method based on chaos |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103427979A (en) * | 2013-06-09 | 2013-12-04 | 浙江工业大学 | Internet picture transparent and safe transmission method based on chaotic encryption |
CN103491279A (en) * | 2013-09-25 | 2014-01-01 | 上海理工大学 | 4-neighborhood exclusive or image encryption method based on hyper-chaos Lorenz system |
CN105046003A (en) * | 2015-07-23 | 2015-11-11 | 王家俊 | Simulated annealing-genetic algorithm spectral feature interval selection and spectrum encryption method |
CN105931175A (en) * | 2016-04-28 | 2016-09-07 | 广西师范大学 | Novel image scrambling method based on chaotic technology |
CN106778304A (en) * | 2016-12-09 | 2017-05-31 | 交通运输部水运科学研究所 | A kind of quick New chaotic image encryption method with related scramble mechanism in plain text |
CN106997607A (en) * | 2017-03-16 | 2017-08-01 | 四川大学 | Video bits face chaos encrypting method based on compressed sensing |
CN108718232A (en) * | 2018-08-17 | 2018-10-30 | 中国矿业大学 | Image encryption method based on AES and chaos |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4188571B2 (en) * | 2001-03-30 | 2008-11-26 | 株式会社日立製作所 | Arithmetic method of information processing apparatus and tamper resistant arithmetic disturbance implementation method |
US20070189518A1 (en) * | 2005-03-30 | 2007-08-16 | Nanni Richard A | 3-D quaternion quantum fractal encryption |
EP2351288B1 (en) * | 2008-10-23 | 2014-12-10 | University Of Ulster | An encryption method |
CN103442157A (en) * | 2013-09-04 | 2013-12-11 | 上海理工大学 | Image encryption method based on Arnold transformations and Henon chaotic system |
CN108055121A (en) * | 2017-10-23 | 2018-05-18 | 北京邮电大学 | The encryption method and decryption method of image |
-
2018
- 2018-12-06 CN CN201811488743.2A patent/CN109660695B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103427979A (en) * | 2013-06-09 | 2013-12-04 | 浙江工业大学 | Internet picture transparent and safe transmission method based on chaotic encryption |
CN103491279A (en) * | 2013-09-25 | 2014-01-01 | 上海理工大学 | 4-neighborhood exclusive or image encryption method based on hyper-chaos Lorenz system |
CN105046003A (en) * | 2015-07-23 | 2015-11-11 | 王家俊 | Simulated annealing-genetic algorithm spectral feature interval selection and spectrum encryption method |
CN105931175A (en) * | 2016-04-28 | 2016-09-07 | 广西师范大学 | Novel image scrambling method based on chaotic technology |
CN106778304A (en) * | 2016-12-09 | 2017-05-31 | 交通运输部水运科学研究所 | A kind of quick New chaotic image encryption method with related scramble mechanism in plain text |
CN106997607A (en) * | 2017-03-16 | 2017-08-01 | 四川大学 | Video bits face chaos encrypting method based on compressed sensing |
CN108718232A (en) * | 2018-08-17 | 2018-10-30 | 中国矿业大学 | Image encryption method based on AES and chaos |
Non-Patent Citations (3)
Title |
---|
《A Simulated Annealing Algorithm for General Threshold Visual Cryptography Schemes》;Chiu, Pei-Ling; Lee, Kai-Hui;《IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY》;20110930;第6卷(第3期);992-1001 * |
《基于混沌系统的数字图像加密算法分析与设计》;吴昊;《信息科技辑》;20180615;全文 * |
Luo, YL;Zhou, RL;Liu, JX;Qiu, SH;Cao, Y.《An efficient and self-adapting colour-image encryption algorithm based on chaos and interactions among multiple layers》.《MULTIMEDIA TOOLS AND APPLICATIONS》.2018,第77卷(第20期),26191-26217. * |
Also Published As
Publication number | Publication date |
---|---|
CN109660695A (en) | 2019-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111105339B (en) | Image encryption method based on multidimensional chaotic system and Joseph scrambling | |
Abdullah et al. | A hybrid genetic algorithm and chaotic function model for image encryption | |
CN106997606B (en) | A kind of image encryption method based on hyperchaotic system Projective Synchronization | |
Chai et al. | A novel image encryption algorithm based on the chaotic system and DNA computing | |
Soleymani et al. | A chaotic cryptosystem for images based on Henon and Arnold cat map | |
Sethi et al. | A proposed novel architecture for information hiding in image steganography by using genetic algorithm and cryptography | |
CN107220923B (en) | Digital picture feedback encryption method based on image network | |
CN111597574B (en) | Parallel image encryption system and method based on spatial diffusion structure | |
CN105404817B (en) | It is based on(k, n)The user-friendly visual secret sharing scheme method of thresholding | |
CN107590394B (en) | An Image Encryption Method Based on Chaotic Map and Bit Reorganization | |
CN107094072A (en) | A kind of mixed chaos encryption method based on general Henon Map | |
CN111031191B (en) | Image encryption method based on controlled alternate quantum walking and DNA sequence operation | |
Li et al. | Cryptanalyzing an image encryption algorithm underpinned by 2-D lag-complex logistic map | |
CN107239709A (en) | A kind of method of New chaotic image encryption, apparatus and system | |
CN114513584A (en) | Image encryption algorithm based on quantum walk and Lorenz chaotic system | |
Devi et al. | Entropy influenced RNA diffused quantum chaos to conserve medical data privacy | |
Yang et al. | Efficient color image encryption algorithm based on 2D coupled chaos and multi-objective optimized S-box | |
CN117579756A (en) | Image encryption method based on block selection Zigzag scrambling and roulette encoding | |
Durdu | Image transfer with secure communications application using a new reversible chaotic image encryption | |
Abid et al. | Genetic Algorithm Using Feistel and Genetic Operator Acting at the Bit Level for Images Encryption. | |
CN109660695B (en) | Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping | |
Kamal et al. | A Novel Remedy for Image Encryption and Data Hiding | |
Mohamed et al. | Image encryption scheme for secure digital images based on 3D cat map and turing machine | |
CN110430037B (en) | An image encryption method and terminal | |
Rajendran et al. | A nonlinear two dimensional logistic-tent map for secure image communication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200310 Termination date: 20201206 |
|
CF01 | Termination of patent right due to non-payment of annual fee |