there is an increase in number of massive security attacks estimated. In this fast growing ..... New Cloud Computing Solution for Government Hospitals to Better.
International Journal of Computer Trends and Technology (IJCTT) – volume 20 Number 2 Feb 2015
Message Encryption by Processing Image Using Pseudo Random Key Streams Generation Hamad Naeem1, Jun Sang1, Waqar Ali Abro1, Adeel Khalid1, Muhammad Rashid Naeem1, Adeel Akbar Memon1, Saad Tanvir2 1
2
(School of Software Engineering, Chongqing University, P.R. China) (School of Computer Engineering, NFC Institute of Engineering, Multan, Pakistan)
Abstract—with the passage of time as technology is evolving, there is an increase in number of massive security attacks estimated. In this fast growing communication network, data security has become a major issue. Cryptography is usually employed to solve this problem. However combination of cryptography with steganography is very valuable. In this paper, we introduce a technique of hiding message by first encrypting it with pseudorandom key stream of bits and then embed this encrypted data inside image using Bit shifting method. The primary purpose of this paper is to enhance security of useful data possibly by combining steganography with cryptography. Keywords— Data Encryption, Image Processing, Pseudorandom Key Streams, Steganography.
I. INTRODUCTION Besides rapid development in Information Technology, the number of data attacks has also grown rapidly. These data attacks are really harmful when the data is confidential. Accessing medical information is beneficial for doctors to better treat patients [1], but if attacker modifies that data, the doctors will treat patient considering other disease can cause patient dead. According to review based on industrial statistics, it is concluded that 50%-75% of security mishaps occur within an organization due to misuse of information. In order to ensure safe information transmission through an organization, it has become essential to define proper technique for securing data [2]. Data security is a critical issue for open systems based on cloud applications or World Wide Web [3]. E-commerce has developed an easiest, fastest and safest online shopping environment for shopkeepers. In ecommerce based system, secure money transaction has suffered from massive security attacks. Due to these security attacks, a big loss is found in online shopping environment usage [4]. Information Systems are abundantly affected by various types of security attacks which can lead to financial losses. Various security threats can change data confidentially and integrity [5]. In recent ages, transmission through communication medium requires more data security. Attacks on data may decrease its worth. There are lots of ways available to overcome this issue. One of them is secure data
ISSN: 2231-2803
transfer through image. In order to achieve this goal, it is found that hiding data in image is more effective through combination of cryptography and steganography [6]. Steganography hides valuable information in some medium while Cryptography encodes useful information in non understandable form [7]. Cryptography systems are classified into symmetric key systems and public key systems. In symmetric key systems, a single key is employed for both data encryption and extraction while public key systems usually use two keys, one is known by everyone and other one is private key [8]. Data hiding is classified by different ways such as sending message through text. Mostly for this purpose “line shift coding” method is popular. In line shift coding, secret message embed in text by varying texture attributes [9]. This paper focuses on proposing the combine method of Cryptography and Steganography. Message is firstly encrypted using key streams and then divided into bits. These broken bits are then inserted into digital image pixel color bit pattern by using least significant bit method. The resulting image will carry very small change in its pixel value which will not perceivable for outside world. Our paper is organized as follows. Section II, is related to Technical Background of the system. In Section III, we discussed the proposed methodology for Encryption and Decryption. Section IV is related to analysis of results generated by our encryption and decryption strategy. Section V is related with conclusion of our research work. II. TECHNICAL BACKGROUND In [5] an approach of hiding image in video is discussed. According to their technique, it is stated that concealing plain
Bmp format image in cipher image by using Blowfish algorithm and then apply steganographic approach to embed this cipher image into video. M. Mishra et al in [10] proposed
http://www.ijcttjournal.org
Page 78
International Journal of Computer Trends and Technology (IJCTT) – volume 20 Number 2 Feb 2015 TABLE 2
a method of hiding message in image through encrypting secret text with RSA public key algorithm. Further F5 algorithm is used to insert encrypted text in image. In [11] S. Narayana at al presented two methods of securing message through image. From their first technique, it is defined that data security can be ensured through encrypting image in cipher text. For this purpose, combination of S-DES algorithm with secret key is used to embed cipher text in another image. In their second technique, S-DES algorithm is employed with key image and then embed stego image in another image.
ALGORITHM FOR DECODING
Input: Encrypted image Output: message file initialize k, j while k less then image width and j less then image height do get the pixel values of image if pixel values are non zero then exit while end if increment in k if k value exceed from image width then increment of 1 in j and k assign value 0 end if Get char values in message file repeat End while
III. PROPOSED METHODOLOGY According to our proposed method, the data which is needed to be send first encrypt with pseudorandom stream of bits generated by pseudo random algorithm. This encrypted data is then further divided into bits and after this these broken bits are inserted into colour pattern of image pixel by using least significant bit method. The resulting image will carry very small change in its pixel values which will not visible for everyone. The algorithms of encoding and decoding system are shown in table1 and table 2 respectively.
TABLE 1 ALGORITHM FOR ENCODING
1- Cryptography
Step 1: Generate pseudorandom stream of bits using key scheduling. Key scheduling algorithm states that first initialize an array “F” of length 0-255 bits and then shuffle each element of array with a key “k” for making it a permutation array. In order to achieve this goal, variable “d” and “c” is iterated 256 times after initialization from 0. This permutation array generates key streams through pseudo random algorithm which are equal to the length of message. Here is complete algorithm of above stated technique [12].
Input: message file, key Output: Encrypted image Initialize k, j while data left to embed do chr with key(character by character) get the pixel values of image set the pixel values by char values increment in k if k value exceed from image width then increment of 1 in j and k assign value 0 end if repeat End while
Declare an array “F” of length 0-255 bytes where value of each index is equal to 0-255.
0
1
2
3
[0]
[1]
[2]
[3]
.... ..
253
254
255
[253]
[254]
[255]
[254]
[255]
Declare a key “K” of length 256.
[0]
Set pixel values in image
[1]
[2]
[3]
.... .. [d mod 256]
Shuffle each element of an array “F” with key “K” to make it permutation array. Shuffle these two values
ISSN: 2231-2803
0
1
2
3
F[d]
[0]
[1]
[2]
[3]
[d]
http://www.ijcttjournal.org
.. .. ..
F[c]
253
254
255
[c]
[253]
[254] [255]
Page 79
International Journal of Computer Trends and Technology (IJCTT) – volume 20 Number 2 Feb 2015
Figure out c=c + F[d] + K [d mod 256].Repeat this process 256 times.
0
1
2
3
[0]
[1]
[2]
[3]
F[c] [d]
.... ..
F[d]
253 253
[c]
[253]
254 4
255
[254]
[255]
Shuffle F[d] with F[C].Repeat this process 256 times.
2- Steganography Encrypting message contains flow of bytes which is then broken in form of bits, so that insert it in colour pattern of an image pixel.A byte of encrypting message will carry eight bits which is divided into twelve possible sequence of bits as shown in fig 2.
Shuffle these two values 256 times
values
0
1
2
3
F[d]
[0]
[1]
[2]
[3]
[d]
.... F[c] .. [c]
253
254
255
[253]
[254] [255]
When complete 256 iterations then obtain permutation array. Generate Key stream of size equal to length of message after initializing an array’s index “d” and “c” from 0. Figure out new values of array indexes “d” and “c”. d=(d+1)mod 256 c=(c+1) mod 256 Shuffle F[d] with F[c] Generate key stream byte by calculating (F[d]+F[c]) mod 256.
Step 2: To encrypt message, perform bit by bit exclusive OR operation between stream key bits and message bits. Resulting message will carry cipher bits. For decrypting an original message, we perform bit by bit exclusive OR operation between stream key bits and cipher message bits. Desire encryption and decryption of message shown in fig 1.
Fig. 1
Text Encryption and Decryption
ISSN: 2231-2803
Fig. 2
Cipher text possible bit sequences
Suppose sequence #10 (11110000 00001110 00000001) in fig.3. is used to shift cipher text bits at least significant position in bit pattern of image pixel. To achieve this goal, perform bit by bit AND operation between Sequence #10 and cipher text bits and shift necessary cipher bits at least significant position. Putting 0 at remaining bits helps to insert desire values in bit pattern of an image pixel as shown in fig.3.
Fig. 3
http://www.ijcttjournal.org
Bit shifting at least significant position.
Page 80
International Journal of Computer Trends and Technology (IJCTT) – volume 20 Number 2 Feb 2015 Placing cipher Text bits at least significant position gives us facility to insert colour bits of image pixel. In order to embed colour bits of a pixel with cipher text bits, perform bit by bit AND operation between Red, Green, Blue colour bits and 11110000, 11111000, 11111110 respectively. This procedure delivers empty last bits .These empty last bits help to insert cipher text bits in colour pattern of image pixel by performing OR operation as shown in fig. 4.
Fig. 5
Fig. 4
Sequence diagram Encryption/Encoding
Whole Steganography Procedure
3- Sequence Diagram Sequence diagrams are used to construct message sequence chart in object oriented way as described in [13]. Therefore, we use sequence diagrams for visualizing the encoding and decoding processes in object oriented technique as shown in fig.5 and fig.6.
ISSN: 2231-2803
Fig. 6
http://www.ijcttjournal.org
Sequence diagram Decryption/Decoding
Page 81
International Journal of Computer Trends and Technology (IJCTT) – volume 20 Number 2 Feb 2015 IV. RESULTS The results which obtained from our C sharp desktop application are as follows. Figure.7 shows encryption of message in colour image and Figure.8 shows decryption of message from colour image.
V. CONCLUSION We have proposed a system of an encrypting text in image using pseudo random key generation .This system provides more secure way of communication between sender and receiver. The algorithm of proposed system provides more complexity as unauthorized party needs to analyse first bit pattern of encrypted text before an attack is accomplished. This method can be used for any information communication network where data safety has first priority such as wireless networks or banking systems.
REFERENCES
[1] A. A. Memon, M. R. Naeem, M. Tahir, M. Aamir, A. A. Wagan, "A
Fig. 7
Fig. 8
ISSN: 2231-2803
Encryption/Encoding
New Cloud Computing Solution for Government Hospitals to Better Access Patients’ Medical Information", American Journal of System and Software, vol. 2 (3), pp. 56-59, June 2014. [2] J. D. Arcy, A. Hovav, D. Galletta, “User awareness of security counter measures and its impact on information systems misuse: A Deterrence Approach”, Information Systems Research, vol. 20 (1), pp. 77-98, March. 2009. [3] F. B. Shaikh, S. Haider,” Security threats in cloud Computing”, in 6th International Conference on Internet Technology and Secured Transactions, p. 214-219, December. 2011. [4] H. Matbouli, Q. Gao, “An Overview on Web Security Threats and Impact to E-Commerce Success”, in 2012 International Conference on Information Technology and e-Services, pp. 1- 6, March. 2012. [5] M. Jouini, L. B. A. Rabai, A. B. Aissa,” Classification of security threats in information systems”, 5th international conference on Ambient Systems, pp. 489-496, December.2014. [6] H. Sharma, M. Arya, D. Goyal, "Secure Image Hiding algorithm using cryptography and steganography”, International Journal of Scientific Research, vol. 13 (5), pp. 01-06, Jul-Aug. 2013. [7] A. Almohammad, G. Ghinea, R. M. Hierons, "JPEG Steganography: A Performance Evaluation of Quantization Tables", in Advanced Information Networking and Applications, 2009. AINA 09. International Conference, pp. 471-478, May. 2009. [8] Ayushi, “A Symmetric Key Cryptographic Algorithm”,in International Journal of Computer Applications, pp. 01-04, February. 2010. [9] R. M. Patel, D. J. Shah,” Multiple LSB data hiding based on Pixel value And MSB value”, in 2013 Nirma University International Conference ,pp. 1-5, November. 2013. [10] M. Mishra, G. Tiwari, A. K. Yadiv,”Secret Communication Using Public Key Steganography”, in IEEE International Conference on Recent Advances and Innovations in Engineering (ICRAIE-2014), pp. 1-5, May. 2014. [11] S. Narayana, G. Prasad,”Two New Approaches For Secured Image Steganography Using Cryptographic Techniques And Type Conversions”, Signal & Image Processing: An International Journal (SIPIJ), pp. 60-73, December. 2010. [12] W. Stallings, Cryptography and Network Security, (Five Editions), ISBN: 978-81-317-6166-3, 2011. [13] M. R. Naeem, W. Zhu, A. A. Memon,” New approach for UML Based modeling of relational databases”, International Journal of Computer Science and Telecommunications, Vol. 5(5), pp. 18-23, May. 2014.
Extraction/Decoding
http://www.ijcttjournal.org
Page 82