Security and Communication Networks

Volume 2017, Article ID 7367518, 13 pages

https://doi.org/10.1155/2017/7367518

## Two-Phase Image Encryption Scheme Based on FFCT and Fractals

Department of Engineering Mathematics, Faculty of Engineering, Alexandria 21544, Egypt

Correspondence should be addressed to Mervat Mikhail; moc.liamg@08liahkim.tavrem

Received 19 July 2016; Revised 21 October 2016; Accepted 20 November 2016; Published 22 January 2017

Academic Editor: Anna Cinzia Squicciarini

Copyright © 2017 Mervat Mikhail et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This paper blends the ideas from recent researches into a simple, yet efficient image encryption scheme for colored images. It is based on the finite field cosine transform (FFCT) and symmetric-key cryptography. The FFCT is used to scramble the image yielding an image with a uniform histogram. The FFCT has been chosen as it works with integers modulo and hence avoids numerical inaccuracies inherent to other transforms. Fractals are used as a source of randomness to generate a one-time-pad keystream to be employed in enciphering step. The fractal images are scanned in zigzag manner to ensure decorrelation of adjacent pixels values in order to guarantee a strong key. The performance of the proposed algorithm is evaluated using standard statistical analysis techniques. Moreover, sensitivity analysis techniques such as resistance to differential attacks measures, mean square error, and one bit change in system key have been investigated. Furthermore, security of the proposed scheme against classical cryptographic attacks has been analyzed. The obtained results show great potential of the proposed scheme and competitiveness with other schemes in literature. Additionally, the algorithm lends itself to parallel processing adding to its computational efficiency.

#### 1. Introduction

Multimedia communication has now become a common practice in our daily lives. Multimedia data demand both high transmission rates and security. Medical imaging systems, military image databases, and pay-per-view TV are examples of applications in which security is an essential requirement of the multimedia system [1].

Encryption is a key component for secure communication. It is the cryptographic primitive responsible for converting data into a form that is only intelligible by the intended recipient. A secret piece of information held by the recipient, the decryption key, is used to recover the original message. The proper choice of such a key is a critical component to any cryptosystem, especially in stream ciphers [2].

Image encryption is far more challenging compared to textual data encryption. The adjacent bits in an image usually show high correlation which can be used in cryptanalysis. Moreover, the image size is a major challenge requiring highly efficient algorithms that can handle such huge data size in an acceptable time frame. Furthermore, traditional symmetric encryption schemes do not work well for encrypting images. Several attempts have been made to adapt standard encryption schemes to suit the delicate nature of images [3]. The enciphered image should look random with a uniform histogram and passing well-known statistical tests of randomness in the NIST suite [4]. Moreover, the encryption scheme should be sensitive to small variations in the plain image showing a significant change in the enciphered image.

Image encryption has thus attracted the attention of many researchers, who attempt to develop new schemes representing different tradeoffs between the complexity of the algorithm and its reliability. In this paper, an image encryption algorithm is proposed employing both the finite field cosine transform [5] and fractal images [6]. Fractal images can be easily generated and they are used as a source of randomness for constructing a strong stream cipher key. The preliminary results show that the proposed scheme shows comparable performance to other schemes in literature.

The rest of the paper is organized as follows. In the following section, related work on image encryption in literature is reviewed. The finite field cosine transform, zigzag scanning idea, and fractal images are defined in Section 3. Some important characteristics of the FFCT are briefly discussed and the transform matrix to be used in our algorithm is presented. In Section 4, evaluation techniques used to test the developed algorithm are described. Our image encryption scheme is introduced in Section 5. System key, complexity, and speed analysis are provided in Sections 6, 7, and 8, respectively. The experimental results used to illustrate and evaluate the performance of our approach are presented in Section 9. Resistance of the proposed encryption scheme to classical cryptographic attacks, like known-plaintext and chosen-plaintext attacks, is examined in Section 10. A comparative study between the proposed scheme and other schemes in literature is presented in Section 11. Finally, Section 12 concludes the paper.

#### 2. Related Work

Much attention has been lately devoted to developing efficient and highly secure image encryption schemes. Image encryption algorithms are classified into three major categories [7]: (i) pixel position permutation based algorithms, in which a pixel is replaced by another pixel of the same image, (ii) value transformation based algorithms, in which a pixel is converted to another pixel value, and (iii) visual transformation based algorithms, in which another image is superimposed on another image such as using an image as a key or watermark-based encryption. Now, hybrid algorithms are most dominating. Different types of permutation or shuffling techniques have been successfully applied. Moreover, numerous frequency domain transforms have been considered. Furthermore, there is abundant literature on the use of chaotic maps as well as the use of fractals in image encryption.

