1. Introduction
A new digital world has increased the transmission demand of multimedia content at large scale. At the same time, excessive use of digital media such as social networking sites and instant messaging brings about the risk of invading to the personal privacy of its owner. Sometimes, this is required to be more conscious about the secure receiving of image contents like in military security documents, medical diagnostic images, bank account-related information from financial institutions, government offices, etc. Thus, it is of the utmost concern to protect the system from the serious risk of confidential data leakage [
1].
The image encryption technique was introduced to secure the images transmitted through the smartphone, IPAD, computer, laptop, and other electronic devices over the internet or outsourced to the cloud storage. As compared to text and binary data, image encryption is more critical due to its additional characteristics such as highly correlated adjacent pixels in different directions, excessive redundancy, and greater data volume. Although many conventional encryption algorithms such as Data Encryption Standard [
2], RSA [
3], Advanced Encryption Standard [
4], and International Data Encryption Algorithm [
5] with high data transmission security have been proposed. However, these ciphers proved inappropriate and time consuming for image information encryption. The foremost concern of implementing image-specific cryptosystem to resolute image information protection includes the consideration of all necessary image characteristics. Over the years, various cryptosystem design techniques have been developed, comprising a chaotic system, DNA structure, fractal function, wavelet transform, cellular automata [
6,
7,
8,
9,
10,
11], and many more.
The author in [
12] suggested that a cryptosystem having two fundamental structures, i.e. confusion-diffusion, exhibits resilient performance against cyber-attacks. The confusion phase deals with the pixel shuffling or pixel permutation to reduce the relationship between the adjacent image pixels. Whereas pixel diffusion ensures that the small change in plain image information should affect at least half of the cipher image information. Pixel shuffling is achieved by changing the pixel positions within the image, and the pixel diffusion is performed by changing the pixel values. Both phases can be repeated as many times as needed to attain the desired security level. However, it costs the total execution time.
Over the last decade, many image encryption ideas have been proposed using the same structure [
10,
13,
14,
15,
16,
17,
18]. An image encryption algorithm can perform permutation in two ways: (1). Bit-level permutation [
19,
20,
21], and (2). Pixel-based permutation [
22,
23,
24]. A bit is considered as the smallest operating element. To perform a bit-level permutation, an image needs to be transformed into the binary form. A bit-plane scrambling shuffles the bits itself, and hence, is considered more secure. However, it requires more execution time compared to the pixel-plane scrambling. For example, the author in [
25] proposed a bit-level permutation by generating a new sequence dynamically on every small change in the plain image to ensure the robustness of the system against the chosen-plaintext and known-plaintext attacks. Shouliang Li et al. pointed out that by implementing bit-plane and pixel-plane scrambling jointly can have better performance in terms of security as well as a speedy outcome [
26]. A bit-plane scrambling plus diffusion (SPD) operation was proposed based on the card trick method to change the pixel position and value at the same time [
14]. Before performing it, a pixel-level scrambling is also done to randomize the plain image pixels. Another example of simultaneous pixel confusion and diffusion was proposed in [
13]. Both processes were implemented through horizontal confusion-diffusion followed by vertical confusion-diffusion with the help of a newly proposed chaotic map, i.e. tent delay-sine cascade with the logistic map.
A high-efficient pixel scrambling was implemented in a block-based square matrix. The method used a chaotic sequence to shuffle the pixels among the different blocks, following which the pixel positions were changed again within the block itself using another chaotic sequence [
23]. A simple yet difficult to breach cryptosystem was designed by the author [
24], in which pixel-based scrambling was implemented using the Arnold method and Lucas series. A total of nine rounds of pixel permutation were executed to enhance the efficiency and uniformity of the pixels. Xuncai Zhang et al. came up with a concept of local pixel scrambling and global pixel scrambling, which was executed multiple times using a Hilbert curve and piecewise linear chaotic map (PWLCM) respectively [
22]. The overall encryption process performed by executing multiple rounds of pixel scrambling and pixel diffusion alternatively. A two-pass method of pixel permutation introduces the utilization of the first half-pixel values to permute the other second half and vice-versa [
27]. The author proposed a simple and fast one-round-based dynamic diffusion operation in which the sum of the plain image pixels plays an important role to have an extremely sensitive and secure cryptosystem. At each pixel diffusion step, the sum of the pixels will be updated to significantly increase the resistivity against the known-plaintext, chosen-plaintext, and differential attacks [
28]. Recently, a two-steps diffusion process was proposed in [
29]. In the method, a new two-dimensional chaotic infinite collapse map generates two matrices
and
to perform pixel substitution. In the first step, scrambled image pixel values were rearranged according to the sorting index generated through a one-dimensional chaotic sequence
. Further, perform the diffusion operation on a previously generated sequence using another chaotic matrix
.
A fractal is a self-similar image that is infinitely scalable in all directions and encompasses striking features to study and explore. The fractal function works in a complex domain and generates complex patterns using complex numbers upon execution. The chaotic nature of the fractal function exhibits extremely random behavior and excellent sensitivity towards its initial condition, which makes eavesdroppers inefficient to replicate the secret key to retrieve the confidential information [
30,
31,
32,
33]. Moreover, a complicated structure of a fractal function leads to a reliable cryptosystem design that is capable of secure digital information transmission. A fractal possesses a small footprint, which means only a few parameters are required to produce a unique fractal image. The image instantly reacts to even a tiny changed input, resulting in a completely different fractal image. At an early stage, the USA navy published a patent describing the use of fractal function as a secret key in an image encryption method [
34]. However, a fractal function can be used in any phase of a cryptosystem design, i.e. key design or encryption/decryption. The author utilized a superior fractal function to generate three initial values, which were further inputted to a newly proposed chaotic map to produce three secret key sequences in [
35]. The Mandelbrot set, a most famous fractal function introduced by B.B. Mandelbrot in 1979 [
33], has a wide exploration history due to its interesting and complex structure. In the last decade, many image encryption methods have been proposed using the Mandelbrot set and a Julia set [
36,
37,
38,
39,
40]. A set of four Julia images was used in the secret key design, which was further modified by the Chen hyper-chaotic sequence. The same chaotic sequence was also used to select a different fractal image to be further applied at each diffusion phase [
36]. The real values of a Julia set function have applied to substitute the scrambled pixels by multiplying the values together [
37]. The author suggested an image encryption method in which an H-fractal was utilized to diffuse the scrambled image pixels [
22,
41]. The author in [
42] proposed a fractal function-based cryptosystem, in which three sets of initial values are derived by iterating a conjugate transcendental fractal function using Picard, Mann, and Ishikawa iteration methods. An image encryption algorithm was proposed by utilizing the RSA algorithm elements with the fractal quadratic transformation system, best suited to the images that allow clearly distinguishing the contours [
40]. A hybrid method including fractal-image addition along with binary encoding has been proposed to encrypt the digital images [
39]. A finite field cosine transformation-based multiphase symmetry key encryption algorithm was designed by utilizing the fractal as a source of randomness to generate a one-time pad keystream [
43]. A burning ship fractal function was employed to generate a secret key sequence, which uses Hilbert transformation to enhance the sequence randomness [
44].
A generalized M-J set was introduced to generate a secret key by using environmental noise and the SHA-512 method. The indefinite nature of environmental noise ensures key security at every use. The author also succeded to achieve a quite large keyspace i.e. 2
3250 [
45]. The chaotic nature of inverse fractal interpolation function was used to generate a pseudo-random key sequence, which was further utilized in plain image pixel scrambling [
46]. A symmetric key encryption algorithm was proposed by the author in which an encryption key was generated using the Mandelbrot set functions [
47]. Later the author in [
48] pointed out that the method is not resistant to the chosen-plaintext attack, chosen-ciphertext attack, and known-plaintext attack, under the assumption of direct use of the plain image. Similarly, cryptanalysis was carried out on secure fractal image coding based on fractal parameter encryption method. The basic idea of the paper is to encrypt few fractal parameters using fractal encoding [
49], but the intruder can reconstruct the image by comparing multiple cipher images of the same original image encrypted using different secret keys [
50]. By analyzing the above-mentioned algorithms, and considering the chaotic nature of a fractal function, it is inferred that a non-linear iterative fractal function is a well-suited structure of a cryptosystem design. Though many researchers have already applied fractal theory in the image encryption method, it was mostly aligned with other elements such as a chaotic map.
In this study, a new composite fractal function (CFF) is proposed which is a combined form of two different standard Mandelbrot set functions to achieve high sensitivity and strong security. The resulting CFF has better chaotic complexity in terms of trajectory in large space, a self-similar structure at each scale, fractional dimension, and positive Lyapunov exponent. The main idea of this paper is to utilize the same function in pixel confusion as well as in the pixel diffusion process using different fractal-based key sequences that are generated by varying the control parameter value.
The rest of the paper is organized in the following sections: In
Section 2, the structure of newly proposed CFF along with its dynamic characteristics is discussed.
Section 3 focuses on the proposed image encryption algorithm. The simulation result and performance analysis are discussed in
Section 4. At last, the paper is concluded.
3. A Cryptosystem Design Using Composite Fractal Function
The paper focuses on designing image encryption & decryption method using a new proposed CFF. An important point about the role of fractal image in the cryptosystem design includes its utilization at the various stages. The method executes the CFF three times to extract three different fractal data sequences used to confuse and diffuse the plain image, respectively. To achieve a higher level of security and computation efficiency, two rounds of pixel scrambling and substitution are implemented to generate a noise-like cipher image.
Figure 6 shows the block diagram of the proposed image encryption method.
3.1. Secret Key Sequence Generation
An integral component of an image encryption algorithm is the secret key used to encrypt and decrypt the image that is supposed to be strong enough to resist the Brute-force attack. A secret key is derived by iterating the fractal function and has a direct impact on pixel shuffling and substitution processes. Therefore, the randomness and chaotic behavior of the key sequence must be complex enough to provide a highly secure cryptosystem. The proposed method uses three different fractal-based key sequences. The first one-dimensional key stream is used to generate a random two-dimensional matrix, which will be further applied in the plain image pixel scrambling process. In the process to generate a one-dimensional fractal data vector, two steps need to be implemented.
- (1)
Generate a fractal data matrix using CFF by considering given in Equation (3). For example, if the method is encrypting an image of size 256 × 256, then execute the CFF to generate a 100 × 100 fractal data matrix.
- (2)
Apply Z-scan to
and select any 256 values to get a one-dimensional fractal data vector
of size 1 × 256. The Z-scan process can be described using a sample matrix of size 4 × 4 as shown in
Figure 7.
The other two fractal key streams (
and
) are generated using the same Equation (3) but for two different
values i.e. 0.3 and 0.5. Both the key sequences (
and
) are modified before applying to the row-wise and column-wise pixel substitution process, respectively. The obtained complex number sequences
and
are converted into double datatype key sequences, i.e.
and
according to the given mathematical function as:
where
. A control parameter
provides the flexibility to generate different fractal data sequences. Even a researcher has the option to analyze the randomness of composite fractal function by considering other power values of the Mandelbrot set [
53,
54]. All generated fractal key sequences exhibit the capability to be used in the cryptosystem design because of its rough structure and irregular scalability in addition to the chaotic properties.
3.2. Permutation Phase
An image pixel permutation method deals with the shuffling of pixels within the image. The objective to execute this process is to ensure the reduced adjacent pixel correlation in all directions. The proposed image encryption scheme applied a fast pixel shuffling method to change the position of row and column pixels simultaneously.
3.2.1. Preliminary Steps
Before performing the shuffling process, (1) A Henon map-based pixel scrambling of a plain image
is performed to have more random output upon pixel permutation process execution. The steps of an image pixel scrambling start by executing the Henon map function for
times and obtained
and
sequences. Next, apply sorting to the obtained sequences separately and then merge their corresponding sorting indexes. At last, swap the plain image pixels with the merged sorting index sequences and get the scrambled plain image
.
Further, (2) To permute image pixel, produce a two-dimensional random fractal matrix
using Z-scanned fractal data array
and a random array
of the same size. Let us suppose a plain image (
) needs to be encrypted, then the size of each random array
and
should be
. Start the process by sorting the array
and
and stores their index values in
and
respectively. Now, identify the index value of
using the sorted index of
. According to the obtained index value, place the data value of
using the sorted index of random array i.e.
. A procedural description is given below:
where
and
. For example, assume
= {5, 2, 9, 7} and
= {4, 1, 3, 8}. After applying to sort, the obtained
and
will be {2, 1, 4, 3} and {2, 3, 1, 4} respectively. Now set the value of
to 1 and calculate
for all columns using Equation (15). Assign the
= {2, 3, 1, 4} value to
according to obtained
= {3, 4, 1, 2} at the first iteration. As a result, the output of
will be {1, 4, 2, 3}. Repeat the process by executing Equations (15) and (16) for
number of rows and get a two-dimensional random fractal matrix
to do the pixel scrambling in the next step.
3.2.2. Image Permutation Using Random Fractal Matrix
A fast pixel permutation method is proposed to change the pixel position in the row and column simultaneously and reduced the adjacent pixel correlation close to zero. The pixel position shuffling of the previously scrambled plain image
takes place with the help of a random fractal matrix
. Identify the row and column index value (
) of newly constructed scrambled matrix
so that the pixel values of
can be shuffled accordingly. The detailed steps are discussed as follows:
The function is repeated for
times to get all updated indexes of
. Now shuffle the elements of
according to the modified index values.
Figure 8 gives a numerical description of how actual plain image pixels will be distributed to its scrambled result. Row-1 of
Figure 8a shows the actual index value which will be changed to the index values given in row-2 of the
Figure 8a only. In the given example of the 4 × 4 matrix, it can be seen that no row and column number of an index matches with its equivalent modified index, except one index in each matrix row.
Figure 8b displays the one-to-one position mapping between the
and
. The color-coded cells help to locate the dispersed cell value of
in
after replacement. Finally
Figure 8c represents a matrix view of scrambling process using the sample matrices
, and
. A simultaneous row and column-wise
pixel position change occurs using
and produces a completely random and revised shuffled matrix
.
3.3. Diffusion Phase
A cipher image must be sufficiently sensitive to the slight change in the plain image. A strong diffused system is assumed to have more than 50% change impact on cipher image pixels in the case of plain image pixel change. The proposed diffusion strategy includes pixel-by-pixel substitution in two phases, i.e. row-wise and column-wise.
The process utilizes the two fractal key streams ( & ) generated in the previous section to perform the non-linear substitution of the scrambled image pixels . The image pixel diffusion is achieved by considering the current pixel, same indexed pixel, and previously diffused pixel (either or cipher image). Before using the fractal keystream, shift the key by or number of bits at each iteration depending upon the row-wise or column-wise pixel substitution, respectively.
Row-wise pixel substitution: Let us assume
= {1, 2, …,
} and
= {1, 2, …,
}, a row-wise pixel substitution starts by initializing
= 1 and varying
until it reaches the end of the columns. For each
value, shift the
bits
times before utilizing it in the diffusion process. The mathematical description of the proposed diffusion method is defined as:
Column-wise pixel substitution: In the next step, a column-wise pixel substitution takes place by using the result of the previous section and a new fractal keystream i.e.
. As discussed in the previous section, the diffusion process utilizes an updated
, which will be obtained by shifting the bits
times at each iteration. The diffusion function in this step will work as follows:
Here and denotes the updated and after bit shifting, respectively. represents the intensity level of an image pixel such as = 2 in the case of a binary plain image, and = 256 if the image pixels are represented by eight bits. A cipher image will be obtained by repeating the pixel scrambling and pixel diffusion process one more time with the generated sequence .
3.4. Algorithm
So far, the paper has discussed all the methodologies in detail used to design the proposed cryptosystem. A step-by-step description of the conversion of a plain image to the cipher image and vice-versa can be explained as below.
3.4.1. Encryption Process
Input: A plain image of size and a composite fractal function CFF
Generate a fractal data matrix of size 100 × 100 by executing CFF for , assuming 256.
Apply the Z-scan method to and obtain a one-dimensional array of size 1 × 256.
Generate two more fractal data matrices and of size for two different values, i.e. 0.3 and 0.5 using the same CFF.
Modify and by implementing an arithmetic operation and obtain and .
Obtain by applying the Henon map-based pixel scrambling to .
Generate a two-dimensional random matrix with the help of and a random array of the same size (1 × 256).
Perform image permutation operation on using and obtain .
Shift the bits of on each row change in row-wise pixel substitution and on each column change in column-wise pixel substitution.
Execute row-wise pixel diffusion using current pixel of , and previously diffused image pixel and get .
Execute column-wise pixel diffusion using current pixel of , and previously diffused image pixel and get .
Repeat steps (7)–(10) using one more time to get the final cipher image .
Output: An encrypted unintelligible image cipher image .
3.4.2. Decryption Process
Input: A cipher image and a composite fractal function CFF
Execute steps (1)–(4) to get initial data matrices to be used in the decryption process as it was in the encryption process.
The cipher image will undergo the pixel diffusion process stated in steps (8)–(10).
Perform pixel shuffling of an obtained image using .
Repeat steps (13) & (14) one more time to get the initial scrambled plain image .
Finally, to produce the original plain image , apply the inverse of a Henon map-based pixel scramble operation to .
Output: An original plain image .
3.5. Discussion
A secure cryptosystem requires a strong and unidentifiable secret key to protect the information from being hacked while in transmission. The proposed cryptosystem utilized the new composite fractal function to generate the key sequence. Here, three important points justify the effective use of a fractal function-based secret key. (1) A fractal function characterizes a large keyspace in-spite of having a low number of initial values. Thus, this reduces the possibility of a Brute-force attack. (2) Three different fractal data sequences have been generated to be used in pixel scrambling and pixel diffusion separately. (3) The proposed CFF combines the two-generic form of well-known Mandelbrot sets so it has the flexibility to use another combination as well to generate a secret key. A standard confusion-diffusion structure has been followed to design the proposed scheme. The discussed cryptosystem leverages the chaotic characteristics of the fractal function and the randomized plain image pixels because of an additional pixel permutation operation before the actual pixel scrambling process. Other advantages that are achieved by implementing the method: (Each statement is verified in the subsequent simulation results and performance analysis section).
All cipher images have a uniform pixel intensity distribution, which proves the applicability of the method to any type of image representation format.
The scheme proposes a two-step diffusion process, i.e. row-wise and column-wise, to get a complete randomized outcome.
The pixel confusion and diffusion processes have been repeated two times so that a single bit change in a plain image or a cipher image has a great impact on the corresponding encryption or decryption phase, respectively.
A random fractal data matrix will always produce a different shuffled image, thus it can resist the well-known attacks such as chosen-plaintext, differential, and statistical attacks.
All three secret key matrices are derived using the discussed CFF so any slight change in the function will change the key matrices completely, and correspondingly, the cipher image.
Till now, we have seen the positive side of the given scheme, but it also portrays a drawback during image recovery from noise and data loss attack. This is due to the impact of repetitive execution of fractal function-based image permutation and diffusion. Because of the high sensitivity towards its initial value, a fractal function-based key will result in an entirely changed decrypted image on any small change in the cipher image (such as noise attack or data loss). Therefore, a legitimate receiver can face difficulty to recover the original image from a noisy or lost data image. In the future, a robust cryptosystem based on a fractal function with multiple rounds can be discussed, which would be secure from the noise and data loss of course.
4. Simulation Results and Performance Analysis
The section discusses the simulation results of the proposed image encryption, executed using MATLAB (2016b) software. The purpose of any image encryption algorithm is to come up with the strategy to be able to produce a noisy cipher image that completely differs from its corresponding plain image. It helps to make sure that the hacker would not be succeeded to penetrate the cipher image through the statistical analysis of it. Further, various suggested performance tests have performed to verify the security, suitability, and robustness of the new CFF-based image encryption algorithm [
55].
To verify the feasibility of the proposed system, few sample images were chosen to test the performance visually. The method can be applied to any image representation format like 2-bit, 8-bit, 16-bit, and 24-bit. A color image has a 24-bit need to split three channels (R, G, B) of 8-bit each before applying the image encryption algorithm. Each divided channel is a 2D matrix. Execute the given image encryption method to each color component separately and get the required encrypted/decrypted images. At last, merge all the three image channels (R, G, B) to get the desired result at both ends.
Figure 9 shows the gray, binary, and color plain images and their corresponding cipher and decrypted images. As can be seen, the cipher image has a noise-like visual, it is hard to identify the plain image by analyzing it. Similarly, the reconstructed image without any loss of information proved the efficiency of the decryption algorithm as well. The subsequent section will evaluate the security level of the proposed scheme to ensure the system’s resistivity against various ciphertext attacks.
4.1. Histogram Analysis & Chi-Square Test
A histogram depicts the image pixel intensity distribution throughout the axes. A plain image with highly correlated pixels allowed the hacker to infer the system. That is the reason: a cipher image must have reduced or almost not correlated image pixels. The condition is achieved by distributing the image pixel frequency uniformly. The histogram of a plain image and cipher image is shown in
Figure 10. The even distribution of image pixels makes it difficult for the hacker to steal valid statistical information from the cipher image. Hence, it proved the effectiveness of the system against the statistical attack.
Besides the visual competency of the system, a quantitative analysis of the randomness is done by implementing the chi-square test. The mathematical function to compute the chi-square value can be given as:
where
and (
are observed and expected pixel intensity frequency respectively. According to [
56], a random gray image should have a chi-square value less than the standard value 293.2478 at significance level 0.05.
Table 1 lists all chi-square values computed for the considered sample gray images and their respective cipher images. The outcome indicates a better uniformity of pixel intensity, a requirement to design a secure cryptosystem.
4.2. Key Space
A cryptosystem must have a sufficiently large keyspace to resist the brute-force attack. According to [
57], a keyspace equal to or larger than
is good enough to make brute-force attack infeasible. A plain image pixel permutation operation is executed using the Henon map, which requires two variables
and
. Additionally, the secret key sequences
and
used in the diffusion process are derived by executing a new CFF, which requires six parameters, i.e.
,
, initial value
, number of iterations
, and
(0.3 and 0.5). Similarly, a different key sequence is generated by considering different
and
(0.2) to shuffle the image pixels. So, a total of 10 double-precision values will be used in the key sequence generation process. Considering the fact given in IEEE floating-point standard, the computational precision of a double datatype variable is
. Accordingly, the total available keyspace will be
. The obtained keyspace value is quite greater than the required
to secure the proposed cryptosystem against the brute-force attack.
4.3. Adjacent Pixel Correlation Analysis
A correlation coefficient depicts the relationship strength between the adjacent image pixels. This test is used to evaluate the encryption quality by relating the pixels of plain and cipher images horizontally, vertically, and diagonally. An ideal encryption algorithm should be able to produce an encrypted image with no correlation between the adjacent pixels in all directions. In such a scenario, an intruder would not get sufficient information about the image structure to recover the original image. The pixels correlation coefficient of plain image and cipher image can be calculated as:
where function
is the mean,
is the variance, and
is the covariance of selected
pixels. Finally, function
estimates the correlation coefficient between adjacent pixels
and
of the plain and cipher image. A
value of nearly one indicates an excellent similarity, while the value of zero explicates no correlation between the adjacent image pixels. Therefore, the
≈ 0 conferred that the plain and cipher image contents are highly dissimilar to each other.
The given approach is evaluated for different gray images of size 256
256. The association among neighboring pixels can be measured by plotting pixels distribution of plain and cipher images in all directions, which are shown in
Figure 11. The distribution pattern concludes whether the pixels are correlated or not. A diagonal line pixel pattern depicts the excessive amount of adjacent pixels similarity. On the other side, and evenly distributed, cipher image pixel signifies the reduced pixel correlation in all directions. The quantifiable investigation of the correlation coefficient of each image is shown in
Table 2 in all possible directions. The plain image and a cipher image have the anticipated
values in horizontal, vertical, and diagonal directions. The test authorized that the system meets the requirement of highly non-correlated images before and after encryption.
4.4. Correlation Between Plain and Cipher Image
The Pearson correlation coefficient (PCC) quantitively describes the linear relationship between two images. The PCC value is computed by using the given function as:
where
and
are two variables that define two neighboring pixels of an image, and
refers to the number of pixel pairs. Here,
and
are assumed to be the plain image and cipher image pixel respectively. The PCC value varies between [−1, 1]. Here, −1 indicates an inverse relationship between the variables, whereas +1 shows a direct relationship and highly correlated variables. The value close to zero indicates that the plain and cipher image are not correlated to each other, which is an expected outcome of a secure cryptosystem.
Table 3 lists the correlation coefficient value of tested sample images.
4.5. NPCR and UACI Tests
To test the robustness of the proposed system against the differential attack, the measurement of the impact of the minor alteration in the plain image of its corresponding cipher image is carried out [
58]. The number of pixels changing rate (NPCR) test is implemented to check the influence capacity of plain image pixel change. An NPCR value illustrates the pixel difference between the two encrypted images at the same position, whose plain image is differed by only one bit. To evaluate the probable impact, consider two encrypted images (
and
) obtained before and after the one-pixel change in plain image. The NPCR can be calculated using the given formula as:
where
is calculated as:
UACI or Unified average changed intensity test calculates the pixel intensity difference between two images. Here the test is applied to two encrypted images
and
having size 256 × 256. The mathematical formula to calculate UACI value as follows:
In the proposed method, a pixel of the plain image
is randomly selected and changed to one to obtain a new plain image
. Now the NPCR and UACI tests are implemented on the corresponding encrypted images
and
. The evaluation of the projected technique is done by calculating the NPCR and UACI values for all test images and listed in
Table 4. The accepted critical values of NPCR and UACI tests are NPCR > 99.5693% and UACI
[33.22–33.70] respectively. The outcome demonstrates that both test values are approaching the ideal values due to the 1-bit alteration in the plain image.
4.6. Information Entropy
The term “entropy” was originally used by a scientist named Claude Shannon in 1949 [
12] to find out the degree of chaos. The tool is widely used to test the gray value distribution probability. Here the global Shannon entropy (GSE) and local Shannon entropy (LSE) of an image are calculated to measure the unpredictability and randomness of the suggested encryption system. The formula to calculate the entropy of an image is defined as:
where
is the discrete probability density function for the pixel value ranges (0–255). Both entropies will be calculated using the same function except that the GSE is calculated for the entire image, whereas LSE considers randomly selected non-overlapping blocks of an image [
59]. An image having 256 possible values will show the maximum entropy equal to eight (i.e.
. To calculate LSE, consider
non-overlapping image blocks and calculate the Shannon entropy of each block using Equation (31). Now compute the mean entropy value of all
image blocks to get LSE. An accepted value of LSE falls between the range [7.901516–7.903423] to pass the randomness test.
Table 5 lists the global Shannon entropy and local Shannon entropy of the encrypted images along with plain image entropy. It is shown that the calculated GSE and LSE values of cipher images are close to the expected values. Therefore, the proposed scheme has successfully passed the randomness test for a variety of different test images.
4.7. MSE, MAE, PSNR and SSIM Tests
The parameters used to check the encryption quality of an image encryption system using its pixel’s disparity are mean absolute error (MAE), mean square error (MSE) and peak signal to noise ratio (PSNR). The MAE value is calculated to check the average absolute pixel difference between a plain image
and a cipher image
of size
. The MAE function can be defined as:
The MSE value refers to the cumulative square error measure, which is calculated by measuring the squared difference between a plain image and a cipher image. Moreover, the PSNR value analyzes the image fidelity by calculating the ratio between the maximum pixel intensity and the MSE value. The MSE and PSNR values will be calculated using the following functions:
where
represents the bit-depth of the used image. Another structural similarity index measurement (SSIM) test quantifies the perceptual difference between two images. The function to calculate SSIM is defined as:
where
and
where
and
are mean values of plain and cipher image respectively,
and
are the standard deviation of plain and cipher image respectively, and
is the cross-correlation of the plain and cipher image.
and
are used for stability and can be calculated as
and
. Here,
represents the image intensity value, which is 255 for a gray image.
A PSNR value equal to infinity indicates that both considered images are the same and an SSIM value close to zero represents two structurally different images. Whereas a higher MAE and MSE value ensure the robustness of the proposed system against the cyber-attack. This shows that to achieve a secure cryptosystem, the PSNR and SSIM values should be low, and the MAE and MSE values should be on the higher side. To prove the validity of the given scheme, all four tests have been conducted on a few test images and the results are listed in
Table 6. The result states that the encryption quality of all images follows the standards of being a secure cryptosystem.
4.8. Performance Analysis
The proposed method is implemented on a computer with the specifications: MATLAB R2016b platform and system configuration Intel® Atom™ x7-z8700 CPU @1.60GHz and 4 GB RAM. Various parameters such as encryption time (ET), encryption throughput (ETP), and number of cycles per bytes (NCB) are used to measure the efficiency of the system.
The given method employed two rounds of confusion-diffusion to achieve a secure and reliable cryptosystem. It is obvious to have longer execution time proportional to the number of rounds to be taken to execute the system. A trade-off between time and security indicates the acceptance of long-running time considering the excellent security requirement. Further, the ETP is computed by estimating the number of bytes executed per second. The mathematical function for ETP and NCB can be defined as:
The performance analysis of the anticipated system in terms of ET, ETP, and NCB has been done for the sample images and the results are listed in
Table 7. The efficiency of the given scheme is comparable with the other fractal-based cryptosystem, where a secure system is more preferable than the time constraint environment.
4.9. Noise and Data Loss Attack Analysis
An information transmission channel is always prone to noise and data loss attacks. It is required that an efficient encryption algorithm still manages to recover the original image without losing much information. However, it is impossible to decrypt an errored image into its original form even with the accurate secret key. Hence, a marginal amount of blurred decrypted image is also acceptable.
The proposed scheme executes two rounds of image pixel confusion and diffusion asymmetrically. The diffusion process also runs in a row-wise and column-wise manner. An asymmetric way of pixel substitution includes the encryption of one plain image byte using the current plain image byte along with the previous ciphered image byte. Whereas in decryption, a cipher image byte will be processed with its previous ciphered byte but no plain image data. Also, for each row/column, bit shifting of random fractal data matrix occurred to make the process more complex. The complete diffusion process illustrates that the impact of one-bit change in the plain image will influence all pixels in the corresponding cipher image. Further, this impact will be followed in the subsequent second round of execution. Though the given method succeeded to recover a high-quality image against the data loss attack, it was not robust enough against the noise attack.
Figure 12 shows the actual cipher image, noisy cipher image with 2% of salt & pepper noise, and three cipher images with different percentages of data loss along with their corresponding decrypted images, respectively. It can be observed that the recovered images lost some information but are still visualized by the human eye.
4.10. Key Sensitivity Analysis
In this paper, the key sensitivity is quantitatively analyzed using the number of bits change rate (NBCR), the number of pixels changing rate (NPCR), and unified average changed intensity (UACI) tests. The NBCR of two images
and
are computed as:
where Ham_dis calculates the Hamming distance between
and
, and bit_len is the bit length of an image (either
or
). An NBCR value close to 50% verifies the effectiveness of the key sensitivity impact on the given scheme.
To test the key sensitiveness, select a pixel of and randomly and change it to 1. Now encrypt the plain image:
using a correct and and get
using a bit changed and a correct and get
using a correct and a bit changed and get
Similarly, decrypt the correct cipher image using the same key combinations discussed above and subsequently get three decrypted images
,
, and
. The next step is to calculate the NBCR value of
) and
to measure the key sensitivity impact on an encryption method. Repeat the same step on decrypted images and get the NBCR value of
) and
). The computed NBCR value in both processes is listed in
Table 8.
Two tests, NPCR and UACI tests, are also implemented to observe the key sensitivity behavior in both encryption and decryption processes. The quantitative results of NPCR and UACI tests are given in
Table 9.
Figure 13 also represents the key sensitivity exploration results in the form of an encrypted/decrypted image, their respective histogram, and the image difference between two encrypted/decrypted images. It is indicated that a single pixel change in either secret key can produce a completely unpredictable outcome. This shows the excellent key sensitivity of the proposed scheme.
4.11. Chosen-Plaintext Attack Analysis
A chosen-plaintext attack is a kind of threat to the system in which an attacker randomly selects a plaintext and encrypts it using an arbitrary secret key. By analyzing the system behavior and corresponding ciphertext, the attacker can infer some secret information to obtain actual plaintext. A secure cryptosystem must be able to fail the unauthorized access of the information by resisting the chosen-plaintext attack. To achieve it, an encryption algorithm must change the plain image data in multiple rounds to get a completely randomized output. The proposed method modifies the plain image by shuffling the pixel positions using the Henon map one time. Again, two rounds of pixel confusion and diffusion process have been implemented to the shuffled image. As a result, the encryption algorithm produces different cipher images on encrypting an identical plain image multiple times using the same secret key. To demonstrate the applicability of the concept, the number of bit change rate (NBCR) of two cipher mages is calculated, which are obtained by encrypting the same image twice using the same secret key. The test result is listed in
Table 10. The NBCR value close to 50% indicates that both cipher images are completely different from each other. Hence, the given system can defend the chosen-plaintext attack successfully.
4.12. Image Autocorrelation Analysis
An image correlation test is executed by comparing all possible pixel pairs to compute the similarity index of both pixels as a function of distance and direction of separation [
60]. An efficient way to measure the image autocorrelation is via a fast Fourier transform using the Weiner–Khinchin theorem. The image autocorrelation function (ACF) can be defined as:
where
represents the image intensity at position
, and
and
show the distance from the corresponding
and
position.
is a power spectrum and calculated by squaring the magnitude of the Fourier transform
of an image
. According to the theorem, the Fourier transform of the autocorrelation of an image is equal to the inverse Fourier transform of
. Therefore, the autocorrelation can also be calculated as:
where
is the conjugated Fourier transform of an image of size
. The test is implemented to the original image as well as to the cipher image. A highly correlated original image autocorrelation is expected to be wavy and spikes at the center of its graphical representation. On the contrary, cipher image pixels are expected to be minimally correlated with each other, so the graph must have a flat and uniform image autocorrelation structure. The results of the original image and cipher image autocorrelation are shown in
Figure 14; they verify the expected outcome of an efficient cryptosystem.
4.13. Decryption Error
The probability of decryption error is mainly influenced by the randomness introduced to generate a secret key or in the encryption method. A reliable cryptosystem ensures that the received information will be identical to the sending information irrespective of any kind of random data insertion. This feature is more crucial in some applications like medical, finance, military, geographical, astrological, and many more. For a plain image
and corresponding cipher image
of size
, the decryption error
can be computed using the given function as:
where
In the case of a fully recovered decrypted image, the decryption error must be equal to zero percentage. It indicates that the decrypted image is identical to the original plain image. The decryption error test is successfully executed to the various test images.
4.14. Performance Comparison with Existing Work
To assess the efficiency of the projected encryption method, its performance is compared with several, mostly fractal-based image encryption methods. A comparative analysis with existing methods is done by considering the same image, i.e. Lena (256 × 256). The comparison is done by considering keyspace, few differential attack measures, global Shannon entropy, and adjacent correlation coefficient.
As shown in
Table 11, the discussed method has the flexibility to select a key from the available keyspace that is sufficiently large to resist the brute-force attack. The NPCR and UACI values of the proposed method are 99.63 and 33.54, respectively, which is the largest among all references. It also proved the system resistance against the differential attack. An ideal entropy value is expected to be much closer to eight. The value reported in
Table 11 indicates that the obtained entropy value passed the pixel randomness test. The correlation coefficient value is also compared with the existing approaches in all three directions. Presented data reveal that the encrypted pixel values are approaching zero. It signifies the desired result of reduced or no correlation between the adjacent pixels. Therefore, all the discussed scenarios verify the suitability of the proposed scheme in the secure digital image transmission over the unsecured network.
5. Conclusions and Future Work
This paper proposed a composite fractal function (CFF) consisting of two different Mandelbrot set functions as a seed map and a control parameter to enhance the non-linear dynamics. Many performance tests such as self-similar image structure, fractal dimension, chaotic trajectory, and Lyapunov exponent were implemented to evaluate the significance of the new fractal function over the original seed function. Using the newly constructed fractal, a secure, simple yet complex cryptosystem was designed. The suggested algorithm displayed increased randomness by applying a Henon map-based plain image pixel scrambling and a random fractal matrix generation using a z-scanned fractal sequence. Additionally, a fractal key sequence was employed to both pixel-based permutation and diffusion phase, but in three different organizations. The simulation result showed the suitability of the given scheme to the different digital image formats such as color, gray, and binary image. The fractal function performance analysis demonstrated that the suggested CFF possesses all desired chaotic properties such as randomness, unpredictability, initial value sensitivity, ergodicity, large chaotic trajectory, and a complex self-similar structure. Moreover, the experimental results of the image cipher also indicated a significantly superior performance in terms of the large keyspace, high key sensitivity, expected global Shannon entropy, local Shannon entropy, adjacent pixel correlation, expected image autocorrelation, NPCR and UACI value, and zero decryption error. However, the method is susceptible to noise and data loss attacks due to the two rounds of pixel confusion-diffusion execution, but it can be considered to some extent to achieve an extremely sensitive cryptosystem. In the future, the robustness of the system against the noise and data loss attacks will be addressed.