Using Encryption Square Keywith One-dimensional Matrix for Enhancing RGB Color Image Encryption-Decryption

Received Oct 19, 2017 Revised Dec 30, 2017 Accepted Jan 21, 2018 Recently, the security of digital images becomes an important issue with the rapid growth of digital communication and multimedia application. Recent cryptography algorithms are providing essential techniques to protect information and multimedia data. However, those algorithms are usually suffering from the problem of time-consuming. Encryption algorithms have been growth quickly and many image encryption methods have been used to protect information and multimedia data from unauthorized access. This research presents effective technique for image encryption which employs Red, Green and Blue (RGB) components of the RGB color image. The proposed technique utilizes matrix multiplication and inverse matrices for encryption-decryption purpose. Moreover, the effectiveness of the proposed encryption-decryption techniques lay on minimizing the encryptiondecryption time and the square error between the original and the decrypted image. The evaluations of the proposed technique were done using many images with different sizes, while the ex perimental results show that the improved encryption technique time are greatly reduced compared with “RGB Color Image Encryption-Decryption Using Gray Image” method. The proposed technique has a high confidentiality level through using confusion diffusion sequentially with a square matrix key and two vectors keys. However, those keys are generated randomly and make the process of hacking the image very difficult.


INTRODUCTION
Multimedia security has become one of the most important aspects of communications with the increasing volume of digital data transmission. In addition, some applications, such as transmitting digital images and videos, this may be used in many applications. In general, images have been widely used in our life. That concept ends up with the more widely we use image, the more necessary their security will be. Image security has become a prime concern in the current computer world [1][2][3][4]. The essential things that a security has to achieved are: integrity availability, confidentiality (CIA) [4][5][6]. In order to provide real-time and reliable security for digital images and videos, many different encryption algorithms have been proposed to make networked continuous media secure from potential threats such as hackers and eavesdroppers [4][5][6][7].
The most of proposed encryption algorithms are characterized by considerable imbalance between security and efficiency [8][9][10]. In addition, some of them are efficient enough to fulfill the real-time requirements, but they have a limited level of security. On the other hand, some are able to meet security demands adequately, but they have limited encryption efficiency. In this work, set of enhancements are applied to reduce the time that was spent by [8] and to improve the results of [11].The main goal of this paper is to propose a new techniques which enhance the time of color image encryptiondecryption. The proposed techniques are minimizing the encryptiondecryption time and the square error between the original and the decrypted image. Furthermore, the proposed technique maintains the encrypted color image confidentiality.
The rest of this paper is structured as follows: Section 2 summarizes the related work. Section 3 introduces the proposed technique. Section 4 describes the implementation of the proposed technique. In section 5, we evaluate the results of the experiments. Finally, in the last section, we present the conclusion and future work.

