You are on page 1of 4

2016 6th International Conference on Information Communication and Management

Using Blowfish Encryption to Enhance Security Feature of an Image




Shreyank N Gowda
e-mail:kini5gowda@gmail.com

Abstract—The use of images to hide information is a feature follows: 00101101 00011101 11011100 10100110
which leaves little doubt in a viewer's mind. Using any medium 11000101 00001101 11010010 10101100 01100011.
to hide information refers to a method called steganography. The Blowfish encryption algorithm is the most efficient
When we use an image as a medium then that method is called encryption algorithm in the world as per [1]. It produces
image steganography. The most famous method to now is the encrypted information that is harder to decrypt than even the
Least Significant Bit Algorithm (LSB). In that method, the least currently most used algorithm Advanced Encryption Standard
significant bit of each pixel is taken and information is hidden in [2].
that. This however is easily breakable. Hence an alternative and
more secure solution is provided. First the data is encrypted II. BACKGROUND
using the Blowfish algorithm. Next an innovative method is
presented. This encrypted block is broken down to 'n' smaller In [3] the author exudes the idea of hiding an image using
blocks and 'n' images are chosen at random and each image is a texture as the medium cover image. Since a texture is just a
made to hide a block of the encrypted data. To maintain the set of pixels that repeat itself it becomes easier to hide data.
correct sequence of blocks a hash table is maintained. This is Also since the texture could be spread to any desired size,
then encrypted using LSB to a new image called the hashing much larger information could be hidden.
image. This hashing image is sent along with the 'n' other images. In [4] the authors use non-linear chaotic mapping. The
To extract the data out, first the hash image is obtained and data to be hidden is firstly made to embed onto a scrambled
using this the encrypted block is reassembled and then original image. At the same time the image used as cover is subject to
data is obtained by decryption. Discrete Wavelet Transform. This output image is later
embedded together with the scrambled image. This method
Keywords-blowfish; steganography; lsb; data hiding can hide large amount of data, but should the map used for
mapping be obtained its extremely easy to obtain the
I. INTRODUCTION information.
Steganography is something often confused and In [5] the authors suggest a method of hiding data using
misinterpreted with cryptography. Both, though are being any one of the different RGB colour channels. An image has 3
used for the same aim, that is to hide important information. channels, so changing any one of the channel's does not
However the difference lying mainly with the fact that in significantly change the image from a visual perspective.
cryptography the intention is to make extracting the data However this method cannot be used for larger images.
impossible, where as in steganography the main aim is to In [6] the authors propose various steps, first Huffman
prevent any sort of attack. Cryptographic algorithms give encoding is done on the data and the data is then broken down
output where the information can be seen although encrpyted to blocks. Simultaneously Discrete Cosine Transform is
and the nature of this output would likely cause an attack. performed on the cover image. Least Significant Bit
Steganographic algorithms try to ensure such attacks never algorithm is then modified using the Huffman values obtained.
happen by concealing the fact that information is being Maintaining these Huffman codes is extremely important
hidden in the first place. since loss of Huffman codes implies a loss of data.
This paper will combine the benefits of both types of Computation time for this method is also relatively large.
algorithms to serve the main purpose: hiding of data. Some In [7] double layer of security is given to the data, the first
standard algorithms are used and combined with an layer is using the standard Least Significant Bit method and
innovative enhancement together to make a much more the second layer involves using the Data Encryption Standard
efficient algorithm in itself. Algorithm. Steganography does not replace the encryption of
First let us understand the famous LSB algorithm. To data, instead it provides an extra security feature to the data.
understand LSB algorithm consider an example, a grid for 3 This helps to increase the security of the data as the text is
pixels of a 24-bit image can be as follows: 00101101 now encrypted as well.
00011100 11011100 10100110 11000100 00001100 In [8] the message desired to be hidden is embedded in
11010010 10101101 01100011 When the number 200, which only the blue part of the RGB channel. Results showed that
binary representation is 11001000, is embedded into the least this enhanced the security level of the image as visual
significant bits of this part of the image, the resulting grid is as distortion was not visible.

978-1-5090-3495-6/16/$31.00 ©2016 IEEE 126


In [9] the secret data is taken and at first it is hidden using used as a standard algorithm. Fig. 1 depicts the flow of the
the Vigenere encryption method to increase the standard of work.
protection of the data. Next the Lempel Ziv Welch (LZW)
technique is used to compress the data to hide its actual
capacity. Afterwards, the extended knight tour algorithm is
implemented where each bit stream of the data is made to Start Stop
spread out on the image. This enhances the robustness of the
image.
In [10], a steganography algorithm based on discrete
Encrypt Data Original
cosine transform, Arnold Transform, Chaotic System is
using Blowfish Information
depicted. The system generates a unique random sequence for
spreading data in the frequency band, Discrete Cosine with help of key obtained
Transform coefficient of the cover image. The secret data is
then scrambled by utilising the Arnold Cat Map which Break data to 'n' Decrypt using key
enhances the security feature. The recovery process is done blocks obtained
by repeating the method in reverse.
In [11] an innovative approach was introduced to update
the existing LSB algorithm and make it more secure. The
given data was broken down to 'n' blocks and each block was Hide blocks to 'n' Extract key from
hidden in an image using the standard LSB, albeit in a random images chosen at hash image
fashion. The order was stored in a hash table and using this the random
sequence of data was later obtained.

