0% found this document useful (0 votes)
46 views

LSB Based Text and Image Steganography Using AES Algorithm

Uploaded by

krapi3doto
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

LSB Based Text and Image Steganography Using AES Algorithm

Uploaded by

krapi3doto
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)

IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

LSB BASED TEXT AND IMAGE STEGANOGRAPHY


USING AES ALGORITHM
Priya Paresh Bandekar1 and Suguna G C2
1
Student of ECE Department, JSSATE, Bangalore
[email protected]
2
Assistant Professor of ECE Department, JSSATE, Bangalore
[email protected]

Abstract- information can be in two insertion domains: spatial


domain and frequency domain. Our main focus is in the
The steganography is the art of hiding data in spatial domain [10] because the changes in the cover
another data. Secret information like image are indistinguishable by the human eye. The
messages, images, audio and video can be spatial domain performs the dissimilation in the bits of
hidden inside the cover image. The main the pixel of the original image. LSB (Least Significant
objective is to hide the secret message or image Bit) technique is one of the spatial domain techniques.
inside the image using Least Significant Bit In LSB each of the bit of the data i.e. the character or
(LSB) technique. To protect and provide the image are placed in the least significant bit of the
security for the hidden message or image, cover image so that the distortions brought by the
Advanced Encryption Standard (AES) insertion process remain imperceptible by the human
Algorithm is used. Various image formats eye.
with different text length or image size are
compared. Efficiency of algorithm is estimated In our work we study about the LSB technique (LSB)
by Peak Signal to Noise Ratio (PSNR), Mean i.e. embedding the secret data into the cover image
Square Error (MSE) where higher PSNR value [9] and in order to protect and provide security for the
gives the high-quality image. Steganography stego-image AES (Advanced Encryption Standard)
plays an important role in applications like algorithm is used [1][2]. We take different images of
medical, military, OTP (One Time Password), various formats and try to hide the secret data of
copyright etc. varied length into the cover image. Then PSNR (Peak
Signal to Noise Ratio) and MSE (Mean Square Error)
Keywords- Image steganography, LSB, between the original and the encrypted image is
Advanced Encryption Standard, PSNR Ratio, estimated. PSNR, MSE and histogram is also plotted.
MSE, OTP.
The paper is organized as following: section II
I. INTRODUCTION presents LSB substitution and AES algorithms.
Steganography becomes of greater significance Section III presents proposed works LSB with AES
in the digital era as more people are joining cyber space algorithm. Section IV presents experimental results.
revolution. Computer network requires special means of Section V presents general conclusion.
security as the number of data being exchanged on the
internet is increasing. Therefore, confidentiality and data II. METHODS
integrity plays a major role to protect against A. Least Significant Bit
unauthorized access. Information hiding is an emerging
research area in modern communication. This includes Least Significant Bit is one of the spatial domain
applications such as watermarking, fingerprinting, techniques where each bit if the text or the image is
copyright protection and steganography. substituted from the least significant bit of the
In ancient time, the use of invisible ink or shaving the original image. It is simple and easy to implement.
messengers head and then sending the person one’s The specialty of its existence in spatial domain is
the hair grows or wooden wax was used as a medium because the human eye cannot distinguish between
in order to pass the secret communication from the original and encrypted image [4]. LSB can be
sender to receiver. The problem with this way of extended up to 4-bits or 2-bits out of 8-bits, but it
communication was the information was not secured. may cause distortion in an image due to change in the
With the advancement in the technology, internet intensity of an image. LSB substitution comprises of
came into existence. As a result all the information
transfer took place over the web. In the modern era,
the word steganography means to hide the secret data 1. LSB Encoder
in a file so that the third person is unaware of the 2. LSB Decoder
existing hidden data into the image. The hidden secret 782
Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)
IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

LSB technique has become the basis of many LSB Decoder


techniques that hide the secret data within the carrier
data. First section explains about the encoding
process where the secret data is hided and next Stego-Image
section explains about the decoding process where
the data gets extracted [5].

