Hiding Text in Video using LSB based Steganography

International Journal of Science, Engineering and Technology Research (IJSETR)
Volume 3, Issue6, May 2014
Hiding Text in Video using LSB based
Steganography
Zun Moe Oo1, Su Wai Phyo2
Department of Information Technology
Abstract— Digital communication has become an essential part
of infrastructure nowadays, a lot of applications are
Internet-based and it is important that communication be made
secret. As a result, the security of information passed over an
open channel has become a fundamental issue and therefore,
the confidentiality is required to protect against unauthorized
access and use. Cryptography and steganography are the two
popular methods available to provide security. Using
cryptography, the data is transformed into some other
gibberish form and then the encrypted data is transmitted. The
proposed system designs by embedding text file (.txt) in a video
file in such a way that the video does not lose its functionality
using Least Significant Bit (LSB) modification method. To be
more robust in security, RC4 encryption algorithm is effectively
combined with LSB algorithm using C# programming
language.
hidden communication techniques, the cover file is no more
than an innocent (unrelated to the embedded message) piece
of information that is used to hide the secret information.
A secret key, called stego-key is used in the embedding
process such that it makes the embedded message
computationally infeasible to extract without possessing this
key. The output of the embedding process is called stego-file,
which is the original file holding the hidden secret message.
This output becomes, at the other end, the input of the
extracting process, in which the embedded message is
extracted from the stego file to complete the hidden
communication process. Since the stego-key is used in the
embedding process, it needs to be used in the extracting
process [3].
Keywords- - Cryptography, Steganography, Least Significant
Bit (LSB), RC4 encryption algorithm
III. RELATED WORK
Nowadays steganography based data security systems are
widely used in many research areas.
In the previous research [11], experiment was done by Dr.
S.A.K Jilani and A.Swathi (2012) in order to propose a data
hiding scheme to hide the information in specific frames of
the video and in specific location of the frame using
polynomial equation.
And then, Ms. Monika S. Shirbhate and S.S. Kulkarni
presented a security that hide encrypted message in audio
portion of the uncompressed AVI video file using LSB
algorithm[12].
After that, Juhi Saurabh and Asha Ambhaikar proposed
audio steganography using RPrime RSA and GA Based LSB
Algorithm to hide the encrypted message into the audio
file[13].
According to the literature from these papers, this paper is
proposed video security system using symmetric
cryptographic algorithm and LSB steganographic technique
I. INTRODUCTION
s the increasing use of digital documents, digital
document image processing becomes more and more
useful. Data-hiding in videos have received much attention
recently. One of the applications of data-hiding in videos is
steganography. The purpose of steganography is to
communicate information secretly so that others who respect
the objects being exchanged cannot notice the existence of
extra information hidden in the objects. Steganography
comes from the Greek word meaning covered writing.
steganography as the hiding of a message within another so
that the presence of the hidden message is indiscernible. The
key concept behind steganography is that the message to be
transmitted is not detectable to the casual eye. In fact, people
who they are not intended to be the recipients of the message
should not even suspect that a hidden message exists [1].
Traditionally, steganography was based on hiding secret
information in image files .Lately, there has been growing
interest in implementing steganographic techniques to video
files as well as audio files. The advantage of using video files
in hiding information is to be added security against hacker
attacks due to the relative complexity of video compared to
image files and audio files [10].
In this paper, message (.txt) is encrypted using symmetric
encryption algorithm. And then, the encrypted message is
embedded in cover video (.avi) file by LSB algorithm to be
more robust in security.
A
II.FRAMEWORK OF STEGANOGRAPHY MODEL
In general, the basic framework of the steganography
model consists of two main processes, namely the embedding
process and the extracting process. The main function of the
embedding process is to hide the secret message, called
embedded message, in a given cover, called cover-file. In
IV. VIDEO STEGANOGRAPHY AND SECURITY
Data Hiding is the process of secretly embedding
information inside a data source without changing its
perceptual quality. Data Hiding is the art and science of
writing hidden messages in such a way that no one apart from
the sender and intended recipient even realizes there is a
hidden message. Generally, in data hiding, the actual
information is not maintained in its original format and
thereby it is converted into an alternative equivalent
multimedia file like image, video or audio which in turn is
being hidden within another object. This apparent message is
sent through the network to the recipient, where the actual
message is separated from it. The requirements of any data
hiding system can be categorized into security, capacity and
robustness. All these factors are inversely proportional to
each other creating the so called data hiding dilemma. The
All Rights Reserved © 2014 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR)
Volume 3, Issue6,Mayy 2014
focus of this paper aims at maximizing the first two factors of
data hiding i.e. security and capacity. The proposed scheme is
a data-hiding method that uses high resolution digital video
as a cover signal. The proposed recipient need only process
the required steps in order to reveal the message; otherwise
the existence of the hidden information is virtually
undetectable. The proposed scheme provides the ability to
hide a significant quality of information making it different
from typical data hiding mechanisms because this paper is
focused on text-in-video.
The purpose of hiding such information depends on the
application and the needs of the owner/user of the digital
media. Data hiding requirements include the following:
a. Imperceptibility- The video with data and original
data source should be perceptually identical.
b. Robustness- The embedded data should survive any
processing operation the host signal goes through
and preserve its fidelity.
c. Capacity-Maximize data embedding payload.
d. Security- Security is in the key.
Data Hiding is the different concept than cryptography,
but uses some of its basic principles [4]. In this system, RC4
encryption algorithm and LSB insertion techniques are used.
plain text stream using the bitwise exclusive-OR (XOR)
operation [6].
RC4 is the most widely deployed commercial stream cipher,
having applications in network protocols such as SSL, WEP,
WPA and in Microsoft Windows, Apple OCE, Secure SQL
etc. The cipher consists of two major components, the Key
Scheduling Algorithm (KSA) and the Pseudo-Random
Generation Algorithm (PRGA) [7].
1) Key Scheduling Algorithm (KSA): As explained
before, the key-scheduling algorithm is used to generate the
permutation array. The first step of this algorithm consist in
initializing the S table with the identity permutation: the
values in the array are equal to their index. Once the S array is
initialized, the next step consists in shuffling the array using
the key to make it a permutation array [2]. To do so, one
simply iterate 256 times the following actions after
initializing i and j to 0:
 compute j = j + S[i] + key[i mod key length]

