1. Introduction
The art of converting the data (text/image/audio/video) into an unidentifiable form to make it secure from an illegal acquisition, alteration, modification, or unauthorized access while transmitting it over the network is known as cryptography [
1]. In 1989, Mathews introduced a chaotic cryptosystem to meet the requirement of image encryption [
2]. After that, a lot of research have been done to accomplish a secure and complex cryptosystem by utilizing its cryptographically desirable properties such as ergodicity, randomness and sensitivity to its initial values [
3]. The use of chaos or randomness provides a new dimension in the cryptosystem design. In order to use the chaos in cryptography efficiently and effectively, chaotic maps are implemented to create confusion and diffusion between the image pixels. It helps to reduce the correlation between the adjacent image pixels to enhance the encryption efficiency. These maps can be categorized into two groups: 1D chaotic maps such as Logistic map, Sine map and Tent map [
4,
5]. Due to simple structure, their chaotic orbits and initial values may be estimated with the least efforts [
6,
7,
8]. The other group of chaotic maps contains a high-dimensional chaotic map with a rather complex structure and a better chaotic performance such as Arnold map, Henon Map, Lorenz system etc. Many authors suggested various combinations of 1D-chaotic maps (Logistic map, Tent map, Sine map) to achieve an improved performance of the proposed cryptosystem [
9,
10,
11]. Although high-dimensional chaotic map based cryptosystem might be vulnerable to the security attacks [
12,
13]. Therefore, a complex and secure encryption scheme is required to employ it to the real-time applications.
The author utilized chaos features to generate chaotic random phase masks and design a cryptosystem using Gyrator transform and Jigsaw transform. The complexity of the method lies in the decryption process. To decrypt the cipher image, correct rotation angles of the Gyrator transform, initial values of chaotic map and the random permutation of the Jigsaw transform are required [
14]. The coupled map lattice is used to generate spatiotemporal chaos, which is further encoded with DNA sequence to encrypt the image [
15]. The Logistic map function is used three times to scramble the row coordinate, column coordinate and to diffuse the plain image respectively [
16]. Recently, a noisy Logistic map with an additive system noise and Clifford strange attractor were suggested by the author to encrypt the images in Navy [
17]. The author introduced a new Sine-Logistic modulation map to generate encryption key and a chaotic magic transform method to change the pixel position of a plain image [
10]. Similarly, a combined 2D-Logistic-adjusted-Sine map based cryptosystem was introduced by the author by adding a random value to the plain image [
9]. Besides all the above well-known chaotic maps, a new Beta chaotic map was introduced to generate key sequence which is based on Beta function [
18].
Fractals [
19] are non-regular geometric shapes that have the same degree of non-regularity on all scales. Benoit Mandelbrot, in 1979 studied a very complex & perturbed structure that is known as Mandelbrot set [
20]. The definition of Mandelbrot set is given in [
21] as “The Mandelbrot set is the set of values of c in the complex plane for which the orbit of 0 under iteration of the complex quadratic polynomial
remains bounded.” Fractal images exhibit the randomness property, appropriate to design a secure and reliable cryptosystem. Fractal based cryptosystem is designed using a complex number rather than the prime number, thus the generation of a private key and a public key is carried out using complex numbers arithmetically. The chaotic nature of the fractal leads to the sensitiveness of the key value towards initial value, makes it difficult to produce an accurate key by the intruder. An additional advantage of using fractal as a key is the key size, which generally impacts on the number of guesses that an attacker would need to make to find the key e.g., brute force attack i.e., it determines the feasibility of a collision attack. In the case of using the fractal key, the exchange key space depends on the size of the keys, which extend the key space, shrink the key size and make it more complex [
22].
A project was carried out in 2003 to encrypt a message with the help of random numbers and Mandelbrot set fractal. In 2004, USA navy published the patent which highlights the importance of fractal as an encryption/decryption key in a cryptosystem [
23]. A new approach to encryption using fractal geometry is discussed by the author in which a fractal is generated by using some initial parameters and then use it to encrypt a predetermined length of the message by using fractal orbits to corresponding alphabet mapping [
24]. Although Suthikshn [
25] encrypts the message using RSA in which an encryption key was generated using Mandelbrot set. A stream cipher encryption algorithm implemented on a compressed image in which a fractal dictionary encoding method is used in the image compression to achieve good quality image reconstruction [
26].
A multiphase symmetric key encryption algorithm was proposed by the author using finite field cosine transformation (FFCT) in which A fractal is used as a source of one-time-pad keystream, provides a secure cryptosystem [
27]. A cryptosystem will be relatively more secure if a set of different keys is used to encrypt the plain image on each iteration [
28]. In [
29], multiple fractal images were used to generate key stream. The method showed an improved performance by adding several parameters: feedback delay, multiplexing and independent horizontal and vertical shifts. To encrypt image pixels, Diaconu [
30] applied a bit level circular shift for pixel shuffling along with diffusion using two ciphering matrices. Later in [
31] concluded that the concept proposed in [
30] is vulnerable to the known/chosen plaintext attacks. To enhance the security of the original scheme, author modified the method by shifting each row of the plain image randomly and appending double crossover diffusion at the end of the original scheme. A pseudo random key stream using fractal generated in [
32] by involving a non-linear network and a delay element. A non-transitional key cryptosystem using superior Mandelbrot set and relative superior Mandelbrot set was discussed in [
33], which generates its private key at its own site with the help of other’s public key.
The proposed encryption scheme utilized the randomness and sensitivity towards its initial condition properties of both chaotic map and fractal function. A fractal image can be generated by using unlimited online resources. The convergence point of the fractal function becomes the initial value to the newly proposed 2D-Sine Tent composite map to generate a key sequence. The algorithm used the key to shuffle and then to diffuse the plain image by applying chaotic circular pixel shuffling (CCPS) and complex XOR operation respectively. To strengthen the system, the whole process is repeated three times using three different keys on feedback mechanism. The performance analysis of the proposed scheme is done by performing various tests such as histogram distribution, correlation coefficient, Shannon entropy, differential attack measure and key sensitivity.
The rest part of the paper is organized into sections:
Section 2 discusses about the methodologies used in the proposed encryption scheme. In
Section 3, a detailed description of an encryption process is presented.
Section 4 will show the simulation results and performance analysis statistics of the method to prove the efficiency and effectiveness towards the real-time applications. Finally,
Section 5 covers discussion and conclusion of the paper by briefing the findings of the proposed scheme.
3. A New Cryptosystem Using Fractal Function
So far, the paper discussed about the methodology to design a secure image cryptosystem. Generally, to generate a cipher image, one may need an encryption key and a plain image. According to
Figure 4, our key generation process consists of two steps:
Next step is to encrypt the plain image using the key stream generated in the previous step. This phase again consists of two steps:
- 3.
Plain image pixel shuffling by CCPS
- 4.
Perform complex XOR operation to shuffled image using chaotic key sequence.
The Algorithm 3 represents step by step execution of proposed image encryption process.
Algorithm 3. The proposed encryption algorithm |
Input: A superior fractal function and the plain image P of size M × N |
1. Obtain three sets of initial values (x, y) by iterating superior fractal function three times for different values of s (i.e., s = 0.3, 0.5 and 0.7) using Equations (7) and (8). |
2. Generate three chaotic key sequences CS1, CS2 and CS3 using 2D-STCM (Equations (3) and (4)) for all three sets of initial values mentioned in step (1). |
3. for i = 1 to 3 do |
4. Apply CCPS discussed in Section 2.3 to shuffle the plain image P using the chaotic key sequence CSi. |
5. Execute complex XOR operation discussed in Section 2.4 to diffuse the shuffled image using chaotic key sequence CSi. |
6. End For |
Output: An encrypted image (C) |
The flowchart in
Figure 4 depicts the proposed cryptosystem with the various schemes used in the encryption process.
3.1. Key Sequence Generation
The encryption/decryption key of the proposed method is generated by using a new 2D-STCM function by inputting the initial values derived from the superior fractal set. A fractal function works on a feedback system in which an output becomes input to the function on each iteration. While iterating the function, gradually it converges to a fixed point. The initial values used in 2D-STCM is nothing but the obtained fixed point after iterating the given function for certain times.
where
z and
c both are complex numbers and
n is a real number. A
s is a control parameter, ranges 0 <
s < 1 and convergent to a non-zero number.
The above Mandelbrot fractal equation with sine function was used to create beautiful fractal images as well as analyzed in the paper [
42] to calculate its convergence rate. The sample fractal images have been shown in
Figure 1. The analysis results showed that for a value of parameter
c, it converges very fast, hence suitable to fasten the key generation speed with much complexity. The paper uses three different values of control parameter
s to generate three sets of initial values. For each
s, fractal function will converge to a fixed point for different number of iterations. The implementation results depict that the function converges rapidly as
s increases, consequently, less time is required to generate initial values. For example, obtained set of initial values are I1 = {0.1880586, 0.0352573, 0.3, 256, 256}, I2 = {0.1899738, 0.0367336, 0.5, 256, 256} and I3 = {0.1908194, 0.0374243, 0.7, 256, 256} which were obtained after 165, 88, 58 number of iterations respectively.
The set of initial values (
x,
y,
s,
M,
N) passes to the 2D-STCM for generating a chaotic key sequence. As a result, three chaotic key sequence for each set of initial values will be generated by the chaotic map. A sample matrix of 4 × 4 is shown in the
Figure 5 as follows.
3.2. Encrypting the Plain Image
An encryption algorithm with confusion property achieved through changing the pixel positions in the image. In the paper, image shuffling is achieved by applying a chaotic circular pixel shuffling method (CCPS). The image pixel shuffling helps to reduce the correlation between the adjacent pixels within the image. An Algorithm 1 explained the process in detail and a sample output of shuffled image was also given in
Figure 3.
The final step of converting a plain image into a cipher image is the execution of a complex XOR operation to change the pixel values of shuffled plain image. The process of changing pixel values is known as diffusion, which could resist the chosen-plaintext attack. A detailed XOR operation execution has already been discussed in Algorithm 2.
For an ideal security performance of the proposed scheme, the image shuffling process and the image diffusion process have repeated three times using different chaotic key sequence CS1, CS2 and CS3. The result of each operation in a sample matrix of size 4 × 4 is shown in
Figure 6.
After performing three rounds of image pixel confusion and diffusion using three different chaotic key sequence, a plain image is encrypted into a complex and unidentifiable form of image known as cipher image.
3.3. Decryption Process
Decryption is the reverse order of an encryption process, noting that the iteration and the operations reversed accordingly. To encrypt an image, the method executes two major steps:
The decryption process will start in reverse order so to get an original image first do image diffusion by performing complex XOR and then image shuffling using CS3 in both. Repeat the process of diffusion and confusion three times by using each chaotic key sequence in reverse.
A confusion/diffusion process in encryption starts with the first pixel of plain image which presents on top-left corner of the image with the directions left to right and top to bottom. Whereas, in decryption process, confusion process will start from the last pixel of a cipher image with the direction right to left and bottom to top.
4. Experimental Results and Analysis
The proposed algorithm encrypt/decrypt the plain image by applying confusion and diffusion process using multiple steps. To verify the efficiency of the given method, various tests have been carried out using MATLAB software with system configuration Intel® Atom™ x7-z8700 CPU @1.60 GHz and 4 GB RAM.
4.1. Encryption and Histogram
An implementation of the algorithm is carried out to represent the result of an encryption and decryption process. The proposed method is applied to various images of same size i.e., 256 × 256.
Figure 7 shows the simulation results of execution in the form of a plain image and cipher image with its corresponding histogram.
4.2. Key Space Analysis.
The effect of proposed method can be realized by seeing the cipher image and its histogram. A histogram of a plain image has a specific pattern which gives an idea about the image structure. An evenly and randomly distributed pixel values of the cipher image prove the randomization of the output value. Therefore, a histogram generated by uniform pixel value distribution makes it difficult to obtain any information by the hacker. Also, an absolute matrices difference between the plain image and the decrypted one is also shown in the below figure.
A chaos based cryptosystem has a wide range of key space, helps to resist the brute-force attack. As suggested in [
43], a key of size 2
100 is enough to resist brute force attack. The security key is generated with the help of 2D-STCM by inputting initial values derived from a superior fractal function. A key space consists of the size of parameters of the fractal function. A function has three parameters at a time i.e.,
x0 (starting value),
n (number of iterations) and
s (control parameter). However, the method generates three chaotic key sequence using control parameter values 0.3, 0.5 and 0.7. In that case, total five keys have been used in the implementation. They all are stored in double data type and the required memory space of one parameter is 8 bytes or 64 bits. Hence, the key space size of the proposed cryptosystem will be 2
320 which is quite sufficient to resist the brute force attack.
4.3. Encryption/Decryption Computational Time Analysis
The proposed scheme is implemented on the multiple color images of size 256 × 256. The system configuration used in the experiment is equipped with Intel® Atom™ x7-z8700 CPU @1.60 GHz and 4 GB RAM running Windows 10 (64-bit). A fractal based key required multiple rounds of iteration to achieve a fixed point. In the proposed scheme, a fixed point achieved through the superior fractal function convergence and then inputted into the 2D-STCM to generate a key sequence. Further, image shuffling and diffusion steps required three consecutive iterations to generate a cipher image in encryption and a plain image in decryption process. The approximate time to encrypt/decrypt the 256 × 256 color image is calculated 6.5–7.0 s.
4.4. Randomness Test
The information entropy was given in 1949 by Shannon and is a statistical measure to estimate the randomness and unpredictability of an information source [
44]. The message entropy
H(
s) of message source
s is defined as:
Here
is the probability of symbol
si and
N is the number of bits to represent a symbol
si. Ideally, the entropy value of a random image having 2
N symbols, is expected to be
H(
s) =
N. Accordingly, a ciphered image with 256 gray levels should be 8. An entropy value, less than 8 depicts a certain degree of predictability of the cipher image. The entropy of various cipher images is shown in the
Table 1. Results showed that the entropy of the output ciphered images is nearby to the standard entropy value.
4.5. NPCR and UACI Tests
NPCR (Number of pixels change rate) and UACI (Unified average changing intensity) are standardized tests to analysis a plain image sensitivity so that differential attack can be resist [
45]. NPCR value is used to test the influence of the petty change in plain image pixels causes a huge difference in the corresponding cipher images. Let’s consider the plain image “PI1” and “PI2” with small change in pixel values and the cipher image “CI1” and “CI2” of size
M ×
N respectively, then the value of a bipolar array
D with the same size as of “CI1” and “CI2” will be calculated as:
The greater the value of NPCR results a better plain image sensitivity. Ideally, the NPCR value of a true random cipher image should be around 100.
UACI test calculates the average intensity change between a plain image and a cipher image which is expected to be around 33. The results are shown in
Table 2 which indicates that the proposed scheme is secure from the differential attack.
4.6. Key Sensitivity Analysis
A security key plays an important role to decide the security level of the cryptosystem. An encryption method must have a key to large sufficient key space and must be extremely sensitive to the minor change in its value. In an earlier section, a discussion has been carried out about the importance and the available key space. Now a detailed analysis will be done around the key sensitivity property of the key used in the proposed method.
A key sensitivity has a significant role in encryption phase as well as in decryption phase. (1) While doing encryption, a small change in security key must produce a totally different cipher image as compared to a cipher image, encrypting with an exact key; (2) While doing decryption, a small change in security key must recover a totally different plain image than the decrypting with an exact key.
The paper used K: x0 = 0.0, n = 200, s = 0.3, s = 0.5 and s = 0.7 as initial values to generate the security key. To verify the key sensitivity, let’s do an experiment by changing the initial values of security key slightly. Assume:
K1: x0 = 0.0001, n = 200, s = 0.3, s = 0.5 and s = 0.7
K2: x0 = 0.000001, n = 200, s = 0.3, s = 0.5 and s = 0.7
K3: x0 = 0.00000001, n = 200, s = 0.3, s = 0.5 and s = 0.7
The below I part of
Figure 8 shows the encrypted and decrypted images obtained after making a slight change in the security key. The decrypted image 2 is obtained by changing
x0 from 0.0 to 0.0001 and that is totally changed from the expected one. Even after changing the key initial value by 10
−6, nobody can guess the actual plain image from the obtained decrypted image 3. The output images are completely different and unrecognizable, which ensure the key sensitivity in both encryption and decryption process.
An additional test is executed to prove the key sensitivity in terms of NPCR and UACI calculation. The
Table 3 shows the NPCR and UACI between cipher images encrypted with correct key and the modified key assumed in (1), (2) and (3). The results showed a significant difference between two ciphered images, either by the difference of
,
or
. In that case, if an attacker tries to decrypt the image using modified key, it will be completely fail.
4.7. Adjacent Pixel Correlation Analysis
The Correlation coefficient represents the relationship between two adjacent pixels in an image. The image pixels are highly redundant, that’s why have a strong correlation between adjacent pixels. In contrary, a cipher image should have a low correlation between the adjacent pixels to make it difficult to identify the relationship between the image pixels by an unauthorized user.
The formula to calculate the correlation coefficient is as follows:
where
and
Here,
x and
y are adjacent pixels in a plain image or cipher image of size
M ×
N. The
Figure 9 shows the distribution of adjacent pixel pairs of the plain image and its cipher image in horizontal, vertical and diagonal direction. The pixel pairs of plain image are mostly located nearby the diagonal line in the graph, means they all are close to each other or have equal values. Whereas, in case of cipher image, pixels are randomly distributed covering entire data range, depicts that they are not related to each other. The low correlation between the pixels makes it non-vulnerable by the attacker only by getting the adjacent pixel pair information.
Table 4 shows the horizontal, vertical and diagonal correlation coefficient value of adjacent pixels of plain image and its corresponding encrypted image. Ideally, the coefficient value in case of plain image must be close to 1 and for cipher image, it must be close to 0. The quantitative result of correlation coefficient has the desired values for the plain image and its cipher image as well, hence proved the suitability of the proposed algorithm for the image encryption application.
4.8. Performance Comparison with Other Image Encryption Techniques
The proposed scheme is compared with the other available color image encryption techniques in terms of information entropy, NPCR, UACI, correlation coefficient and speed in the
Table 5. The results showed that the given algorithm performs similar or better than the other mentioned schemes.
5. Discussion and Conclusions
This paper realizes the importance of a fractal function in the combination of a two-dimensional chaotic map to suggest an image encryption scheme. A superior fractal function required fewer iterations to generate initial values as compared to the general fractal function. The initial conditions are then keyed to a newly introduced 2D-Sine Tent composite map (2D-STCM) to generate a chaotic sequence as a key stream. It is designed by combining a 1D Sine map and a 1D Tent map with minor modifications to reduce the limitations imposed by the 1D chaotic maps. The trajectory graph of the proposed chaotic map shows the wider chaotic region in the phase plane. The generated encryption/decryption key is much complicated and has key sensitivity due to the fractal function and chaotic map properties.
The proposed cryptosystem implements both necessary steps, i.e., confusion and diffusion to achieve a high security level. The confusion phase deals with the pixel position change which was accomplished by applying chaotic circular pixel shuffling (CCPS) to the plain image. The final cipher image is obtained after the diffusion process by executing complex XOR operation on the shuffled plain image. In the entire course, three rounds of confusion and diffusion process have performed using three different key sequences to enforce more security. The scheme is tested to prove effectiveness, correctness, secure and robustness by calculating Shannon entropy, NPCR value, UACI value, adjacent pixel correlation, histogram distribution, key space analysis and key sensitivity analysis. The experimental results show the suitability of the proposed method to protect the digital image transmission over the network with high security level.