Implementation of Modified AES as Image Encryption Scheme

ABSTRACT


INTRODUCTION
In today's multimedia technology, images are often used to communicate and convey meaningful information [1]. Securing images from unauthorized users is important and needed in the fields of medical processing, remote sensing, military, government documents, telecommunications and other similar fields [2]- [4].
The widespread usage of digital images on the internet requires a fast, reliable and robust security to store and transmit them over the network [5]. Image encryption is needed to enforce content access control, identity authentication and provide protection [6] of images by transforming the original content of the image into a texture-like or noise-like information that is hard to understand.
The use of encryption techniques provides a solution to the security issues in image and video processing. Asymmetric encryption algorithms are not suited for this type of application because asymmetric algorithms are much slower than symmetric techniques and require more computational processing power [7]. Symmetric encryption algorithms are already adequate when static media information like images [3] is to be secured.
Images have bigger file size compared to text and also are real-time data, a faster image encryption algorithm is necessary. AES is one of the naïve traditional algorithm used for multimedia storage and transmission of pixels. Using AES for encrypting images have drawbacks [8] because of its high computations and is slow when used for encrypting images [8]- [10].
One of the emerging challenges in image processing is that encryption techniques are often computationally expensive [6]. Unlike in text encryption, image encryption algorithm needs additional requirement because image data have properties like high redundancy, bulk capacity and high correlation between the pixels [11]. Therefore, having an efficient cryptographic algorithm is considered to be imperative, and a fast encryption algorithm is to be chosen to provide higher security in digital images [12]. The paper presents an implementation of the modified AES algorithm [13] as an image encryption scheme. The modified algorithm used bit permutation in replacement of the MixColumns Transformation to achieve faster encryption time in images. The modified algorithm had high key sensitivity and achieved a low correlation value between adjacent pixels. The result also shows a negligible value of predictability making it resistant to statistical and differential attack.

REVIEW OF RELATED LITERATURE
Encrypting images can be performed either in full or partial image encryption procedure under the spatial, frequency or hybrid domain [3]. A full encryption algorithm encrypts the whole image rather than just a selected or important part. While spatial domain deals with the image as it is, where the pixel values of image change concerning a scene. The implementation of the modified algorithm is under the full image encryption procedure in the spatial domain.
The paper of [14] presents a framework to evaluate image encryption schemes. Aside from visual inspection, parameters like correlation coefficient, information entropy, number of pixel change rate, and unified average change rate are used to evaluate image encryption schemes. These parameters were used in this study to evaluate the performance of the modified algorithm.
Similar studies of modification of AES algorithms were presented for image encryption. Some of the studies are the following: The reduction of the number of rounds of AES to only one round is introduced to address the high computational load of the AES algorithms, and a new S-box was proposed in the research of [15] to encrypt greyscale high definition images. The reduction to only one round showed a significant decreased in the encryption time of the algorithm by 1/10 and reduced the ROM used by 256 bytes. However, several studies [16]- [18] show that a round-reduction in AES is likely to affect the security level of the algorithm.
An AES modification by adjusting the ShiftRows transformation was introduced by [19]. The basis of shifting of rows is from the value in the state ([0][0]) whether the value of the state is odd or even. The result shows that the proposed transformation gives better encryption time because it does not have any additional operations.
Modifications in both ShiftRows and MixColumns were also presented [20]. The direction of shifting in ShiftRows modification is also about checking the value of the state ([0][0]). The modification in MixColumns includes a matrix transformation of the final state from ShiftRows before applying the MixColumn process. The modification shows that the modification resulted in lesser computational time.
The paper of [21] proposed image encryption based on shifted row and columns of the image. Before the encryption of images, a shifting process is introduced to divide the plaintext image into blocks with 3x3 pixels. These blocks are used to further shift it through the rows and the columns within the image using a shifted table processed by the hash algorithm. The result shows that the algorithm produces a significant difference in small change in the original image The paper of [22] proposed an image based encryption technique by shuffling the RGB pixel values of the image. The shuffling of values on pixel-based only interchange the RGB values of the image and do not create a new pixel value for the encrypted image unlike with a bit-permutation technique.
The proposed image encryption of [23] is also based on pixel modification. The proposed pixel modification is an exchange between the most significant bits and the least significant bits. The result of the study shows that the density of the histogram image of the plain image is greater than the density of the encrypted image. The correlation coefficient in horizontal direction of the plain and encrypted image are the same which means that the two images are the same in horizontal direction [14]. Figure 1 shows the modified AES algorithm using bit permutation as presented in the study of [13]. The result in the paper shows that the use of bit permutation instead of MixColumns makes the modified AES algorithm suited for encrypting digital images because of increased efficiency and throughput due to reduced execution time and CPU usage. Bit permutation has no complex mathematical operationbut only involves shifting of the position of bits of every state [13]. The proposed modified AES algorithm takes 128bit data length as input and 128 key length which has ten rounds of transformation and used AES-CBC mode in encrypting images. Figure 2 shows the conceptual framework for image encryption. The original image is taken as an input, taking its height and width and its RGB component. The proposed method is done in full image encryption using the proposedalgorithm. The secret key is used during the encryption and decryption process.

