﻿ 基于改进标准映射的图像加密算法 A Novel Image Encryption Algorithm Based on Improved Standard Mapping

Computer Science and Application
Vol.07 No.08(2017), Article ID:21681,21 pages
10.12677/CSA.2017.78087

A Novel Image Encryption Algorithm Based on Improved Standard Mapping

Yucheng Chen, Ruisong Ye

Department of Mathematics, Shantou University, Shantou Guangdong

Received: Jul. 24th, 2017; accepted: Aug. 6th, 2017; published: Aug. 14th, 2017

ABSTRACT

This paper proposes an image encryption algorithm based on improved standard mapping. The standard mapping is improved by introducing the nonlinear term of the variables and the linear combination of the parameters. The phase space diagram, Lyapunov exponent and time series tests of the improved standard mapping show that improved standard mapping has good random performance. A new gray image encryption algorithm is then designed using the improved standard mapping. In the permutation stage, the improved standard map is applied to disorder the pixels positions to achieve good scrambling effect. In the diffusion stage, the mechanism of dynamic feedback is used to make the diffusion process have fair diffusion and encryption effect. Finally, the performance analysis is carried out, including key space analysis, key sensitivity analysis, statistical analysis, etc. Simulation experiments show that the encryption algorithm proposed has a large key space, strong key sensitivity, strong robustness against statistical analysis attack, brute force attack, differential analysis attack, and chosen\known plaintext attacks, etc.

Keywords:Standard Mapping, Chaos, Image Encryption

1. 引言

2. 标准映射及其改进

2.1. 标准映射

(1)

(2)

2.2. 标准映射的改进及其特性分析

(3)

(a) (b)(c) (d)

Figure 1. (a)-(d) are the phase maps of the standard mapping parameters k = 0.6, 0.971635, 1, 5, respectively

(a) (b)

Figure 2. (a) and (b) are the phase maps of the standard mapping and the improved standard mapping under the same initial conditions

(a) (b)(c)

Figure 3. (a)-(c) are the Lyapunov exponent curves of standard mapping and improved standard mapping, respectively

(4)

(5)

(6)

(a) (b)

Figure 4. (a), (b) are the x, y time series of the improved standard mapping, respectively

(a) (b)(c)

Figure 5. (a)-(c) are the auto-correlation and cross-correlation test results of the time series generated by the improved standard mapping, respectively

(7)

(a) (b) (c) (d)

Figure 6. (a)-(d) correspond to the plaintext and the scrambled image after the standard mapping scrambling 1, 2, 3 times

(a) (b) (c) (d)

Figure 7. (a)-(d) correspond to the plaintext and the scrambled image after the improved standard mapping scrambling 1, 2, 3 times

3. 基于改进标准映射的图像加密算法

Step 1. 读入明文，输入密钥。读入明文图像I，并记，计算明文图像的SHA256哈希函数值，并将其转化为一个大小为的向量，设置要执行图像置乱的次数iter，输入改进标准映射的参数, , ,

Step 2. 计算防止出现置乱无效的整数对。首先计算向量的大小和所有元素的和，分别记为，然后选取向量的奇数项和偶数项的元素并分别求和，分别记为，最后分别利用(8), (9)式计算,

(8)

(9)

Step 3. 利用离散化改进标准映射(7)对明文灰度图像像素的位置进行置乱iter次，置乱后的图像矩阵记为I1。

Step 4. 利用公式(10), (11)计算改进标准映射(3)式的初值,

(10)

(11)

Step 5. 计算改进标准映射的两个新参数,，和为了避免产生过渡效应的迭代步数。具体计算过程通过以下(12), (13), (14)式得到：

(12)

(13)

(14)

Step 6. 以,为初值，,为参数，迭代改进标准映射(3)式次，产生两个序列,，为了避免量化过程出现的过渡效应发生的情况，我们把,的前项丢弃。这样我们就得到两个大小均为的向量,

Step 7. 利用Step 6生成的两个随机序列产生3个密钥流，记为key 1, key 2, key 3。其计算公式如下(15), (16), (17)式：

(15)

(16)

(17)

Step 8. 将置乱后的图像矩阵I1重新排成一个一维向量I2。依据以下(18)式从上到下，从左到右的顺序排成一行，同时利用(19)式计算除了I2第一项以外的所有元素的和，记为，最后根据(20)式产生一个种子值seed。

(18)

(19)

