An Enhancement of One Time Pad Based on Monoalphabeth Caesar Cipher to Secure Grayscale Image

Image is an object that has been used by various people since long ago. Utilization of these images evolve in line with advances in technology. Image in this information technology era is not only in a physical form, there is also a form of so-called digital image. Many people use digital images for personal use, so prone to be manipulated by others. Cryptographic technique, such as Caesar Cipher and OTP is a security techniques that can be applied to the digital image to avoid manipulation or theft of data image. The result is, an image can be read only by the sender and the recipient's image alone. Combined the two algorithms have fast turnaround time, up to 0.017791 seconds for the image to the size of 512x341 and 0.032302 seconds for the image to the size of 768x512. In addition, the resulting image has a very low degree of similarity, with the highest PSNR value obtained is 6.8653 dB. It can be concluded that the combined algorithm and OTP Caesar Cipher algorithm is fast and difficult to solve.


INTRODUCTION
Image or image is an object that has been used by the public for a long time.The image has been widely used in various fields of life, ranging from the arts, economics, to the field of education.However, not everyone is always associated with the image activity, because its use is limited to certain activities such as painting, reading a picture book, and shooting with a film camera so that the image is rarely used.The changing times that happened to enter the 21 st century, the era of information technology has created a world [1].From this virtual world, the use of digital images increasingly widespread and easy to use even by ordinary people though.Not a few people who take advantage of access into this virtual world to do business, social relationships with colleagues, seeking knowledge, and so forth.Of the various activities in the virtual world, one of which is often done is to send digital images.
Digital imagery that is sent in this virtual world can be confidential, so there is a need for security of this personal digital image message.Of course everyone does not want the secret image message to be accessible to anyone other than the recipient, so it takes a technique to secure the digital image [2].Cryptography is a technique for randomizing a message so that it can only be read by the sender and receiver.Caesar Cipher and OTP are one of the many techniques that exist in cryptography.Both techniques can provide security to digital images, by way of encryption or randomization of digital image messages to be used.
Alan Blair in 2013 [3] presented method to secure information based on substitution cryptography method, namely Caesar Cipher that has been combinated using Vigenere Cipher.Sari, et al [4] has been secured all file extensions by utilizing cryptographic process, namely Vernam Cipher to prevent data theft.Setiadi, dkk [5] in his research on testing the OTP algorithm to encode a data, which can be applied to various fields due to its very strong security level and has been combinated using Discrete Cosine Transform (DCT) in steganography techniques.Thus, the main objective of this study is to use Caesar Cipher and OTP techniques as a way to secure an image data in digital form, so that it can not be used by others who have no authority to access the image data.

Cryptography
First used by the Spartans of Greece [6], cryptography is a useful science to secure or hide an important message, derived from the Greek language that is cryptos and graphein which means hidden and written.Cryptography was originally only used for the military field to secure the secret messages used during the war, but the more changing times, the use of cryptography also began to change [7].The current era of information technology, not only the use of cryptography for the military alone, but also education and economics.
Cryptography has 5 devices [6,7] namely Plain text, encryption, decryption, key, and ciphertext.Plain text is the original message, while the ciphertext is the result message of encryption or random message.Encryption itself is a process for randomizing the original message so that it can not be read by others.In order for the recipient to read the ciphertext, it needs decryption to return the ciphertext to plain text.Key itself is needed to perform the process of decryption and encryption.The process of cryptography itself can be seen in Figure 1.

Figure 1. Commonly Cryptography Scheme
The main purpose of using cryptography is to maintain the confidentiality of a data [10].The importance of data confidentiality is that the data can only be read by the creator and recipient of the message only [11], so that the data can not be accessed by others who do not have access rights.Cryptography consists of two parts: classical and modern cryptography [12].Classical cryptography is divided into substitutions (Monoalphabetic and Poly Alphabetic) and transposition.As for modern cryptography, divided into symmetrical cryptography (Block Cipher and Stream Cipher) and asymmetric cryptography.Symmetric cryptography is cryptography with the same encryption and decryption keys, while asymmetric cryptography is cryptography with different encryption and decryption keys.More details can be seen in Figure 2. Caesar Cipher is an algorithm in classical cryptography that uses substitution techniques in its encryption process [1].Caesar Cipher itself is the first substitution algorithm found by Julius Caesar.Caesar Cipher works by replacing each character from plain text with the same key, so the formula is: "Pi" is plain text to be encrypted, while 'k' is the key.The process of encrypting plain text that amounts to 256 characters equals 26 characters, the difference lies only in the module.So we get the formula: The decryption process uses the same key as the encryption process, in which the ciphertext is subtracted by the key, to obtain the formula: Ciphertext with 256 characters has the same decryption process, the difference lies only in modulo, so get the formula:

One Time Pad (OTP)
OTP is a very powerful classical substitution algorithm.OTP is a substitution algorithm with a formula similar to Caesar Cipher that adds plain text with key, only the keys used are always different.The formula is: Plain text with 26 characters must be 26, and plain text with 256 characters must be modified with 256 as well, so the formula is: Decryption process is the same as encryption, only to be processed is ciphertext it by subtracting with key for encryption, so got formula: = ( − ) 26 (7) Just like the 26 character ciphertext, for the process of decrypting ciphertext 256 different characters is just the number of module only, so the formula: An algorithm can be said to be a OTP and unbreakable algorithm if it meets 3 main requirements [7].First, the key to the encryption process of each character from the plain text is always different.Second, the key used must have the same character length as the plain text.And the last is the key to the encryption process is only used once.

