**3. Experimental results and algorithm analysis**

Numerical simulation experiments have been carried out to verify the proposed encryption method using MATLAB 2016 b platform on a PC with Core (TM) i7-353U processor of 2.5GHz. We first take eight images with 512 � 512 pixels and 256 gray levels as the target images to be encrypted, which are combined in two multiplex images as shown in **Figure 6** (*a–h*), respectively. The compression ratio *C*<sup>p</sup> is 0.75 for each multiplex image. The size of low-pass filter is (*M*', *M'*) = (256, 256) pixels. Results are analyzed more in terms of statistical attack, differential

attack, quality of decrypted images, and speed. We chose the different values as

*Multiple-Image Fusion Encryption (MIFE) Using Discrete Cosine Transformation (DCT)…*

*Encrypted images and their histograms. (a) Multiplexed image 1, (b) multiplexed image 2.*

*r*p**<sup>1</sup> =** 4.841585120587438; *r*p2 **=** 4.738149127386060**;** *α* **=** 6.187.

*NPCR* ¼

*W* � *H*

*UACI* <sup>¼</sup> <sup>1</sup>

directions respectively, by using Eq. (17).

*x*<sup>01</sup> **=** 0.351482953177765; *x*<sup>02</sup> **=** 0.972970074275508; *r*<sup>01</sup> **=** 4.988242173292221; *r*<sup>02</sup> **=** 4.909240772131021; *x*p1 **=** 0.363606938668312; *x*p2 **=** 0.890363879273465;

The size of the filter (*M', M'*) and the number of target images *N* constitute

For a well-ciphered image, all the frequencies of pixels must be uniformly distributed. As one can see in **Figure 7**, the histogram of the multiplex encrypted

> P *i*,*j D i*ð Þ , *j W* � *H*

> > � � � �

A good cryptosystem produces a cipher image with a correlation coefficient close to zero, for two adjacent pixels. Five thousand pairs of adjacent pixels were chosen to calculate the correlation coefficients in horizontal, vertical, and diagonal

X *i*, *j*

*C*1ð Þ� *i*, *j C*2ð*i*, *j*Þj 255

� 100% "

� 100% (17)

(18)

�

keys of the proposed cryptosystem:

*DOI: http://dx.doi.org/10.5772/intechopen.92369*

additional parameters of the key.

**3.1 Statistical analysis**

*3.1.1 Histogram*

**Figure 7.**

images is uniform.

*3.1.2 Correlation analysis*

**31**

#### **Figure 6.**

*Plain and combined images. (a–d) Images combined in multiplex image 1, (e–h) images combined in multiplex image 2, (i) multiplex image 1 before IDCT, (j) multiplex image 1 after IDCT.*

*Multiple-Image Fusion Encryption (MIFE) Using Discrete Cosine Transformation (DCT)… DOI: http://dx.doi.org/10.5772/intechopen.92369*

**Figure 7.** *Encrypted images and their histograms. (a) Multiplexed image 1, (b) multiplexed image 2.*

attack, quality of decrypted images, and speed. We chose the different values as keys of the proposed cryptosystem:

*x*<sup>01</sup> **=** 0.351482953177765; *x*<sup>02</sup> **=** 0.972970074275508; *r*<sup>01</sup> **=** 4.988242173292221; *r*<sup>02</sup> **=** 4.909240772131021; *x*p1 **=** 0.363606938668312; *x*p2 **=** 0.890363879273465; *r*p**<sup>1</sup> =** 4.841585120587438; *r*p2 **=** 4.738149127386060**;** *α* **=** 6.187.

The size of the filter (*M', M'*) and the number of target images *N* constitute additional parameters of the key.

#### **3.1 Statistical analysis**

#### *3.1.1 Histogram*

(*x*p1, *r*p1, *x*p2, *r*p2, α), the receiver can get the images *I1* and *I2* by solving the system

Then, the two multiplex images can be obtained easily by decrypting *I1* and *I2*

Numerical simulation experiments have been carried out to verify the proposed