(20)

Step 9. 计算用来加密置乱后I2的第1个元素的密钥。这里根据(21)式来计算，该值与key 1和key 2有关。

(21)

Step 10. 加密置乱后图像I2的第1个元素。即是对向量I2的第1个元素进行扩散产生最后的密文I3的第1项。扩散公式(22)如下：

(22)

Step 11. 设置，计算用来加密置乱后元素的动态指数,。这2个动态指数与已经加密过后的元素和由(15), (16)产生的密钥有关，数学计算公式如下(23), (24)所示：

(23)

(24)

Step 12. 采用Step 11产生的,根据如下式(25)对置乱后的图像I2的第项进行加密，直到

(25)

Step 13. 对置乱后图像I2的最后一个像素加密。首先利用式(26)计算类似Step 12的指数，然后用式(27)对I2的最后一个像素进行加密。然后把I3拉成一个新的2维矩阵I4，即为我们的最终加密密文。

(26)

(27)

Figure 8. The flow chart of encryption algorithm based on improved standard mapping

Figure 9. The flow chart of decryption algorithm based on improved standard mapping

4. 仿真实验和加密性能分析

4.1. 仿真实验

4.2. 加密性能分析

4.2.1 . 密钥空间分析

(a) (b) (c) (d) (e) (f) (g) (h) (i)

Figure 10. (a)-(i) correspond to the plain-text, cipher-text, and decrypted images of images Lena (a), Elaine (d), Man (g)

4.2.2 . 直方图分析

(a) (b)

Figure 11. (a)-(b) correspond to the Lena image and cipher-text histogram

(a) (b)

Figure 12. (a)-(b) correspond to the symbiotic histogram of Lena image and cipher-text respectively

4.2.3 . 图像信息熵分析

(28)

4.2.4 . 相邻像素的相关性分析

Table 1. Information entropy of different plain-text and cipher-text corresponding to different encryption algorithms

Table 2. The correlation coefficient between Lena and its cipher-text in horizontal, vertical and diagonal directions, respectively

(a) (b) (c) (d) (e) (f)

Figure 13. (a)-(c), (d)-(f) are the distributions of Lena and cipher-text pixels in horizontal, vertical and diagonal directions, respectively

(29)

4.2.5 . 明文图像与密文图像的相关性

Table 3. The correlation coefficient between plain-text and cipher-text

(30)

4.2.6 . 密钥敏感性分析

, ,

, ,

.

4.2.7. 差分分析

(a) (b) (c) (d) (e) (f) (g) (h) (i) (j)

Figure 14. Encryption sensitivity test: (a), (c), (e), (g), (i) were encrypted with Key 1 - Key 5, respectively; (b), (d), (f), (h), (j) correspond to the difference between cipher-text generated by (a), (c), (e), (g), (i) and cipher-text generated by Key, respectively

Table 4. The correlation coefficients between different cipher-texts generated by different keys

Table 5. The correlation coefficients between plaintexts decrypted by different keys

(a) (b) (c) (d)(e) (f)

Figure 15. (a)-(f) are plain-texts by using Key and Key 1 - Key 5 to decrypt the cipher-text generated by Key

(31)

(32)

(33)

(34)

. (35)

(a) (b)

Figure 16. (a)-(b) are the NPCR and UACI graphs, respectively

5. 总结

A Novel Image Encryption Algorithm Based on Improved Standard Mapping[J]. 计算机科学与应用, 2017, 07(08): 753-773. http://dx.doi.org/10.12677/CSA.2017.78087

1. 1. http://www.xinhuanet.com/world/ljm2013/index.htm

2. 2. http://finance.qq.com/a/20170119/003242.htm

3. 3. 张同锋. 基于一维复合混沌映射的数字图像加密算法研究[D]: [博士学位论文]. 兰州: 兰州大学, 2016.

4. 4. Liu, W., Sun, K. and Zhu, C. (2016) A Fast Image Encryption Algorithm Based on Chaotic Map. Optics and Lasers in Engineering, 84, 26-36.

5. 5. 张强, 田小平. 基于图像位平面分解的混沌加密方法研究[J]. 西安邮电学院学报, 2010, 15(5): 83-86.

6. 6. Robinson, R.C., 韩茂安, 邢业朋, 等. 动力系统导论[M]. 北京: 机械工业出版社, 2007.