Histogram
The color change of a digital image can be seen using a histogram, which will show the color difference from the initial image before the encryption process, and the image of the encryption process [13].The importance of using this histogram is to analyze the level of color randomness.

MSE and PSNR
MSE (Mean Square Error) can be used to see the error value between the original image and the inserted image [14], while the PSNR (Peak Signal to Noise Ratio) [15] can see the quality or resemblance of the original image and the image the message has inserted .The formula for finding MSE is: Where (m, n) is the error value of the original image and the colored image, whereas N and M are the number of row and column pixels of the image.Having obtained the value of MSE PSNR can be searched it: S represents 255 for 8-bit images.Images that have a good resemblance will have a PSNR value above 40 dB (deciBel), and a low MSE value.While images that have a poor resemblance will have a PSNR value below 40 dB and a large MSE value.

RESEARCH METHOD
From Figure 3, we can explain the research model as follows: 1. Prepare digital image messages to be processed.2. Input the original image, then encrypt with Caesar Cipher with the key that has been prepared.
3. Once you get the cipher file Caesar, encrypt again with OTP with the key that has been prepared and will get cipher file OTP. 4. The next process is decryption, before the decryption process begins, inputkan cipher file to be described.5.After that decrypt with OTP and the key used is the same key as when the encryption process and will get cipher file Caesar.6. Cipher file Caesar that has been obtained, decrypted with Caesar Cipher with the same key as well as during the encryption process.7. It will get the original digital image message or plain file.After the Caesar Cipher process is done, the next encryption process is OTP.The Caesar Cipher encryption image is again encrypted with OTP with the OTP key (Figure 8) that has been prepared.The OTP encryption formula is Ci = Pi + ki mod 256.After the decryption process is done, it will get back ciphertext Caesar his and the image of Caesar Cipher encryption (before encrypted with OTP) can be seen in Figure 11 and Figure 12.After going through the final decryption process, it will get the original plain text which if the process of decryption has been correct, then plain text the image of the decryption and the original image must be the same, can be seen in Figure 13.The final result obtained is the image of the decryption or original image, shown in Figure 14.    1 shows the comparison of processing times of each process, both encryption and decryption processes.It is seen that the image pixel size influences the speed of the encryption process as well as the decryption.

A Comparison of Time Execution
Image size in 512x341 Image size in 768x512 decryption process that is longer than image with 512x341 pixel size.This indicates that the image size affects the speed of the encryption and decryption process.

Table 2. The Changes of Image File
No Nama Citra Based on the results of the research in Table 2, shows the change in image file size after the encryption process.All encrypted images of the same pixel size have the same size.The Changes of Image Files Decryption Encryption Based on Table 3, it can be seen that the image encryption size 512x341 has a good level of randomness, because the distribution of color in each pixel evenly, so it will be difficult to look for certain instructions to solve it.4 also shows a good level of image randomness for the size of 756x512, because the distribution of colors per pixel is evenly distributed.The attackers will not find clues to solve the image of the encryption.5, the encrypted image has a high degree of randomness, because the error value obtained from the MSE calculation is high enough.As for the process of decryption, resulting in a value of 0, which means there is absolutely no error between the image of the decryption with the original image indicating that the two pieces of the image is the same image or identical.

Table 6. PSNR Value between Encrypted dan Decrypted Image
No Nama Citra Table 6 shows that the encrypted image has a very small degree of similarity, since the PSNR value is below 40 dB.In addition, the process of decryption successfully restore the image to its original shape because it has infinite value.

CONCLUSION
Based on the results of tests that have been done, it has been proved that the highest MSE value is 6377,582 with 768x512 image size, while the value of MSE decrypted on all images is 0. This indicates that the decryption process goes well.Another test by calculating PSNR, it is known that the encryption process produces a small PSNR value which means the image has been through the encoding process correctly.This is different from the watermarking technique that results in high PSNR values.In cryptography, the low value of PSNR actually indicates that the process has been running well.In the decryption process, the image size of 512x341 and 768x512 has resulted in infinite value.
The conclusion is that the combined algorithm of Caesar Cipher and OTP is very strong and difficult to solve.In addition, this algorithm has a very fast processing time, up to 0.017791 seconds.But the disadvantage is the encryption process causes the image file size to be larger than the original size before it is encrypted.
The suggestions for further research are that they can be implemented with GUI and with colors other than grayscale.In addition, the cryptographic object can be applied to other file types such as text, audio and video.

Figure 15 .
Figure 15.Graphic of Time Execution between Encrytion and Decryption

Figure 1
Figure 1 The Changes of Image Files

Table 1 .
Time Execution for Encryption and Decryption Process No Name of Image

Table 3 .
Histogram of Image with size in 512x341

Table 4 .
Histogram of Image with size in 756x512

Table 5 .
MSE Value between Encrypted dan Decrypted Image Nilai MSE