Image Cryptography with Least Squares Approximations

: Security of digital images has become one of the most important issues in network technologies. Different techniques have been evolved over the past few years to provide security for digital images through concealing information, image scrambling and image encryption. The aim of this work is to enhance the network security level by using the cryptographic method based on the Least Square Approximation technique ( LSA ). This work is one of the first attempts due to the use of the least squares polynomial of fifth degree technique as data interpolation in the image cryptography process. It has been proven in this study that a high level of correlation exists amongst the original and the corresponding decrypted images. The achieved high values of the measured Peak Signal to Noise Ratio ( PSNR ) for the decrypted images in this study are an indication to the high accuracy of the proposed technique in comparison to other cryptographic techniques. The output of the encrypted technique in this study reveals its reliability and robustness against security attacks.


Introduction
Information security is an increasingly important concern in the social networking era. Cryptography plays a crucial role in different popular applications of multimedia technology such as smart phones communications, electronic commerce, exchange of private emails, ATM security, transmitting financial information, etc. Cryptography can be described as a process of converting particular data into unreadable format for secure electronic transmitting and then retransforming it back to its original form. Different encryption methods have been proposed to protect the confidential data from unauthorized use such as discrete logarithm (Odlyzko, 2000), Rivest-Shamir-Adleman (RSA) public key (Rivest et al., 1970), knapsack (Merkle and Hellman 1978) and the alike. Those techniques depended on the Galio field construction technique which is considered a difficult one to employ (Merkle and Hellman, 2017). They are based on highly complicated concepts represented in algebra modular, prime number, operators, vector spaces and orthogonal basis. To overcome those difficulties and complexities, different methods have been introduced, such as a hybrid chaotic map for image encryption and hiding problems. In that method, the ciphered image is embedded into several carrier images (Cao, 2013). Based on the composition of the three classic chaotic maps: The logistic map, the Henon map and the Ikeda map, the hybrid chaotic map demonstrates a more complex chaotic characteristic than that of the single chaotic maps. Younes and Jantan presented a block-based transformation algorithm. They combined the process of image transformations and the well known Blowfish encryption and decryption algorithm (Younes and Jantan, 2008). That technique introduced lower correlations and higher entropies due to the increase in the number of blocks owing to the use of smaller block sizes. El Abbadi et al. (2014) introduced an image encryption using the Singular Values Decomposition (SVD). Elabbadi utilised the spectral diagonal matrices of two images to produce a new third one. Al-Rammahi (2015) used mutual two images for crypto one image via SVD technique. Mutual singular value decomposition approach can perform well with simple images, but it is not an appropriate method to be employed with complex images due to the simplicity of the SVD method. To overcome the associated drawbacks with that method, (Al-Rammahi, 2014a;2014b) proposed another two methods for image encryption/decryption operation, see. However, limitations still associated with those two methods when they were applied to the very complex digital images.

■■
Several other methods based on Least Squares Approximation (LSA) have also been developed to overcome the complexities associated with the aforementioned methods, such as, (Elrabeay et al., 2012) technique that is based on the LA interpolation of fused MR,. A major drawback of that technique is represented by giving a large number of coefficients in all scales corresponding to the edges of the image. Divya also introduced a method using a least-squares interpolation step. In that method, the image encryption operation was carried out by breaking down the image into 88 blocks. Then, domain transformation have been applied to those blocks from the spatial to the frequency domain using the Discrete Cosine Transformation (DCT) method (Divya et al., 2012). The drawback of this method is limited to the homogeneous images. Kekre et al. (2014) proposed a hybrid method to secure digital images. The basis of Kekre's method was a combination of hiding information and image encryption processes. Kekre employed four different algorithms based on Least Significant Bit (LSB) for hiding information process. Kekre's technique showed low quality in the decryption process when it was applied to complex images. Al-khassaweneh and Aviyente (2008) proposed an encryption/decryption image technique based on the first-degree polynomial interpolation LSA. In this technique, the original images are encrypted using randomly generated method. In the decrypted stage, the LSA method is utilised to decrypt the encrypted images. The major problem with Al-khassaweneh's technique is the sensitivity to the effect of the outliers. In addition to that, there was no information provided about the coefficient Correlations (COR) and PSNR of the examined images. Shreef and Hoomod (2013) utilized technique based on first-degree LS interpolation method for image encryption. Shreef's technique does not take into account the variances of the observations due to the sensitivity to the effect of the outliers.
In this study we are addressing these problems, including the sensitivity to the effect of outliers, by using a robust and highly accurate technique based on the LSA method. This method interpolates all mesh points when the number of mesh points is equal to the degree of the LSA. The performance of the proposed method in this study is compared to the performances of the introduced methods by both Al-khassaweneh and Shreef. The newly employed technique in this study has been proven more efficient than other previously introduced techniques due to its encryption/decryption accuracy.
The rest of this paper is organised as follows: Section 2 presents a brief description about the least squares method. Section 3 demonstrates some information about the proposed cipher method using least squares interpolation. The statistical analysis and discussion are presented in section 4. Section 5 outlines the conclusions from this work.

