Analysis Performance of Fast Image Encryption

Perkembangan teknologi mengakibatkan peningkatan kebutuhan pengiriman data melalui media internet. Banyak pengiriman data yang membutuhkan keamanan dalam pengirimannya untuk berbagai keperluan. Enkripsi data merupakan salah satu topic pengamanan yang banyak dilakukan penelitian dengan tujuan untuk mengamankan data yang dikirimkan melalui media internet. Salah satu data yang banyak digunakan adalah data citra. Citra merupakan data yang memiliki kapasitas besar dan memiliki sifat Perulangan yang tinggi sehingga dibutuhkan metode tertentu untuk melakukan proses enkripsi dan dekripsi citra. Permutasi dan difusi merupakan cara yang banyak digunakan untuk melakukan enkripsi citra. Permutasi bertujuan untuk mengacak posisi citra sedangkan difusi merubah nilai citra. Permutasi dan difusi banyak dilakukan sebagai dua tahap yang berbeda sehingga dibutuhkan dua kali pembacaan citra. Sebuah algoritma untuk menggabungkan proses permutasi dan difusi sehingga hanya diperlukan satu kali pembacaan citra untuk melakukan enkripsi telah diajukan. Selain permutasi dan difusi, fungsi chaos juga digunakan dalam algoritma tersebut karena kemampuannya untuk menghasilkan angka random yang sangat sensitif terhadap beberapa parameter. Dengan ide demikian, algoritma akan cepat untuk melakukan proses enkripsi dan dekripsi. Dalam penelitian ini dianalisis kinerja algoritma gabungan permutasi dan difusi menggunakan fungsi chaos. Analisis dilakukan dengan mengimplementasikan algoritma, mendapatkan waktu yang dibutuhkan untuk proses enkripsi dan dekripsi serta membandingkannnya dengan algoritma baku yang telah banyak digunakan, Advanced Encryption Standart (AES).


I. INTRODUCTION
ECENT rapid developments in computer network technology have resulted in increasing information transmission. One kind of information commonly transmitted on the internet is image data. Image data is used in many business and personal applications. In some cases, it need secure image data transmission over open networks possibly hosting adversaries. This requirement has led to a great deal of research proposing algorithms to encrypt image data.
Image has special characteristics such as a large number of bits, high correlation of adjacent pixels, and special storage formats. Some researcher believe that traditional block cipher based encryption schemes, such as Data Encryption Standard (DES), International Data Encryption Algorithm (IDEA), and Advanced Encryption Standard are not suitable for image encryption, and that specialized encryption techniques are needed [1]. One of techniques that are widely used is chaosbased method, which relies on ergodicity, sensitivity to control parameter, and sensitivity to initial condition. There are many chaos based techniques for image encryption. One of chaos-based technique is the chaotic map, which has several varieties such as Arnold's cat map, Baker's map, the logistic map, and the tent map. One example of chaos function for image encryption is used to permute the location the image pixels [2]. Other work is image encryption algorithm using the logistic map [3].
Another common way to encrypt image is by permutation and diffusion stage. The general permutation-diffusion architecture for chaos based image encryption was employed [4][5][6][7]. The goal of permutation is to reorder the location of image pixels, whereas diffusion is to transform the pixel values. Permutation and diffusion are two different stages, so to use both of these stages it needed to scan the image twice. A research proposes combination of permutation and diffusion in one time pass and uses nearest neighboring coupled map lattice to encrypt images, claimed that the process of encryption is fast but did not show the running time of algorithm [8]. This paper purposes to implement that particular algorithm, find the running time and compare it with AES running time performance.

II. A NEW CHAOS BASED FAST IMAGE ENCRYPTION ALGORITHM
Images have large capacity. Reading the same data twice might be more expensive than doing it once, even when same operations are being performed in the two steps. To solve this problem, research [8] propose the simple idea of combining permutation and diffusion in the same step. Permutation and diffusion are done together so that only one pass through the image is required. First, the image is divided into blocks of pixels. Then, spatiotemporal chaos is used to shuffle the blocks and to change pixel values.

