1. Introduction
Along with the swift advancement of communications and computer literacy, the use of multimedia applications has progressed quickly in all sections of society, because of their simple perspective and appealing appearance. In the meantime, the difficulties in maintaining the security of these applications have motivated a great deal of interest. Multimedia data have some inherent properties, for instance high redundancy [
1] and large data capacity; therefore, the long-established encryption algorithms such as RSA, DES and AES are no longer suitable for such data. Many different image encryption algorithms, for example hash [
2,
3], Fibonacci [
4], chaos [
5,
6,
7,
8,
9,
10,
11,
12], transform domain [
13,
14] and DNA [
15], have been proposed to meet the security requirements.
In the theory of cryptanalysis, the security of an encryption algorithm is determined by its key space. The key space of an encryption method should be large enough to withstand a brute force attack at an obtainable computing capability. The classical permutation and diffusion encryption schemes required a higher amount of chaotic data. Generally, this need is fulfilled by one-dimensional or higher-dimensional chaotic maps, like the Arnold cat map, tent map, standard map, Beker’s map, etc. Meanwhile, many encryption systems [
16,
17,
18,
19,
20,
21,
22,
23] have been successfully broken. The main reasons for the insecurity include: insufficient key space against brute force attacks, more dependence on secret keys, vulnerability against differential attack, poor sensitivity and also, with the advances in chaotic signal estimation technologies, the possibility to find chaotic orbits corresponding to the initial values (secret keys). The usage of two independent keys in the permutation and diffusion stage, which is breakable by a known plaintext attack, can be pointed out as another drawback.
These deficiencies can be counteracted by using higher-dimensional chaotic maps or chaotic dynamical systems, as well as by some improvements, such as time-varying delays [
24], couple map lattices, S-box [
25], etc. In [
26], Chen proposed an encryption scheme based on a dynamical state variable selection mechanism (DSVSM), which is not only fast, but also secure. Its main features are: the use of the same secret key in both the permutation and diffusion stages, involving pixels of the plain image, the use of a higher-dimensional chaotic dynamical system with great sensitivity to initial values and different key streams for different plain images by use of the same secret keys. As a result, higher security is achieved without exhausting much of the resources.
In this paper, we propose the chaotic dynamical state variable selection procedure (CDSVSP) by using a chaotic tent map. The architecture of our image encryption scheme is based on standard permutation and the diffusion system [
1]. In the permutation stage, we also create the confusion with the use of the chaotic tent map, and in the diffusion stage, we use the time-varying delays. The simulation demonstrated an achievement of better results than Chen [
26]. This cryptosystem can provide the security necessities recommended in [
27,
28] and deal with the defects present in the broken cryptosystems by making improvements in the following features:
Chaotic state variables are generated from four-dimensional chaotic systems; a minor alteration in the secret key will not only influence the diffusion stage, but also manipulate the permutation at the same time.
In CDSVSP, the pixels of plain images are used to choose the state variable for encryption. Thus, different key streams will be generated for each individual plain image, even if the same secret keys are used. Therefore, by encrypting individual images, the attacker is unable to extract helpful information. This characteristic guarantees the security against the known-plaintext attacks.
In the permutation stage, the added confusion procedure can also, to some extent, create a diffusion effect. As a result, the whole effect of diffusion is increased.
The remaining part of this paper is composed as follows. The chaotic dynamic state variables selection procedure (CDSVSP) is presented in
Section 2. In
Section 3, the image encryption/decryption scheme is formulated and explained.
Section 4 is dedicated to the numerical results and analysis of our proposed image encryption scheme. Finally, we provide the concluding remarks in
Section 5.
2. Selection Procedure
In the field of cryptography, chaos is widely used. The algorithms based on chaos have exposed some exceptional features, such as complexity and security. Normally, area-preserving maps like the logistic map, bakermap and Lorenz map are used to permute the pixels of the plain image without changing the pixel values. However, in our scheme, in addition to permutation, pixel values are also changed. For this purpose, we use the chaotic tent map. The discretized tent map [
29] can be defined as:
where
is an integer.
In this paper, we used Lü’s hyperchaotic system [
30] as an example illustrating CDSVSP, as described by the following set of equations.
The initial system variables and act as the secret keys. In each iteration of the Lü’s hyperchaotic system, we get four state variables, denoted as X, Y, Z and W, respectively. For the currently processed image with pixels, the pixels are arranged in a one-dimensional array from the upper-left corner to the lower-right corner of the image. In CDSVSP, the chaotic state variables are selected with the use of the previously processed pixel and the chaotic tent map. Additionally, the value used for the first pixel is included in the secret keys. In order to demonstrate the CDSVSP properly, the following definitions are needed.
Let where and are the states of X, Z and W in the i-th, j-th, k-th and l-th iteration, respectively. It should be noted that i, j, k and l do not need to be equal to each other.
We define
as the selected variable in
that will be used to generate the key stream element for
. The decision will be made by an indicator
defined below:
where
is a tent map and both
a and
are parts of the secret keys.
For the first pixel value, has to be set as a seed.
The procedure of CDSVSP is described as follows:
Choose
sufficiently large and different from each other to act as secret keys. Iterate over Lü’s hyperchaotic system
times to get
as shown in
Figure 1, for the first pixel
, and then, select the state variable for
by computing
Based on this index, the system state is updated as follows:
Subsequently, select the state variable from updated S for by computing . Inductively, get the updated state variable set S for , and select the state variable from S by computing . Let us have the state for the , and we can assume, without loss of generality, that In this case, the state value is chosen for and the combination of state variables is reorganized to . Similarly, calculate and let The state value will be given to and the combination state variables transform to . Without loss of generality, it can be assumed that . The state value will be selected for ciphering Then, the state variable combination changes to . Let us assume that without loss of generality. The state value will be chosen for ciphering . Since is the last element of the chaotic state W, Lü’s system should be iterated enough times to produce a sufficient number of state variables for all the pixels.
3. Proposed Image Encryption Scheme
The proposed algorithm is a new chaotic image encryption scheme. The entire procedure of encryption is presented concisely in the flowchart in
Figure 2. Confusion and diffusion terms are required to be more specifically defined. The confusion and diffusion are properties of the operation of a secure cipher. The confusion term refers to making the relationship between the key and the ciphertext as complex and as involved as possible. Diffusion means that if we change a single bit of the image, then statistically, half of the bits in the ciphertext should change [
31]. The features of the encryption procedure are as follows.
3.1. Confusion Algorithm
The key stream
is produced by using the following formula:
where
returns the nearest integer value less than or equal to
represents the absolute value of
x and
is the remainder when
x is divided by
y.
First, we use a discretized tent map (
1) to change the value of each pixel of the plain image. Since the grey components in 8-bit images range from 0–
set
The discretized tent map as
is used
times to iteratively change each pixel value of the plain image. After the above transformation, the plaintext
P is converted into
. Secondly, in the permutation stage, the discretized tent map
is used
times to rearrange the position of each pixel, where
, and the input variable
indicates the index number of each pixel of
. Since the tent map is a one-to-one mapping, it will give us a permutation
Apply this permutation to
in a way that each pixel will be sent to the place of its index value in
In order to test the confusion and permutation effects of our proposed image encryption scheme, we performed simulations on the Lena gray scale standard test image and its modified version, achieved by changing only one pixel value. The number of pixel changing rate (NPCR) and unified averaged changed intensity (UACI) criteria are generally useful to study the performance of our approach. The formulae to calculate
and
are as follows:
where
W represents the width and
H represents the height of the image.
C and
are respectively the ciphered images before and after one pixel of the plain image is changed.
can be defined as:
The control parameters
and
) are used in the Lü chaotic system to generate chaotic state variables. The results, according to our confusion algorithms NPCR and UACI, are shown in
Table 1 with comparison to the existing techniques.
The inspection of
Table 1 will reveal the clear superiority of the proposed confusion algorithm: not only are the NPCR and UACI values much higher than Chen’s result [
26] and others, they are also more secure. In the sense that the attacker can by pass the permutation stage by taking the same value for all the pixels and try to break the diffusion algorithm, in the proposed algorithm, however, the pixel values are also changed, as well as permuted, so it is more secure against the known plaintext and chosen plaintext attacks.
3.2. Diffusion Algorithm
In the diffusion algorithm, the key stream
is generated by the same formula (
3) as in the confusion algorithm, but the CDSVSP will be applied on the confused image.
To calculate the cipher-pixel value, we use the values of current and previous pixels according to:
where
,
and
are, respectively, the currently operated pixel, output pixel and time-varying delay determined by the discretized tent map (
1) as follows:
Here, the initial values and are the keys. Furthermore, whenever , we use a constant time delay that is a part of the secret keys.
3.3. Proposed Algorithm for Image Encryption and Decryption
The flowchart of the proposed cryptosystem is in
Figure 2, and the encryption scheme is given below:
- Step 1:
Iterate the Lü chaotic system (
2) with
for
times continuously to avoid the harmful effect of the transitional procedure.
- Step 2:
Obtain the current state variable by means of CDSVSP. An initial value is set as the secret key for the first pixel; iterate the Lü system (
2) if needed.
- Step 3:
Calculate the key stream for the current pixel with Equation (
3).
- Step 4:
The discretized tent map (
1) is used to change the current pixel’s value.
- Step 5:
Go back to Step 2 until the values of all pixels are changed.
- Step 6:
Permute the pixels by using the discretized tent map (
1) as described in the confusion algorithm.
- Step 7:
Repeat Steps 1–6 m times.
- Step 8:
Obtain the current state variable by means of CDSVSP applied on the currently processed pixel of the confused image. The initial value is set as the secret key for the first pixel.
- Step 9:
Calculate the key stream for the current pixel with Equation (
3).
- Step 10:
Calculate the time-varying delays using the discretized tent map (
1).
- Step 11:
Mask the values of the currently processed pixel using Equation (
4).
- Step 12:
Go back to Step 8 until all pixels are encrypted.
- Step 13:
Repeat all these steps n times to ensure the security requirements are met.
Our proposed encryption algorithm consists of two parts: confusion and diffusion. The decryption is performed in the reverse order to the encryption. The inverse formula of masking (Equation (
4)) is given in Equation (
5). The discretized chaotic tent map is invertible, with the inverse given in Equation (
6); for more detail of the inverse, see [
29]:
The decryption is done as follows.
- Step 1:
Iterate over the Lü chaotic system (
2) with
for
times continuously to avoid the harmful effect of the transitional procedure.
- Step 2:
Obtain the current state variable by means of CDSVSP. The initial value is known for the first pixel; iterate over the Lü chaotic system (
2) if needed.
- Step 3:
Calculate the key stream for current pixel by Equation (
3).
- Step 4:
Calculate the time-varying delays using the discretized tent map (
1).
- Step 5:
Unmask the values of the currently processed pixel by using Equation (
5).
- Step 6:
Go back to Step 2 until all pixels are undiffused.
- Step 7:
Apply the reverse of permutation.
- Step 8:
Obtain the current state variable by means of CDSVSP applied on the currently processed pixel of the image found after Step 7. The initial value is known for the first pixel.
- Step 9:
Calculate the key stream for the current pixel by Equation (
3).
- Step 10:
Apply the inverse of the discretized tent map (
6) to get the pixel value of the plain image.
- Step 11:
Go back to Step 8 until all the pixels are unconfused.
- Step 12:
Repeat Steps 7–11 m times.
- Step 13:
Repeat all these steps n times to get the plain image.
4. Analysis and Simulation Results
Numerous different experiments were performed with many standard gray scale
-sized plain images and many encryption rounds to display the success and competence of the suggested encryption scheme. The proposed algorithm was tested in the MATLAB 2015 version with 64-bit double-precision according to IEEE [
32] standard 754. The steps taken were small enough in solving the hyper chaotic Lü’s dynamical system to avoid unwanted behavior [
33] and degradation effects [
34]. The parameters of the Lü’s hyperchaotic system are
and
4.1. Effectiveness Analysis
We took five standard gray scale test images and made their modified versions by changing the last bit of the lower right corner pixel of these test images. The proposed image cryptosystem is applied to these images. The NPCR and UACI between the encrypted test images and the cipher images of their modified versions are shown in
Table 2.
Hence, a single round of encryption is enough to get effective cipher images. Furthermore NPCR and UACI in all cases, proving that the proposed image encryption scheme is secure and protected against many attacks like differential attack. A change of a single pixel will result in obtaining entirely different cipher images, so that a known plaintext attack is successfully defended. The above simulation results proved the effectiveness of our proposed scheme.
4.2. Efficiency Comparisons
For an efficient encryption algorithm, NPCR and UACI should be greater than 99.6% and 33.4%, respectively. The efficiency of any algorithm is measured in terms of achieving these levels with minimum resources. Wong et al. [
12,
35] pointed out that efficiency is reflected by the average chaotic variables and average quantization operations, required in the encryption process. Thus, a comparison of the efficiency between the proposed encryption algorithm and five typical encryption algorithms [
11,
26,
36,
37,
38] based on these parameters is presented in
Table 3.
The proposed encryption algorithm needs only one round of encryption to achieve NPCR >99.6 and UACI >33.4, so for Chen’s algorithm [
26] and Fu’s algorithm [
36]. However, it is more secure, as already discussed in
Section 3.1. For encryption of the gray scale
sized image, only 65,650 iterations of Lü’s hyperchaotic system are needed. Thus 65,650 × 4 = 262,600 state variables are used to generate the key stream, and therefore, 1.002 chaotic variables are required to cypher each pixel on average. Hence, the proposed encryption algorithm is better in comparison to [
11,
26,
36,
37,
38], in one way or another.
4.3. Key Space Analysis
The key is a very essential aspect of every cryptosystem. An algorithm is only as secure as its key. Even if an algorithm is very strong and well designed, if the key is chosen poorly or the key space is too small, the cryptosystem will be broken eventually. The strength of any cryptographic algorithm depends on the size of its key space to make brute force attack unfeasible. In our proposed algorithm, the secret key consists of four parameters , , and of the Lü’s chaotic system. For the simulation of the proposed scheme, we use 64-bit double precision. According to IEEE floating point standards, the computational accuracy is As a result, the total number of likely values of the secret key is around which is large enough to resist a brute-force attack.
4.4. Key Sensitivity Analysis
The key sensitivity analysis guarantees the security of the cryptosystems against the brute-force attack. For any cryptosystem, the key sensitivity means that the two cipher images should be entirely independent of each other if the attacker uses two slightly different keys to encrypt the same plain image. To assess the key sensitivity, at first, we did the single-round encryption with keys
and
). Then, we added
to one of the parameters, whilst all others stayed unchanged, and we performed the encryption process again. The corresponding cipher images and the differential images are shown in
Figure 3. The differences between the corresponding cipher images are computed and given in
Table 4. The results clearly demonstrate that the cipher images have no relation between each other, and there is no considerable correlation that could be observed in the differential images.
4.5. Histogram Analysis
An image histogram shows the pixels distribution in an image by plotting all the pixels. Here, we use the well-known `Lena.jpg’
pixel plain image. The plain and cipher images are shown in
Figure 4a,c, respectively. Their corresponding histogram analyses are shown in
Figure 4b,d. It is easy to notice that the histogram of the cipher (encrypted) image is uniformly distributed and completely different from that of the plain (Lena gray scale) image.
4.6. Correlation Analysis
In the first step, the number of pairs of neighboring pixels should be chosen. Based on the literature study, we can assume that the four most commonly-used variants are 3000, 4000, 8000 and 10,000 randomly-selected pairs [
39,
40,
41]. We have conducted research on all of these variants; nevertheless, the best results were obtained for the variant containing 3000 pairs. The comparison of the results is presented in
Table 5. Due to having the best results, the 3000-pair variant will be presented in detail. If less than 3000 pairs were selected, the correlation between the neighboring pixels would not be exhibited comprehensively. A set of 3000 randomly-selected pairs of neighboring pixels (in the vertical, horizontal and diagonal directions) was collected from the plain and ciphered images, and the correlation coefficients of each two neighboring pixels were calculated according to the following formulas:
where:
The correlation coefficients of the adjacent pixels in the plain image and its cipher image are listed in
Table 5. Both the calculated correlation coefficients and
Figure 5 and
Figure 6 indicate that the correlation of the two adjacent pixels of the plain image is large, while that of the encrypted image is very small, so the encryption effect is satisfactory.
4.7. Entropy Measure Analysis
In 1949, Shannon found the unpredictability and randomness of an information source, called information entropy [
42]. It is a mathematical property. The entropy measure
of a message source
s is defined as:
where
N is the number of bits to represent the symbol
and
is the probability of the symbol
The entropy measure is
N for a truly random source consisting of
symbols. The ideal entropy for a 256 gray scale level image is eight. The lesser the entropy, the lesser the randomness and security. Information entropy was calculated for six different 256 gray scale test images of
in size before and after the first round of encryption. The values are given in
Table 6. The analysis of the values from
Table 6 shows that the entropy values of the cipher images are very close to eight, which guarantees the randomness and unpredictability of the cipher image.
5. Conclusions
The main contribution of the paper is to propose an image cryptosystem utilizing a four-dimensional chaotic system in order to get highly secure results. For this purpose, a new chaotic dynamic state variables selection procedure (CDSVSP) was developed. Low-dimensional chaotic systems are a useful tool for achieving low complexity and relatively small key space, yet obtaining high encryption speed at the same time.
The paper presents the theoretical foundations of the proposed approach, ensuring a very high level of security of the presented system. The chaotic sequence can be utilized to produce a key stream, which is then used in the confusion and diffusion stages. Furthermore, the discretized tent map increases the security even more by changing the pixel values, which creates some sort of diffusion. The proposed approach is also consistent with the current research trends on increasing the level of system security.
We verified the security of the image encryption scheme against numerous attacks, which allowed us to reach the conclusion that our image encryption scheme is highly secure and most suitable for image encryption. The results of the presented numerical example show that the entropy values of the cipher images ensure the randomness and unpredictability of the cipher images.
During the research, some possible areas of improvement have been identified. The potential future work directions could focus on:
practical utilization of the proposed procedure and system;
broader comparison of the obtained results with other approaches;
searching for possibilities to increase the level of system security even further.