Cryptography Triple Data Encryption Standard (3DES) for Digital Image Security

Advances in technology in the field of internet, making the Internet become the most popular data transmission media for now. This is certainly not free from the incidence of cyber crime, such as theft and data modification. Given the losses caused by data manipulation is very detrimental to the owner, then the original data can be misused in the cyber world. Cryptography offers an algorithm for randomizing data, so it can not be read by unauthorized people. The cryptography technique was implemented using Triple Data Encyption Standard (3DES) given the results of a randomized cryptographic algorithm, it is possible to arouse suspicion from the viewer. For that will be done the process of insertion of cryptographic files into another media in the form of images commonly referred to as steganography. The steganography technique that will be used is End of File (EOF). The combination of 3DES and EOF in the 64x64 pixel image with grayscale color format produces the fastest image processing time of 173.00192 seconds with the highest Peak Signal to Noise Ratio (PSNR) value of 25.0004 dB, while in the 128x128 pixel image with grayscale format has produced the highest PSNR 21.0084 dB.


INTRODUCTION
Improved technology in the field of internet trigger the occurrence of problems, especially in the field of Internet security.Given the number of Internet media users are quite high, it is possible the occurrence of Internet crimes that occur in the process of sending data through the internet media.Among these are file modifications, or the theft of important data transmitted over the internet.For solving cryptography offers a way to scramble an existing file by using a specific key known only to the us er.The technique of cryptography that will be implemented in this research is 3DES.3DES has a good level of security when compared to other cryptographic techniques [1].However, cryptography has a weakness, the resulting file looks random, and of course this can cause suspicion for people who see it [2].For overcoming these deficiencies need to be done the process of insertion of the encrypted file into another media, which is often referred to as steganography.
The technique of steganography used is EOF.The EOF technique is chosen because it has a fast time [3] compared to other steganographic techniques.

METHODS 2.1. Cryptography
Cryptography has actually existed since 4000 years ago in Egypt, which we often know with hieroglyph.In Ancient Rome it was told that Julius Caesar wanted to send a message to someone on the battlefield, but he did not want the message to be known to others [4].Therefore, Julius Caesar created a way to hide the message, from the problem then created the algorithm Caesar Cipher.In cryptography there are 2 types of encryption models are: a) Symmetrical: Where in the process of encryption or decryption will use the same key.b) Asymmetric: Encryption and decryption process using different keys.The cryptographic algorithm consists of three basic functions, namely [5]: a) Encryption: Is a process of securing data, by converting the original text into code that is not understood based on the existing algorithm.b) Key: Is the key that will be used to perform the p rocess of encryption and decryption.c) Decryption: It is the process of recovering the previously encrypted code back into the original text, using algorithms and keys that have been used previously.
Figure 1.Common cryptography scheme [6] Based on Figure 1, the encryption process will be performed using plaintext and keys that are processed by a particular algorithm.With this step will be generated a cipher file, which is ready to be sent.For the decryption process, it will be done with the cipher text and the initial key is processed with the initial algorithm.

Steganography
Steganography is a science or art in hiding information by entering the information into other media [3].So that the existence of the message cannot be known by others.Steganography comes from the Greek Steganós [7] which means to hide and Graptos which means writing, so the whole meaning is "writings that are hid".Media commonly used in steganography include: The purpose of steganography is to conceal the existence of a data, by hiding it into a particular media.

Triple Data Encryption Standard (3DES)
3DES is a symmetric cryptography algorithm with cipher block type.Symmetric cryptography is a method that will use the same key in the encryption and decryption process.Cipher block is a type of asymmetric cryptography that has a fixed or fixed bit size, which is 64 bits for DES [8].3DES is the development of Double DES algorithm previously available to improve DES security.The 3DES algorithm uses three keys in the encryption and decryption process.The key variations in 3DES can be classified into 3 by using the same 1 key, 2 different keys, or 3 different keys to each other.3DES encryption using 2 or 3 different keys is still considered robust for current usage [9].Based on Figure 2 above it can be seen that the sequence of 3DES algorithm scheme.Encryption formulas for 3DES can be described as follows: Where 3 1 ,2,3 (  ) is 3DES encryption for P using key, are k1, k2, and k3.Whereas   (  ) is DES encryption for P using kn.For   (  ) is DES decryption for P using key kn.The decryption formula for 3DES can be described as follows: Where 3 1 ,2,3 (  ) 3DES decryption of C using key, are k1, k2, and k3.Whereas   (  ) is DES decryption for P using kn.For   (  ) is encryption for P using key kn.