LSB Encoder
Convert pixels to
binary

Secret data Cover image

LSB Decoder

Convert data Convert pixels to


to binary
binary

Covert binary to Convert binary to


secret data pixel values
LSB encoder

Secret data Cover image


Convert result to
pixels
Figure 2: LSB Decoder

1. Input the stego image.


Stego-Image 2. Convert the pixel value to binary representation.
3. Apply LSB decoder; function is to retrieve the
secret data back from the stego-image.
4. The secret data and the cover image are
Figure 1: LSB encoder separated together to get the desired output.
1. Input the secret data i.e. text or the image
which needs to be hidden.
2. Input the cover (original) image of size [256
B. AES (Advanced Encryption Standard)
256].
3. Convert the secret data i.e. asci value of
The AES algorithm is the symmetric algorithm that is
each text or pixel value in case of image into
secure enough to provide security for confidential
binary representation.
data operating on plaintext of 128-bit with variable
4. Convert the pixel value of cover image into
key length of 128, 192 and 256-bit [3]. The number
binary representation.
of rounds performed is 10, 12 and 14 respectively.
5. Apply LSB encoder; function is to hide each
AES is one of the strongest algorithms until now and
bit of text or image into the least significant
we can use only one key at the sender and receiver
bit of each 8 pixel value of cover image.
side, hence the privacy made by the key is secured.
6. The resultant output is converted back to
pixel values to get the stego-image.

978-1-5386-4765-3/18/$31.00 ©2018 IEEE 783


Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)
IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

c) Mix Column Transformation


Each column in the new formed matrix is
multiplied with each column of the
predefined matrix.
d) Add Round Key
The resultant matrix is xor-ed with the
expanded key generated from the initial key.

AES DECRYPTION

Decryption is just the opposite of encryption i.e. the


cipher text is converted back to the plain text. Inverse
substitute byte, inverse mix column, inverse shift
rows and inverse s-box takes place.

a) Inverse Sub Byte Transformation


Each byte from the matrix is substituted
with the inverse s-box table to get the new
matrix.
b) Inverse Shift Rows Transformation
The row of the matrix is circularly right
shifted.
c) Inverse Mix Columns Transformation
Function opposite to that of mix column
transformation.
d) Inverse Add Round Key Transformation
Figure 3: AES Encryption Algorithm The round keys should be selected in a
reverse order and Xor-ed with the state
matrix.
AES ENCRYPTION

All operations in AES are byte oriented. 128 bit III. LSB combined with AES Algorithm
plaintext is arranged in 4x4 matrixes with 16bytes.
Substitute byte, shift rows, mix columns and add Our approach is to provide security for the secret
round key are the main steps in AES encryption [7]. information hidden inside the cover image performed
through LSB technique [6] with the help of AES
a) Sub Bytes Transformation algorithm. The first step is to read the secret data and
Sub byte is substitute byte where each byte the cover image. The next step is to hide the data into
from the cipher text is substituted from the the cover image which is done with the help of LSB
standard look up table of s-box which encoder. To protect the data from the intruder the
contains 256 elements. S-box is shown in resultant stego-image is given to AES encryption
fig. First hexadecimal values in byte indicate where each of the pixels get scrambled .To get back
row index and second hexadecimal value the stego-image AES decryption is done and the
indicate column index. output of this is provided to LSB decoder where the
hidden data is retrieved finally [8].
b) Shift Rows Transformation
In shift row transformation, the rows of the
matrix are circularly left shifted. Row 0is
kept constant; Row 1 is left shifted by 1
byte; Row 2 is shifted by 2 byte and finally
last row by 3 byte.

978-1-5386-4765-3/18/$31.00 ©2018 IEEE 784


Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)
IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

General Block Diagram: IV. EXPERIMENTAL RESULTS

In this work, we used LSB technique in order to hide


Cover image Secret data the secret data i.e. text or image using LSB technique.
Further in order to provide and protect the data AES
algorithm is applied with the maximum key length of
128 bit. Image steganography is implemented in
MATLAB software.