7. 7. Alvarez, G. and Li, S. (2006) Some Basic Cryptographic Requirements for Chaos-Based Cryptosystems. International Journal of Bifurcation and Chaos, 16, 2129-2151. https://doi.org/10.1142/S0218127406015970

8. 8. Matthews, R. (1989) On the Derivation of a “Chaotic” Encryption Algorithm. Cryptologia, 13, 29-42. https://doi.org/10.1080/0161-118991863745

9. 9. Fridrich, J. (1998) Symmetric Ciphers Based on Two-Dimensional Chaotic Maps. International Journal of Bifurcation and Chaos, 8, 1259-1284. https://doi.org/10.1142/S021812749800098X

10. 10. Ye, R. (2011) A Novel Chaos-Based Image Encryption Scheme with an Efficient Permutation-Diffusion Mechanism. Optics Communications, 284, 5290-5298.

11. 11. Wong, K.W., Kwok, B.S.H. and Law, W.S. (2008) A Fast Image Encryption Scheme Based on Chaotic Standard Map. Physics Letters A, 372, 2645-2652.

12. 12. 李昌刚, 韩正之, 张浩然. 一种基于随机密钥及“类标准映射”的图像加密算法[J]. 计算机学报, 2003, 26(4): 465- 470.

13. 13. Xu, L., Gou, X., Li, Z., et al. (2017) A Novel Chaotic Image Encryption Algorithm Using Block Scrambling and Dynamic Index Based Diffusion. Optics and Lasers in Engineering, 91, 41-52.

14. 14. Hamdi, M., Rhouma, R. and Belghith, S. (2017) A Selective Compression-Encryption of Images Based on SPIHT Coding and Chirikov Standard Map. Signal Processing, 131, 514-526.

15. 15. Fu, C., Chen, J., Zou, H., et al. (2012) A Chaos-Based Digital Image Encryption Scheme with an Improved Diffusion Strategy. Optics Express, 20, 2363-2378. https://doi.org/10.1364/OE.20.002363

16. 16. Chai, X., Chen, Y. and Broyde, L. (2017) A Novel Chaos-Based Image Encryption Algorithm Using DNA Sequence Operations. Optics and Lasers in Engineering, 88, 197-213.

17. 17. Patidar, V., Pareek, N.K., Purohit, G., et al. (2011) A Robust and Secure Chaotic Standard Map Based Pseudorandom Permutation-Substitution Scheme for Image Encryption. Optics Communications, 284, 4331-4339.

18. 18. Lian, S., Sun, J. and Wang, Z. (2005) A Block Cipher Based on a Suitable Use of the Chaotic Standard Map. Chaos, Solitons & Fractals, 26, 117-129.

19. 19. 吴成茂. 离散Arnold变换改进及其在图像置乱加密中的应用[J]. 物理学报, 2014, 63(9): 090504.

20. 20. Ye, R. (2014) A Novel Image Encryption Scheme Based on Generalized Multi-Sawtooth Maps. Fundamenta Informaticae, 133, 87-104.

21. 21. Wang, Y., Wong, K.W., Liao, X., et al. (2009) A Chaos-Based Image Encryption Algorithm with Variable Control Parameters. Chaos, Solitons & Fractals, 41, 1773-1783.

22. 22. Zhang, Y. and Xiao, D. (2013) Double Optical Image Encryption Using Discrete Chirikov Standard Map and Chaos-Based Fractional Random Transform. Optics and Lasers in Engineering, 51, 472-480.

23. 23. Ye, R. and Huang, H. (2010) Application of the Chaotic Ergodicity of Standard Map in Image Encryption and Watermarking. International Journal of Image, Graphics and Signal Processing, 2, 19. https://doi.org/10.5815/ijigsp.2010.01.03

24. 24. Zhao, J., Guo, W. and Ye, R. (2014) A Chaos-Based Image Encryption Scheme Using Permutation-Substitution Architecture. International Journal of Computer Trends and Technology, 15, 174-185. https://doi.org/10.14445/22312803/IJCTT-V15P137

25. 25. Rannou, F. (1974) Numerical Study of Discrete Plane Ar-ea-Preserving Mappings. Astronomy and Astrophysics, 31, 289.

26. 26. http://www.scholarpedia.org/article/Chirikov_standard_map

27. 27. http://sipi.usc.edu/database/

28. 28. 张弘. 数字图像处理与分析[M]. 北京: 机械工业出版社, 2013.