Evaluation of the quality of an image encrytion scheme

Encryption systems have been developed for image viewing applications using the Hill Cipher algorithm. This study aims to evaluate the image encryption quality of the Hill Cipher algorithm. Several traditional metrics are used to evaluate the quality of the encryption scheme. Three of such metrics have been selected for this study. These include, the Colour Histogram, the Maximum Deviation (comparing the original image) and the Entropy Analysis of the encrypted image. Encryption quality results from all three schemes using a variety of images show that a plain Hill Cipher approach gives a good result for all kinds of images but is more suited for colour dense images


Introduction
Encryption schemes [1][2][3][4][5][6][7][8][9][10][11][12][13] are only as good as the difficulty posed in attacking its results.This difficulty is a function of various factors dependent on the encryption scheme or method employed.With respect to images, the difficulty of retrieving an original image [14][15][16] from one that is ciphered is the clear objective in evaluating an encryption scheme's security and performance.Evaluation also helps in ascertaining that a good visual result is obtained for a variety of images whilst using an encryption scheme (encrypted images must leave nothing exposed from an original image).Another purpose of evaluating an encryption scheme is to improve the time performance of the encryption process whilst also ensuring that its result is not susceptible to any security attack.
This study details the evaluation of the performance and security (quality) of an encryption scheme implemented using the Hill Cipher algorithm.A number of studies have shown that a visual inspection is insufficient to estimate correctly the quality of an encryption scheme [17].A number of novel tests and analyses have been introduced and these tests have been classified into various categories.Notably, Li et al [18] classified objective evaluation into two namely: reference and non-reference objective evaluation.Objective evaluation is done with the reference or original image in use whilst a non-reference evaluation does not rely on the reference image.All evaluation however, border on measuring the randomness introduced to an image by an encryption scheme.It may also seek to show its vulnerability to security attacks.This study is organized as follows; section two gives an overview of quality metrics and the various types of tests and analyses that can be carried out on an encryption scheme.Section three discusses the implementation of the encryption quality interface.Section four outlines the results obtained for various image types.Section 5 concludes the study.

Overview of Encryption Quality Analysis
This section discusses some well-known quality metrics, it includes Colour Histograms, Encryption Quality, Maximum Deviation, Entropy Analysis etc.

Colour Histogram
Colour histograms are a pictorial representation of the occurrence frequency of 8 bit pixel values showing the Red-Green-Blue (RGB) component of an image.Colour histograms give an idea of the dominant occurring shades represented in an image.Histogram is used to show the confusion and diffusion properties of an image encryption scheme to resist any statistical attacks [19].Uniform or fairly even distribution of a colour histogram show strong diffusion properties.Also, the distribution of an encrypted image should be significantly different from that of the original image [20].Figure 1 shows a flow chart for obtaining the Colour Histogram.

Maximum Deviation
Maximum Deviation is obtained by computing the difference between the cipher values and the encrypted values of the images.A three-step process is documented by El-Fishawy et al [21] for obtaining this metric namely: − Get the frequency of image pixels of each grayscale value in the range from 0 to 255 and for both original and ciphered images.− Compute the absolute difference or deviation between the original and ciphered image pixel frequency.− From the absolute difference obtained, calculate the sum of deviations (D) and this represents the Maximum Deviation.D is given by (1). (1) where L is the total grayscale levels and hi is the value of the difference histogram obtained from step 2 above i.e. the deviation or absolute difference between the grayscale values of the plain hpi and cipher image hci respectively.

Entropy Analysis
Information or Shannon entropy is a measure of the information or uncertainty in any random system or the quantity of information in a given source [22].Shannon's entropy is given as: an ideal random source entropy is equal to 8 but most information sources seldom generate random messages, therefore their entropy value is much smaller than the ideal one.