swap S[i] and S[j]

increment i
V. SYMMETRIC KEY CRYPTOGRAPHY
With symmetric key cryptography, a single key is used for
both encryption and decryption. As shown in Figure 1. Secret
key cryptography schemes are generally categorized as being
either stream ciphers or block ciphers. Stream ciphers operate
on a single bit (byte or computer word) at a time and block
cipher encrypts one block of data at a time using the same key
on each block.
Figure 2. Generate the permutation array
Once i has reached 256 (the 256 iterations were
completed), the S array has been properly initialized.
Now that the S array is generated, it is used in the next step of
the RC4 algorithm to generate the keystream.
Figure 1. Symmetirc key crypto system
The sender uses the key to encrypt the plaintext and sends
the cipher text to the receiver. The receiver applies the same
key to decrypt the message and recover the plaintext.
Because a single key is used for both functions, secret key
cryptography is also called symmetric encryption. This
system will use RC4 stream cipher algorithm and LSB
insertion algorithm.
A. RC4 Algorithm
RC4 like as a streaming cipher encrypts plaintext one byte at
a time, but also can be designed to encrypt one bit a time or
even units larger than a byte at a time. In this structure a key
is input to a pseudorandom bit generator that produces a
stream of 8-bit numbers that are supposed to be truly random,
the pseudorandom stream can’t be predicted without
knowledge of the input key. The output of the generator is
called a key stream .It is combined one byte a time with the
2) Stream Generation: This step of the algorithm
consists in generating a keystream of the size of the message
to encrypt. This algorithm enables us to generate a keystream
of any size. To do so, first initialize the two indexes to 0 and
we then start the generation of the keystream one byte at a
time until we reached the size of the message to encrypt. For
each new byte to compute, the following actions will do [2]:
 Compute new value of i and j:
i := (i + 1) % 256
j := (j + S[i]) % 256
 Swap S[i] and S[j] to have a dynamic state (it makes
it obviously harder to crack than if the state was
computed only once and use for the generation of
the whole keystream)
 Retrieve the next byte of the keystream from the S
array at the index
S[i]+S[j]% 256
All Rights Reserved © 2014 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR)
Volume 3, Issue6, May 2014
Figure 3. Generating a keystream
3) Encryption and Decryption of RC4: Once the
keystream has been generated, the encryption of the
plaintext is really simple: it simply consists of a XOR
between the plaintext and the keystream. As for the
decryption, it is as simple as the encryption, the ciphertext
with the keystream.
VI.LEAST SIGNIFICANT BIT MODIFICATION
Least significant bit modification is the most common
and simple approach for hiding information in cover image.
This method is also known as 8th bit modification method as
it uses 8th bit of every byte in a pixel to hide a bit of the secret
message. In a monochrome or grayscale image each pixel is
of 8 bits, that is, there are 256 possible values of pixel. Hiding
a bit of secret message in the LSB of the pixel will only
change the pixel value with only one difference. This
difference is unnoticeable to human eye to detect. Digital
colour images are typically stored in 24-bit files and use the
RGB (red, green, blue) colour model. Each pixel is
represented by 256 different colour values of red, green and
blue adding upto 16- million combinations, resulting in more
than 16-million colours [5]. For example a grid for 3 pixels
of a 24 bit image can be as follows:
(00101101 00011100 11011100)
(10100110 11000100 00001100)
(11010010 10101101 01100011)
When the letter A, which binary representation is
01000001 and is embedded into the least significant bits of
this part of the image, the resulting grid is as follows:
(00101100 00011101 11011100)
(10100110 11000100 00001100)
(11010010 10101101 01100011)
Although the letter was embedded into the first 8 bytes of
the grid, only the 2 highlighted bits need to be changed
according to the embedded message. On average only half of
the bit in an image will need to be modified to hide a secret
message using the maximum cover size.
This paper is designed to embed the text into the video
signal and to convert the text data into the binary format.
Binary conversions is done by taking the ASCII value of the
character and converting those ASCII values into binary
format and takes the binary representation of samples of
cover signal and insert the binary representation of text into
that cover signal.
The LSB bits of video signals are substituted by the binary
bits of data and this encoded signal is called stego signal is
ready for transmission. For the steganography the important
video format is Audio Video Interleave (AVI). The message
to hide is converted into ASCII and then converted into its
binary representation with each word consist of 8 bits. These
bits are substituted in the Least Significant Bits of binary
representation of each image ample [8].
VII. PROPOSED SYSTEM DESIGN
The proposed system design involves two parts sender side
and receiver side. In the sender side (Figure 4), the sender
firstly encrypts the message using RC4 stream cipher. And
then the encrypted message is embedded into the AVI video
with stego key using LSB based video stegnography and then
sent to the receiver.
Secret Key
Plaintext
Encrypt
with RC4
Stego Key
Ciphertext
Embeding
using LSB
Cover
video
Stego
video
Figure 4. Encryption process of system design
In the receiver side (Figure 5), firstly it is extracted the
encrypted message from the AVI video file. After that the
receiver decrypts the message with RC4 key to recover the
original message.
Stego Key
Stego
video
Extracting
using LSB
Secret Key
Ciphertext
Decrypt with
RC4
Plaintext
Cover
video
Figure 5. Decryption Process of System Design
VIII. TEST AND RESULT
The following results are generated by implementing the
proposed system. In this paper, the results are displayed a
series of interface by choosing manuscript.
Figure 6. Welcome Form
Firstly, the user can see the welcome form as main
interface. As figure 6, the user can choose sender side by
clicking Sender on the menu and the encryption processes are
appeared as in Figure 7.
All Rights Reserved © 2014 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR)
Volume 3, Issue6,Mayy 2014
Figure 7. Message Encryption with RC4 Algorithm
The embedding process of ciphertext message into video
(.avi file) is shown in Figure 8. To embed the encrypted
message into the cover AVI file, the user must be put the
stego key and load the message to embed. Moreover, he or
she must be loaded the cover video and choose the place of
the stego video. Finally, when the user click the “ Hide
Message ” button, successfully encrypted message box is
shown.
Figure 10. Message Decryption with RC4 Algorithm
IX. CONCLUSION
Many data from where such as military, hospital, bank and
business need security while communicating between people
and activities. Symmetric encryption algorithms can solve
the problems of the information security with the security
keys. Symmetric key algorithms are faster and easier to be
implemented than the asymmetric key algorithms. In the
proposed system, only text file (.txt) is embedded only in the
AVI video file. As further extensions, this system can be
extended to encrypt other types of text file (pdf, doc), image
file, video file, audio file etc. Moreover the cover video must
be extended to other types of video file such as MOV, ASF,
MPEG file etc.
X.REFERENCES
[1]
Figure 8. Hiding Message into Cover AVI File
At the receiver site, the encrypted ciphertext is firstly
extracted from the stego video as shown in Figure 9.
Hemant Gupta, Dr. Setu Chaturvedi, “ Video Data Hiding Through
LSB Substitution Technique”,Vol.2, Issue 10 (April 2013), Pp 32-39
Issn(e): 2278-4721, Issn(p):2319-6483, Www.Researchinventy.Com
[2] Quentin Galvane, Baptiste Uzel, “Cryptography-RC4 Alogrithm”,
February 18,2012.
[3] A. H. Ouda and M. R. El-Sakka, “A Step Towards Practical
Steganography Systems”, Computer Science Department,
University of Western Ontario, London, Ontario, Canada, ICIAR
2005, LNCS 3656, pp. 1158 – 1166, 2005.
[4] Arup Kumar Bhaumik, Minkyu Choi, Rosslin J.Robles and Maricel
O.Ba Litanas, “Data Hiding in Video”,Vol.2, No.2, June 2009.
[5] NavinN.Mittal, “A Video Steganography Model Based on Least
Significant Bit Insertion Method”, IJCST Vol.3, Issue 2, April-June
2012.
[6] Alaa M.Riad, A., Elminir K.Hamdy, M.,Taha R.Ibrahim,
“EVALUATION OF THE RC4 ALGORITHM AS A SOLUTION
FOR CONVERGE NETWORKS”,Vol.60,No.3,2009,155-160.
[7] Souuav Sen Gupta, S., Gowtam Paul, S., “(Non-) Random Sequences
from (Non-) Random Permutations-Analysis of RC4 Stream Cipher”,
FSE, SAC, 2011.
[8] MrithaRamalingam, “Stegomachine – Video Steganography using
Modified LSB Algorithm”, 2011
[9] http://www.winxdvd.com/resource/avi.htm.
Figure 9. Extraction message from the video file
When the receiver performed decryption process as the
reverse order of the sender site, he or she can get the original
plaintext message as in Figure 10.
[10] S. Suma Christal Mary, “IMPROVED PROTECTION IN VIDEO
STEGANOGRAPHY USED COMPRESSED VIDEO BITSTREAMS”,
(IJCSE) Vol. 02, No. 03, 2010, 764-766.
[11] A.Swathi and Dr.S.A.KJilani, “Video Steganography by LSB
Substitution Using Different Polynomial
Equations”,MadanapalliInstitude of Technology and science,2012
[12] Ms. Monika S. Shirbhate and S.S. Kulkarni, “Hiding and
Extracting Secrete Data in Video File with Noise Compression”,
International Journal Of Computer Science And Applications Vol. 6,
No.2, Apr 2013 ISSN: 0974-1011 (Open Access)
[13] Juhi Saurabh, Asha Ambhaikar, “Audio Steganography using
RPrime RSA and GA Based LSB Algorithm to Enhance Security ”,
All Rights Reserved © 2014 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR)
Volume 3, Issue6, May 2014
International Journal of Science and Research (IJSR), India Online ISSN:
2319-7064
Authors
First Author – Zun Moe Oo,zunmoechaw@gmail.com
Second Author- Su Wai Phyo,
suwaiphyo@gmail.com
All Rights Reserved © 2014 IJSETR