^{1}

^{2}

^{1}

^{1}

^{2}

^{1}

^{2}

The current common color image encryption algorithms applying “scrambling-diffusion” have some problems, such as the small key space, the cumbersome encryption process, and the security vulnerability. Aiming at these problems, this paper proposes a new color image encryption algorithm based on the hyperchaotic system and applying “transforming-scrambling-diffusion” model. Before scrambling, in accordance with the plaintext itself attributes, the number of iterations was calculated, all the pixel values of color image were transformed into gray code iteratively, and then the chaotic sequence was generated from the four-dimensional hyperchaotic system. Pixel matrix after gray code transformation was converted to one-dimensional matrix. The chaotic sequence was sorted and the one-dimensional matrix was changed positions correspondingly to complete the whole domain scrambling. And then, bit-operation was executed for image diffusion. The ciphertext can be obtained by matrix transformation. The key sensitivity, histogram, information entropy, correlation, and other evaluation indexes were calculated and analyzed through the simulation experiment. Compared with other algorithms, it can be proved that the encryption algorithm has the strong antiattack ability.

With the rapid development of multimedia information industry, the security requirements of information are gradually improved [

The equation of state of the 4-dimensional autonomous hyperchaotic system used in this paper is [

where

Chaotic attractors of system (

x-y-z

x-u

Compared with low-dimensional chaotic systems, high-dimensional hyperchaotic systems have more complex phase space and dynamic characteristics. At this time, system (

The common image encryption algorithms mostly apply the model of “scrambling-diffusion” [

Gray code is a typical binary communication coding format [

Among them,

In this algorithm, the first encrypted gray code iteration conversion times are calculated according to the size of the color image

where

Based on the chaotic sequence generated by hyperchaotic system, this algorithm can scramble the pixel positions of n-by-m color images. The steps of pixel position scrambling are as follows:

According to the given system parameters

Four chaos real value sequences are converted into a one-dimensional matrix. To reduce the impact of the initial value on the system, the previous

Among them,

3D matrix which has been converted to gray code is converted to a one-dimensional matrix

For color images, there is a strong correlation between adjacent pixels and each color component. The whole-field pixel scrambling method not only disrupts the correlation between adjacent pixels, but also changes the correlation among R, G, and B color components to achieve a better scrambling effect. Although the histogram statistics of each color component have changed to some extent, the histogram statistics of the image as a whole have not been changed. The histogram statistics of each component are not uniform; hence the further encryption is still needed.

In order to improve the security of image encryption, especially to equalize the histogram and hide the statistical information of plaintext, this algorithm uses the sequence generated by hyperchaotic system to diffuse the pixel value of image. The hyperchaotic sequence transforming into one dimension is discretized as follows to obtain the key flow

The matrix generated by the XOR operation of scrambled image sequence with the key flow

Decryption algorithm is the inverse process of encryption algorithm, decryption image can be obtained by the whole decryption process according to the key:

In this experiment, color image “lena.jpg” of size 256 by 256 was selected as the encrypted plaintext image. The parameter values of the four-dimensional hyperchaotic system (

Plaintext, ciphertext, and decrypted image.

Plaintext

Ciphertext

Decrypted image

To detect the key sensitivity of the algorithm, only one key was changed during decryption. The initial value of the chaotic system, the number of iterations and the order number selected at the beginning of the chaotic sequence are changed, respectively, and slightly. In proper order, let

3 Error decrypted images.

Although only one key was changed imperceptibly during every round, the ciphertext could not be decrypted precisely, therefore, this algorithm can be proved to have a strong key sensitivity.

Histogram shows the frequency of different pixel values appearing in images. It has been widely used in image retrieval, classification, and other fields [

Histogram of plaintext and ciphertext.

Plaintext-R

Plaintext-G

Plaintext-B

Ciphertext-R

Ciphertext-G

Ciphertext-B

The histogram of color components tends to be uniform distribution, which is completely different from the plaintext distribution. Figure

There is often a high correlation between adjacent pixels in plaintext which is the inherent feature of the image. Therefore, the encryption algorithm should try to reduce the correlation between adjacent pixels. In this paper, 10,000 pixels are randomly extracted from plaintext and ciphertext. The correlation coefficients in horizontal, vertical, and diagonal directions are calculated according to the following equations:

Adjacent element correlation.

Correlation Coefficient | Horizontal | Vertical | Diagonal |
---|---|---|---|

Plaintext | 0.9372 | 0.9458 | 0.9681 |

Ciphertext | 0.0013 | 0.0015 | -0.0024 |

Ciphertext [ | -0.0102 | 0.0076 | -0.0153 |

Ciphertext [ | 0.0129 | 0.0065 | 0.0013 |

Ciphertext [ | 0.0034 | 0.0050 | 0.0056 |

Ciphertext [ | 0.0173 | -0.0112 | -0.0125 |

2500 pixels were randomly selected from the three primary color components of the original image and the encrypted image, respectively. The element distribution in the diagonal direction is shown in Figure

Correlation of pixel components in the diagonal direction of plaintext and ciphertext.

Plaintext-R

Plaintext-G

Plaintext-B

Ciphertext-R

Ciphertext-G

Ciphertext-B

Adjacent elements of plaintext images tend to have a strong correlation, and the distribution of elements and their adjacent elements is concentrated around

In fact, pixel values at the same relative position of different color components in color images are often highly correlated. Therefore, in the process of color image encryption, attention should be paid to reducing the correlation between pixel values at the same relative position of different components.

Some random points are randomly selected in plaintext and ciphertext. The pixel values of the three-color components R, G, and B represent the X, Y, and Z axis coordinates, the adjacent elements in the diagonal direction are plotted as the relationship diagram of the adjacent elements. The scatter diagram is shown in Figure

RGB components are represented by the distribution of adjacent elements diagonally.

Plaintext-diagonal

Ciphertext-diagonal

Table

In the process of image transmission or decoding, pepper and salt noise, Gaussian noise, and other noises as well as image clipping are often generated [

Decrypted images of 1/4 clipping and noises.

1/4 tailoring

0.20 pepper noise

0.1 Gaussian noise

Poisson noise

Speckle noise

Decryption (a)

Decryption (b)

Decryption (c)

Decryption (d)

Decryption (e)

According to Figure

This algorithm is based on gray code and hyperchaos system of 4D. Parameters, initial value, the number of iterations, and image size are the encryption key. When the precision is set to 10^{14}, key space would be more than

Image information entropy is used to represent the aggregation feature of image pixel value distribution [

According to Table

Comparison of information entropy.

Image | Information Entropy |
---|---|

plaintext | 7.4481 |

ciphertext | 7.9991 |

ciphertext [ | 7.8556 |

ciphertext [ | 7.8534 |

ciphertext [ | 7.9994 |

ciphertext [ | 7.9551 |

Since the starting sequence number of gray code and chaotic sequence is related to the attribute of plaintext image itself [

NPCR (Number of Pixels Change Rate) and UACI (Unified Average Changing Intensity) [

where

The calculated results are shown in Table

Comparison of NPCR and UACI.

Image | NPCR/% | UACI/% |
---|---|---|

Ciphertext | 99.63 | 33.52 |

Ciphertext [ | 99.63 | 33.54 |

Ciphertext [ | 86.55 | 33.47 |

Ciphertext [ | 99.63 | 33.51 |

Ciphertext [ | 99.60 | 30.34 |

When the NPCR and UACI of the ciphertext are greater than 99.6% and 33.46%, respectively, it indicates that the algorithm has good security. As shown in Table

The data used to support the findings of this study are included within the article.

In this paper, a new color image encryption algorithm based on 4D hyperchaotic system and “transformation-scrambling-diffusion” is proposed. It is different from the traditional encryption algorithm based on “scrambling-diffusion”. According to the chaotic sequence generated by the four-dimensional chaotic system, the scrambling and diffusion are completed and the algorithm shows better statistical characteristics. The process of encryption and decryption is simple and easy to implement. In the design of this algorithm, some encryption keys are dependent on plaintext which increases the sensitivity of the algorithm to plaintext and improves the antiplaintext attack ability. The simulation results show that this algorithm has good security and strong antidamage ability. As a result, this algorithm has a very high application value in the field of image encryption.

The authors declare that there are no conflicts of interest regarding the publication of this paper.

This project is funded by the National Natural Science Foundation of China (NSFC), with the Fund no. 61806219.