Least Significant Bit (LSB)
The LSB is part of the binary number row that has the least or meaningless value.
The location of LSB is the rightmost bit sequence [10].For example, in a byte 0101 1001 the LSB bit is the bit located at the far right of "1".Sometimes the letter "b" at the end of the number becomes 0101 1001b.

Peak Signal to Noise Ratio (PSNR)
PSNR is the result of comparison of the maximum value of the image measured by the noise.PSNR in this study will be used to perform the process of comparison of results from images before and after the steganography process.The higher the PSNR value is similar to the image b etween the comparable images [11].The formula of the PSNR value can be defined according to equation (3) and equation ( 4) below.
With the value of MSE (Mean Square Error) obtained according to the formula as follows:

Histogram
An image histogram is a graph depicting the distribution of pixel intensity values of an image [12], or just a part of an image.In the cipher file his togram if it looks flat for each color intensity is the same and this indicates that the algorithm used cannot provide any guidance for a statistical attack [13] because there is no prominent intensity as in plain file histogram.

RESULTS AND DISCUSSION
Here, we proposed a scheme both encryption and decryption pro cess as present in Figure 4. image with 3DES.Then the cipher file generated from the encryption will be used on the EOF encryption.Previously will be asked for input image that will be used for the process of encryption EOF.After encryption EOF is done will get image file result of cipher file 3DES and EOF.
Once the pixel value is obtained, the pixel will be converted to binary, the binary value to be generated is: After the XOR process will be obtained binary value of 48 bits to be processed using table S-Box and P-Box.This step is a one-time iteration of the 3DES algorithm using the first key.After processing using 3 pieces with 16 different iterations called L16 and R16, the following binary values are obtained bellow and Figure 12.The time comparison between images with the size of 64x64 pixels with a 128x128 pixel image shown in Table 1.It appears that the fastest processing time of a 64x64 pixel image is 172.00139seconds, while for 128x128 images it is 680.99123seconds.

Table 1. Time elapse of 3DES-EOF
The result of 3DES-EOF ont the encryption process shown in Table 2 and Table 3. PNSR value of EOF is shown in Table 4.

Figure 3 .
Figure 3. Example of LSB payload calculationFrom the 1st row above, the 1st rightmost digit is 1, and that is the smallest.The section is called the least significant bit (the least significant bit), while the leftmost part is 128 and is called the most significant bit (Joshi & Yadav 2015).Least significant bits are often used for the purposes of insertion of data into another digital medium (Gosalia 2016).Suppose the message to be inserted 5 bits = 11010, then the number of bytes used = 5 bytes 10010110 11001001 11111001 10001000 10100011 (byte us ed for mes s age ins ertion) The ins ertion proces s message 11010, the insertion result becomes 10010111 11001001 11111000 10001001 10100010, s o this LSB method is only replace the first bit.

Figure 4 .
Figure 4. Proposed scheme 3DES-EOF Based on Figure4can be explained the description as follows.For the encryption step, image-shaped data to be tested is first prepared in advance.Input the plain file to be encrypted, then will be asked input in the form of the key as much as 3 pieces of plain text 8 characters that will be inputted to the program to encrypt the

Figure 12 .
Figure 12.A pixels of encryption result After obtained both the input image and key values, will be the iteration of 3DES calculation.For encryption in plain file, the first step to do is processing by using the initial permutation table in Figure7, after initial permutation is generated, the value of the existing bit will be split into 2 parts ie L0 and R0.Figure 10.Table PC-2 of DESAt this stage, the key is finished and ready for use in the final calculation process.For the next step, the processing will be done on the plain files that have been processed earlier by using the expansion table.Then the result of the expansion table will be XOR with the result from the PC-2 table as follow in Figure11.

Table 2 .
Result of 3DES-EOF on the encryption process 64x64 pixels

Table 3 .
Result of 3DES-EOF on the encryption process 128x128 pixels

Table 4 .
PSNR value of EOF