III. PROPOSED METHOD Use hash table to Extract the hash


At first the user takes the text to be hidden and then maintain order table first and
encrypts it by using the Blowfish encryption algorithm with and embed hash order the correct
the help of a key that is variable in length. The key will be table using LSB to sequence of
decided by the user. hash image information
This encrypted information is then made to break to 'n'
blocks. Now 'n+1' images are selected at random from a set of Figure 1. Flowchart of proposed method
'm' images where 'm'>'n'. Each broken block is encrypted at
random to one image. A hash table is maintained to obtain a
correct order in terms of sequence of data. This hash table and IV. EXPERIMENTAL RESULTS
all the blocks are then embedded into the 'n+1' images using To test the strength of the algorithm following tests were
LSB algorithm. These 'n+1' images are then sent. done in comparison to the standard Least Significant Bit
At the receivers side the 'n+1' images are obtained. The Algorithm,
receiver then obtains the hash image first. The information 1) determine maximum size of file that can be hidden
regarding the position of the hash image is known before hand 2) time that is needed for execution of both algorithms
to the receiver. Using the hash image he extracts the correct 3) Peak Signal To Noise Ratio for original to new image
sequence of data. He then decrypts it using the key which is Table I shows the results for a series of tests done to
also part of the hash table. The entire algorithm is executed in determine the maximum size of a text file that could be hidden
Python using OpenCV. using both algorithms. As can be seen from results, both give
The advantages of the proposed method are numerous. the same output.
Firstly the encryption enhances the security. Then the
randomness of the sending of images further enhances the TABLE I. RESULT FOR DETERMINING MAXIMUM SIZE THAT CAN BE
security of the algorithm. Also it can be seen later in the HIDDEN
results that in terms of time of execution the proposed Output for
Output Value
algorithm is not significant. S.No Input Size
for LSB
proposed
of 'n'
The purpose of hiding information securely is done algorithm
perfectly. The important thing to be done is the images chosen 1 320x240 512kB 2048kB 4
2 1280x780 2MB 8MB 4
should not be repeated, however in the case they are repeated
the names of the images are modified by hard coding to
ensure the system does not get confused. Table II depicts the results for the experiment conducted
Also in comparison with most recent work in terms of to determine the time needed for execution of the algorithm in
image steganography, the proposed algorithm gives excellent comparison with the standard LSB algorithm. As can be seen
results and takes relatively lesser time and gives most secure from the table time taken to execute the standard LSB is lesser.
results. Hence the proposed algorithm can be proposed to be This is natural, since we are combining encryption to the

127
proposed algorithm along with the extra feature of breaking to
blocks and the formation of hash table, which all add to the
complexity to execute the program and hence will certainly
lead to an increased output in terms of time of execution. Still
the time for execution as can be seen is not too large relatively.
Also usually files of size at least 1 MB are taken to be hidden
which gives an even smaller difference for output.
TABLE II. TIME OF EXECUTION

Input Size Output for


