Content uploaded by Gaurav Deep
Author content
All content in this area was uploaded by Gaurav Deep on Nov 11, 2019
Content may be subject to copyright.
lvii
Nishant Sharma, Gaurav Deep
International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 4, Issue 6
June 2015
Padding Byte Stuffing: A Technique to Hide Data in MP3
Nishant Sharma*, Gaurav Deep**
*Student (M.Tech), Deptt. Of Computer Engg, Punjabi University, Patiala
**Asst. Professor, Deptt. Of Computer Engg, Punjabi University, Patiala
Abstract: In today‟s world, secrecy is of utmost importance in almost all fields. When one needs to share
some sensitive information in public networks, it becomes vital that information does not go into wrong
hands. Here, information security plays a major role. Sensitive information communication can be secured by
using either cryptography or steganography. Steganography is a covert communication method for hiding data
in some digital media such as images, audio etc. Hiding secret data using audio files as carrier is known as
“Audio Steganography”. Furthermore, MP3 files being more popular can be good message carriers. With the
advancement in digital audio media, many audio steganography techniques have been developed and also
used. Audio steganography has been used widely by various agencies for sending messages secretly. In this
paper, we devise and implement a technique that hides message in padding bytes of MP3 file. MP3 format has
been discussed in detail, as it is important to have good understanding of MP3 format to work with them. This
technique hides secret message in form of bits in each frame of mp3 file. Frames, which are not padded, are
embedded with message bits .Original and modified signals have been compared over various parameters.
Challenges that are faced with MP3 steganography have also been discussed.
1. Introduction.
Steganography is hiding data within data. It is
the technique to hide secret message inside a
carrier file and is later extracted by its intended
receiver. Steganography takes cryptography a
step further by hiding an encrypted message so
that no one suspects it exists. So any intruder
scanning the files in ideal condition can never
know about existence of the message. As
nobody except the sender and the receiver
knows the existence of the message, it does not
attract unwanted attention. Information security
has two techniques: cryptography and
steganography. Difference between these two
comes from the fact that cryptography is the
study of hiding information, while
steganography deals with composing hidden
messages [10]. Cryptographic methods try to
protect the content of a message, while
Steganography uses methods that would hide
both the message as well as the content.
A good steganography technique should
possess following features:
a. Data should always remain hidden.
b. Secret data should be visible, but
unidentifiable.
c. Data should be directly hidden into
carrier.
d. Hiding data should not compromise the
quality of carrier.
e. Technique should provide better
imperceptibility.
1.1 Audio steganography
When we use audio file as carrier for hiding
secret messages, it is known as “audio
steganography” [4]. Usually due to less
complexity of image files, they are preferred
over audio files.
Fig.1.1 Basic Steganography model
58
Nishant Sharma, Gaurav Deep
International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 4, Issue 6
June 2015
But, this does not mean in any case that audio
files are any less efficient for steganography
purpose. In fact, this makes steganalysis of
audio files more difficult.
Parameters by which efficiency of a audio
steganography technique can be observed are
[11] [13]:
Perceptual transparency: Original cover
file and stego file should look the same.
Robustness: Unintentional attacks such
as resampling should not affect the message.
Capacity: Amount of data that can be
added without compromising perceptual
transparency.
Various techniques for audio steganography
have already been developed [6]. These
techniques, in one way or another, replace
information in the audio file with the secret
message. Techniques related to audio
steganography thus have been discussed under
along with their merits and demerits [1] [10].
Technique
Description
Merits
Demerits
LSB
encoding
LSB of each sample of
audio is replaced with 1
bit of hidden message
Less complex
High bit rate
Easy steganalysis
Prone to resampling
Parity
Coding
File is divided into sample
regions and parity bit of
each region is encoded
according to secret
message.
Signal can be changed
in obtrusive fashion.
Less complex
More encoding choice
Prone to resampling
Phase
coding
Modulate the phase of
cover audio according to
secret message
Needs original signal to
retrieve message
Robust against signal
manipulation
Low signal-to-noise
ratio
Capacity is low
Spread
Spectrum
Data is spread over signal
frequencies.
High robustness
Vulnerability towards
time scale
modification
Echo
hiding
Echo is introduced in the
cover signal to embed
data.
Resilient to lossy data
compression algorithms
Low capacity
Low security
Table 1.1 Audio steganography techniques
MP3 file format
MP3 was released in 1992 as part of the MPEG
model. It refers to layer 3 [highest complexity]
of MPEG – 1 compression mode, which is
optimized to provide best quality at low bit rate
[2]. It was the first audio format, which made
sharing audio files over internet feasible due to
its low size. As after compression, some data
cannot be recovered, so it is considered a lossy
format.
However, it can achieve perceptual lossless
compression [14]. This means that, even if it
loses some bits in compression, it does not
affect the quality of file. As an experiment,
some expert listeners were asked to distinguish
between encoded audio and original audio, but
they could not distinguish between them [3].
MP3 format has been designed to store audio
data, which is different from visual information
stored in images.
Therefore image stegonography techniques
may not always work with audio data.
Furthermore, unlike some image data formats,
mp3 files are compressed and encoded in a very
59
Nishant Sharma, Gaurav Deep
International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 4, Issue 6
June 2015
storage-conscious way. Thus they are not the
best host files for stegonographic data.
Popularity of mp3 format is due to its high
compression ratio of 1/10 [3] [14]. That is, an
original file of size 100 MB can be compressed
to approximate 10 MB in MP3 format without
much difference in quality.
1.2 MP3 file structure
A MP3 file in itself is made up of several
subparts connected together, called MP3
frames. These frames consist of a frame header
and data block. Frame header contains
information about various properties of
particular frame such as bitrate, padding bits,
CRC etc. Frame header consists of a sync word
which indicated the beginning of a frame. Data
block of frame contains audio information in
terms of frequency and amplitude. MP3 file
structure can be better describe with below
figure.
MP3 also consist of tags, which contains
metadata about the file such as artist name,
genre, track length etc. These tags are of two
types; ID3V1 and ID3V2. There is no such
standardized format defined for tags. ID3V1
tags are appended at the end of file, whereas
ID3V2 tags are appended at the start, so
navigation is easy.
Header of each MP3 frame contains
information about frame. So, to know about a
frame, we need to locate the frame, an read its
header. A frame header is of 4 bytes or 32 bits
in length. If we need to represent header in
form of characters with each character
representing different characterstic of frame, a
header can be represented as :
AAAAAAAA AAABBCCD EEEEFFGH
IIJJKLMN
Details of these representations are described in
table 2.
To calculate the size of frame in a MP3 file, we
use the formula:
Frame Length = (144 * Bit Rate / Sample Rate ) + Padding
So, for a MP3 file with bit rate as 128 kbps and
sample rate as 44.1 kHz, frame length would be
418 bytes. But in practice, some frames are of
417 byte length. So, in order to fit the bit rate
exactly, extra byte is added to these frames.
These extra bytes are known as paddings or
padding bytes.
MP3
internal
structure
MP3 header
MP3 data
MP3 header
MP3 data
MP3 header
MP3 data
MP3 header
MP3 data
Single MP3 frame
Fig. 1.2 MP3 File structure
MP3 header
MP3 data
MP3 header
MP3 data
MP3 header
MP3 data
ID3V2 tag
Fig 1.3 Basic representation of ID3V2 tag
60
Nishant Sharma, Gaurav Deep
International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 4, Issue 6
June 2015
Sign
Length
Description
A
11
Frame Sync
B
2
Tells MPEG audio version
00 – Ver. 2.5; 01 – Reserved; 10 –
Ver. 2; 11 – Ver. 1
C
2
Tells MPEG layer
00 – Reserved; 01 – Layer 3; 10 –
Layer 2; 11 – Layer 1
D
1
Protection bit
0 – CRC Protected; 1 – Not
Protected
E
4
Describes bit rate
F
2
Tells sampling rate
G
1
Tells if frame is padded or not
0 – Not padded1 – Padded
H
1
Private bit. Only informative
I
2
Tells channel mode
00 – Stereo; 01 – Joint stereo; 10 –
Dual channel; 11 – Single channel
J
2
Mode extension(only used in joint
stereo)
K
1
Copyright
0 – Not copyrighted; 1 –
Copyrighted
L
1
Whether it is a copy or original
0 – Copy; 1 – Original
M
2
Rarely used. Used to indicate
decoder that file should be re-
equlized.
Table 1.2 MP3 frame header bytes
2. Proposed Methodology
In MP3 files, Data hiding can be performed at
three stages. These are:
1. Embedding before compression
2. Embedding during compression
3. Embedding after compression
The proposed technique comes under third
category. There has been very less research
done in embedding after compression. This is
due to the fact that it may affect the quality of
sound. Also, due to embedding after
compression, it cannot achieve a good spread of
data steganography. Embedding before and
during compression poses a serious threat to
data security, as data may get corrupted. But
after compression techniques do not replace
any data, it adds bits to it.
The technique proposed in this paper uses
padding byte stuffing technique for data hiding.
As explained earlier, padding bytes are added
to the frames to even out the frame rate.
Methodology is explained in the diagram on
next page.
As explained in the flow chart, we input a mp3
file, and look for the start of first frame header.
From here, knowing the frame size from the
formula, we can divide the file into frames.
After this, we look at each frame header, and
look for „G‟ or padding bit in frame header.
Those frames with padding bit set as „0‟, are
unpadded frames and others are padded frames.
As 1 byte padding can be added to each
unpadded frame, we can embed a message as
long as number of available unpadded frames.
So, secret message size is calculated in bytes,
and it is compared with number of unpadded
frames.
If message size exceeds the number of
unpadded frames, then this scheme cannot be
applied.
But, if message size is less than or equal to
number of unpadded frames, message will be
embedded into frames. One byte is to be added
to each frame. Here, we are making an
assumption that padding is always added at the
end of frame. As whole message is embedded,
we join frames together and recreate MP3 file
that stores our secret message.
61
Nishant Sharma, Gaurav Deep
International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 4, Issue 6
June 2015
Fig 2.1 Proposed work methodology
3. Experimental results
After implementing the technique, we tested it
with a set of audio files with different
specification. We plotted both original and
stedo-file and compared them against each
other. We find that there is no significant
alteration visible with the signal. Also, on
playing both files, we could not find any noise
present. Test results for various files are
presented in below table:
File
MSE
RMSE
PSNR
SNR
Test1.mp3
0.0157
0.1255
66.1582
1.0064
Test2.mp3
3.5018e-05
0.0059
92.6879
1.0032
Test3.mp3
2.1052e-06
0.0015
104.8979
0.9981
Test4.mp3
8.804e-04
0.0297
78.6858
0.9902
Table 3.1 Different parameters for diff. test
MP3 file
Fig 3.1 Original test file
Fig 3.2 Stego test file
As we see both graphs, we do not find any
significant difference among them.
4. Conclusion and Future work
We proposed and implemented a new technique
that hides data inside a mp3 file in the padding
bytes of frames. While doing this, we came to
know about MP3 file structure and were also
struck with many possibilities of data hiding in
MP3 and that they can be a great cover file in
audio steganography. At seeing the results, and
that there is negligible difference among
original and stego-audio, we can conclude that
padding byte stuffing technique is as good as
any other technique. But, certain assumptions
were made while implementing the technique.
First, we assume that padding bytes are
appended at the end of each frame, which may
or may not be true with little documentation
available. This technique can further be
improved in further research with more
knowledge about the MP3 format.
5. References
[1]. Fatiha Djebbar, Beghdad Ayad, Karim Abed
Meraim and Habib Hamam, “Comparative
study of digital audio steganography
techniques”, EURASIP Journal on Audio,
Speech, and Music Processing 2012
Yes
No
Input MP3 file
Locate first frame
header
Calculate Frame size
and number of frames
Read each frame header
and check for padding
bit
Number of
unpadded
frames >
message
length
Calculate number of
padded and unpadded
frames
Input secret message
Calculate size in bytes
Embed one byte of message
to each frame at the end.
Join all frames and
reconstruct MP3
Output –
Stego audio
62
Nishant Sharma, Gaurav Deep
International Journal of Innovations & Advancement in Computer Science
IJIACS
ISSN 2347 – 8616
Volume 4, Issue 6
June 2015
[2]. Mohammed Salem Atoum, Subariah Ibrahim,
Ghazali Sulong3 and Ali M-Ahmad, “MP3
steganography : review”, IJCSI, Nov. 2012
[3]. Mohammed Salem Atoum, Subariah Ibrahimn,
Ghazali Sulong, Akram Zeki, Adamu
Abubakar, “Exploring the challenges of mp3
steganography”, International Conference on
Advanced Computer Science Applications and
Technologies, 2013
[4]. Rohit Tanwar, Monika Bisla, “Audio
Steganography”, ICROIT 2014
[5]. Ritej Gaba, Gaurav Deep, “Comparison of
various video steganography techniques”,
IJAIR 2013
[6]. Huynh Ba Dieu, Nguyen Xuan Huy, “An
Improved Technique for Hiding Data in
Audio”, IEEE 2014
[7].Neha Gupta, Ms. Nidhi Sharma, “ DWT and
LSB based audio steganography”, ICROIT
2014
[8]. Xuping Huang, Ryota Kawashima, Norihisa
Segawa, Yoshihiko Abe, “Design and
implementation of synchronized audio to audio
steganography scheme”, IEEE 2008
[9]. James C. Judge, “Steganography: past, present
and future”, SANS institute
[10]. Ashima Wadhwa, “A survey on audio
steganography techniques for digital data
security”, IJARCSSE April 2014
[11]. Jasleen Kaur, Deepankar Verma,
“Steganography techniques – A review paper”,
IJERMT 2014
[12]. Shaveta Mahajan, Arpinder Singh, “A review
of methods and approach for secure
steganography”, IJARCSSE 2012
[13]. Yunura Azura Yunus, Salwa Ab Rahman,
Jamaludin Ibrahim, “Steganography: A Review
of Information Security Research and
Development in Muslim World”, AJER 2013
[14]. Joebert S. Jacaba, “AUDIO COMPRESSION
USING MODIFIED DISCRETE COSINE
TRANSFORM: THE MP3 CODING
STANDARD”, Department of Mathematics
College of Science The University of the
Philippines Diliman, Quezon City