Encryption Quality
Encryption quality is designed to measure the change rate of pixel values when encryption is applied to an image.The encryption quality may be expressed as the deviation between the original and encrypted image or as the total changes in pixels values between the plain-image and the encrypted image [23].This is shown in (3) the gray level pixel values are used and are computed with (4):  = 0.299 * () + 0.587 * () + 0.114 * () (4)

Irregular Deviation
The Irregular deviation factor takes a similar path as the maximum deviation factor with only extra computations needed.In a five-step process, here's how its obtained: D is absolute value gotten by subtracting the values of the image pixel after encryption (I) from the value of the image pixel before encryption (J).This is shown in (5). Figure 2 shows a flow chart for calculating Encryption Quality, Maximum and Irregular Deviation.(8)

Design of Encryption Quality Interface
Based on the algorithms discussed in the previous section, an encryption quality analysis interface has been created with all four of the methods discussed.The Encryption Quality interface has been developed in a software application already described in a previous work [24].The algorithm to obtain the frequency of occurrence of each bit value as used in the colour histogram is shown in Figure 1.
Figure 2 shows the flowchart for calculating both the maximum deviation and irregular deviation algorithm.Figure 2

Histogram Analysis
Results from histogram analysis are presented in Figures 3 and 4. The good uniformity of the histograms produced in Figure 4 [24] noted that low valued images with grey level pixels closer to maximum bound produced much better quality with the hill cipher encryption scheme.Image results will therefore be less prone to statistical attacks.

Maximum and Irregular Deviation
Larger values of maximum deviation indicate better encryption quality while for irregular deviation, the smaller the better.Based on these metrics, the pepper image performs least by both metrics while the watch image performs best in the encryption scheme based on maximum deviation.Lena image performs best based on irregular deviation.Lower values are required for irregular deviation.Therefore, based on the tests, it is seen that Lena image performs best and Pepper image still performs least by this metric.

Encryption Quality
Encryption quality shows how deviated the encrypted image is from the original as shows in Table 1.Based on this metric, Pepper image performs least.This means that it is least deviated from the original.While on the other hand, watch image is encrypted significantly well and is relatively highly deviated.This means that the encryption algorithm is most effective on the Watch image.

Entropy Analysis
Based on the entropy metric, all images perform lower than the ideal random source entropy which is 8-bit.With watch image having the lowest entropy value and Lena image having the highest entropy value.This means that information leakage in the watch image is most possible and Lena image least possible.It is advised that other encryption algorithms be used for the watch image and pepper image since the encryption algorithm used is prone to entropy attack.

Key Sensitivity Analysis
Zhang et al [25] showed using a key sensitivity test where values of the key used for image encryption was analysed to see similarities in the encrypted images produced by these keys.Table 2 shows the observation when various image keys where tested against the Lena image for the corresponding results.The results show metrics for ID, EQ, MD and Entropy.The entropy remains the same for all three keys showing a similar strength.It can be seen that keys with higher absolute determinant give better maximum deviation.However, Maximum and irregular deviation values look significant.

Acknowledgement
We acknowledge the support of Covenant University in conducting this research and the cost of publication.

Conclusion
Image Encrytion schemes experience a variety of security attacks.Although these attacks are known, the susceptibility of encryption schemes have to be effectively investigated.This study suggests an approach to investigating the risk of image encryption schemes to some of this attack.The hill cipher scheme shows a lot of weakness to a number of attacks as the results from the previous section suggests.This study hopes to further evaluate using a variety of other encryption quality metrics and the effectiveness of hill cipher approach against other algorithms for image encryption.
Evaluation of the quality of an image encrytion scheme (Osemwegie Omoruyi) 2969

Figure 1 .Figure 2 . 7 )
Figure 1.Flowchart of obtaining colour histogram also shows the flow chart for deriving the encryption quality and Figure1shows the flowchart for obtaining the Colour histogram.The Graphical user interface is retained for display of histogram values as shown in Figure3.

Table 1 .
Encryption Quality Metrics Obtained from Analysis

Table 2 .
Testing with Various Keys using the Lena Image