International Journal of Engineering Trends and Technology (IJETT) – Volume 13 Number 5 – Jul 2014 A Novel Text to Image Encryption Technique by AES Rijndael Algorithm with Color Code Conversion Shanthi1 Dr.V.Palanisamy2 M.Phil Research Scholar Department of Comp.Sci & Engg Alagappa University Karaikudi . Abstract - Transmission of secure data through the communication spectrum is major issue in current scenario. To ensure the security of the data, many techniques and algorithms were evolved in which the cryptographic techniques are most powerful. Through cryptographic algorithms, the conversion of plain text into unintelligible form made it more secure and protect data from unauthorized users. The proposed scheme focus on the block cipher substitution method that encrypts the given text into blocks. In this paper, our proposed method extends such that, the user given plain text is divided into blocks that are fed to the AES Rijndael encryption process, converted to unreadable format. Each character of the block is then shifted into ASCII value which is, in turn formulated into equivalent color code. Thus, the final encrypted text is in image format which make available for more enrichment to the data. The AES algorithm is chosen for its quick and legible conversion of data. Our proposed method is very flexible technology for 256 ASCII values that is converted into 256 color code. Keywords- Block cipher, Cryptography, Encryption, Decryption, Color Substitution, AES Rijndael Algorithm. I. INTRODUCTION Cryptography is the science of information security. Cryptography includes techniques such as microdots, merging words with images, and other ways to hide information in storage scenario. However, in today's computer-centric world, cryptography is most often associated with scrambling plaintext (ordinary text, sometimes referred to as clear text) into cipher text (a process called encryption), then back again (known as decryption). Individuals who practice this field are known as cryptographers. Key is used to authenticate purpose. With the help of key sender make sure correct receiver would decrypt the message [11]. In wireless networks, the security of data is an important aspect and encryption algorithms play an important role to provide the security to the wireless networks. The main aim of the cryptography is to enhance the data confidentiality and privacy by making the information unintelligible. Hence the data cannot be interrupted by the intruders. The Encryption techniques and various algorithms are used to provide the needed security to the applications [3]. The rapid growth of computer networks allowed large files, such as digital images, to be easily transmitted over the internet [10,1]. Data encryption is widely used to ensure security however, most of the available encryption algorithms ISSN: 2231-5381 Professor Department of comp.sci & Engg Alagappa University Karaikudi are used for text data. Due to large data size and real time Constrains, algorithms that are good for textual data may not be suitable for multimedia data [10, 2, and 4]. The type of operations used for transforming plaintext to cipher text: all the encryption algorithms are based on two general principles: Substitution, in this each element in the plaintext (bit, letter, group of bits are letters) is mapped into another element and the transposition in which elements in the plain text are rearranged. Most systems, referred to as product systems, involve multiple stages of substitution and transposition [6]. A block cipher processes the input into multiple blocks and proceeds each block of elements at a time, producing an output block for each input block. A stream cipher processes the input elements continuously, producing output one element at a time, as it goes along [3]. Basically, the encryption technique is divided into two types namely the Symmetric Key Encryption and Asymmetric Key Encryption. Encryption in Symmetric-key schemes, the encryption and decryption keys are the same. Thus communicating parties must agree on a secret key before they wish to communicate [11]. In public-key encryption schemes, the encryption key is published for anyone to use and encrypt messages. However, only the receiving party has access to the decryption key and is capable of reading the encrypted messages. Public-key encryption is a relatively recent invention historically; all encryption schemes have been symmetric-key (also called private-key) schemes. Cryptanalysis is the process of deciphering coded messages without being told the key. Cryptanalysis refers to the study of ciphers, cipher text, or cryptosystems (that is, to secret code systems) with a view to finding weaknesses in them that will permit retrieval of the plaintext from the cipher text, without necessarily knowing the key or the algorithm. This is known as breaking the cipher, cipher text or cryptosystem [11]. The rest of the paper is organized as follows. Section 2 come out with various works related to text to image encryption methodology. Section 3 consists of various algorithms that are used for encryption technique. Section 4 is the proposed work, along with models and examples. Section 5 comes with experimental results concludes the proposed work. http://www.ijettjournal.org Page 237 International Journal of Engineering Trends and Technology (IJETT) – Volume 13 Number 5 – Jul 2014 II. RELATED WORK Ahmad Abusukhon, Mohammad Talib and Maher A. Nabulsi in their paper, have shown the efficiency of the text to image encryption algorithm analyses. Abusukhon and Talib [1] proposed a novel data encryption algorithm called Text-to-Image Encryption algorithm (TTIE) in which a given text is encrypted into an image. Each letter from the plaintext is encrypted into one pixel [2]. Sourabh Singh,, Anurag Jain, shown An Enhanced Text to Image Encryption Technique using RGB Substitution and AES algorithm. Under this approach, the secret key is smartly sent along with the cipher text in a single transmission, thus it also solves the key exchange problem that generally arises in most of the encryption models. The encryption and decryption process make the use of a combination database for text to image transformation [10]. Komal D Patel, Sonal Belani, proposes a survey on various existing techniques for image encryption, their advantages and working methodologies[5].Mohammad Ali Bani Younes and Aman introduce a block-based transformation algorithm based on the combination of image transformation and a well known encryption and decryption algorithm called Blowfish. The original image was divided into blocks, which were rearranged into a transformed image using a transformation algorithm, and then the transformed image was encrypted using the Blowfish algorithm. Their results showed that the correlation between image elements was significantly decreased [7]. Singh and Gilhorta [9] proposed encrypting a word of text to a floating point number that lies in range from 0 to 1. The floating point number is then converted into binary number and after that one time key is used to encrypt this binary number. In tht work, they encode each character by one pixel (three integer values R, G and B). K. Ravindra Babu, Dr .S.Udaya Kumar, Dr. A.Vinaya Babu,and Dr. Thirupathi Reddy, extends their views ona block cipher generation using color substitution method. From their work, they conclude that, the new algorithm given by them for the color substitution method is good and potential one against the brute force attack. Moreover, analytically the results are formulated [8]. Jawad Ahmad and Fawad Ahmed have compared two encryption algorithms namely Advanced Encryption Standard (AES) and Compression Friendly Encryption Scheme (CFES). They have explored the security estimations of AES and CFES for digital images against brute-force, statistical, and differential attacks, the results they have calculated to test the security of these algorithms for digital images shows some weaknesses in CFES. These weaknesses were mainly related to low entropy and horizontal correlation in encrypted images. The algorithm which has less correlation values indicates that it has higher security [4]. The security of digital images has become more and more important due to the rapid evolution of the Internet in the digital world today. The security of digital images has attracted more attention recently, and many different image ISSN: 2231-5381 encryption methods have been proposed to enhance the security of these images [9]. The most influential and universal approach to countering the threats to network / information security is encryption. Even though it is very authoritative, the cryptanalysts are very intelligent and they were working day and night to break the ciphers. To make a stronger cipher it is recommended that to use: More stronger and complicated encryption algorithms, Keys with more number of bits (Longer keys), larger block size as input to process, use authentication and confidentiality and secure transmission of keys. III. EXISTING TECHNIQUES For the cryptographic process there exist many algorithms and methods. This section briefly discuss on the substitution method encryption and decryption procedure. The algorithms such as symmetric key encryption also explained in the following section: A. Symmetric Key Encryption The most important type of the encryption type is the symmetric key encryption. In the symmetric key encryption both for the encryption and decryption process the same key is used. Hence the secrecy of the key is maintained and it is kept private. Symmetric algorithms have the advantage of not consuming too much of computing power and it works with high speed in encryption. A block cipher is taken as the input, a key and then the output block will be same in size in the symmetric key encryption. The symmetric key encryption takes place in two modes either as the block ciphers or as the stream ciphers. In the block cipher mode the whole data is divided into number of blocks and based on the block length the key is provided for encryption. B. Substitution Algorithm There exists two form of encryption namely the substitution and the transposition. In the substitution method one character will be exchanged for the character, and vice versa at the decryption end. The substitution algorithm may be in many formats such as the monoalphabetic substitution, polyalphabetic substitution, vigenere cipher, playfair cipher etc., In a monoalphabetic cipher, the same substitution rule is used at every character position in the plaintext message. In a polyalphabetic cipher, on the other hand, the substitution rule changes continuously from one character position to the next in the plaintext according to the elements of the encryption key. The block substitution table has the following function, and this is the earliest known example of a substitution cipher. • Each character of a message is replaced by a character three position down in the alphabet. plaintext: are you ready ciphertext: DUH BRX UHDGB • If we represent each letter of the alphabet by an integer that corresponds to its position in the alphabet, the http://www.ijettjournal.org Page 238 International Journal of Engineering Trends and Technology (IJETT) – Volume 13 Number 5 – Jul 2014 formula for replacing each character p of the plaintext with a character c of the cipher text can be expressed as c = E (3, p) = (p + 3) mod 26 where E () stands for encryption. If you are not already familiar with modulo division, the mod operator returns the integer remainder of the division when p + 3 is divided by 26, the number of letters in the English alphabet. We are obviously assuming case-insensitive encoding with the Caesar cipher. C. AESRijndael Encryption Algorithm The encryption algorithm is an integral work of image encryption and decryption process. They should preserve high security to the image transmitted. Basically, encryption algorithms are divided into three major categories – transposition, substitution, and transposition – substitution technique. The AES Rijndael algorithm is the advanced encryption standard algorithm, used most widely for encryption because of its simplicity and efficient working syntax. Rijndael is an iterated block cipher at with a variable block length and a variable key length. The block length and key length can be independently specified to 128,192 or 256 bits. Internally the AES algorithm’s operations are performed on a two dimensional array of bytes called the state. The state consists of four rows of each bytes, each contains Nb number of bytes, where Nb is the block length divided by 32. The function involved in AES algorithm is, sub bytes transformation, Shift rows Transformation, Mix column Transformation and Add round key transformation. IV. THE PROPOSED ALGORITHM AND EXAMPLE The main intention of this paper is to present an innovative cryptographic Substitution method, can generate stronger cipher then the existing substitution algorithms. We are sure that concept is new and the cryptanalysis did on this will prove that the cipher is strong. A. Proposed Algorithm The proposed algorithm works as follows: Step1: Read the input text that is to be encrypted. Step 2: The input text is encrypted using the AES Rijndael encryption algorithm and the output is obtained. Step 3: Now, the encrypted unreadable format is divided into block ciphers of length 3 characters per block. Step 4: The block is replaced with 3 color codes R, G, B respectively for each pixel within the block. Step 5: The entire known pixel contain 3 components like Red, Green and Blue. The magic of our algorithm 3 components range between 0 to 255 simultaneously ASCII table also contain 0 to 255. The procedure for the, the block substitution is as follows. Since, in RGB color image systems, a color is typically represented by three component intensities such as blue, green and red, then read the given encrypted text and separated it three characters. Combine the three characters and consider it as a block. After the separation into blocks, convert it into corresponding color code, so we can get a single pixel. The above process repeated until full plaintext is converted to pixels. This pixel is used to draw a 512 X 512 image. ISSN: 2231-5381 As a first step draw row wise 512 pixels once. Until the final row of the block is reached continuously draw the pixels. Finally the input text is converted into unintelligible form image. This is also one of the substitution methods. Here we are substitute text into pixel. The strength of proposed algorithm includes rich character set compare to Caesar cipher. The strength of the algorithm lies in that format that is the user provided input text is converted into image format. Fig 1. Block Diagram of Encryption technique with color code An Example: welcome – 119,101,108,99,111,109,101 convert into block cipher , 3 characters per block 119,101,108 - RGB (119,101,108) = 99,111,109 - RGB (99,111,109) = 101, 0, 0 - RGB (101,0,0) = The step by step process of text encrypted into image and decrypted the image into text file. B. Encryption Algorithm Happy Birthday = Hap py Bir thd ay. http://www.ijettjournal.org Page 239 International Journal of Engineering Trends and Technology (IJETT) – Volume 13 Number 5 – Jul 2014 D. Advantages of Proposed Method Step 1: Read each block and get the equivalent ASCII value. Hap = 72, 97,112 py = 112,121,32 Bir = 66,105,114 thd = 116,104,100 ay = 97,121,0 Consider each block as pixel. In a block consider first value as Red, second value as Green and third value as Blue. Step 4: Write it as an image. C. Decryption Algorithm Step 1: Read the encrypted image and get the first pixel. Step 2: Read each pixel. Example : First pixel have A simple and effective algorithm with efficient working syntax. It does not need any key for an encryption and decryption. It supports 256 characters. Text is encrypted with the AES Rijndael algorithm; into image it is so hard to find the plain text. E. Conversion of plain text to cipher text using the proposed Method. The following is the example plain text to cipher text for different block size and pixel values. Input Text: The most influential and universal approach to countering the threats to network / information security is encryption. Our proposed work is to present an innovative cryptographic Substitution method, can generate stronger cipher then the existing substitution algorithms. We are sure that concept is new and the cryptanalysis did on this will prove that the cipher is strong. The substitution cipher one of the classical ciphers in cryptography. In this method each letter in the plaintext is replaced by a letter shifted a fixed number of places to the right. But the existing methods only 26 alphabets, keys used. Red = 72, Green = 97, Blue = 112 Encryption Using AES Rijndael Algorithm: 72 = H, 97 = a, 112 = p Second Pixel. Red = 112, Green = 112, Blue = (Space) 32 32 = p, 112 = y, 32 = (Space) Third Pixel. Red = 66, Green = 105, Blue = 114 66 = B, 105 = i , 114 = r Fourth Pixel. Red = 116, Green = 104, Blue = 100 116 = t, 104= h, 100 = d Red = 97, Green = 121, Blue = 0 97 = a, 121 =y, 0 = NULL To combine all the characters we get our original plain text “Happy Birthday” ISSN: 2231-5381 cbzxj/g1rMLUk97OvxVN1GxytChm85q+COFbw50 Qi59+sLzQQRrLUsfb6QRZj0zkeh4QBnmmflKhZZtnEojc 0rwF4Gmy9d1+5F+/prbHrvLJWwcwvccYxbILeeFPMdd2 kuQfPgOUVvODmwibifA0eyyFlPDUiqDTWgvX8jIrYpP 87jP5Cyic7U4nRO3eLTrqa2G+R4bZsDJfQQIUG6+f8du VTtxQb4p5hPYtGdYAo2EFWpxepgbB/rSlo5K6O2c1nW uNfC4za453Vkuyqa6jz2hwd/xv1oKvN++P7HcK4yiVLqv GeKbpTbgtt4YZpL04y6MYQxgRC78FpIe+/NWM7zKPb qrCiRZ8EvA/SSt09O6onXafEuHFssPtl4u/jSULqGPuMT Umgfh2Vn/MH2EPklvz3Woid+JvHzE/NKTP1+qgIttL2Z WoIgPX1VLX6FwtJrMlk+zVPApbtl/cnkUd0wHUe93HT wVdkNjna/cP4f2WvLyoWKDVUq9yH7Llun9UxWentYm qAZaxM5JzwOUhm7deG87NQPhtSi2jUEnlh33e79g12nH kDtZUZYLxhfv6OW1dRhgTEyCFz7OJxTnOMwCojyLw D15QfyHKIs0E9B5EUQvkOzVguBT03RW1QDlT5uw/L oiot+8Uj/zjNY4Alww8PY8ucQZtA/lYH4NPNmSD7tkAK 4isAYBt5lXycTx0NAW1aO77wsi3KiILI22M6SOHN0bW MP36sSpFiEbliagdSjRh4W0ydP0I1E2ulr2LmclRuZHPFn pENQ5XY5QBP1j9+b98YkBCpdtDTlNZ89dcls/Ak8tuX4 rrB7L7UCuNSv96mmGj0lgEU1GI3i0Hrl0kdmWiunNcHF +OIpSAVEYHgb+8EeKVbBEladaYQzg8gPesXcVS23rA T3JASRqh+uVsjwIcGaTzHM41oWe7CMxy+hUB/XRC5 FSouyilKv4Wrqhhcmbgxl+JLdZVLEYUolG8m4d/xSlGZ 79Uh13w1RX+YLpDnyNnN2JRyYhxRWP/ http://www.ijettjournal.org Page 240 International Journal of Engineering Trends and Technology (IJETT) – Volume 13 Number 5 – Jul 2014 [6] Manoj Kumar, “Cryptography & Network Security”, 3rd ed., Krishna Prakashan Media (P) Ltd, 2008. [7] Mohammad Ali Bani Younes and Aman Jantan “Image Encryption Using Block-Based Transformation Algorithm”, inIAENG International Journal of Computer Science, 35,2008. [8] K. Ravindra Babu, Dr .S.Udaya Kumar, Dr. A.Vinaya Babu,and Dr. Thirupathi Reddy, “A Block Cipher Generation Using Color substitution”, inInternational Journal of Computer Applications, vol1, issue 28, pp:25-29. [9] Singh, A., Gilhorta, R.:,”Data security using private key encryption system based on arithmetic coding”,in. International Journal of Network Security and its a (IJNSA), 3(3) (2011). [10] Sourabh Singh and Anurag jain , in “An Enhanced Text to Image Encryption Technique using RGB Substitution and AES”, in International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013, pp:2108 – 2112. [11] William Stallings, “Cryptography and Network Security”, Principles and practice, 5th ed., 2008. Encrypted Data to Image Conversion Fig 2. Text to Image Conversion F. Output Text after Decryption: The most influential and universal approach to countering the threats to network / information security is encryption. Our proposed work is to present an innovative cryptographic Substitution method, can generate stronger cipher then the existing substitution algorithms. We are sure that concept is new and the cryptanalysis did on this will prove that the cipher is strong. The substitution cipher one of the classical ciphers in cryptography. In this method each letter in the plaintext is replaced by a letter shifted a fixed number of places to the right. But the existing methods only 26 alphabets, keys used. V. CONCLUSION Most of the encryption technique does not woks in cross platform manner. Here we convert the text into image this supports cross platform. So, when comparing with other block cipher algorithm, our proposed algorithm remains very strong in encryption and in decryption. Complex computational were also excluded by using this procedure. So it leftovers fast when compare with the other algorithm. The Intermediate form is the AES encryption technique, which increases more security to the data, and since the divided block is converted to color code, it seems more complex to the intruders to find out the original text. REFERENCES [1] A.Abusukhon, and M. Talib, "A Novel network security algorithm based on Private Key Encryption". In Proceeding of The International Conference on Cyber Security, Cyber Warfare and Digital Forensic (CyberSec12), 2012. [2] Ahmad Abusukhon, Mohammad Talib and Maher A. Nabulsi, “Analysing the efficiency of Text to image encryption algorithm” , in International Journal of Advanced Computer Science and Applications, Vol. 3, No. 11, 2012, pp-35 – 38. [3] Behrouz A. Forouzan, “Cryptography and Network Security”, Tata McGraw-Hill, 2007. [4] Jawad Ahmad and Fawad Ahmed “Efficiency Analysis and Security Evaluation of Image Encryption Schemes” ,in International Journal of Video & Image Processing and Network Security IJVIPNS-IJENS Vol:12 No:04. [5] Komal D.Patel and Sonal Belani,” Image Encryption Using Different Techniques:A Review”, in International Journal of Emerging Technology and Advanced engineering, Volume 1, Issue 1, November 2011, pp: 30- 34. ISSN: 2231-5381 http://www.ijettjournal.org Page 241