encryption method using MATLAB 2016 b platform on a PC with Core (TM) i7-353U processor of 2.5GHz. We first take eight images with 512 � 512 pixels and 256 gray levels as the target images to be encrypted, which are combined in two multiplex images as shown in **Figure 6** (*a–h*), respectively. The compression ratio *C*<sup>p</sup> is 0.75 for each multiplex image. The size of low-pass filter is (*M*', *M'*) = (256, 256) pixels. Results are analyzed more in terms of statistical attack, differential

*Plain and combined images. (a–d) Images combined in multiplex image 1, (e–h) images combined in multiplex image 2, (i) multiplex image 1 before IDCT, (j) multiplex image 1 after IDCT.*

(16)

ð Þ *<sup>I</sup>*1½ �� *<sup>i</sup>*, *<sup>j</sup> <sup>w</sup>*<sup>11</sup> <sup>þ</sup> *<sup>I</sup>*2½ �� *<sup>i</sup>*, *<sup>j</sup> <sup>w</sup>*<sup>12</sup> *mod*<sup>256</sup> <sup>¼</sup> *<sup>C</sup>*<sup>1</sup> *floor t*ð Þ� <sup>11</sup> � *<sup>t</sup>*<sup>21</sup> <sup>10</sup><sup>15</sup> � � ð Þ *<sup>I</sup>*1½ �� *<sup>i</sup>*, *<sup>j</sup> <sup>w</sup>*<sup>21</sup> <sup>þ</sup> *<sup>I</sup>*2½ �� *<sup>i</sup>*, *<sup>j</sup> <sup>w</sup>*<sup>22</sup> *mod*<sup>256</sup> <sup>¼</sup> *<sup>C</sup>*<sup>2</sup> *floor t*ð Þ� <sup>12</sup> � *<sup>t</sup>*<sup>22</sup> <sup>10</sup><sup>15</sup> � �

of equations below:

*Multimedia Information Retrieval*

through reverse permutation operations.

**3. Experimental results and algorithm analysis**

