RGB Image Encryption using Hill Algorithm and Chaos System

The development of modern technology in recent years, makes the data security very big issue. To secure our data from unauthorized person, encryption is used before transmission. Various sensitive information is using encryption such as: e-mail messages, banking transactions, credit information and military operations. The encrypted data can be in form of text, image, voice, and video. In this paper, a proposed Hill algorithm with chaos system is used to encrypt colour RGB (Red, Green and Blue) image. The key of Hill algorithm is a square matrix. The selection of matrix key numbers is very important. Therefore, chaos system is used to generate sequences of numbers for Hill key matrix. These sequences have a property of randomness that make it very difficult for guessing. Finally, the proposed system is simulated using MATLAB, and a test image is encrypted and decrypted using proposed system successfully.


Introduction
Every transmitted data over networks can be suffer an attack by third party. Therefore, cryptography is used to secure data from unauthorized person. Cryptography is an art and science of hiding data from the external environment. It is basically classified into two categories: symmetric cipher and asymmetric cipher [1][2]. In a symmetric cipher, both sender and receiver used same shared key (such as Hill cipher). While in asymmetric cipher, there are two keys. The first key is a public key that is used by the sender to encrypt message, while the second key is a private key that is used by the receiver to decrypt message (such as RSA cipher). Encryption is a process to convert the original message to encrypt message using a specific key. While decryption is the reverse process of encryption, it is retrieving the original message from encrypted message [3]. The original message can be any transmitted data such as text or image. Colour images are being transmitted and stored over networks, which take advantage of rapid development in multimedia and network technologies. Image encryption has applications in different fields such as multimedia systems, internet communication, medical imaging, and military communication [4]. In recent years, some papers were proposed encryption using chaos system [5][6][7][8][9][10][11][12]. The attractiveness of using chaos is that it has the properties which are very sensitive to initial condition, long term unpredictable sequence, and the implementation of hardware and software is simple [13]. Some researchers were also using Hill cipher algorithm [14][15]. In this paper, a colour image is encrypted using both chaos system and Hill cipher so that each colour in RGB image is encrypted separately and then combined

Hill Cipher Algorithm
The principle of Hill cipher algorithm based on linear algebra properties. It uses square matrix Key (K) modulo 26 (there are 26 English letters). The inverse of K (K -1 ) must be exist to satisfy decryption process [3] [16]. This means that: where, I is identity matrix. Each English letter takes numerical value, so that a = 0, b = 1, c = 2, … , z = 25. In encryption process, plain-text (P) letters are subdivided into several segments. The length of each segment equals to K rows (or column). The encryption equation that generate Cipher-text (C) is shown as follow: where, E is encryption process and ( T ) is transpose operation. While the decryption equation is:

Chaos System
Chaos is aperiodic, random-like, long term non-predictive behaviour, and very sensitive to initial condition [17]. The chaos sequence is implemented using several chaotic maps. Any chaotic map is defined as [18]: where, yn+1 is the present value of y and yn is the previous value. Several chaotic maps are existing, such as logistic map, Lorenzo map, and quadratic map. Logistic map is used in this work that is given by: yn+1= yn * r * (1-yn) where, r is bifurcation parameter which lies between [0,4]. Fig. 1 shows the bifurcation diagram of the logistic map. From this figure, it is shown that chaotic behaviour occurs when r is between [3.68, 4].

Proposed Encryption Algorithm
In this work, RGB image is encrypted by combining Hill cipher and chaos system. RGB image contains of three colour matrices which include R matrix, B matrix, and G matrix. The pixel size in each colour matrix is 8-bits which is 2 8 =256. So, all operations are based on modulo 256. The next sections will state the encryption and the decryption processes of the proposed method. K1 is used to encrypt R matrix, while K2 is used to encrypt G matrix and K3 is used to encrypt B matrix.

A. Encryption process
All key matrices are achieved Hill cipher conditions to generate K -1 modulo 256, so that K* K -1 modulo 256 = I.
3) Each colour matrix is subdivided into several 4*4 segments. After that, each segment is multiplied with its specific K to generate encrypted matrix. 4) All encrypted matrices are combined together to create encrypted image that is transmitted over network.

B. Decryption process
Both sender and receiver are used the same initial conditions. Therefore, receiver calculate the inverse of Hill matrix keys (K1 -1 , K2 -1 , and K3 -1 ). The decryption process is: 1) When the encrypted image reach at the receiver, it is separated to three encrypted matrices, each matrix is belonging to one colour of RBG image.
2) Each encrypted matrix is subdivided into several 4*4 segments. Then, each segment is multiplied with its specific K -1 to get R, B and G matrices.
3) All R, B and G matrices are combine together to retrieve the original RBG image.
All steps of encryption and decryption process flow are clearly shown in Fig. 3.

Results
The proposed algorithm is simulated using MATLAB program. The original test image with its histogram is shown in Fig. 4. Fig. 5 displays the R, G and B of the original test image independently. While Fig. 6 demonstrations the encryption of each colour image separately. Lastly, the final encryption step is combining all three encryption colours together as shown in Fig. 7.   When the encrypted image is received, the original image can be retrieved by doing the reverse process of all encryption steps. Fig. 8 shows the decrypted image in the receiver which similar to the original image in the Fig. 4.

Conclusion
In this paper, a proposed method is used to improve Hill cipher algorithm by using chaos system. RGB image can be encrypted using the proposed method which is simple to be implemented and efficient. Each colour of image is encrypted individually using different key so that, each key is created from different chaos sequence. These chaos sequences are generated using initial conditions which are entirely different from each other. In fact, the chaos sequence has a property of dependency on initial condition. This makes a small change in the initial condition will create entirely different chaos sequence. Therefore, the attacker will face several difficulties such as 1) the estimation of three initial conditions of chaos system which is very sensitive and difficult, 2) each colour of RGB image is encrypted alone, this makes confusion of which initial condition is used to each colour, 3) the size of Hill matrix key, which set the size of segments during encryption and decryption process, 4) the selection of Hill matrix key numbers from millions of numbers in the generated chaos sequences. Simulation results show that, the encryption of any image is entirely hidden by using the proposed algorithm.