LSB encoder Images of various sizes are used and further resized
the image into 256x256 pixel values. We choose
image of type TIFF format because the size of the
stego-image is no change in comparison with the
AES Encryption original image [4]. TIFF format is lossless
compression for archiving images.

Using the above two algorithms, we have hidden the


AES Decryption text or the image inside the cover image and is also
successful in retrieving back the hidden data. We
compare the various images with the same text length
and also with varied text length and also same in case
LSB decoder of secret image where the size is less than or equal to
80x80.Estimation of PSNR ratio, MSE and histogram
is plotted.

Secret data
TEXT INSIDE IMAGE

Figure 4: LSB combined with AES algorithm 8-bit length

Image(256x256).tiff PSNR MSE


1) Read the input cover image of size [256 RATIO(dB)
256]. Boat 52.3728553 0.38
2) Read the secret data i.e. text or the image. Barbara 53.1204016 0.32
3) Apply LSB encoder where the bits of the Cameraman 53.2416592 0.31
secret data are hidden into the least Couple 54.9964493 0.21
significant bit of the pixel value of the cover Fingerprint 55.380342 0.19
image. Lena 52.8258176 0.34
4) The resultant stego-image is given to AES Mona Lisa 48.5456915 0.91
encryption in order to provide security for Stairways 53.3657362 0.30
the hidden data. Tower 52.9426629 0.33
5) The function of the AES decryption is to get Cat 52.8250.63 0.34
back the stego image in order to retrieve
back the data. Table 1: Text inside Image for 8-bit text length
6) The LSB decoder finds each of the data
which was embedded in the cover image and Table 1 depicts hiding of text inside image of text length of
the resultant is the secret data. 8-bit long. It infers that it has different PSNR and MSE for
different images and as the PSNR ratio increases, the MSE
decreases indicating good quality of the image.

978-1-5386-4765-3/18/$31.00 ©2018 IEEE 785


Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)
IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

256-bit length

Image(256x256).tiff PSNR MSE PSNR AND MSE PLOT


RATIO(dB)
Boat 52.2368628 0.39
Barbara 52.9530097 0.33
Cameraman 53.0662400 0.32
Couple 5407240130 0.22
Fingerprint 55.0917353 0.20
Lena 52.6709765 0.35
Mona Lisa 48.5088875 0.92
Stairways 53.1816601 0.32
Tower 52.7823693 0.35
Cat 52.6649955 0.35
Figure 6: PSNR RATIO for 8-bit text length
Table 2: Text inside Image for 256-bit text length

Table 2 gives the hiding of text inside the original


cover image of text length of 256 bit long.

Figure 7: MSE RATIO for 8-bit text length

Figure 6, 7 shows the PSNR ratio and MSE for 8 –bit text
length which are inversely proportional to one another.

Figure 5: Text inside Image


Figure 5 infers hiding of Text inside image using
LSB encoder, encrypting the stego image using AES
encryption, decryption in order to provide security
and finally retrieving back the hidden text from the
stego image using LSB decoder.

978-1-5386-4765-3/18/$31.00 ©2018 IEEE 786


Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)
IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

IMAGE INSIDE IMAGE

Original Secret Size(<=[ PSNR MS


image(.ti image(.ti 80 80]) ratio E
ff) ff)
Barbara boat [45 45] 56.63246 0.1
44 2
[60 60] 54.19471 0.2
96 2
[80 80] 51.69480 0.3
Figure 8: Image inside Image 71 9
cat cameram [45 45] 51.67234 0.3
Figure 8 shows hiding of Image inside Image using LSB an 18 9
encoder, encrypting the stego image using AES [60 60] 54.16689 0.2
encryption, decryption in order to provide security and 37 2
finally retrieving back the hidden image from the stego [80 80] 56.68275 0.1
image using LSB decoder. 28 2
stairways cat [45 45] 51.64037 0.3
66 9
[60 60] 54.17987 0.2
71 2
[80 80] 56.63618 0.1
93 2
tower stairways [45 45] 51.66149 0.3
12 9
[60 60] 54.18471 0.2
80 2
[80 80] 56.66664 0.1
00 2
Lena Mona [45 45] 51.67675 0.3
Lisa 76 9
[60 60] 54.16900 0.2
46 2
[80 80] 55.61441 0.1
74 3

