CN112153238B - Image encryption method based on Tent mapping and composite chaotic mapping - Google Patents
Image encryption method based on Tent mapping and composite chaotic mapping Download PDFInfo
- Publication number
- CN112153238B CN112153238B CN202011038591.3A CN202011038591A CN112153238B CN 112153238 B CN112153238 B CN 112153238B CN 202011038591 A CN202011038591 A CN 202011038591A CN 112153238 B CN112153238 B CN 112153238B
- Authority
- CN
- China
- Prior art keywords
- mapping
- chaotic
- matrix
- tent
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000000739 chaotic effect Effects 0.000 title claims abstract description 97
- 238000013507 mapping Methods 0.000 title claims abstract description 68
- 239000002131 composite material Substances 0.000 title claims abstract description 49
- 238000000034 method Methods 0.000 title claims abstract description 20
- 239000011159 matrix material Substances 0.000 claims abstract description 94
- 238000009792 diffusion process Methods 0.000 claims abstract description 14
- 150000001875 compounds Chemical class 0.000 claims description 7
- 238000013178 mathematical model Methods 0.000 claims description 6
- 238000012360 testing method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 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
-
- 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/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
-
- 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/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
Abstract
本发明提供了图像加密技术领域的一种基于Tent映射和复合混沌映射的图像加密方法,包括如下步骤:步骤S10、获取大小为M×N的原始图像,并创建一大小为M×N的矩阵I;将所述原始图像的矩阵信息存储至矩阵I中;步骤S20、基于所述矩阵I中存储的矩阵信息生成6个初始密钥;步骤S30、基于所述初始密钥获得Tent映射和复合混沌映射的3个混沌序列;步骤S40、基于所述混沌序列对原始图像进行两轮置乱扩散操作,得到加密图像。本发明的优点在于:极大的提升了图像加密的安全性,降低了执行成本。
The present invention provides an image encryption method based on Tent mapping and composite chaotic mapping in the technical field of image encryption, comprising the following steps: Step S10, acquiring an original image with a size of M×N, and creating a matrix with a size of M×N I: Store the matrix information of the original image in matrix I; Step S20, generate 6 initial keys based on the matrix information stored in the matrix I; Step S30, obtain Tent mapping and composite based on the initial key Three chaotic sequences of the chaotic map; step S40, performing two rounds of scrambling and diffusion operations on the original image based on the chaotic sequences to obtain an encrypted image. The advantages of the present invention lie in that the security of image encryption is greatly improved, and the execution cost is reduced.
Description
技术领域technical field
本发明涉及图像加密技术领域,特别指一种基于Tent映射和复合混沌映射的图像加密方法。The invention relates to the technical field of image encryption, in particular to an image encryption method based on Tent mapping and compound chaotic mapping.
背景技术Background technique
随着多媒体技术和互联网的飞速发展,越来越多的图像被传输、共享和存储在互联网上。而图像的信息安全一直是数字世界中的一个严重问题,虽然存在一些传统的加密算法具有较高的安全性和成熟的验证能力,例如DES算法和RSA算法,但由于图像数据的特殊性,传统的加密算法并不适合图像加密领域。图像在空间域中通常用像素位置和像素值这两种信息来进行描述,所以图像加密算法主要围绕置乱和扩散两部分设计,由于混沌系统具有非周期性、不可预测性、伪随机性以及初值敏感性等优点,十分适合用于图像加密领域。With the rapid development of multimedia technology and the Internet, more and more images are transmitted, shared and stored on the Internet. The information security of images has always been a serious problem in the digital world. Although there are some traditional encryption algorithms with high security and mature verification capabilities, such as DES algorithm and RSA algorithm, due to the particularity of image data, traditional encryption algorithms The encryption algorithm is not suitable for the field of image encryption. The image is usually described by the pixel position and pixel value in the spatial domain, so the image encryption algorithm is mainly designed around scrambling and diffusion. The advantages of initial value sensitivity, etc., are very suitable for the field of image encryption.
由于一维混沌映射存在映射分布不均匀的缺点,导致基于一维混沌映射的图像加密算法的加密效果不好,并且还存在密钥空间小的问题,使得算法不能抵抗暴力攻击;虽然高维混沌映射具有复杂的混沌行为并且难以预测,但是会导致算法具有很高的执行成本,对计算机的运算能力要求比较高。同时,一个好的图像加密方法还需要具有抵抗明文攻击的能力。Due to the disadvantage of uneven mapping distribution in one-dimensional chaotic map, the encryption effect of image encryption algorithm based on one-dimensional chaotic map is not good, and there is also the problem of small key space, which makes the algorithm unable to resist brute force attacks; although high-dimensional chaos Mapping has complex chaotic behavior and is difficult to predict, but it will lead to high execution cost of the algorithm, and requires relatively high computing power of the computer. At the same time, a good image encryption method also needs to have the ability to resist plaintext attacks.
因此,如何提供一种基于Tent映射和复合混沌映射的图像加密方法,实现提升图像加密的安全性,降低执行成本,成为一个亟待解决的问题。Therefore, how to provide an image encryption method based on Tent mapping and composite chaotic mapping to improve the security of image encryption and reduce execution cost has become an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题,在于提供一种基于Tent映射和复合混沌映射的图像加密方法,实现提升图像加密的安全性,降低执行成本。The technical problem to be solved by the present invention is to provide an image encryption method based on Tent mapping and composite chaotic mapping, so as to improve the security of image encryption and reduce the execution cost.
本发明是这样实现的:一种基于Tent映射和复合混沌映射的图像加密方法,包括如下步骤:The present invention is realized as follows: a kind of image encryption method based on Tent mapping and compound chaotic mapping, comprising the following steps:
步骤S10、获取大小为M×N的原始图像,并创建一大小为M×N的矩阵I;将所述原始图像的矩阵信息存储至矩阵I中;Step S10, obtaining the original image with a size of M×N, and creating a matrix I with a size of M×N; the matrix information of the original image is stored in the matrix I;
步骤S20、基于所述矩阵I中存储的矩阵信息生成6个初始密钥;Step S20, generate 6 initial keys based on the matrix information stored in the
步骤S30、基于所述初始密钥获得Tent映射和复合混沌映射的3个混沌序列;Step S30, obtain 3 chaotic sequences of Tent mapping and composite chaotic mapping based on the initial key;
步骤S40、基于所述混沌序列对原始图像进行两轮置乱扩散操作,得到加密图像。Step S40: Perform two rounds of scrambling diffusion operations on the original image based on the chaotic sequence to obtain an encrypted image.
进一步地,所述步骤S10中,所述矩阵信息包括像素位置以及像素值。Further, in the step S10, the matrix information includes pixel positions and pixel values.
进一步地,所述步骤S20具体包括:Further, the step S20 specifically includes:
步骤S21、创建一个大小为1×4的一维矩阵X,随机生成3个取值范围在0至1的随机数并存储在所述一维矩阵X的前3列;求取所述矩阵信息中所有像素值的和并存储在一维矩阵X的第4列;Step S21, creating a one-dimensional matrix X with a size of 1×4, randomly generating 3 random numbers with values ranging from 0 to 1 and storing them in the first three columns of the one-dimensional matrix X; obtaining the matrix information The sum of all pixel values in and stored in the 4th column of the one-dimensional matrix X;
步骤S22、基于所述一维矩阵X计算复合混沌映射系数e1、e2、e3以及e4:Step S22: Calculate the complex chaotic mapping coefficients e 1 , e 2 , e 3 and e 4 based on the one-dimensional matrix X:
步骤S23、基于各所述复合混沌映射系数计算初始密钥x(1)、y(1)、a1、μ1、u以及z(1):Step S23: Calculate initial keys x(1), y(1), a 1 , μ 1 , u and z(1) based on each of the composite chaotic mapping coefficients:
x(1)=e1;x(1)=e 1 ;
y(1)=e2;y(1)=e 2 ;
a1=2+e3;a 1 =2+e 3 ;
μ1=0.99+e4;μ 1 =0.99+e 4 ;
u=1.999999+e4;u=1.999999+e 4 ;
z(1)=0.000001+e4。z(1)=0.000001+e 4 .
进一步地,所述步骤S30具体为:Further, the step S30 is specifically:
基于各所述初始密钥获得Tent映射和复合混沌映射的混沌序列s1、s2以及s3,并将3个所述混沌序列映射到0至255范围内的伪随机序列Rn:The chaotic sequences s 1 , s 2 and s 3 of the Tent map and the composite chaotic map are obtained based on each of the initial keys, and the three chaotic sequences are mapped to a pseudo-random sequence R n in the range of 0 to 255:
Rn=mod(ceil(sn×10∧3),256),n={1,2,3}。 Rn =mod(ceil( sn ×10∧3),256),n={1,2,3}.
进一步地,所述步骤S30中,所述Tent映射的数学模型为:Further, in the step S30, the mathematical model of the Tent mapping is:
其中u表示控制参数,且取值范围为[0,2];zn为Tent映射的迭代变量,且初始值z1的取值范围为(0,1)时,Tent映射进入混沌区。Where u represents the control parameter, and the value range is [0, 2]; z n is the iteration variable of the Tent map, and when the value range of the initial value z 1 is (0, 1), the Tent map enters the chaotic region.
进一步地,所述步骤S30中,所述复合混沌映射是采用Sine映射和Chebyshev映射作为种子映射,利用扰动分叉参数生成的映射,所述复合混沌映射的数学模型为:Further, in the step S30, the composite chaotic mapping adopts Sine mapping and Chebyshev mapping as the seed mapping, and utilizes the mapping generated by the perturbation bifurcation parameter, and the mathematical model of the composite chaotic mapping is:
其中μ的取值范围为(0,1];xn表示输出的混沌序列,取值范围为(0,1);初始密钥a1的绝对值不小于2时,复合混沌映射进入混沌区,在无限精度条件下产生无限长度非周期混沌实值序列;yn的取值范围为[-1,1];c表示加权参数,取值为0.1;n表示迭代次数;μ1表示控制参数μ的迭代初值;a1表示控制参数a的迭代初值;xn+1、yn+1表示复合混沌映射的迭代变量;μn+1、an+1表示控制参数的迭代变量。The value range of μ is (0, 1]; x n represents the output chaotic sequence, and the value range is (0, 1); when the absolute value of the initial key a 1 is not less than 2, the composite chaotic map enters the chaotic area , generates an infinite-length aperiodic chaotic real-valued sequence under the condition of infinite precision; the value range of y n is [-1, 1]; c represents the weighting parameter, which is 0.1; n represents the number of iterations; μ 1 represents the control parameter Iterative initial value of μ; a 1 represents the iterative initial value of the control parameter a; x n+1 , y n+1 represent the iterative variables of the composite chaotic map; μ n+1 , a n+1 represent the iterative variables of the control parameter.
进一步地,所述步骤S40具体包括:Further, the step S40 specifically includes:
步骤S41、利用circshift函数对所述矩阵I进行第一轮置乱,得到图像I1;Step S41, utilize the circshift function to carry out the first round of scrambling to the matrix I to obtain the image I 1 ;
步骤S42、利用复合混沌映射生成的伪随机序列R2对所述图像I1进行第一轮扩散,得到矩阵C:Step S42, using the pseudo-random sequence R 2 generated by the composite chaotic map to perform the first round of diffusion on the image I 1 to obtain a matrix C:
其中i表示矩阵的位置信息;C(i)表示矩阵C中第i个数;C(i+1)表示矩阵C中第i+1个数;where i represents the position information of the matrix; C(i) represents the i-th number in the matrix C; C(i+1) represents the i+1-th number in the matrix C;
步骤S43、利用Tent映射生成的伪随机序列R3对所述矩阵C进行位异或操作,得到第二扩散乱生成的矩阵CC;Step S43, using the pseudo-random sequence R3 generated by Tent mapping to perform a bit XOR operation on the matrix C to obtain the matrix CC generated by the second diffusion;
步骤S44、利用复合混沌映射生成的伪随机序列R1对所述矩阵CC进行洗牌打乱,得到第二轮置乱生成的加密图像CCC。Step S44 , shuffling the matrix CC by using the pseudo-random sequence R 1 generated by the composite chaotic map to obtain an encrypted image CCC generated by the second round of scrambling.
本发明的优点在于:The advantages of the present invention are:
1、通过采用Sine映射和Chebyshev映射作为种子映射,利用扰动分叉参数生成复合混沌映射,提高了复合混沌映射的复杂度,有效的扩大了密钥空间,进而极大的提升了图像加密的安全性。1. By using Sine map and Chebyshev map as seed map, and using perturbation bifurcation parameters to generate composite chaotic map, the complexity of composite chaotic map is improved, the key space is effectively expanded, and the security of image encryption is greatly improved sex.
2、通过将两个一维混沌映射组成一个新的复合混沌映射,进而极大的降低了图像加密算法的执行成本,减轻了对计算机运算能力的依赖。2. By combining two one-dimensional chaotic maps into a new composite chaotic map, the execution cost of the image encryption algorithm is greatly reduced, and the dependence on the computing power of the computer is relieved.
3、通过将明文矩阵信息中的像素值作为初始密钥的生成依据,极大的提高了图像加密算法抵抗明文攻击的能力。3. By using the pixel values in the plaintext matrix information as the basis for generating the initial key, the ability of the image encryption algorithm to resist plaintext attacks is greatly improved.
附图说明Description of drawings
下面参照附图结合实施例对本发明作进一步的说明。The present invention will be further described below with reference to the accompanying drawings and embodiments.
图1是本发明一种基于Tent映射和复合混沌映射的图像加密方法的流程图。FIG. 1 is a flow chart of an image encryption method based on Tent mapping and composite chaotic mapping according to the present invention.
图2是本发明一种基于Tent映射和复合混沌映射的图像加密方法的流程示意图。FIG. 2 is a schematic flowchart of an image encryption method based on Tent mapping and composite chaotic mapping according to the present invention.
图3是本发明原始图像预处理示意图。FIG. 3 is a schematic diagram of the original image preprocessing of the present invention.
图4是本发明第二轮置乱示意图。FIG. 4 is a schematic diagram of the second round of scrambling according to the present invention.
图5是本发明测试图像。Figure 5 is a test image of the present invention.
图6是本发明测试图像的加密效果图。Fig. 6 is the encryption effect diagram of the test image of the present invention.
具体实施方式Detailed ways
请参照图1至图6所示,本发明一种基于Tent映射和复合混沌映射的图像加密方法的较佳实施例之一,包括如下步骤:Please refer to FIG. 1 to FIG. 6 , one of the preferred embodiments of an image encryption method based on Tent mapping and composite chaotic mapping of the present invention includes the following steps:
步骤S10、获取大小为M×N的原始图像,并创建一大小为M×N的矩阵I;将所述原始图像的矩阵信息存储至矩阵I中;Step S10, obtaining the original image with a size of M×N, and creating a matrix I with a size of M×N; the matrix information of the original image is stored in the matrix I;
步骤S20、基于所述矩阵I中存储的矩阵信息生成6个初始密钥;Step S20, generate 6 initial keys based on the matrix information stored in the
步骤S30、基于所述初始密钥获得Tent映射和复合混沌映射的3个混沌序列;去除各所述混沌序列的前1000个随机数,以保证所述混沌序列的随机性;Step S30, obtaining 3 chaotic sequences of Tent mapping and composite chaotic mapping based on the initial key; removing the first 1000 random numbers of each of the chaotic sequences to ensure the randomness of the chaotic sequences;
步骤S40、基于所述混沌序列对原始图像进行两轮置乱扩散操作,得到加密图像。Step S40: Perform two rounds of scrambling diffusion operations on the original image based on the chaotic sequence to obtain an encrypted image.
所述步骤S10中,所述矩阵信息包括像素位置以及像素值。In the step S10, the matrix information includes pixel positions and pixel values.
所述步骤S20具体包括:The step S20 specifically includes:
步骤S21、创建一个大小为1×4的一维矩阵X,随机生成3个取值范围在0至1的随机数并存储在所述一维矩阵X的前3列;求取所述矩阵信息中所有像素值的和并存储在一维矩阵X的第4列;Step S21, creating a one-dimensional matrix X with a size of 1×4, randomly generating 3 random numbers with values ranging from 0 to 1 and storing them in the first three columns of the one-dimensional matrix X; obtaining the matrix information The sum of all pixel values in and stored in the 4th column of the one-dimensional matrix X;
步骤S22、基于所述一维矩阵X计算复合混沌映射系数e1、e2、e3以及e4:Step S22: Calculate the complex chaotic mapping coefficients e 1 , e 2 , e 3 and e 4 based on the one-dimensional matrix X:
步骤S23、基于各所述复合混沌映射系数计算初始密钥x(1)、y(1)、a1、μ1、u以及z(1):Step S23: Calculate initial keys x(1), y(1), a 1 , μ 1 , u and z(1) based on each of the composite chaotic mapping coefficients:
x(1)=e1;x(1)=e 1 ;
y(1)=e2;y(1)=e 2 ;
a1=2+e3;a 1 =2+e 3 ;
μ1=0.99+e4;μ 1 =0.99+e 4 ;
u=1.999999+e4;u=1.999999+e 4 ;
z(1)=0.000001+e4;z(1)=0.000001+e 4 ;
其中2、0.99、1.999999、0.000001为预设的初始值。Among them, 2, 0.99, 1.999999, and 0.000001 are the preset initial values.
所述步骤S30具体为:The step S30 is specifically:
基于各所述初始密钥获得Tent映射和复合混沌映射的混沌序列s1、s2以及s3,并将3个所述混沌序列映射到0至255范围内的伪随机序列Rn:The chaotic sequences s 1 , s 2 and s 3 of the Tent map and the composite chaotic map are obtained based on each of the initial keys, and the three chaotic sequences are mapped to a pseudo-random sequence R n in the range of 0 to 255:
Rn=mod(ceil(sn×10∧3),256),n={1,2,3};R n =mod(ceil(s n ×10∧3),256),n={1,2,3};
所述伪随机序列Rn包括利用复合混沌映射生成的伪随机序列R1、利用复合混沌映射生成的伪随机序列R2、利用Tent映射生成的伪随机序列R3。The pseudo-random sequence R n includes a pseudo-random sequence R 1 generated by using a composite chaotic map, a pseudo-random sequence R 2 generated by using a composite chaotic map, and a pseudo-random sequence R 3 generated by using a Tent map.
所述步骤S30中,所述Tent映射的数学模型为:In the step S30, the mathematical model of the Tent mapping is:
其中u表示控制参数,且取值范围为[0,2];zn为Tent映射的迭代变量,且初始值z1的取值范围为(0,1)时,Tent映射进入混沌区。Where u represents the control parameter, and the value range is [0, 2]; z n is the iteration variable of the Tent map, and when the value range of the initial value z 1 is (0, 1), the Tent map enters the chaotic region.
所述步骤S30中,所述复合混沌映射是采用Sine映射和Chebyshev映射作为种子映射,利用扰动分叉参数生成的映射,所述复合混沌映射的数学模型为:In the step S30, the composite chaotic map is a map generated by using the Sine map and the Chebyshev map as the seed map, and the perturbation bifurcation parameter is used, and the mathematical model of the composite chaotic map is:
其中μ的取值范围为(0,1];xn表示输出的混沌序列,取值范围为(0,1);初始密钥a1的绝对值不小于2时,复合混沌映射进入混沌区,在无限精度条件下产生无限长度非周期混沌实值序列;yn的取值范围为[-1,1];c表示加权参数,取值为0.1;n表示迭代次数;μ1表示控制参数μ的迭代初值;a1表示控制参数a的迭代初值;xn+1、yn+1表示复合混沌映射的迭代变量;μn+1、an+1表示控制参数的迭代变量。The value range of μ is (0, 1]; x n represents the output chaotic sequence, and the value range is (0, 1); when the absolute value of the initial key a 1 is not less than 2, the composite chaotic map enters the chaotic area , generates an infinite-length aperiodic chaotic real-valued sequence under the condition of infinite precision; the value range of y n is [-1, 1]; c represents the weighting parameter, which is 0.1; n represents the number of iterations; μ 1 represents the control parameter Iterative initial value of μ; a 1 represents the iterative initial value of the control parameter a; x n+1 , y n+1 represent the iterative variables of the composite chaotic map; μ n+1 , a n+1 represent the iterative variables of the control parameter.
所述步骤S40具体包括:The step S40 specifically includes:
步骤S41、利用circshift函数对所述矩阵I进行第一轮置乱,得到图像I1;Step S41, utilize the circshift function to carry out the first round of scrambling to the matrix I to obtain the image I 1 ;
步骤S42、利用复合混沌映射生成的伪随机序列R2对所述图像I1进行第一轮扩散,得到矩阵C:Step S42, using the pseudo-random sequence R 2 generated by the composite chaotic map to perform the first round of diffusion on the image I 1 to obtain a matrix C:
其中i表示矩阵的位置信息;C(i)表示矩阵C中第i个数;C(i+1)表示矩阵C中第i+1个数;where i represents the position information of the matrix; C(i) represents the i-th number in the matrix C; C(i+1) represents the i+1-th number in the matrix C;
步骤S43、利用Tent映射生成的伪随机序列R3对所述矩阵C进行位异或操作,得到第二扩散乱生成的矩阵CC;Step S43, using the pseudo-random sequence R3 generated by Tent mapping to perform a bit XOR operation on the matrix C to obtain the matrix CC generated by the second diffusion;
步骤S44、利用复合混沌映射生成的伪随机序列R1对所述矩阵CC进行洗牌打乱,得到第二轮置乱生成的加密图像CCC。Step S44 , shuffling the matrix CC by using the pseudo-random sequence R 1 generated by the composite chaotic map to obtain an encrypted image CCC generated by the second round of scrambling.
所述加密图像CCC的解密过程即图像加密算法的逆过程,解密和加密的初始密钥、混沌序列均相同。The decryption process of the encrypted image CCC is the inverse process of the image encryption algorithm, and the initial keys and chaotic sequences for decryption and encryption are the same.
本发明一种基于Tent映射和复合混沌映射的图像加密方法的较佳实施例之二,包括如下步骤:The second preferred embodiment of an image encryption method based on Tent mapping and composite chaotic mapping of the present invention includes the following steps:
步骤S10、获取大小为512×512的测试图像(如图3所示),并创建一大小为512×512的矩阵I;将所述原始图像的矩阵信息存储至矩阵I中;所述矩阵信息包括像素位置以及像素值;Step S10, acquiring a test image with a size of 512×512 (as shown in FIG. 3 ), and creating a matrix I with a size of 512×512; storing the matrix information of the original image in the matrix I; the matrix information Including pixel position and pixel value;
步骤S20、基于所述矩阵I中存储的矩阵信息生成6个初始密钥;Step S20, generate 6 initial keys based on the matrix information stored in the
步骤S30、基于所述初始密钥分别迭代Tent映射和复合混沌映射(1000+512×512)次,生成3个混沌序列,并去除各所述混沌序列的前1000个随机数;Step S30, iterate Tent map and composite chaotic map (1000+512×512) times respectively based on the initial key, generate 3 chaotic sequences, and remove the first 1000 random numbers of each described chaotic sequence;
步骤S40、基于所述混沌序列对原始图像进行两轮置乱扩散操作,得到加密的测试图像(如图4所示)。Step S40 , performing two rounds of scrambling diffusion operations on the original image based on the chaotic sequence to obtain an encrypted test image (as shown in FIG. 4 ).
所述步骤S20具体包括:The step S20 specifically includes:
步骤S21、创建一个大小为1×4的一维矩阵X,随机生成3个取值范围在0至1的随机数并存储在所述一维矩阵X的前3列;求取所述矩阵信息中所有像素值的和并存储在一维矩阵X的第4列;Step S21, creating a one-dimensional matrix X with a size of 1×4, randomly generating 3 random numbers with values ranging from 0 to 1 and storing them in the first three columns of the one-dimensional matrix X; obtaining the matrix information The sum of all pixel values in and stored in the 4th column of the one-dimensional matrix X;
步骤S22、基于所述一维矩阵X计算复合混沌映射系数e1、e2、e3以及e4:Step S22: Calculate the complex chaotic mapping coefficients e 1 , e 2 , e 3 and e 4 based on the one-dimensional matrix X:
步骤S23、基于各所述复合混沌映射系数计算初始密钥x(1)、y(1)、a1、μ1、u以及z(1):Step S23: Calculate initial keys x(1), y(1), a 1 , μ 1 , u and z(1) based on each of the composite chaotic mapping coefficients:
x(1)=e1;x(1)=e 1 ;
y(1)=e2;y(1)=e 2 ;
a1=2+e3;a 1 =2+e 3 ;
μ1=0.99+e4;μ 1 =0.99+e 4 ;
u=1.999999+e4;u=1.999999+e 4 ;
z(1)=0.000001+e4;z(1)=0.000001+e 4 ;
其中2、0.99、1.999999、0.000001为预设的初始值。Among them, 2, 0.99, 1.999999, and 0.000001 are the preset initial values.
所述步骤S40具体包括:The step S40 specifically includes:
步骤S41、利用circshift函数对所述矩阵I进行第一轮置乱,即将所述矩阵I看成一个一维矩阵,分别对所述矩阵I的每一行、每一列进行循环位移操作,进而得到图像I1;Step S41, utilize the circshift function to carry out the first round of scrambling to the matrix I, that is, to regard the matrix I as a one-dimensional matrix, and carry out a cyclic shift operation to each row and each column of the matrix I respectively, and then obtain an image. I 1 ;
步骤S42、利用复合混沌映射生成的伪随机序列R2对所述图像I1进行第一轮扩散,即将所述图像I1转换成一维行向量,图像I1和伪随机序列R2为大小相等的矩阵,分别取出I1和R2第一个位置的值相加后,对256进行mod操作,将mod操作的计算结果与前一个计算结果进行异或操作,以此类推,进而得到矩阵C:Step S42, using the pseudo-random sequence R 2 generated by the composite chaotic map to perform the first round of diffusion on the image I 1 , that is, converting the image I 1 into a one-dimensional row vector, and the image I 1 and the pseudo-random sequence R 2 are equal in size. matrix, take out the values of the first positions of I 1 and R 2 respectively and add them together, perform a mod operation on 256, and perform an XOR operation on the calculation result of the mod operation and the previous calculation result, and so on, and then get the matrix C :
其中i表示矩阵的位置信息;C(i)表示矩阵C中第i个数;C(i+1)表示矩阵C中第i+1个数;where i represents the position information of the matrix; C(i) represents the i-th number in the matrix C; C(i+1) represents the i+1-th number in the matrix C;
步骤S43、利用Tent映射生成的伪随机序列R3对所述矩阵C进行位异或操作,即将矩阵C和R3转换成大小为512×512的矩阵,对两个矩阵同时进行遍历,分别取出两个矩阵相同位置的值并转换成一个字符串形式表示的二进制数,然后进行二进制异或操作,再将结果转换成十进制,以此类推,进而得到第二扩散乱生成的矩阵CC;Step S43, using the pseudo-random sequence R3 generated by Tent mapping to perform a bit XOR operation on the matrix C, that is, converting the matrix C and R3 into a matrix with a size of 512×512, traversing the two matrices at the same time, and taking out The values in the same position of the two matrices are converted into a binary number represented by a string, and then the binary XOR operation is performed, and the result is converted into decimal, and so on, and the matrix CC generated by the second diffusion disorder is obtained;
步骤S44、利用复合混沌映射生成的伪随机序列R1对所述矩阵CC进行洗牌打乱,即对矩阵R1进行sort操作,将矩阵R1里的值进行升序排序,将矩阵R1的位置变化数据存储在一个新的位置矩阵中,根据位置矩阵对所述矩阵CC进行置乱,进而得到第二轮置乱生成的加密的测试图像。Step S44, shuffling the matrix CC by using the pseudo - random sequence R1 generated by the composite chaotic map, that is, performing a sort operation on the matrix R1, sorting the values in the matrix R1 in ascending order, The position change data is stored in a new position matrix, and the matrix CC is scrambled according to the position matrix, thereby obtaining an encrypted test image generated by the second round of scrambling.
综上所述,本发明的优点在于:To sum up, the advantages of the present invention are:
1、通过采用Sine映射和Chebyshev映射作为种子映射,利用扰动分叉参数生成复合混沌映射,提高了复合混沌映射的复杂度,有效的扩大了密钥空间,进而极大的提升了图像加密的安全性。1. By using Sine map and Chebyshev map as seed map, and using perturbation bifurcation parameters to generate composite chaotic map, the complexity of composite chaotic map is improved, the key space is effectively expanded, and the security of image encryption is greatly improved sex.
2、通过将两个一维混沌映射组成一个新的复合混沌映射,进而极大的降低了图像加密算法的执行成本,减轻了对计算机运算能力的依赖。2. By combining two one-dimensional chaotic maps into a new composite chaotic map, the execution cost of the image encryption algorithm is greatly reduced, and the dependence on the computing power of the computer is relieved.
3、通过将明文矩阵信息中的像素值作为初始密钥的生成依据,极大的提高了图像加密算法抵抗明文攻击的能力。3. By using the pixel values in the plaintext matrix information as the basis for generating the initial key, the ability of the image encryption algorithm to resist plaintext attacks is greatly improved.
虽然以上描述了本发明的具体实施方式,但是熟悉本技术领域的技术人员应当理解,我们所描述的具体的实施例只是说明性的,而不是用于对本发明的范围的限定,熟悉本领域的技术人员在依照本发明的精神所作的等效的修饰以及变化,都应当涵盖在本发明的权利要求所保护的范围内。Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments we describe are only illustrative, rather than used to limit the scope of the present invention. Equivalent modifications and changes made by a skilled person in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011038591.3A CN112153238B (en) | 2020-09-28 | 2020-09-28 | Image encryption method based on Tent mapping and composite chaotic mapping |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011038591.3A CN112153238B (en) | 2020-09-28 | 2020-09-28 | Image encryption method based on Tent mapping and composite chaotic mapping |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112153238A CN112153238A (en) | 2020-12-29 |
CN112153238B true CN112153238B (en) | 2022-07-15 |
Family
ID=73894888
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011038591.3A Active CN112153238B (en) | 2020-09-28 | 2020-09-28 | Image encryption method based on Tent mapping and composite chaotic mapping |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112153238B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113194213B (en) * | 2021-04-08 | 2022-05-20 | 安徽大学 | A PNG image information hiding and restoration method based on secret sharing and chaotic mapping |
CN113190867B (en) * | 2021-05-26 | 2024-02-06 | 中国工商银行股份有限公司 | Key generation method, key generation device, electronic device, and storage medium |
CN115250171A (en) * | 2021-12-30 | 2022-10-28 | 刘芳 | Dynamic encryption method for local area network information security based on composite chaotic mapping |
CN115277977B (en) * | 2022-07-25 | 2023-11-10 | 重庆邮电大学 | Hybrid chaotic image encryption method based on FPGA (field programmable Gate array) configurable floating point precision |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103530571A (en) * | 2013-09-25 | 2014-01-22 | 上海理工大学 | Image encryption method based on sine mapping and Logistic chaos sequence |
CN108133446A (en) * | 2016-12-01 | 2018-06-08 | 钦州市晶通科技有限公司 | A kind of composite chaotic Second-scrambling resume image |
CN108235029A (en) * | 2018-01-05 | 2018-06-29 | 广西师范大学 | A kind of compression of images encryption method based on compressed sensing and cai's circuit |
CN108322622A (en) * | 2018-02-23 | 2018-07-24 | 哈尔滨理工大学 | A kind of color digital image encryption method based on 2D-VMD and octuple hyperchaotic system |
CN108366181A (en) * | 2018-01-23 | 2018-08-03 | 西南财经大学 | A kind of image encryption method based on hyperchaotic system and multistage scramble |
CN110430036A (en) * | 2019-07-05 | 2019-11-08 | 云南大学 | A kind of RGB color image encryption method based on poor chaotic maps |
CN111050020A (en) * | 2019-11-12 | 2020-04-21 | 河南大学 | Color Image Compression and Encryption Method Based on Compressed Sensing and Double Random Encryption Mechanism |
CN111683191A (en) * | 2020-06-08 | 2020-09-18 | 兰州理工大学 | A fast chaotic image encryption method with simultaneous row and column scrambling and diffusion |
-
2020
- 2020-09-28 CN CN202011038591.3A patent/CN112153238B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103530571A (en) * | 2013-09-25 | 2014-01-22 | 上海理工大学 | Image encryption method based on sine mapping and Logistic chaos sequence |
CN108133446A (en) * | 2016-12-01 | 2018-06-08 | 钦州市晶通科技有限公司 | A kind of composite chaotic Second-scrambling resume image |
CN108235029A (en) * | 2018-01-05 | 2018-06-29 | 广西师范大学 | A kind of compression of images encryption method based on compressed sensing and cai's circuit |
CN108366181A (en) * | 2018-01-23 | 2018-08-03 | 西南财经大学 | A kind of image encryption method based on hyperchaotic system and multistage scramble |
CN108322622A (en) * | 2018-02-23 | 2018-07-24 | 哈尔滨理工大学 | A kind of color digital image encryption method based on 2D-VMD and octuple hyperchaotic system |
CN110430036A (en) * | 2019-07-05 | 2019-11-08 | 云南大学 | A kind of RGB color image encryption method based on poor chaotic maps |
CN111050020A (en) * | 2019-11-12 | 2020-04-21 | 河南大学 | Color Image Compression and Encryption Method Based on Compressed Sensing and Double Random Encryption Mechanism |
CN111683191A (en) * | 2020-06-08 | 2020-09-18 | 兰州理工大学 | A fast chaotic image encryption method with simultaneous row and column scrambling and diffusion |
Non-Patent Citations (3)
Title |
---|
2D Chebyshev- Sine Map for Image Encryption;Yanru Zhong et al.;《2018 7th International Conference on Digital Home (ICDH)》;20181201;第1-8页 * |
Construction of a new 2D Chebyshev-Sine map and its application to color image encryption;Hongjun Liu et al;《Multimedia Tools and Applications》;20181211;第78卷;第15997-16010页 * |
基于2D Chebyshev-Sine映射的图像加密算法;钟艳如等;《浙江大学学报(理学版)》;20190331;第46卷(第2期);第131-141、160页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112153238A (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112153238B (en) | Image encryption method based on Tent mapping and composite chaotic mapping | |
CN111105339B (en) | Image encryption method based on multidimensional chaotic system and Joseph scrambling | |
Xian et al. | Double parameters fractal sorting matrix and its application in image encryption | |
Man et al. | Double image encryption algorithm based on neural network and chaos | |
CN113538203B (en) | Image encryption method and device based on novel two-dimensional composite chaotic mapping and SHA-256 | |
CN108234813A (en) | Plaintext associated images Encryption Algorithm based on Hyperchaotic Chen System | |
CN107590394B (en) | An Image Encryption Method Based on Chaotic Map and Bit Reorganization | |
CN110086600B (en) | An Image Encryption Method Based on Hyperchaotic System and Variable Step Joseph Problem | |
CN106570815A (en) | Image encryption method based on double-chaos system and blocking | |
CN109803063A (en) | A kind of image encryption method based on five dimension ultra-chaos systems | |
CN112906043B (en) | Image encryption method based on chaotic mapping and chaotic S-box substitution | |
Wen et al. | Triple-image bit-level encryption algorithm based on double cross 2D hyperchaotic map | |
CN114157408B (en) | Digital image encryption method, decryption method and system based on chaotic system | |
CN108199828A (en) | A kind of color image Encryption Algorithm and device | |
CN110225222B (en) | Image encryption method based on 3D orthogonal Latin square and chaotic system | |
CN117579756B (en) | Image encryption method based on block selection Zigzag scrambling and rotary coding of wheel disc | |
CN118474267A (en) | Image processing method based on chaotic system applying inverse cosine function | |
Song et al. | Multi-image reorganization encryption based on SLF cascade chaos and bit scrambling | |
Bahi et al. | Evaluating quality of chaotic pseudo-random generators: Application to information hiding | |
Verma et al. | Quantum image encryption algorithm based on 3D-BNM chaotic map | |
CN117527182A (en) | Image encryption method, device, terminal and storage medium | |
CN112887075A (en) | Encryption method of similar full-connection network image based on plaintext correlation | |
CN109361830A (en) | A plaintext-based image encryption method | |
CN109559269B (en) | Image encryption method and terminal | |
CN116996626A (en) | Double-quantum image encryption method based on chaotic system |
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 |