International Conference on Information and Communication Technology and Its Applications (ICTA 2016) Federal University of Technology, Minna, Nigeria November 28 – 30, 2016 A Secure Method to Hide Confidential Data Using Cryptography and Steganography John K. Alhassan1, Idris Ismaila2, Victor O. Waziri3, and Adamu Abdulkadir4 Department of Cyber Security Science, Federal University of Technology, Minna, Nigeria 1 jkalhassan@futminna.edu.ng, 2ismi.idris@futminna.edu.ng, 3victor.waziri@futminna.edu.ng, 4 abdulcybersec2015@gmail.com Abstract—The rate at which encrypted messages are being sent encrypting plaintext and generating cipher text. A data that over the internet and other electronic means will easily capture can be read easily and understood without the need for any the attention of hackers and possibly make them try to disrupt software to decipher or decode it is known as plaintext or or even hack those messages so as view the original message. clear text. Changing the plaintext or clear text into one that Steganography is designed to hide the presence of a message by cannot be easily understood is known as cipher text [4]. The hiding the secret message inside an innocent file. For effective method of disguising the clear text or plaintext so as to hide security, steganography is sometimes combined with its substance is known as encryption. Generally, cryptography. In this paper, steganography and cryptography Cryptography scrambles information by maintaining the are combined to provide a robust system capable of encrypting secrecy of such information and enable it to be transferred a secret message using RSA algorithm. To hide the message, advanced LSB method is used. The original message is across an insecure channel so that unauthorized parties encrypted at the initial stage and then separated into two cannot understand it [5]. There are two other techniques that portions P1 and P2. An XOR operation is applied to the first are related to steganography. These are watermarking and portion (P1) using the odd location and to the second portion fingerprinting. They are concerned with the protection of (P2) using the even position of the LSB+1.The Position of the intellectual property [6]. LSB is then used to hide the XORed encrypted message. The two main branches of cryptography are cryptanalysis and cryptology. Cryptanalysis refers to applying different Keywords-cryptography; RSA algorithm; steganography; method so as to break into a system or cipher text without Least Significant Bit having the knowledge of the key. This is also referred to as breaking the cryptosystem [5]. Below are the four parts of all cryptographic process. I. INTRODUCTION  Plaintext: Clear text or unscrambled text to be sent to Cryptography and steganography are used to manipulate another person or entity over the network. It could be information so as to scramble or hide it. These techniques a simple text document, personal information, a have a goal which is to protect the confidentiality, integrity simple text document to be transmitted over the and availability of information from unauthorized access [1]. network. Intruders or hackers can be successful easily due the fact that the information they usually obtain from computer  Cipher text: Cipher text refers to information that have been scrambled and difficult to understand by systems is in a form that can be read easily and understood others unless with the knowledge of the correct key [2]. They may decide to reveal such information to their e.g. encrypted text to be transmitted over the friends, modify it in order to misrepresent organizations, network. individuals, or even use it to carry out a serious attack. A viable solution to this issue is the use of advanced  Key: This refers to formula, mathematical value or steganography. Advance steganography is defined as a process that can be used to encode or decode a technique of hiding information in digital form and then message. Keys are used to convert messages or encrypting it. Contrary to cryptography, its goal is not to information to a cipher text [7]. keep the information hidden from others but for them not to  Cryptographic Algorithm: This could take a form of think the information even exist [3]. Steganography is formula which can be used to encrypt or scramble a derived from two Greek words steganos meaning “covered” plain message into a form that cannot be easily and graphia which means “writing”, We could therefore understood by anybody unless with the knowledge define steganography as “covered writing”. The goal of of the key. steganography is hide the existence of a message. Digital images, videos, sound etc. are used as a carrier file to embed Basically, cryptographic algorithms can be broadly confidential information. Cryptography is a technique for divided into two categories: 105 International Conference on Information and Communication Technology and Its Applications (ICTA 2016) the knowledge of the private key. Examples of public key cryptosystems includes RSA, Elgamal Encryption, Diffie- Hellman. etc. Fig. 3 shows how the process works. Figure 1. Basic concept of cryptography, adapted from [5].  Stream algorithms (cipher): It operates on plaintext considering one byte at a time, where 1 byte can be special character, number, or character.  Block algorithms (cipher): This algorithm operates Figure 3. Asymmetric cryptosystem, adapted from [5]. on clear text, usually in groups of bytes called Blocks (Block algorithm). 64 bytes is the block size for modern algorithms, small enough to work with B. Steganography but large enough to deter code- breakers. The goal of steganography is to hide information by Unfortunately, these days especially with the speed making it difficult to observer to detect that information is of the microprocessors, it is easy to break a 64-byte present. Steganography is closely related to cryptography algorithm using the method of brute force. though they differ in terms of operation [6]. Fig. 4 shows the overview of the steganography system. For securing data, the following types of cryptographic schemes are used.  Secret Key Cryptography (SKC): This is also referred to as symmetric- key cryptographic scheme which used a single key to perform both encryption and decryption. An example of this type of cryptosystem is AES (Advance Encryption Standard). Fig. 2 is the illustration of the steps in secret key cryptography for a secure data transmission. Figure 4. Steganography model, adapted from [5]. Covert object is a name given to the object through which message is hidden. The image that is obtained through embedding secret object or image into covert image is known as stego image [9]. The message that is hidden could be plaintext, image or cipher text. Steganography system commonly used today are as follows:  Audio Steganography: Unused audio bits are used to embed a secret message. This is due to the fact that every file have some area where messages can be Figure 2. Symmetric cryptography, adapted from [5]. hidden also known as unused bit.  Image steganography: This is used to hide secret Even though this system is designed to improve the data messages into a carrier image. The resulting image is security, its main problem lies on the distribution of keys called stego image. between a sender and receiver. Therefore, for secure  Video Steganography: This involves dividing the communication the key security becomes an issue with this video into image frames and audio, thus the approach. embedding is performed using the audio file. A. Public key Cryptography (PKC): II. LITERATURE REVIEW This is also referred to as asymmetric key cryptography. Many works had been proposed and carried out in the It is designed to use public key for encryption and a private area of steganography and cryptography. In the research or secrete key for decryption. Both the public and private work of [10], the researchers proposed an efficient data keys are required for the process [8]. A person with the hiding system based on audio steganography and possession of the public key can encrypt the message but cryptography. The performance and efficiency of the system cannot decrypt it. It can only be decrypted by the person with was evaluated for effectiveness and their results clearly 106 International Conference on Information and Communication Technology and Its Applications (ICTA 2016) shows that the application of cryptography and sizes of data hidden were tested on the system. Hence the steganography to the system makes it more secured. They system was efficient in hiding data inside an image. recommended the system to be used for establishing a secure communication on the Internet. [11] in their research paper entitled “A novel security scheme for secret data using cryptography and steganography’’ proposed a security model. The authors combined Steganography and Cryptography. The confidential information was encrypted using Advanced Encryption Standard (AES) algorithm. Their model provided a two-layer security for secrete data. In addition, the system provided extraordinary insertion capacity and high class stego images. Figure 5. Flow of their system, adapted from [10]. Figure 8. Flow of the encryption phase, adapted from [12]. Figure 6. Message embedding algorithm, adapted from [11]. Figure 9. Flow of the decryption phase, adapted from [12]. Figure 7. Message extraction algorithm, adapted from [11]. [13] in their research proposed a steganographic method In another paper by [12], the authors proposed an based on gray-level modification for true color images. algorithm called Hash Least Significant Bit (H- LSB) with Image transposition and secret key was used. The system affine cipher that will provide more security to data in a used bitxor operation, stego key-based encryption and bit networked environment. A number of images with different shuffling which were hidden in the host image pixel. Five 107 International Conference on Information and Communication Technology and Its Applications (ICTA 2016) security level was utilized The proposed technique was B. Flowchart of the System evaluated using different image assessment metrics which produced interesting results based on imperceptibility and security. Figure 10. Pictorial representation of the framework, adapted from [13] Figure 11. The proposed text embedding flowchart C. The Proposed Algorithm III. METHODOLOGY LSB coding and RSA algorithm were used for the proposed algorithm. The text is scrambled using the RSA A. Introduction algorithm. Based on the system, the secret text is embedded A secure and robust method for hiding information is the inside an image. It is then converted into binary equivalent. main aim of the proposed scheme. To achieve the To make it more secure, an XOR operation is applied. The requirement for steganography such as security, robustness message is scrambled with the help of RSA which is then and capacity, we considered combining steganography and inserted into the image file then into binary. The scrambled cryptography. message is inserted into the file LSB bit of the separate In our proposed method, inserting the information into block. The name given to the inserted image file is also image file was achieved using the LSB bit manipulation. The called stego image message is encrypted using RSA algorithm. Image file as well as text files are converted into their binary equivalent before embedding. RSA was used to encrypt the information, D. RSA Algorithm the encrypted information is then inserted into the image file RSA are initials for Ron Rivest, Adi Shamir, and using the LSB algorithm. The extraction of the information Leonard Adleman. It is an asymmetric cryptosystem which is done at the side at the receiver. This required the hidden means two keys are involved for encryption and decryption. information file to be chosen first. After file selection, It requires two large prime numbers to be selected after advance LSB is used to remove the scrambled information, which the product is used to form a private and public key, which is then scrambled using RSA. which can be used to perform encryption and decryption of The proposed method for the embedding and extraction the information. of information in image is presented below Below are the brief steps involved in RSA Algorithm. 108 International Conference on Information and Communication Technology and Its Applications (ICTA 2016) F. Message Extraction Algorithm Step One: Get the stego image Step Two: Obtain the LSB & (LSB + 1) embedded message bit of pixel Step Three: Use the XOR operation on the LSB & (LSB+1) bits Step Four: Obtain an XOR values of the entire pixel values Step Five: From the XOR value, retrieve the bits. Step six: Decrypt the retrieved data using RSA algorithm Step Seven: Secrete message obtained at this stage. IV. RESULT The actual cover image and the stego image based on the PSNR and MSE values have been shown together with their histogram which are also shown in figures. Figure 12. The proposed text extraction flowchart Figure 13. Histogram of the original image and stego image. PSNR between original and stego image is given as = 52.33dB MSE between original and stego image is = 0.1657 E. Advance LSB Algorithm The message embedding algorithm: Step One: Enter the encrypted message by means of RSA Step Two: Choose a cover image Step Three: From the cover image take pixels Step Four: From the pixels take (LSB+1) bit. Step Five: divide encrypted text (two equal parts). Step six: Compute the XOR operation for the first portion of the encrypted message plus the pixel’s odd position value Step seven: Compute XOR operation for the second portion of the encrypted message plus the pixel’s even position value Step eight: Obtain the entire xored of both the odd and even position pixel. Step Nine: From the even position of the LSB bit pixel, save Figure 14. Original image and Stego image with their histogram PNSR the xored value of the even. between original and stego image is = 51.331dB MSE between original and stego image is =0.15942 109 International Conference on Information and Communication Technology and Its Applications (ICTA 2016) V. CONCLUSION [4] T. Jawahar, and K. Nagesh, “DES, AES and blowfish: Symmetric key cryptography algorithms simulation based performance analysis,” Image steganography based on advanced LSB technique International journal of emerging technology and advance has been proposed and accomplished. The system which is engineering, vol. 1, issue 2, pp. 6 – 12. achieved using advance LSB technique has the ability embed [5] A. Mehndiratta, ”Data Hiding System Using Cryptography and secret messages into cover images with no generation of any Steganography: A Comprehensive Modern Investigation”, 2015. serious change. In this work, a novel method for concealing [6] V. Tyagi,"Data Hiding in Image using least significant bit with message within an image with fewer alteration in the bits of cryptography." International Journal of Advanced Research in Computer Science and Software Engineering 2.4, 2012, pp. 120-123. the image have been developed. This makes the technique [7] A. Monika, and M. Pradeep, “A comparative survey on symmetric safer and more robust than considering only LSB. The use of key encryption techniques”, International journal on computer science cryptographic technique which is the RSA algorithm helps in and engineering,” 2012, vol. 4, issue 5, pp.877-882. securing the secret information by making it difficult to [8] A. J. Raphael, and V. Sundaram, “Cryptography and steganography – understand the message without the key. This is due to the A survey,” International journal of computer technology application, fact that RSA algorithm is a secure algorithm. The use of 2011, vol. 2, issue 3, pp. 626- 630 XOR operation in addition to the RSA algorithm makes the [9] J. Mamta, and S. S. Parvinder, “An improved LSB based method more reliable especially when it sending information steganography technique for RGB color images,” International journal of computer and communication engineering, vol. 2 issue 4, in an unsecured channel is needed. pp. 513-51 [10] S. A. Laskar, and Hemachandran, K. (2012). “High Capacity data hiding using LSB Steganography and Encryption”, International REFERENCES Journal of Database Management Systems, vol. 4 (6), [1] C. A. Oluwakemi, A. S. Kayode, and O. J. Ayotunde, “Efficient [11] V. S. Phad, R. S. Bhosale , and A. R. Panhalkar, “A novel security data hiding system using cryptography and steganography”, scheme for secrete data using cryptography and steganography”. International Journal of Applied Information Systems IJAIS411, International Journal on Computer Network and Information Security, 2012, pp. 6- 11. vol. 2, issue 6. pp 36-42. [2] A. Chadha, Mallik, S., Chadha, A., Johar, R., and M. M. Roja, [12] A. Muhammad, Abdullah, and R. H. HamaAziz, “New Approach to “Dual-Layer Video Encryption using RSA Algorithm.” arXiv preprint encrypt and decrypt data in image using cryptography and arXiv:1509.04387. 2015. steganography Algorithm”, 2016, vol. 143 (4), pp. 11-17. [3] K. S. Dipti, and B. Neha, “Proposed system for data hiding using [13] K. Muhammad, Ahmad, J., Sajjad, M., and M. Zubair, “Secure image cryptography and steganography”, International journal of computer steganography using cryptography and image transposition”. arXiv application. 2010. Vol. 8, issue 9, pp .7-10. preprint arXiv:1510.04413. 110