Output Value
S.No (Image Size, proposed
for LSB of 'n'
Text size) algorithm
2 (a) 2 (b)
1280x780,
1 0.5 secs 0.671 secs 4 Figure 2. (a) Original Image (b) Output Image
1kB
1280x780, 1.265
2 1.368 secs 4
10kB secs
V. CONCLUSION
1280x780, 8.327
3 8.714 secs 4 An algorithm has been proposed that significantly
100kB secs
1280x780, 40.111
enhances the security of the algorithm. An innovative
4 42.214 secs 4 enhancement is added in terms of increasing the chaos factor
512kB Secs
of the algorithm by adding the randomness to it. Also it can be
seen that the time of execution does not get significantly vary.
Table III presents the results of Peak Signal to Noise Ratio
This ensures the algorithm is as efficient as plausible with
between the pre-algorithm image and the post-algorithm
regards to time and also security.
image. The Mean Square Error (MSE) ,the Peak Signal to
Following conclusions can be made on the basis of the
Noise Ratio (PSNR) are the two main error metrics used to
analysis of the algorithm.
compare image compression quality. The MSE represents the
x The proposed algorithm increases the capacity of
cumulative squared error between the compressed and the
hiding data since we use more images. This also
original image, whereas PSNR represents a measure of the
increases the size of input we need. But with
peak error. This is used to indicate the maximum difference
expanding technology, size of data has stopped being
between the images. The Peak Signal to Noise Ratio is the
a significant drawback for algorithms.
difference between corresponding pixel values of the
pre-algorithm to post-algorithm image. This is done using x The proposed algorithm takes slightly more time to
MatLab. The higher the value of PSNR the lesser is the execute than the standard LSB. This is expected as
difference in quality of the image. three additional features are added to the algorithm
namely: encryption using Blowfish algorithm,
TABLE III. PSNR VALUE DETERMINATION breaking of blocks and formation of hash table. Even
then for larger files the time taken is not significant.
Output for
Input Size
Output proposed Value x The proposed algorithm, since it uses more images,
S.No (Image Size, uses lesser data per image than the standard LSB and
for LSB algorithm of 'n'
Text size)
(average) hence gives a higher PSNR value per image, which
1 1280x780, 1kB 77.15 86.15 4 means the viewer will find it harder to differentiate
1280x780, even more than the standard LSB. PSNR is often the
2 71.14 79.16 4
10kB most used distinguishing factor to determine the
1280x780,
3
100kB
63.25 69.44 4 strength of a steganography algorithm.
1280x780, x The most important aspect here is that the LSB can be
4 51.23 59.25 4 easily decoded. By using the proposed algorithm it
512kB
increases the security factor of the image. The
Following are the images before and after execution of the encryption enhances the security and then the
proposed algorithm. As can be seen, the difference is not randomness increases the chaos factor of the
visually perceptible. However, the image on the right i.e 2(b) algorithm.
contains data that has been embedded in it using the Least
Significant Bit Algorithm. On further testing the PSNR value ACKNOWLEDGEMENT
can be found out to be different. This however is something Any achievement, be it scholastic or otherwise does not
not visible to the naked eye, which in turn tells us about the depend solely on the individual efforts but on the guidance,
entire efficiency of steganography as a whole in comparison encouragement and cooperation of intellectuals, elders and
to cryptography. friends. A number of different personalities, in their own

128
capacity have helped me in carrying out this project work. I [5] M T Parvez and A Gutub, “RGB Intensity Based Variablr-Bits Image
would like to take this opportunity to thank them all. Steganography”, IEEE Asia-Pacific Services Computing Conference,
pp 1322-1326, December 2008.
I would like to thank Dr. Shobha, HOD Computer Science
[6] A Nag, S Biswas, D Sarkar, P P Sarkar “A novel technique for image
and Engineering Department, R. V. C. E, Bengaluru for her steganography based on Block-DCT and Huffman Encoding”
invaluable suggestions and expert advice. International Journal Of Computer Science and Information
I thank my parents, brother, friends and all faculty of the Technology, pp 103-112, vol 2, June 2010.
Department of Computer Science And Engineering, R.V.C.E [7] S Singh and V K Attri "Dual Layer Security of data using LSB Image
for their help. Steganography Method and DES Encryption Algorithm"
International Journal of Signal Processing, Image Processing and
Pattern Recognition Vol. 8, No. 5 (2015), pp. 259-266.
[8] S Gupta , G Gujral and N Aggarwal "Enhanced Least Significant Bit
REFERENCES algorithm For Image Steganography" IJCEM International Journal of
[1] T Nie and T Zhang. "A study of DES and Blowfish encryption Computational Engineering & Management, Vol. 15 Issue 4, pp 40-42,
algorithm." TENCON 2009 IEEE Region 10 Conference. pp 1-4, July 2012.
January 2009. [9] M Bashardoost ,G B Sulongand, P Gerami "Enhanced LSB Image
[2] Babu, K Ravindra, S U Kumar, and A V Babu. "A Survey on Steganography Method By Using Knight Tour Algorithm, Vigenere
cryptography and Steganography methods for information security." Encryption and LZW Compression" IJCSI International Journal of
International Journal of Computer Applications Volume 12 Issue 3 pp Computer Science Issues, Vol. 10, Issue 2, No 1, pp. 221-227, March
13-17, December 2010. 2013.
[3] K Wu and C Wang, “Steganography using reversible texture [10] S Singh and T J Siddiqui "A Security Enhanced Robust
synthesis” IEEE Transactions on Image Processing Vol.24 pp Steganography Algorithm for Data Hiding" IJCSI International
130-139,January 2015. Journal of Computer Science Issues, Vol. 9, Issue 3, No 1, pp 131-139,
May 2012.
[4] S Thenmozhi and M Chandrasekaran, “A novel technique for Image
Steganography using Nonlinear Chaotic Map”, 7th International [11] S N Gowda and S Sulakhe "Block Based Least Significant Bit
Conference on Intelligent Systems and Control , pp 307-311, January Algorithm For Image Steganography" Annual Int'l Conference on
2013. Intelligent Computing, Computer Science & Information Systems
(ICCSIS-16) ,pp 16-19, April 2016.

129

You might also like