Least Squares Method
A Least Squares (LS) method is introduced as a statistical technique to find the best fit line for a model. It is used to examine the nature of the relationship between any two variables. This idea can be achieved by determining an approximate solution to a system of linear equations with no exact solution. The concept of LS is to find the best fit that is a straight line y = ax + b by measuring the values of y for given values of x. Suppose n points have been given where (Kolman, 1993) of degree m represents the best fit for the given data points. To determine the values of the constants 0 1 2 , , ,.... m b b b b , the y polynomial can be formatted as follows: Then, the value of b can be computed as follows:

Passive Threat in Wireless Networks
Confidentiality, integrity and availability are important elements in order to ensure secure wireless networks. Confidentiality of the wireless network traffics is highly influenced by passive attacks, while integrity and availability are affected by active attacks. A passive attack is the first stage of a hacking process. For lunching an active attacks against the wireless networks, passive attacks is needed. Passive attacks are silent in nature as it does not present any alteration to the network traffic or normal network operations. In this type of the attack, the network traffic is simply can be sniffed and analyzed by the attackers based on the objective of capturing sensitive information of the victims. Passive attack is very difficult to detect as an illegal access can be gained by the unauthorized users to the network traffic without modifying the traffic (Khan et al., 2008). Based on that, this work is concerned with the passive attacks which is laying down a foundation for later launching an active attacks.

Proposed Cipher Method using Least Squares Interpolation
It is known that the LSA method is classified as an approximation data technique. It causes noticeable errors when it is utilized in image cryptography. To overcome ■■ this problem, a new technique has been introduced in this study based on the least square interpolation method. In this technique, the number of mesh points is exact equal to the degree of least squares polynomial. Applying this technique to encrypt and decrypt different types of images result in minimal errors, Fig. 1 and 2.
In the proposed cryptography method of this work, the columns of an image have been partitioned to represent the key, say n. The gray levels which represent the number of Bits Per Pixel (BPP) can be classified based on the selected n key into dependent values (y1, y2,…, yn) and independent values (x1, x2,…, xn) as the xs' have been chosen at any interval. In this study, m is assumed to be equal to n in order to interpolate (x, y) otherwise LSA approximates the values and results in errors. Equation (2) has been employed to calculate the value of b. An example of this process can be explained by the representation of image values in the matrix T as follows: 20 22 22 24 44 45 44 55 33 12   65 77 21 89 55 34 22 23 55 34  34 23 10 56 39 90 77 78 99 67  91 78 20 90 30 70 88 90 66 89  78 93 30 12 10 23 90 80 88 70  46 40 40 51 909 78 30 50 22 23  89 20 50 58 80 45 23 36 44 54  40 10 60 42 70 29 4 72 66 64  20 45 77 69 56 70 5 90 89 Each row can be divided into two vectors where the key k = 5. For interpolating second row [65,77,21,89,55,34,22,23,55,34] The image cryptography process depends on two separate stages. The first stage is an encryption and the other one is a decryption which is the inverse operation of the encryption.
Mathematically, it is known that when minor changes occur during the encryption operations it results in large alterations in the original data. This leads to the need of implementing an accurate algorithm to prevent or reduce the alterations in the original data during encryption and decryption operations. The statistical measurements of an image are determined by the coefficient correlations (COR), PSNR, Number of Pixels Change Rate (NPCR) and the Unified Average Changing Intensity (UACI). It is noted that PSNR is strongly related to the number of vanishing moments (Abhilash, 2015). The sparsity of the transformation is strongly affected by the vanishing moments (Wu and Noonan, 2011). Higher vanishing moments means more complex functions can be represented by the scaling function.
where, X refers to the origin image with dimension of N * M and Y refers to its corresponding encryption with the same dimension. A lower value of MSN means less error which is in turn means a higher value of PSNR. Based on the high values of CRO and PSNR, the performance of the newly introduced technique has proven higher accuracy of the examined images in comparison to the previously introduced cryptography techniques: , ,  Tahreer   T  Q   4000  3500  3000  2500  2000  1500  1000  500  0   4000  3500  3000  2500  2000  1500  1000  500  0   4000  3500  3000  2500  2000  1500  1000  ■■ UACI are the most commonly utilised parameters to assess the strength of image encryption/decryption technique in the sense of differential attacks (Wu and Noonan, 2011). In other words, high values of NPCR and UACI are usually used as an indication to a high resistance to differential attacks. Based on that, the high values gained of NPCR and UACI are an indication of the strength of the employed technique in this study against differential attacks.