(

**Figure 6.**

**30**

For a well-ciphered image, all the frequencies of pixels must be uniformly distributed. As one can see in **Figure 7**, the histogram of the multiplex encrypted images is uniform.

$$\text{NPCR} = \frac{\sum\_{ij} D(i, j)}{W \times H} \times \mathbf{100\%} \tag{17}$$

$$\text{UACI} = \frac{1}{W \times H} \left[ \sum\_{i,j} \left| \frac{\mathbf{C}\_1(i,j) - \mathbf{C}\_2(i,j)}{255} \right| \times 100\text{\%} \tag{18}$$

#### *3.1.2 Correlation analysis*

A good cryptosystem produces a cipher image with a correlation coefficient close to zero, for two adjacent pixels. Five thousand pairs of adjacent pixels were chosen to calculate the correlation coefficients in horizontal, vertical, and diagonal directions respectively, by using Eq. (17).

$$\mathbf{C\_{xy}} = \frac{\mathbf{K} \times \sum\_{i=1}^{K} \mathbf{X}\_i \mathbf{Y}\_i - \sum\_{i=1}^{K} \mathbf{X}\_i^2 \times \sum\_{i=1}^{K} \mathbf{Y}\_i^2}{\sqrt{\left(\mathbf{K} \times \sum\_{i=1}^{K} (\mathbf{X}\_i)^2 - \left(\sum\_{i=1}^{K} \mathbf{X}\_i\right)^2\right) \times \left(\mathbf{K} \times \sum\_{i=1}^{K} (\mathbf{Y}\_i)^2 - \left(\sum\_{i=1}^{K} \mathbf{Y}\_i\right)^2\right)}} \tag{19}$$

where X and Y are the values of two adjacent pixels in the image, C*rxy* belongs to the range [�1, 1] and K denotes the number of pairs of pixels randomly selected. *Crxy* tends to be 1 or � 1 for strong correlation and tends to be 0 for every poor correlation. **Table 2** shows the calculated correlation coefficient of 512 � 512 cameraman and peppers images in every direction. A mean value of the proposed encryption algorithm is about 0.0032, which tends to be zero, which is the expected value. The same result can be confirmed in **Figure 8**, where the pixels of encrypted

images are not correlated in different directions. Then, these results prove that attacks based on correlation analysis cannot succeed on the proposed cryptosystem.

**Imageq Test Plain image Encrypted multiplex image 1 or 2**

*Multiple-Image Fusion Encryption (MIFE) Using Discrete Cosine Transformation (DCT)…*

VC 0.9400 0.051 DC 0.8931 �0.003

VC 0.9954 �0.0020 DC 0.9919 0.0044

Cameraman HC 0.9314 0.0023

Peppers HC 0.9934 0.0013

The information entropy evaluates the level of randomness contained in a

*p m*ð Þ*<sup>i</sup>* log <sup>2</sup>

where *p m*ð Þ*<sup>i</sup>* is the probability of the recurrence of element *mi* and *M* denotes the number of bits of information *m*. The ideal entropy value of a 256-grayscale image represented on 8 bits with equal probability is 8. **Table 3** shows entropy values of the two multiplex images of the proposed encryption algorithm very close to 8, as

Key space size is the total number of different keys that can be used in an encryption algorithm. A good encryption algorithm needs to contain sufficiently large key space to make the brute-force attack infeasible. The high sensitivity to initial conditions inherent to any chaotic system, that is, exponential divergence of

In literature, a key space of at least 10<sup>30</sup> is required for the system to be robust [19]. The proposed encryption algorithm actually does have some of the following secret keys: the initial values *x*01, *x*02, *x*p1, *x*p2 and control parameters *r*01, *r*02, *r*p1, *r*p2 and *α* of the chaotic systems used; the number *N* of target images and the size *<sup>M</sup>*<sup>0</sup> � *<sup>M</sup>*<sup>0</sup> of the filter. We suppose that the computer precision is 10�15, so the key space is greater than 10<sup>15</sup> � <sup>9</sup> = 10135. Therefore, this key space is large enough to resist the brute-force attack. Moreover, key sensitivity analysis has been carried out, but the results are not presented here for reasons of space. These results confirm

**Gray image Proposed algorithm [20] (2017) [19] (2017)** Multiplex image 1 7.9993 — — Multiplex image 2 7.9993 7.9993 7.9992

1 *p m*ð Þ*<sup>i</sup>*

� � (20)

*3.1.3 Information entropy analysis*

expected.

**Table 3.**

**33**

**Table 2.**

*Correlation coefficient.*

**3.2 Key analysis**

sequence *m*, and it is defined as follows:

*DOI: http://dx.doi.org/10.5772/intechopen.92369*

chaotic trajectories, ensures high security [11].

*Information entropy of some ciphered images.*

*S m*ð Þ¼

2 X*M*�1 *i*¼0

**Figure 8.**

*Plot of correlation coefficients in horizontal, vertical, and diagonal directions of plain and cipher cameraman (512* � *512). (a, c, e) correlation coefficients of plain images in horizontal, vertical, and diagonal directions respectively. (b, d, f) correlation coefficients of ciphered images in horizontal, vertical, and diagonal directions respectively.*

*Multiple-Image Fusion Encryption (MIFE) Using Discrete Cosine Transformation (DCT)… DOI: http://dx.doi.org/10.5772/intechopen.92369*


**Table 2.** *Correlation coefficient.*

*Crxy* <sup>¼</sup> *<sup>K</sup>* � <sup>P</sup>*<sup>K</sup>*

*Multimedia Information Retrieval*

*<sup>K</sup>* � <sup>P</sup>*<sup>K</sup>*

**Figure 8.**

*respectively.*

**32**

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

s� �

<sup>2</sup> � <sup>P</sup>*<sup>K</sup>*

*<sup>i</sup>*¼1ð Þ *Xi*

*<sup>i</sup>*¼<sup>1</sup>*XiYi* � <sup>P</sup>*<sup>K</sup>*

where X and Y are the values of two adjacent pixels in the image, C*rxy* belongs to the range [�1, 1] and K denotes the number of pairs of pixels randomly selected. *Crxy* tends to be 1 or � 1 for strong correlation and tends to be 0 for every poor correlation. **Table 2** shows the calculated correlation coefficient of 512 � 512 cameraman and peppers images in every direction. A mean value of the proposed encryption algorithm is about 0.0032, which tends to be zero, which is the expected value. The same result can be confirmed in **Figure 8**, where the pixels of encrypted

*Plot of correlation coefficients in horizontal, vertical, and diagonal directions of plain and cipher cameraman (512* � *512). (a, c, e) correlation coefficients of plain images in horizontal, vertical, and diagonal directions respectively. (b, d, f) correlation coefficients of ciphered images in horizontal, vertical, and diagonal directions*

*<sup>i</sup>*¼<sup>1</sup>*Xi* � �<sup>2</sup> *<sup>i</sup>*¼1*X*<sup>2</sup>

� *<sup>K</sup>* � <sup>P</sup>*<sup>K</sup>*

*<sup>i</sup>* � <sup>P</sup>*<sup>K</sup>*

*<sup>i</sup>*¼<sup>1</sup>*Yi* 2

*<sup>i</sup>*¼1ð Þ *Yi*

<sup>2</sup> � <sup>P</sup>*<sup>K</sup>*

� �<sup>2</sup> � �

*<sup>i</sup>*¼<sup>1</sup>*Yi*

(19)

images are not correlated in different directions. Then, these results prove that attacks based on correlation analysis cannot succeed on the proposed cryptosystem.

### *3.1.3 Information entropy analysis*

The information entropy evaluates the level of randomness contained in a sequence *m*, and it is defined as follows:

$$S(m) = \sum\_{i=0}^{2^{\mathcal{M}}-1} p(m\_i) \log\_2 \left( \frac{1}{p(m\_i)} \right) \tag{20}$$

where *p m*ð Þ*<sup>i</sup>* is the probability of the recurrence of element *mi* and *M* denotes the number of bits of information *m*. The ideal entropy value of a 256-grayscale image represented on 8 bits with equal probability is 8. **Table 3** shows entropy values of the two multiplex images of the proposed encryption algorithm very close to 8, as expected.

#### **3.2 Key analysis**

Key space size is the total number of different keys that can be used in an encryption algorithm. A good encryption algorithm needs to contain sufficiently large key space to make the brute-force attack infeasible. The high sensitivity to initial conditions inherent to any chaotic system, that is, exponential divergence of chaotic trajectories, ensures high security [11].

In literature, a key space of at least 10<sup>30</sup> is required for the system to be robust [19]. The proposed encryption algorithm actually does have some of the following secret keys: the initial values *x*01, *x*02, *x*p1, *x*p2 and control parameters *r*01, *r*02, *r*p1, *r*p2 and *α* of the chaotic systems used; the number *N* of target images and the size *<sup>M</sup>*<sup>0</sup> � *<sup>M</sup>*<sup>0</sup> of the filter. We suppose that the computer precision is 10�15, so the key space is greater than 10<sup>15</sup> � <sup>9</sup> = 10135. Therefore, this key space is large enough to resist the brute-force attack. Moreover, key sensitivity analysis has been carried out, but the results are not presented here for reasons of space. These results confirm


**Table 3.** *Information entropy of some ciphered images.*


the NMSE is still low, which attests the good quality of reconstructed images and

*Multiple-Image Fusion Encryption (MIFE) Using Discrete Cosine Transformation (DCT)…*

**Table 6** reports a comparison of encryption time by the proposed algorithm with some recent works in literature for different images. The algorithm written under Matlab platform was not optimized. The computer time consumption is

The performance of the proposed algorithm compared to similar and good standing ones in literature is shown in **Table 7**. From the table, we can observe that the proposed encryption algorithm has a large key space and can encrypt a large number of target images in a good time compared to others. As for UACI and NPCR, they are about the best values expected (respectively >33.3 for UACI and >99.6 for NPCR) as can be seen in the table. Finally, our cryptosystem exhibits the best correlation value and a reduced normalized Mean Square Error (MSE) after

**Number of images Proposed algorithm [19] (2017) [20] (2017) [24] 2016** 08 or 09, size 512 512 0.27389 0.7103 0.191 11.66

**Number of target images (***N* **2) 4 2 9 2 16 2** NMSE 0.00082 0.0019 0.00376

**Entropy NPCR UACI Encryption**

<sup>10</sup><sup>135</sup> 0.0032 7.9993 99.61 33.49 0.27389 3.7 <sup>10</sup><sup>3</sup>

10<sup>60</sup> 0.003 7.9994 99.62 33.50 0.7103 —

1056 — 7.8225 — — 0.255 —

1090 — — —— 11.66 8.448

2260 0.0032 — 99.92 — — ≈**0**

10<sup>210</sup> 0.0031 7.9986 99.62 33.42 2.386 0.0155

**time (s)**

**NMSE**

10<sup>3</sup>

good performances of the proposed cryptosystem.

0.27389 s, which is smaller than those of [19, 24].

**3.5 Comparison with other encryption algorithms**

**3.4 Encryption/decryption time**

*DOI: http://dx.doi.org/10.5772/intechopen.92369*

decryption step.

**Table 6.**

**Table 5.**

Proposed algorithm

Ref. [19] [2017]

Ref. [20] [2017]

Ref. [24] [2016]

Ref. [14] [2015]

Ref. [25] [2018]

**Table 7.**

**35**

*Encryption time in seconds.*

**Key space**

*NMSE for a set of different target images.*

*Comparison of the proposed cryptosystem with others.*

**Average correlation**

#### **Table 4.**

*NCPR AND UACI measure after a LSB change.*

that by changing only one bit in any parameter of the key, it is not possible to recover the plain images.

#### **3.3 Sensitivity analysis**

#### *3.3.1 Differential attack analysis*

An excellent encryption algorithm should have the desirable property of spreading the influence of slight change to the plain text over as much of the cipher text as possible. The sensitivity of a cryptosystem is evaluated through Number of Pixel Change Rate (NPCR), see Eq. (19), and Unified Average Change Intensity (UACI), see Eq. (20), criteria, which consist in testing the influence of one-pixel change of a plain image in the resulting cipher image.where *C*<sup>1</sup> and *C*<sup>2</sup> are two images with same size *W* � *H*. If *C*1(i, j) # *C*2(i, j) C1ð Þ i, j 6¼ C2ð Þ i, j then *D i*ð Þ¼ , *j* 1 D i, j ð Þ¼ 1, otherwise, *D i*ð Þ¼ , *j* 0.

**Table 4** gives the measurement of NCPR and UACI between two cipher images of cameraman, Lena and peppers, when a Least Significant Bit (LSB) changed on gray value in the last pixel's position. We can notice that the values obtained are around the mean of 99.61 for NCPR and 33.49 for UACI. This result shows that a slight change to the original images will result in a great change in all the encrypted images. The results also imply that the proposed algorithm has an excellent ability to resist the differential attack.

#### *3.3.2 Quality of reconstructed images*

As the number of target images to encrypt increases, the quality of recovered images decreases. In order to reduce the NMSE between plain and decrypted images and enlarge the number of target images, we grouped them into two multiplexed images before encryption. To evaluate quantitatively the quality of decrypted image, we used the normalized mean square error (NMSE) between the original image and the decrypted image. The NMSE is defined as:

$$\text{NMSE} = \frac{\sum\_{\mathbf{i}=1}^{N} \sum\_{\mathbf{j}=1}^{M} \left[ \mathbf{I}\_{\text{D}}(\mathbf{i}, \mathbf{j}) - \mathbf{I}\_{\text{E}}(\mathbf{i}, \mathbf{j}) \right]^{2}}{\sum\_{i=1}^{N} \sum\_{\mathbf{j}=1}^{M} \left[ \mathbf{I}\_{\text{E}}(\mathbf{i}, \mathbf{j}) \right]^{2}} \tag{21}$$

where M � N are the size of the image, ID(i, j) and IE(i, j) are the values of the decrypted image and the original image at the pixel (i, j), respectively. **Table 5** presents the values of NMSE for a set of different target images of size 512 � 512. From this table, we can observe that for *N = 16* target images combined in one multiplex image, that is, 32 images to encrypt by the proposed cryptosystem,

*Multiple-Image Fusion Encryption (MIFE) Using Discrete Cosine Transformation (DCT)… DOI: http://dx.doi.org/10.5772/intechopen.92369*

the NMSE is still low, which attests the good quality of reconstructed images and good performances of the proposed cryptosystem.