RESULTS AND DISCUSSION
The encryption algorithm in images was simulated using Microsoft .NET framework, and the generated encrypted images were evaluated using the functions in Matlab (R2017a). The evaluation of the encrypted image is on the encryption and decryption time, key sensitivity analysis, histogram analysis, correlation coefficient, information entropy, NPCR, and UACI.

Encryption and Decryption Time
Encryption Time refers to the amount it takes to process the plaintext image to its equivalent encrypted image while Decryption Time refers to the amount it takes to convert back the encrypted image to the plaintext image. Results in Table 1 and 2 show that the modified AES encrypts the image faster than the standard AES. A faster encryption algorithm for images is needed to provide better security of digital images.

Key Sensitivity Analysis
A good encryption algorithm should be highly sensitive to changes in the secret key [4]. A minor change in the secret key during decryption process results in a completely different decrypted image. Figure  4a shows the decrypted image using the correct secret key while Figure 4b shows a wrong decrypted image using a changed value in the secret key. The result shows that the algorithm produces a high sensitivity in small changes in the secret key.

Histogram Analysis
The histogram is a graphical representation that shows the distribution of pixels in the image at every different intensity value. For an encryption algorithm to be resistant to statistical attack, it must have a histogram that is entirely different from the plain image and has a uniform distribution of values [24], [25]. Figure 5a-5b show that the histogram of the plaintext image Smiley is completely different from the encrypted image. The encrypted image has a uniformly distributed histogram which means that a little information about the data is known. The result of the analysis of the histogram shows that the modified algorithm is resistant to statistical attack.

Correlation Coefficient
Correlation Coefficient computes the degree of similarity between adjacent pixels. A correlation coefficient that is very low or very close to zero means that the plain and encrypted images are completely different. A correlation coefficient equal to one means that both images are identical and are in perfect correlation and that the encryption process fails because the encrypted image is same as the plaintext image [14].
A randomly selected 3000 adjacent pairs of pixels in horizontal and vertical direction in the plain and encrypted image were used to compute for the correlation coefficient. Below shows the formula for the computation of correlation coefficient [14,21,26,27].
) ∑ where x and y are the values of two pixels of the plaintext and encrypted images and N is the number of selected adjacent pixels. Table 3 shows that the modified AES algorithm has achieved a lower correlation coefficient than the standard AES for the two images. The value means that the plain and the encrypted image are entirely different from each other and are uncorrelated both in horizontal and vertical directions. Figure 6 shows the distribution of two pixels in horizontal and vertical direction in the original image and its equivalent encrypted image using the modified algorithm.  Figure 6. Distribution of pixels in horizontal and vertical direction

Information Entropy
Information Entropy is vital in analyzing the encryption algorithm because it is used to depict the randomness of data [28] and is used to show the degree of uncertainties in a communication system [14]. When messages are encrypted, the value of the entropy should be approximated to 8. An entropy value that is less than 8 means a certain degree of predictability exists. The information entropy H(m) of a message is calculated as [14,21,28]: Where ) is the propability of The result in Table 4 shows that the modified AES has a very close value to the ideal value of 8, which implies that the modified AES has a negligible value of predictability and introduces randomness to the encrypted image and a comparable performance with the standard.

NPCR and UACI
The NPCR and UACI are factors to demonstrate that the modified encryption algorithm can strongly resist differential attack [29] [30]. A higher value of these two factors means a better encryption algorithm [14].
Number of Pixel Change Rate (NPCR) -NPCR refers to a test to measure the avalanche effect in image encryption. It refers to the number of pixel difference between encrypted images C1 and C2, where C1 is the encrypted image of original image and C2 is the encrypted image with one (1) pixel change.
Unified Average Change Intensity (UACI) -UACI indicates the average intensity of differences between the plain image and the encrypted image.
The computation of NPCR and UACI is [30]: Where: The ideal value of NPCR and UACI is 99.61% and 33.46% respectively [31].The result in Table 5 and 6 show that themodified algorithm has high sensitivity to small changes because the value of the NPCR and UACI are closer to their ideal value than the standard AES. It shows that the modified algorithm also hasstrong diffusion mechanism and strongly resists differential attack.

CONCLUSION
The paper presented an implementation of the proposed modified AES as an image encryption scheme to address the requirement in encrypting images. Comparison with the standard AES is carried out concerning encryption time, key sensitivity analysis, histogram analysis, the correlation coefficient of adjacent pixels, information entropy, NPCR, and UACI. The experimental result showed that the modified algorithm produced an entirely different encrypted image and that there is a significant difference in the encrypted image whenever there is a small change in the plaintext image. The result also showed that the modified algorithm is faster than AES, has a comparable value of predictability with the standard and is resistant to statistical and differential attacks making it suitable for image encryption. In the future, the implementation of the modified AES algorithm in partial image encryption can be considered and a comparison of the modified algorithm with other image encryption algorithms.