A. Advanced Encryption Standard (AES)
AES is a symmetric key block cipher published by National Institute of Standards and Technology (NIST) in 2001. As a block cipher, AES takes a plaintext block size of 128 bits, or 16 bytes. The length of the key used in AES can be 16, 24, or 32 bytes (128,192, or 156 bits). The algorithm can thus be referred to as AES-128, AES-192, or AES-256, depending on the length of the key.
There are some modes that can be used to operate block cipher. These modes are used as a way how to interact the encryption for each block. Cipher block chaining (CBC) is one of mode that used to encrypt blocks. In CBC mode, each block of the plaintext is first XOR-ed with the previous cipher text block before being encrypted. For the first block, the block is XOR-ed with an initial vector that must be known by both sender and receiver.
Since there are modes to operating blocks, AES also use these modes in implementation. AES can be used to encrypt such a large data by divide them into blocks. The example of large data is image data.

B. Chaotic Tent Map
The chaotic tent map is a way to map a real number to another real number based on function.

R
The function used for tent map chaos is shown by (1). The chaotic tent map is used because it is very sensitive to the initial condition and parameter control. (1) where i=0,1,…,n is index sequence, x0 is the initial value, whereas b is the control parameter. The result of tent map strongly influence by xi and b. If the equation is repeated n times, it will make output an n-element sequence. The resulting sequence can be used to scramble another sequence with the same length.
where n=1,2,…is the time index, i=1,2,..,N is the lattice state index, f is a chaotic map which in this case use tent map, and ɛ ϵ (0,1) is coupling constant.

D. Generate Pseudorandom Number
There are many ways to generate pseudorandom number to encrypt data. This pseudorandom number is very important so the encryption algorithm is not easy to be attacked. In research [8], generating pseudorandom number is done by following steps.

A. Encryption Image
In the encryption scheme, the input of the algorithm is the plain image and used key. The key must be known by both sender and receiver. The key consist of 128 bit which divide into K[0], K [1],…, K[15]. The flowchart of whole encryption scheme is shown in Fig.2 The cipher image is get from relocated encrptimage to the original image. Repeat step 4 and 5 as much as needed to get more secure result. The more rounds are processed, the higher security the encryption will have, but the expanse of computational effort and time delay.

B. Decryption Image
The goal of decryption algorithm is to recover the plain image. To process the decryption, the receiver must have the key beside the cipher image. The key which is used in decryption algorithm is the same key which is used in encryption algorithm. Steps of decryption are the reverse of steps in encryption. Flowchart of the whole decryption scheme is shown in Fig. 3. For detail of decryption is explained in pseudocode.
1. In this step, do the same steps as step 1 and step 2 in encryption algorithm. The last step is reshape the pixel to original size. If the encryption algorithm is done by x times round, then the decryption also need to be done in x times round. Result of decryption process if done correctly with the correct key will produce the recovered plain image.

IV. IMPLEMENTATION RESULT
The implementation of encryption and decryption scheme based on research [8] is built the software using Microsoft Visual Studio 2010 with the OpenCV library. Dataset uses 10 images with size 256x256 in grayscale from http://sipi.usc.edu/database/database.php?volume=misc128. On the 10 images of dataset, decryption algorithm always perfectly recovers the plain image. Fig. 4 shows the plain image as input of encryption algorithm, whereas Fig. 5 shows the cipher image as output of encryption algorithm.
From the implementation, the running time performance is found. To compare this running time, implementation of standard algorithm, AES is performed. The implementation of AES with CBC mode is built using Microsoft Visual Studio 2010 with the cryptopp library. Table 1 shows the needed time by the encryption and decryption processes of research [8] and also the running time of AES encryption and decryption as comparison.
From table 1 can be analyzed that the time needed for both encryption and decryption by research [8] are still not faster than AES as standard encryption algorithm. So can be said that AES as standard encryption with CBC mode still better to be used as encryption for image from the running time performance. Many researchers concern to develop algorithm to encrypt and decrypt image. One of algorithm for image encryption using permutation and diffusion with chaos-based is proposed [8]. Permutation and diffusion are combined so both can be done in only one scan image. With this way, encryption process will cost cheaper for the running time performance. In other way, AES as standard algorithm is also used by many applications. AES can work well in many kind of data, no exception for image data. In fact, the usage of AES has many modes, so data with many redundancies like image data can be encrypted well using AES algorithm. After implementing research [8], get the running time of the algorithm, and after compare it with CBC mode AES running time, the result says that CBC mode AES running time is much faster than algorithm of research [8]. From this result, CBC mode of AES is still better to be used as encryption algorithm than algorithm of combination permutation and diffusion with chaos-based by research [8] based on running time performance.