For keystream generation, fractal geometry and chaotic maps have been extensively used in both cryptography and data hiding [8]. As for the use of chaotic function, Liu and Wang [9] used a piecewise linear chaotic map to generate a pseudorandom key stream sequence. Amin et al. [10] used a chaotic block cipher scheme to encrypt a block of bits rather than a block of pixels using cryptographic primitive operations and a nonlinear transformation function. Wang et al. in [11] encrypted images using Baker map and several one-dimensional chaotic maps. Wang et al. [12] encrypted plaintext by alternating between stream ciphering and block ciphering based on a pseudorandom number generated based on a chaotic map. On the other hand, Huang [13] used a nonlinear chaotic Chebyshev function to generate a keystream, in addition to multiple pixel permutations. In [14], Wang and Luan proposed a novel image encryption scheme based on reversible cellular automata combined with chaos.

As for the use of fractal images, the Mandelbulb set has been used in [15]. The fractal image and the fractal-compressed source image are transformed to square matrices and matrix operations are applied in encryption and decryption. The Mandelbrot set is utilized in [16] along with the Hilbert transformation to generate a random encryption key. Moreover, Abd-El-Hafiz et al. [6] introduced a novel image encryption system based on diffusion and confusion processes in which the image information is hidden inside the complex details of multiple fractal images.

The FFCT was first defined in [19] and corresponds to a finite field version of the discrete cosine transform (DCT). It exhibits interesting properties which are valuable for cryptographic purposes. In [5], a simple method for uniformizing histograms of greyscale digital images was introduced based on 8-point FFCT without any encryption mechanism. Then, a method for histogram uniformization of greyscale images integrated with a full encryption mechanism was developed in [17]. In [20], an improvement had been proposed to allow the color channels to be processed jointly by means of a single transformation round by using a 32-point FFCT over the to transform blocks of the image.

The present work is based on the idea of multiphase image encryption and thus the encryption process is split over two phases: FFCT phase and encryption phase as in [18]. First, a transformation is done based on applying a recursive 8-point FFCT over to blocks of a color image. Since RGB images are considered, the transform is applied to each color channel separately. Application of this transformation guarantees a uniform histogram as well as decorrelation of values of adjacent pixels. This makes our method useful to provide robustness against statistical attacks in image encryption schemes. Second, encryption is based on using fractal images to generate the keystream which leads to a simple, yet secure encryption scheme.

#### 3. Background

In this section, some important definitions are provided which are essential to the development of the proposed scheme. First, the finite field cosine transform (FFCT) is defined, and then zigzag image scanning and fractal images and their generation are described.

##### 3.1. Finite Field Cosine Transform

In order to define the FFCT as in [5], let be a nonzero element in the finite field , where is an odd prime. The finite field cosine function related to is computed modulo as where denotes the multiplicative order of .

As an advantage, the finite field cosine transform is defined over the integers modulo and thus avoids inaccuracies associated with other real-valued transforms. A type-2 FFCT is defined in [5, 19] as follows.

Let be an element with multiplicative order . The finite field cosine transform of the vector , ) is given by the vector , whose elements are whereThe inverse FFCT can be computed according to the following formula:

The previous equations can be written in matrix format as , where corresponds to the transform matrix, the elements of which are obtained directly from (2). Using such a matrix notation, the FFCT can be extended to two dimensions. The two-dimensional FFCT of a matrix* M* with dimensions can be computed by where is the transformation matrix.

In this paper, RGB color images are considered, which have three color channels red, green, and blue. Each channel has pixels values ranging from 0 to 255. As suggested by [5], the Fermat prime used in the current paper is taken to be . An example of a transform matrix used for testing the scheme is the following:where is an orthogonal matrix which satisfies

The period of the FFCT transform matrix has great importance for the application described in this paper, since such a parameter corresponds to the least integer and positive power giving . Once the transform matrix used has a large period ( for the above matrix), there is not risk of returning the transformed block to its original block by the FFCT repetitive computation for a small number of times.

##### 3.2. Zigzag Scanning of Images and Reshaping

To understand the idea of zigzag scanning of a two-dimensional matrix, see Figure 1. A two-dimensional matrix is scanned in a zigzag way to obtain a one-dimensional vector. The one-dimensional vector thus has elements, which is then to be reshaped back into an two-dimensional matrix. Every consecutive element is used to form a column of this matrix as shown in Figure 2. This method of image scanning is used in the keystream generation step mentioned in Section 5.2.