Statistical Analysis and Discussion
In order to examine the accuracy of the utilized algorithms in this study, different images, including medical ones, have been encrypted and then decrypted. The performance of the proposed algorithms in this study is compared to the performance of Alkhassaweneh and Shreef's algorithms. The examined algorithm in this study exhibits a very few errors in the decryption process owing to the high correlation between the decrypted and origin images, in addition to the high PSNR values achieved by the proposed method. It has been shown that the achieved COR values are very close to 1. In other words, the newly introduced technique in this study has demonstrated higher correlation between the decrypted and the origin images in comparison to Al-khassaweneh and Shreef. In addition to that, high PSNR values (average value of PSNR is around 45) have been gained in comparison to the PSNR values introduced by Al-khassaweneh and Shreef, Table 1 to 3. For example, the attained COR and PSNR values in this study are 0.9994 and 43.7342 respectively for Tahreer's image, see Table 1, while the achieved COR and PSNR values by Al-khassaweneh for the same image were 0.9014 and 40.7342, Table 2.
Usually, hackers may seek to observe variations at the encrypted image to find the correlation between the plaintext and the encrypted image. Generally, the NPCR and the UACI can be utilised as an indication to the ability to resist to the differential attacks. As higher the measured values of NPCR and UACI as, the better resistance to the differential attacks. The proposed algorithms in this study have been applied to different types of images of different complexities, Fig. 2. In that figure, T denotes the original image and Q refers to the decrypted one. The measured NPCR and UACI for the examined images provide very acceptable results in terms of the method's strength against the differential attacks, Table  1. In other words, the implemented decryption algorithm in this study effectively detects that alteration to the original image, i.e., it detects the attack and resists it.
Further examination to the accuracy of the introduced method in this study, grayscale and coloured medical images are tested, Fig. 3. Al-khassaweneh and Shreefs' techniques are also applied to those medical images for the purpose of comparison. Higher values in terms of COR, PSNR, NPCR and UACI parameters are achieved in this study in comparison to Al-khassaweneh and Shreefs' works. For example, the PSNR value is 52.4470 when the proposed method in this study is applied to the grayscale image. While, for the same image, the values of PSNR are 26.5230 and 18.8080 for Al-khassaweneh and Shreef respectively. The achieved COR in this study for the grayscale image is 0.9697, while the achieved COR values by both Al-khassaweneh and Shreef are 0.9091 and 0.9011 respectively. The measured NPCR and UACI for the examined images provide very acceptable results in terms of the method's strength against the differential attacks.

Robustness of Proposed Method
Assume that the attacker can gain access and read the crypto values [-10, 15, 5]. Suppose that the attacker is knowledgeable about the presented algorithm in this study, with respect to the method's algebraic type and key, the attacker has to manipulate the following methods and using the attacker's table,

Conclusion
Mathematical concepts play an essential role in image cryptography. The proposed algorithms in this study employ interpolated LSA which results in a very few errors. In this method, all mesh points are interpolated when the number of mesh points is equal to the degree of the LSA. This means that all dependent points pass through the curve of the LSA. In order to examine the accuracy of the utilized algorithms in this study, different images, including grayscale and colored medical images, have been encrypted and then decrypted. It has been revealed that the newly introduced technique in this study has proven high correlations between the decrypted and the origin images. High COR and PSNR values have been gained when the proposed technique in this study is applied to a very large number of images of different textures and complexities. In comparison to the introduced techniques by both Al-khassaweneh and Shreef, high NPCR and UACI are achieved by the proposed technique in this study. The high values of NPCR and UACI indicate the strength of the employed technique in this study in terms of the high resistance to differential attacks.