Table 3: Image inside Image

Table 3 depicts hiding of secret image of size <=80x80


into the original image of size 256x256 and calculating
the PSNR ratio and MSE for different images.

PSNR AND MSE PLOT

Figure 9: PSNR RATIO for Image inside Image 787


Proceedings of the International Conference on Communication and Electronics Systems (ICCES 2018)
IEEE Xplore Part Number:CFP18AWO-ART; ISBN:978-1-5386-4765-3

algorithm”,2015 fifth international conference


on instrumentation and measurement,
computer, communication and control.

4. Harpreet Kaur and Ajay Kakkar proposed a


paper “Comparison of different image formats
using LSB steganography”, 2017 4th
International Conference on Signal
Processing, Computing and Control (ISPCC).

5. S.M Masud Karim, Md.Saifur Rahman,


Figure 10: MSE RATIO for Image inside Image Md.Ismail Hossain presented a paper “A new
approach for LSB based image steganography
Figure 9, 10 shows PSNR ratio and MSE for image inside using secrete key”,14 th international
image which are proportional to each other from the conference on computer and information
experimental result. technology, December,2011.

6. Aman Arora, Manish Pratap Singh, Prateek


V. CONCLUSION Thakral, Naveen Jarwal proposed a paper by
name “Image steganography using Enhanced
In this work, we hide the secret data into the LSB substitution technique”,2016 fourth
cover image using LSB technique where the international conference on Parallel,
maximum number of characters embedded is 8192 Distributed and Grid Computing.
characters and the secret image size is less or equal to
80x80. Hence in order to provide security for our 7. Priya Deshmukh presented a paper on “An
hidden information we apply AES algorithm with key image encryption and decryption using AES
length of 128 bit which is one of the symmetric algorithm”, International Journal of Scientific
algorithm recommended by NIST and provide more & Engineering Research, Volume 7, Issue 2,
security than other algorithms. February-2016.
Based on our implementation of this algorithm
in MATLAB environment, we compared PSNR and 8. Z. Y. Al-Omari and A. T. Al-Taani, “Secure
MSE for different images and plotted graph LSB steganography for coloured images using
respectively. On plotting the graph, we studied that character-colour mapping,” 2017 8th
both PSNR and MSE are inversely proportional to International Conference on Information and
each other. Lower value of MSE tells us that the error Communication Systems (ICICS), 2017, pp.
between original and encrypted image is less and 104-110.
higher PSNR gives that the quality of reconstructed
image is better. The PSNR ratio lies in the range 45- 9. D. Samidha and D. Agrawal, “Random image
70 dB and MSE in range of 0-1. steganography in spatial domain,” 2013
International Conference on Emerging Trends in
In this work, we hide text or image in another VLSI, Embedded System, Nano Electronics and
image. Further study about hiding audio and video Telecommunication System (ICEVENT), 2013,
inside an image will be done soon. The key length pp. 1-3.
used in AES can be increased.
10. Ali K. Hmood B. B. Zaindan, “an overview on
hiding information techniques in images,”
REFERENCES
journal of applied sciences, vil. 10, no. 18, 2010.
1. NIST, “Advanced Encryption Standard,”
http://csrc.nist.gov/
publications/fips/fips197/fips-197.pdf, 2001
(accessed March 24, 2017).

2. Gurpreet Singh and Supriya proposed a paper


“A Study of Encryption Algorithms (RSA,
DES, 3DES and AES) for information
security”.

3. Qi Zang and Qunding proposed paper by


name “Digital Image Encryption based on
788
Advanced Encryption Standard [AES]

You might also like