RELATED WORKS
Security issues in multimedia technology have become very important. The level of security required depends on the sensitivity of the information in these applications. Moreover, some applications require a suitable secure transmission system, and achieving secure multimedia transmission over the network is currently receiving a lot of attention from the research community [9,[12][13][14][15]. With the dramatic increase in the use of multimedia applications, the exponential increase in security incidents. Recently, there is still a lack of appropriate image encryption algorithms as mentioned in [16].
The existing image encryption techniques can be classified into three major categories: position permutation, value transformation, and the combination form between position permutation and value transformation. The position permutation algorithms scramble the data position within the image itself and usually have low security. On the other hand, the value transformation algorithms transform the data value of the original signal and have the potential of low computational complexity and low hardware cost. Finally, the combination forms perform both position permutation and value transformation and usually have the potential of high security. In recent years, a number of different image encryption schemes have been proposed in order to overcome image encryption problems. A few image encryption techniques suggested recently are discussed within this section In 2015 [13] proposed an algorithm to encryption iris image, based on Advanced Encryption Standard algorithm (AES). AES Algorithm is a kind of groping encryption algorithm with changeable block plaintext length and key length. AES is a symmetric encryption algorithm which using the same key for encryption and decryption.The proposed algorithm [13] was compared with scrambling encryption effect of the classic Arnold, The experiment results show that the image encryption security gained by the proposed algorithm of [13] is higher than Arnoled algorithm.
Mrunali [15] proposed a colored image encryption technique using visual cryptography scheme. The main advantage of visual cryptography that's eliminates the complex computation problem in decryption process, while the secret images can be restored by starching operation. This property makes visual cryptography useful for the low computation load requirement. Also, the proposed technique had a process on color image to grayscale image, and then he created the shares of binary image and encrypting those shares using the shared keys. On the other hand, the decryption is just the reverse of the encryption process.
An algorithm was proposed in [14] applies scrambling and substitution processes, that is the proposed algorithm provides more uniform histogram which is different from plain image histograms. The proposed algorithm [14] works in two phases; scrambling phase and substitution phases shown in Figure 2.

773
A colored image encryption and decryption algorithm proposed by [17] is based on Arnold transformation. The proposed algorithm depends on the encryption key instead of relying on the period of transformation time. Thus, the decryption time of the proposed algorithm is independent of the transformation time, but it's only decided by the encryption time.
Many encryption-decryption algorithms rely on changing the physical location of the image pixels or the changing the pixels values, but the proposed algorithm by [17] changes the physical location of pixels and pixels values as well.
The advantage of the proposed algorithm of [17] that it's more conspicuous when the size of the image is bigger. However, the simulation results show when the size of the image is bigger the encryptiondecryption time is reduced. Moreover, the proposed algorithm changes the original image statistical characteristics and makes the image pixels values uniformly distributed in the entire value space.
The proposed algorithm of [16] implemented security for image, by considering reading the image pixels and convert it into pixels matrix of order as height and width of the image. Then, replacing those pixels into some fixed numbers, while the secret key was generated using random generation technique. Theproposed algorithm is based on Ceaser Cipher algorithm, random generation technique, concept of shuffling the rows i.e. rows transposition and Huffman Encoding. Encryption and Decryption of an image by this algorithm protect the image from an unauthorized access.
The image encrypting in [16] was performed using a secret key that is generated from random generation technique, performing random transposition on encrypted image, converting it into one dimensional encrypted array and finally applied Huffman coding on that array, due this size of the encrypted image is reduced and image is encrypted again .The decryption is reverse process of encryption. Hence the proposed method [16] provides a high security for an image with minimum memory space.
Because of the inherent characteristics of chaotic systems, the chaos-based encryption seems not a good choice for secure image encryption, [18] proposes a transposing and scrambling image encryption algorithm based on improved hyper-chaotic sequence to provide enhanced security for encrypted image transmission. The algorithm processes the hyper-chaotic sequence according to the pixel information, which makes the keys sensitive to original image. Then scrambling and transposing operations were applied to the pixels in image, according to separate scrambling keys and gray scale transposing keys.
The proposed algorithm [18] was transposing and scrambling image encryption algorithm based on hyper-chaotic sequence. The transposing encryption [18] meets the Kerckhoff's principle, because it is irreversible, and the security is completely dependent on the key sequence. Moreover, the statistical result of encrypted image in [18] is closer to uniform distribution than the original image and the distribution of the original pixels is concealed, which prevents attackers from getting image information through histogram analysis.
A non-chaos based image, simple, fast and secured against any attack encryption scheme was proposed by [19] using an external key of 144-bits is presented. The proposed encryption scheme uses both pixel substitution as well as pixel permutation process. Furthermore, a feedback mechanism is also applied to avoid differential attack and make the cryptosystem more robust. The proposed encryption scheme has high encryption rate, requires less computation and sensitive to small changes in the secret key so even with the knowledge of the approximate key values, there is no possibility for the attacker to break the cipher.
Three processes were used in the proposed algorithm [19]: key mixing process, substitution process and permutation process. In the key mixing process; two kinds of key mixing processes called FKM and BKM are used in the proposed algorithm. In the both processes i.e. FKM and BKM, the image block is divided into sub-blocks and each sub-block is modified by using sub-key, its previous sub-block and subblock itself. A similar process is used in the BKM process.
The proposed system by [20] carried out pixel position permutation by using Lorenz, chen, and LU. The proposed system has two stages; confusion stage and the diffusion stage. In confusion pixel position is scrambled over the entire image by using chaotic system. The chaotic system was controlled by initial condition and controlled parameters which were derived for 16-bit secret key. Among the three chaotic dynamic system i.e. Lorenz, chen, and LU one is selected by the system parameter which was obtained from the generated secret key. The proposed system had three advantages; bigger key security, small iteration times, and high security analysis.
A new effective method for image encryption was proposed by [21], which employs magnitude and phase manipulation using Differential Evolution (DE) approach. The idea of the proposed work was that encrypted image is obtained by magnitude and phase manipulation of the original image using the secret key. The original image magnitude and phase was uniquely retrieved from the encrypted image if and only if the key is known. This idea makes the cryptosystem secure.
The Authors of [21] carried out the two dimensional (2-D) keyed discrete Fourier transform on the original image, resulting in the first level of image encryption by the use of the secret key. Secondly, a crossover operation was performed on the two components of the encrypted image, which are selected based on Linear Feedback Shift Register (LFSR) index generator. Crossover make more shuffling to the positions of image pixels leading to fully distorted encrypted image. The LFSR index generator initializes it seed with the shared secret key value to ensure the security of the resulting indices.
The histogram of the cipher image is significantly different from that of the original images, and bears no statistical resemblance to the plain image. On the other hand, it's clear that the histogram of the encrypted image is significantly different from the respective histogram of the original image and hence does not provide any clue to employ any statistical attack on the proposed image encryption procedure.
R'G'B' model was proposed by [8, 22, and 23] to convert RGB color image to grey image. The model of [8] can be used also to encrypt-decrypt color image using R'G'B' model and Hue, Saturation, and Intensity (HIS) model. Encryption phase of [8] was implemented using R'G'B' model as shown in figure 2, and decryption phase of [8] was implemented using R'G'B' as shown in figure 3.

THE PROPOSED TECHNIQUE
The proposed technique is suggested in order to eliminate the conversion from RGB to gray. In addition, the one-dimensional matrix is multiplied with the encryption square matrix key and then the columns and rows order will be changed.The proposed technique implemented into two phases; encryption phase and decryption phase.
The first phase of the proposed technique is the encryption phase which contains the following sequence of steps: 1. Convert the original three-dimensional (RGB) color image with a size (L×W×3) to one-dimensional matrix. 2. Generate a random square matrix key (EK) with a size (W×W). 3. Generate a random vector key (RK) with a length that equals the length of the one-dimensional matrix with unique values varies from 1 to the length of the one-dimensional matrix. 4. Generate a random vector key (CK) with a width that equals the width of the one-dimensional matrix with unique values varies from 1 to the width of the one-dimensional matrix. 5. Multiply the one-dimensional matrix with EK key. 6. Change the rows order of the result matrix in step 5 according to RK key. 7. Change the columns order of the result matrix in step 6 according to CK key.
The second phase of the proposed technique is the decryption phase which contains the following sequence of steps: 1. Change the columns and rows order of the encrypted image according to CK and RK keys.
2. Multiply the result matrix with EK inverse matrix.
3. Reshape the one-dimensional matrix to three-dimensional (RGB) color image.

RESULTS AND DISCUSSION
A method of [8] was proposed for color image encryption decryption. This method has based on converting color image to grey image then grey image was encrypted. In addition, it was measured for each color image.
Each time MSE was calculated and the results show that in each time of the decrypted image, 100% matches the original image (MSE=0).For performance analysis, the required total time for encryptiondecryption was measured for each color image and the results of measuring are listed in Table 1. The encryption-decryption rate of the proposed technique wascomparedwith the proposed technique [8] that using direct inverse conversion. Table 2 shows the results of comparisonsusingsome images of differentsize. The proposed technique enhancedthe RGB color image encryption by 4.159792 times comparing with the "RGB Color Image Encryption-Decryption Using Gray Image" method which developed by [8]. Furthermore, the proposed technique enhanced the RGB color image decryptionby 2.683146 times comparing with the [8].

CONCLUSION AND FUTURE WORK
This paper demonstrates the need for enhancing the color image encryption and decryption techniques in terms of time and security. This paper investigate the modern method called "RGB Color Image Encryption-Decryption Using Gray Image" which developed by [8]. Accordingly, this study proposes an effective technique for image encryption. The proposed technique employs Red, Green and Blue (RGB) components of the RGB color image in order to utilize matrix multiplication and inverse matrices for encryption decryption purpose through designing a new color image encryption-decryption technique using encryption square matrix key.
As for future work, we can enhance the encryption-decryption time for the proposed approaches and adds more enhancements to maximum confusion and diffusion of the encrypted image.