Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

Steganographic Encrypted Communication

Through Audio And Image For Defense


And Intelligence Applications
(MAJOR PROJECT DISSERTATION)
Submitted in partial fulfilment of THE
Requirements for the award of the degree
Of
Bachelor of technology In
Electronics & communication engineering

By:SURYA PRAKASH PATTANAYAK (ECE=4TH YR)


SAURABH BALYAN ( ECE=4TH YR)
To
Project Coordinators
Mr. Pawan Kumar

Ms. Chanpreet Kaur

Mr. Gurmeet Singh

DEPARTMENT OF ELECTRONICS &COMMUNICATION ENGINEERING


GURU TEGH BAHADUR INSTITUTE OF TECHNOLOGY
GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY NEWDELHI
2011-2015

DECLARATION
This is to certify that the project report entitled Steganographic encrypted
communication through audio and image for defense and intelligence applications
, which is submitted by us in partial fulfillment of the requirement for the award of
B.Tech degree, in Electronics and Communication to Guru Tegh Bahadur Institute of
Technology, Delhi comprises only our original work and due acknowledgement has
been made in the test to all other material used.
Date:

SURYA PRAKASH PATTANAYAK (UNIV ID=07876802811)

SAURABH BALYAN (UNIV ID=06376802811)

CERTIFICATE
This is to certify that the project report entitled steganographic encrypted
communication

through

audio

and

image

for

defense

and

intelligence applications, which is submitted by Mr. SURYA PRAKASH


PATTANAYAK (07876802811),Mr. SAURABH BALYAN (06376802811),in
partial fulfillment of the requirement for the award of B.Tech degree, in Electronics
and Communication to Guru Tegh Bahadur Institute of Technology, Delhi is a
record of the candidates own work carried out by him under our supervision and
guidance. The matter embodied in this thesis is original work and to the best of my
knowledge and belief the material has not been submitted elsewhere for the award of
any other degree.
Place: New Delhi
Date:

Mr. Pawan Kumar


(Project Co-ordinator)

Ms. Chanpreet Kaur Bhasin


(Project Co-ordinator)

Prof. Amrik Singh

Mr. Vaneet Singh

(Overall Project Co-ordinator)

(HOD, ECE)

Mr. Gurmeet Singh


(Project Co-ordinator)

ACKNOWLEDGEMENT
Setting an endeavor may not always be an easy task; obstacles are bound to come in
its way and when this happens, help is welcome and needless to say without help of
those people whom we are mentioning here, this endeavor would not have been
successful. We are very much thankful for the precious contribution of our
coordinators Mr. Pawan Kumar ,Ms. Chanpreet Kaur Bhasin, Mr. Gurmeet
Singh, Prof. Amrik Singh who provided all their possible help. We would also like to
thank our H.O.D. Mr. Vaneet Singh for his constant support and encouragement. The
successful completion of this project has been possible due to sincere co-operation,
guidance and timely advice from all the fore mentioned, who devoted their utmost cooperation in this project work.

SURYA PRAKASH PATTANAYAK

SAURABH BALYAN

ABSTRACT
Steganography is an art of sending hidden data or secret messages over a public channel
so that a third party cannot detect the presence of the secret messages. The goal of
steganography is different from classical encryption, which seeks to conceal the
content of secret messages; steganography is about hiding the very existence of
the secret messages.
Modern steganography is generally understood to deal with electronic media
rather than physical objects. There have been numerous proposals for protocols to
hide data in channels containing pictures, video, audio and even typeset text. This
makes sense for a number of reasons. First of all, because the size of the information
is generally quite small compared to the size of the data in which it must be hidden
(the cover text), electronic media is much easier to manipulate in order to hide data
and extract messages. Secondly, extraction itself can be automated when the data
is electronic, since computers can efficiently manipulate the data and execute the
algorithms necessary to retrieve the messages. Electronic data also often includes
redundant, unnecessary and unnoticed data spaces which can be manipulated in order
to hide messages.
A steganographic method of embedding textual information in an audio and
image file is presented in this project. In the proposed technique, first the audio file is
sampled and then an appropriate bit of each alternate sample is altered to embed the
textual information. As a steganographic approach the perceptual quality of the host
audio signal was not to be degraded.

LIST OF FIGURE
FIGURE

FIGURE NAME

PAGE

NO
2.3.1

Parity coding procedure

2.3.2

The signals before and after Phase coding procedure

11

2.3.3

Spread Spectrum Encoding


Synthesized spread spectrum information encoded by the direct sequence

12

2.3.4
2.3.5

NO
9

Echo Hiding

13
14

3.2

.WAV File Format

17

3.3.1

Block Diagram of Embedding

19

3.3.2

Block Diagram of Extraction

20

List of Abbreviations:
WAV: Windows Audio Visual
AIFF: Audio Interchange File Format log scale 8bit mlaw
MP3: Motion Picture Experts Group Layer III
HAS: Human auditory system.
LSB: least significant bits
Varagout: variable length o/p argument list allows any no of o/p argument from a function.

varargin:Variable length i/p argument list allows any no of arguments to a function.


singleton: GUI allows only one instance to run.
GUIDE: Graphical user interface design environment.
nargin: no of function i/p arguments.
ischar(s): returns 1 if s is a character array & 0 otherwise.
str2 function: construct a function handle from function name string.
nargout: no of function o/p arguments.
Fname: filename.
Pname: pathname.
y:sampled data
fs: sample frequency (Hz)
nbit: no of bits per sample
opts: additional information

CONTENT
Chapters No

Title
INTRODUCTION
1.1
1.2
1.3
1.4

Introduction
History of Steganography
Cryptography v/s Steganography
Steganography Detection Tools

2.1
2.1.1
2.1.2
2.2
2.2.1
2.2.2

2
2.3

2.3.1
2.3.2
2.3.3
2.3.4

3.1
3.2
3.3

SYSTEM DESIGN
Why .WAV?
Wave File Format Specifications
LSB Coding
3.3.1 Algorithm (For Embedding of Data) and Block Diagram
3.3.2 Algorithm (For Extracting of Data) and BlockDiagram
IMPLEMENTATION AUDIO STEGANOGRAPHY
Flowchart for Encryption & Algorithm
Flowchart for Decryption & Algorithm
INSTRUCTIONS USED
Development on MATLAB

4.1
4.2
4.3
4.4

5.1
5.2
5.3
5.4

STEGANOGRAPHIC TECHNIQUES
Text Steganography Algorithms
Line Shit Coding
Word Shift Coding
Image Steganography algorithms
Least significant bit encoding:
Digital Watermarking:
Audio Steganography Algorithms
Parity Coding
Phase Coding
Spread Spectrum
Echo Hiding

IMAGE STENOGRAPHY
Algorithm (For Embedding of Data) and Block Diagram
Algorithm (For Extracting of Data) and BlockDiagram
Matlab code
RESULT AND SCREEN-SHOT
APPLICATION

6.1

7.1

8.1
8.2

Applications

Page No
1
2
3
4
4
5
6
6
6
7
7
7
7
7
8
9
10
11
12
13
13
14
15
17
18
20
22
23-27
28
29
30
32
35
38
39-42

ADVANTAGE & DISADVANTAGE


Advantages & Disadvantages
7.1.1 Advantages
7.1.2 Disadvantages

43
44
44
44

CONCLUSION & FUTURE SCOPE


Conclusion
Future Scope
Appendix
Bibliography

45
46
46
47
52

Work hard for what you want because it won't


come to you without a fight. You have to be
strong and courageous and know that you can
do anything you put your mind to. If somebody
puts you down or criticizes you, just keep on
believing in yourself and turn it into something
positive.
Leah LaBelle

CHAPTER 1
INTRODUCTION

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 1

1.1 INTRODUCTION
Currently the fast improvement of the Internet and the digital information revolution caused major changes
in the overall culture. In modern communication system Data Hiding is most essential for Network Security
issue. The internet has also encouraged a number of audio applications like internet telephony, voice query
and assistance on the net and voice activated web sites. Music is another subject of interest worldwide and
reaches its audience as audio files or internetradio broadcasts (apart from conventional radio and television).
Audio traffic on the internet is increasing at a high rate. Therefore, choosing audio as a cover media is quite
obvious for data hiding. Popular audio formats on the internet are the WAV (Windows Audio Visual), AIFF
(Audio Interchange File Format), log scale 8bit mlaw and MP3 (Motion Picture Experts Group Layer III).
Data rates supported vary from 8 kbps to 44.1 kbps. Audio hiding techniques rely on the weakness of the
human auditory system (HAS).
Hiding information inside audio is a popular technique now a day. Audio data hiding can be used any time
you want to hide data. There are many reasons to hide data but most important is to prevent unauthorized
persons from becoming aware of the existence of a message. Data hiding in the least significant bits (LSBs)
of audio samples in the time domain is one of the simplest algorithms with very high data rate of additional
Information. In this project, we will present general principles of data hiding basic terminology, and an
overview of applications and techniques.
In particular we will consider data hiding within audio signals, basic requirements and the state of
the art techniques. We will propose a novel technique with several variations. The proposed method is
characterized by perfect transparency, robustness, high bit rate, low processing load, and, particularly, high
security.

1.2 HISTORY OF STEGANOGRAPHY

The first description of the use of steganography dates back to the Greeks. Herodotus tells how a
message was passed to the Greeks about Xerses' hostile intentions underneath the wax of a writing
tablet, and describes a technique of dotting successive letters in a cover text with a secret ink, due to
Aeneas the Tactician.
Pirate legends tell of the practice of tattooing a secret information, such as a map, on the head of
someone, so that the hair would conceal it.
Kahn tells of a trick used in China of embedding a code ideogram at a prearranged position in a
dispatch; a similar idea led to the grille system used in medieval Europe, where a wooden template
would be placed over a seemingly innocuous text, highlighting an embedded secret message.
During WWII the grille method or some variants were used by spies. In the same period, the
Germans developed microdot technology, which prints a clear, good quality photograph shrinking it
to the size of a dot.
There are rumors that during the 1980's Margareth Thatcher, then Prime Minister in UK, became so
irritated about press leaks of cabinet documents, that she had the word processors programmed to
encode the identity of the writer in the word spacing, thus being able to trace the disloyal ministers.
During the "Cold War" period, US and USSR wanted to hide their sensors in the enemy's facilities.
These devices had to send data to their nations, without being spotted.
Among the first ones there is war telecommunications, which use spread spectrum or meteor scatter
radio in order to conceal both the message and its source.
In the industry market, with the advent of digital communications and storage, one of the most
important issues is copyright enforcement, so digital watermarking techniques are being developed
to restrict the use of copyrighted data.
Another important use is to embed data about medical images, so that there are no problems with
matching patient's records and images.
Among illegal ones is the practice of hiding strongly-encrypted data to avoid controls by
cryptography export laws.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 2

1.3 CRYPTOGRAPHY V/S STEGANOGRAPHY


The study of hiding information is called Cryptography. When communicating over an untrusted medium
such as internet, it is very important to protect information and Cryptography plays an important role in this.
Today, cryptography uses principles from several disciplines such as mathematics, computer science, etc.
Steganography deals with composing hidden messages so that only the sender and the receiver know that the
message even exists. Since, nobody except the sender and the receiver knows the existence of the message,
it does not attract unwanted attention.
What is Cryptography?
Cryptography is the study of hiding information and it is used when communicating over an untrusted
medium such as internet, where information needs to be protected from other third parties. Modern
cryptography focuses on developing cryptographic algorithms that are hard to break by an adversary due to
the computational hardness therefore could not be broken by a practical means. In the modern cryptography,
there are three types of cryptographic algorithms used called Symmetric key cryptography, Public-key
cryptography and hash functions. Symmetric key cryptography involves encryption methods where both the
sender and the receiver share the same key used to encrypt the data. In Public-key cryptography, two
different but mathematically related keys are used. Hash functions does not use a key, instead they compute
a fixed length hash value from the data. It is impossible to recover the length or the original plain text from
this hash value.
What is Steganography?
Steganography deals with composing hidden messages so that only the sender and the receiver know that the
message even exists. Since nobody except the sender and the receiver knows the existence of the message, it
does not attract unwanted attention. Steganography was used even in ancient times and these ancient
methods are called Physical Steganography. Some examples for these methods are messages hidden in
messages body, messages written in secret inks, messages written on envelopes in areas covered by stamps,
etc. Modern Steganography methods are called Digital Steganography. These modern methods include
hiding messages within noisy images, embedding a message within random data, embedding pictures with
the message within video files, etc. Furthermore, Network Steganography is used in telecommunication
networks. This includes techniques like Steganophony (hiding a message in Voice-over-IP conversations)
and WLAN Steganography (methods for transmitting Steganograms in Wireless Local Area Networks).
What is the difference between Cryptography and Steganography?
Cryptography is the study of hiding information, while Steganography deals with composing hidden
messages so that only the sender and the receiver know that the message even exists. In Steganography, only
the sender and the receiver know the existence of the message, whereas in cryptography the existence of the
encrypted message is visible to the world. Due to this, Steganography removes the unwanted attention
coming to the hidden message. 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. By combining
Steganography and Cryptography one can achieve better security.

1.4 STEGANOGRAPHY DETECTION TOOLS


This article has a stated focus on the practicing computer forensics examiner rather than the
researcher. This section, then, will show some examples of currently available software that can detect the
presence of steganography programs, detect suspect carrier files, and disrupt steganographically hidden
messages. This is by no means a survey of all available tools, but an example of available capabilities.
As the research shows, many steganography detection programs work best when there are clues as to
the type of steganography that was employed in the first place. Finding steganography software on a
computer would give rise to the suspicion that there are actually steganography files with hidden messages
on the suspect computer. Furthermore, the type of steganography software found will directly impact any
subsequent steganalysis (e.g., S-Tools might direct attention to GIF, BMP, and WAV files, whereas JP
Hide-&-Seek might direct the analyst to look more closely at JPEG files).
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 3

The second important function of steganography detection software is to find possible carrier files.
Ideally, the detection software would also provide some clues as to the steganography algorithm used to hide
information in the suspect file so that the analyst might be able to attempt recovery of the hidden
information.
There are more than 100 steganography programs currently available, ranging from free downloads
to commercial products. The most common among them are:
Gif-It-Up, a Nelsonsoft program, JP Hide-&-Seek (JPHS) by Allan ,S-Tools, a program by Andy Brown that
can hide information inside GIF, BMP, and WAV files.
This section will show a simple steganography example by hiding an 11,067-byte GIF map of the
Burlington, Vermont, airport.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 4

CHAPTER 2
STEGANOGRAPHIC Techniques

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 5

STEGANOGRAPHIC METHODS
The word steganography is of Greek origin and means covered writing. The objective of steganography is
to hide a secret message within a cover-media in such a way that others cannot make out the presence of the
hidden message. The following formula provides a very generic description of the pieces of the
steganographic process:
Cover medium + hidden data + stego key = stego medium
In this context, the cover medium is the file in which we will hide the hidden data, which may also be
encrypted using the stego key. The resultant file is the stego medium (which will, of course. be the same
type of file as the cover medium). The cover medium (and, thus, the stego_medium) is typically image or
audio files.

Types Of Steganographic Algorithms


There are various types of steganographic algorithms used today. For simplification these steganographic
algorithms are classified based on the medium (cover) they use to embed secret data. The following are the
various types of Steganographic algorithms

2.1 Text Steganography Algorithms:


2.1.1 Line-shift encoding:
It involves actually shifting each line of text vertically up or down by as little as 3 centimeters.
Depending on whether the line was up or down from its initial position it would equate to a value that would
or could be encoded into a secret message.
2.1.2 Word-shift encoding:
It works in much the same way that line-shift encoding works, the only difference is that, in this the
horizontal spaces between words is used to equate a value for the hidden message. This method of encoding
is less visible than line-shift encoding but requires that the text format should support variable spacing. Text
based encoding methods require either the original file or the knowledge of the original files formatting to
be able to decode the secret message of the human visual system (HVS). Almost any plain text, cipher text,
image and any other media that can be encoded into a bit stream can be hidden in a digital image.

2.2 Image Steganography algorithms:


In the digital world of today this type of encoding is widely accepted. This is because it can take
advantage of the limited power of human vision. When dealing with digital images for use with
Steganography, 8-bit and 24-bit per pixel image files are typical. Both have advantages and disadvantages,
as we will explain below.8-bit images are a great format to use because of their relatively small size. The
drawback is that only 256 possible colors can be used which can be a potential problem during encoding.
24-bit images offer much more flexibility when used for Steganography. The large numbers of colors (over
16 million) that can be used go well beyond the human visual system (HVS), which makes it very hard to
detect once a secret message, has been encoded. The other benefit is that a much larger amount of hidden
data can be encoded into a 24-bit digital image as opposed to an 8-bit digital image. The one major
drawback to 24-bit digital images is their large size (usually in MB) makes them more suspect than the much
smaller 8-bit digital images (usually in KB) when sent over an open system such as the Internet. Digital
image compression is a good solution to 24-bit digital images but it has drawback that the possibility of the
uncompressed secret message to lose parts of its contents.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 6

2.2.1 Least significant bit (LSB) encoding:


It is by far the most popular of the coding techniques used for digital images. By using the LSB of
each byte (8 bits) in an image for a secret message, you can store 3 bits of data in each pixel for 24-bit
images and 1 bit in each pixel for 8-bit images.
2.2.2 Digital Watermarking:
This technique actually extends an image data by masking the secret data over the original data as
opposed to hiding information inside of the data.

2.3Audio Steganography Algorithms:


A number of different cover objects (signals) can be used to carry hidden messages. Data hiding in
audio signals exploits imperfection of human auditory system known as audio masking. In presence of a
loud signal (masker), another weaker signal may be inaudible, depending on spectral and temporal
characteristics of both masked signal and masker. Masking models are extensively studied for perceptual
compression of audio signals. In the case of perceptual compression the quantization noise is hidden below
the masking threshold, while in a data hiding application the embedded signal is hidden there.
Data hiding in audio signals is especially challenging, because the human auditory system operates
over a wide dynamic range. The human auditory system perceives over a range of power greater than one
billion to one and a range of frequencies greater than one thousand to one.
Sensitivity to additive random noise is also acute. The perturbations in a sound file can be detected as
low as one part in ten million (80 dB below ambient level). However, there are some holes available.
While the human auditory system has a large dynamic range, it has a fairly small differential range. As a
result, loud sounds tend to mask out quiet sounds. Additionally, the human auditory system is unable to
perceive absolute phase, only relative phase. Finally, there are some environmental distortions so common
as to be ignored by the listener in most cases. Now we will discuss many of these methods of audio data
hiding technology.
2.3.1Parity Coding:
One of the prior works in audio data hiding technique is parity coding technique. Instead of breaking
a signal down into individual samples, the parity coding method breaks a signal down into separate regions
of samples and encodes each bit from the secret message in a sample region's parity bit. If the parity bit of a
selected region does not match the secret bit to be encoded, the process flips the LSB of one of the samples
in the region. Thus, the sender has more of a choice in encoding the secret bit, and the signal can be changed
in a more unobtrusive fashion. Figure 2.3.1, shows the parity coding procedure.

Figure2.3.1: Parity coding procedure


2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 7

2.3.2 Phase Coding:


The phase coding method works by substituting the phase of an initial audio segment with a reference
phase that represents the data. The phase of subsequent segments is adjusted in order to preserve the relative
phase between segments. Phase coding, when it can be used, is one of the most effective coding methods in
terms of the signal-to perceived noise ratio. When the phase relation between each frequency component is
dramatically changed, noticeable phase dispersion will occur. However, as long as the modification of the
phase is sufficiently small (sufficiently small depends on the observer; professionals in broadcast radio can
detect modifications that are unperceivable to an average observer), an inaudible coding can be achieved.
Phase coding relies on the fact that the phase components of sound are not as perceptible to the human ear as
noise is. Rather than introducing perturbations, the technique encodes the message bits as phase shifts in the
phase spectrum of a digital signal, achieving an inaudible encoding in terms of signal-to-perceived noise
ratio.
Phase coding is explained in the following procedure:
i.
ii.
iii.
iv.

v.
vi.

The original sound signal is broken up into smaller segments whose lengths equal the size of the
message to be encoded.
A Discrete Fourier Transform (DFT) is applied to each segment to create a matrix of the phases and
Fourier transform magnitudes.
Phase differences between adjacent segments are calculated.
Phase shifts between consecutive segments are easily detected. In other words, the absolute phases
of the segments can be changed but the relative phase differences between adjacent segments must
be preserved. Therefore the secret message is only inserted in the phase vector of the first signal
segment as follows:
A new phase matrix is created using the new phase of the first segment and the original phase
differences.
Using the new phase matrix and original magnitude matrix, the sound signal is reconstructed by
applying the inverse DFT and then concatenating the sound segments back together.

To extract the secret message from the sound file, the receiver must know the segment length. The
receiver can then use the DFT to get the phases and extract the information (consider Figure 2.3.2 for phase
coding procedure).

Figure 2.3.2: The signals before and after Phase coding procedure
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 8

2.3.3

Spread Spectrum:
In a normal communication channel, it is often desirable to concentrate the information in as narrow
a region of the frequency spectrum as possible in order to conserve available bandwidth and to reduce
power. The basic spread spectrum technique, on the other hand, is designed to encode a stream of
information by spreading the encoded data across as much of the frequency spectrum as possible. This
allows the signal reception, even if there is interference on some frequencies. While there are many
variations on spread spectrum communication, we concentrated on Direct Sequence Spread Spectrum
encoding (DSSS). The DSSS method spreads the signal by multiplying it by a chip, a maximal length
pseudorandom sequence modulated at a known rate. Since the host signals are in discrete-time format, we
can use the sampling rate as the chip rate for coding. The result is that the most difficult problem in DSSS
receiving, that of establishing the correct start and end of the chip quanta for phase locking purposes, is
taken care of by the discrete nature of the signal. Consequently, a much higher chip rate, and therefore a
higher associated data rate, is possible. Without this, a variety of signal locking algorithms may be used, but
these are computationally expensive.
Procedure: In DSSS, a key is needed to encode the information and the same key is needed to decode
it. The key is pseudorandom noise that ideally has flat frequency response over the frequency range, i.e.,
white noise. The key is applied to the coded information to modulate the sequence into a spread spectrum
sequence.
DSSS method: The code is multiplied by the carrier wave and the pseudorandom noise sequence, which has
a wide frequency spectrum. As a consequence, the spectrum of the data is spread over the available band.
Then, the spread data sequence is attenuated and added to the original file as additive random noise (see
Figure 2.3.3. DSSS employs bi-phase shift keying since the phase of the signal alternates each time the
modulated code alternates. For decoding, phase values f0 and f0 + p are interpreted as a 0 or a 1, which
is a coded binary string. Spread Spectrum is shown in Figure 2.3.4

Fig
ure
2.3.
3: Spread Spectrum Encoding
In the decoding stage, the following is assumed:
I.
The pseudorandom key is maximal (it has as many combinations as possible and does not repeat for
as long as possible). Consequently it has a relatively flat frequency spectrum.
II. The key stream for the encoding is known by the receiver. Signal synchronization is done, and the
start/stop point of the spread data is known.
III. The following parameters are known by the receiver: chip rate, data rate, and carrier frequency.
2.3.4 Echo hiding:
In echo hiding, information is embedded in a sound file by introducing an echo into the discrete
signal. Like the spread spectrum method, it too provides advantages in that it allows for a high data
transmission rate and provides superior robustness when compared to the noise inducing methods. If only
one echo was produced from the original signal, only one bit of information could be encoded. Therefore,
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 9

the original signal is broken down into blocks before the encoding process begins. Once the encoding
process is completed, the blocks are concatenated back together to create the final signal.
Echo Hiding is shown in Figure 2.3.5. Also, a message can be encoded using musical tones with a
substitution scheme. For example, a Fistone will represent a 0 and a C tone represents a 1. A normal musical
piece can now be composed around the secret message or an existing piece can be selected together with an
encoding scheme that will represent a message.

Figure 2.3.4. Synthesized spread spectrum information encoded by the direct sequence method

Figure 2.3.5: Echo Hiding

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 10

CHAPTER 3
SYSTEM DESIGN

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 11

3.1 Why .WAV?

Why .WAV?

Most popular Audio format

Dont lose any quality in


recording
Easier format for
Development

No Compression
3.2 Wave File Format Specifications
File Description: WAVE or RIFF WAVE sound file
File Extension: Commonly .wav, sometimes .wave

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 12

Figure 3.2: .WAV File Format

3.3 LSB CODING:


In the current endeavor, an audio file with .wav extension has been selected as host file. It is assumed that
the least significant bits of that file should be modified without degrading the sound quality.
To do that, first one needs to know the file structure of the audio file. Like most files, WAV files
have two basic parts, the header and the data. In normal wav files, the header is situated in the first 44 bytes
of the file. Except the first 44 bytes, the rest of the bytes of the file are all about the data. The data is just one
giant chunk of samples that represents the whole audio. While embedding data, one cant deal with the
header section. That is because a minimal change in the header section leads to a corrupted audio file.
A program has been developed which can read the audio file bit by bit and stores them in a different
file. The first 44 bytes should be left without any change in them because these are the data of the header
section.
Then start with the remaining data field to modify them to embed textual information. For example,
if the word Audio has to be embedded into an audio file one has to embed the binary values of the word
Audio into the audio data field.
Consider the following table:
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 13

From the table, one can come to a point that to embed the word Audio into the host audio file
actually the corresponding eight bit binary values have to be embedded into the data field of that audio file.
To develop this algorithm multiple bits of each sample of the file have been changed or modified to
insert text data in it. It has also been observed the degradation of the host audio file after modification of the
bits. The bit modification was done by various ways, like 1, 2, 3, 4 bits were changed in turn. But after going
through all the modification it has been observed that 1 bit change in LSB gave the best result. Thus, data
can be embedded according to the following algorithm.
TABLE I
Letters with ASCII Values and Corresponding Binary Values
Letter

ASCII Value

Corresponding Binary Value

065

01000001

117

01110101

100

01100100

105

01101001

111

01101111

3.3.1 Steps (For Embedding of Data):


1.
Leave the header section of the audio file untouched.
2.
Start from a suitable position of the data bytes. (For the experiment purpose the present start byte
was the 45th byte). Edit the least significant bit with the data that have to be embedded.
3.
Take every alternate sample and change the least significant bit to embed the whole message. The
data retrieving algorithm at the receivers end follows the same logic as the embedding algorithm.
Secret Text

Embedding Process
LSB of the Data
Part

Audio Input

Separate Header
and Data

Stego Audio

Alternate Samples
of LSB Data

Figure 3.3.1: Block Diagram for Embedding

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 14

3.3.2 Steps (For Extracting of Data):


1.
Leave first 44 bytes.
2.
Start from the 46th byte and store the least significant bit in a queue.
3.
Check every alternate sample and store the least significant bit in the previous queue with a left shift
of the previous bit.
4.
Convert the binary values to decimal to get the ASCII values of the secret message.
5.
From the ASCII find the secret message.

Extraction Process

Store LSB of
Data Part

Stego Audio

Separate Header
and Data

Convert Binary to
ASCII

Left Shift of
Previous bit

Extracted Text

Figure 3.3.2: Block Diagram for Extracting


An audio file named audio.wav has been selected for this experiment. After checking the binary
values of each sample, first 44 samples were left without any changes. The data embedding with LSB
modification has been started after the header section. If the data embedding process is started from 45th
sample then the LSB value of the 45th sample should be modified. If the binary value of the corresponding
sample is 01110100 then 1 should be modified. From Table I it can be observed that to embed the letter
A, the sender has to embed the binary value 01000001. That is why according to the embedding
algorithm A should be embedded according to Table II.
According to the same way the remaining consecutive letters of the word Audio is embedded in
the file audio.wav. Editing of the existing binary values with the intended binary values causes a minimal
change in the audio file audio.wav that remains almost imperceptible to anyone other than the sender.
When it comes to the point of data retrieving at the receivers end, the retrieving algorithm has to be
followed: First, change the audio message into binary format that has come from the source as stego-object.
Leave first 44 bytes with no change in them.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 15

TABLE II
Samples of Audio File with Binary Values before and after Embedding
Sample No.
46
48
50
52
54
56
58
60

Binary values of
corresponding
sample
01110100
01011110
10001011
01111011
10100010
00110010
11101110
01011100

Binary value
to be
embedded
0
1
0
0
0
0
0
1

Binary values
after
modification
01110100
01011111
10001010
01111010
10100010
00110010
11101110
01011101

Start from 46th bit, check the least significant bit, and store it in a queue. Check every alternate
sample to collect the whole messages. Like 48th, 50th and 52th and so on. Store the least significant bits of
the alternate samples in the queue with left shift of previous bit. Convert the binary values to decimal to get
back the ASCII from which the text can be retrieved. The whole retrieval process can be depicted with the
following table more thoroughly.
TABLE III
Extraction of Data from Audio File
Sample No
Binary values with
Bits that are stored in the
embedded secret data
queue
46

01110100

48

01011111

01

50

10001010

010

52

01111010

0100

54

10100010

01000

56

00110010

010000

58

11101110

0100000

60

01011101

01000001

As in Table II the embedding process of the letter A was stated that is why, in Table III, the
retrieval process of A is depicted. Starting from the 46th sample, every alternate sample has been checked
and the least significant bit has been stored into a queue with a left shift of previous bit. After getting all the
bits in the queue, start from the left hand side, take 8 bits and convert them into equivalent decimal to get the
ASCII, from the ASCII retrieve the embedded textual message. From the table, it is clearly observed that
after getting 01000001 in the queue it is converted into the equivalent decimal that is 60, the ASCII of A.
Thus A is retrieved.
Like the same way, the next letters also have been retrieved and hence the complete word Audio.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 16

CHAPTER 4
IMPLEMENTATION

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 17

4.1Flowchart for Encryption


Start

Select a .wav
file as carrier
to hide the text

If Selected
.wav file is
>100KB

B
Add text

Display Message
Message too big, select small message

If text length is more than


no. of samples present in
the selected .wav file

Convert text values to


equivalent ASCII

Convert ASCII to equivalent decimal


value

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 18

Convert Decimal value to


equivalent binary

Leave first 44 bytes of .wav file


untouched

Convert rest of the bytes of


carrier which is of 8 columns

Replace LSB of carrier matrix


with corresponding element of
text vector

B
If all bits of
text are
embedded?
No

Yes
Create a new file containing
the stegano audio

Algorithm for Encrypting:


1.
2.
3.
4.

Select a .wav file as a carrier to hide the text as a message.


Check if the selected .wav file is >100KB.
If the condition is satisfied then open the selected .wav file.
Prepare message text as a binary column vector of 8.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 19

5. If text length is more than the no. of samples present in the selected .wav file then display Message
too big, select small message
6. Skip the first 44 byte of carrier which is address part of .wav file.
7. Replace least significant bit of message carrier matrix with corresponding element of message vector
by converting them from ASCII to decimal and then to equivalent binary.
8. Create a new file to store the modified LSB.
9. Get the stegano audio file as output.

4.2 Flowchart for Decryption


Define a variable to store LSB

Select file containing stegano audio

Leave the first 45 bytes of the audio


stegano untouched

Read LSB from next byte

Store LSB in a variable

Left shift the LSB stored in the


variable and store the new one

If

No

All LSB of stegano audio


are stored in a variable

Yes from the variable to


Convert binary values
equivalent decimal
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

C
Page- 20

Convert the decimal to equivalent


ASCII

Display the Recovered Message

End

Algorithm for Decryption:


1.Define a register or variable to store the LSB.
2.Select a file containing the stegano audio.
3.Leave the first 44 bytes of .wav file untouched as it contains belongs to header.
4.Read LSB from next byte.
5.Store the LSB in the variable defined earlier.
6.Read the next LSB from selected .wav (stegano audio) file.
7.Left shift the stored LSB in the variable and store the newly read LSB.
8.Check if all the LSBs of stegano audio are stored in the pre-defined variable.
9.Then convert the binary values stored in this variable to equivalent decimal.
10.Then after convert these decimal values to ASCII.
11.Check if all the values from the stegano audio file have been converted to ASCII.
12.Display the decrypted message on to the message box.

4.3 INSTRUCTIONS USED


varagout:variable length o/p argument list allows any no of o/p argument from a function.
varargin:Variable length i/p argument list allows any no of arguments to a function. Returns the handle to
audiostegano.m or to existing singleton.
singleton:GUI allows only one instance to run.
GUIDE: Graphical user interface design environment.GUIs are created /edited from FIG files .
nargin:no of function i/p arguments.
ischar(s): returns 1 if s is a character array & 0 otherwise.
str2 function:construct a function handle from function name string.
nargout:no of function o/p arguments.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 21

GUI_main function: support function for creation & callback dispatch of guide GUIs.Each time guide is
called the initialization block builds a structure called gui_state which contain information for accessing
guide function
fieldgui _name(iegui_stategui_name):contains the MATLAB function mfilename which returns the name
of currently executing M-file.If Guide gui object is activated by the user (e.g. button is pressed) the name of
object callback function is added as gui_callback (the callbacks name would have been passed as a string in
varagin (1)).
gui_state: After structure gui_state is formed ,it is passed as an i/p argument along with vargin (:) to
function gui_main .
gui_mainfunc:gui_mainfunchandles guicreation,layout& called dispatch.
The only function a user should modify are as follws:
a)openingfunc
b)callback
Opening & o/p function are passed arguments .
a)hobject:graphics object handle
b)eventdata:reserved for future use .
c) handles:structure that provides handles to interface objects & any application specific or user defined
data. Provides handles for all graphics object. It can be used to access & modify object properties.
set() sets the value of property for graphics objects with handle.
guidata() stores the specified data in figures application data .
callback functions are launched in response to interaction with a fig object or windows.
edit controls have white background on windows.
ISPC returns 1 for windows (PC) 0otherwise.
get function to retrieve information.
isequal() true if arrays are numerically equal.
uigetfile() open file dialog box .
fnamefilename.
pnamepathname.
fnamestring containing name of file selected in dialog box.
Pushbutton1*wavselect a file.
waveread (FILE .[N1 N2]): returns only samples N1 through N2 from each channel in the file
[y,fs,nbits,opts]- y:sampled data, fs: sample frequency (Hz), nbit:no of bits per sample, opts:additional
information.
fread (fidl.40,'unit=>char')
bitget()returns the value of bit at position 1sb in data.
reshape(X,M,N)returns MXN matrix whose elements are taken columnwise from x.
de2.bi(..,N)N defines no of columns
fwrite (fid2,header,'units') writes header to file fid2.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 22

4.4 Development on MATLAB


Step:1
Guide: Graphical User Interface Tools.

Step: 2
Select Wav file (cover signal) for Embedding.

function pushbutton1_Callback(hObject, eventdata, handles)


% hObject
handle to pushbutton1 (see GCBO)

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 23

% eventdata reserved - to be defined in a future version of MATLAB


% handles
structure with handles and user data (see GUIDATA)
value1=get(handles.radiobutton1,'value');
value2=get(handles.radiobutton2,'value');
if value1==1
[handles.fname, handles.pname] = uigetfile('*.wav','Select a file');
set(handles.pushbutton2,'enable','on');
guidata(hObject, handles); %update handle structure
end
if value2==1
set(handles.pushbutton2,'enable','off');
[filename, pathname] = uigetfile('*.wav','Select a file');
[y,fs,nbits,opts]=wavread([pathname filename],[1 2]);
%open the file with hidden text
fid1=fopen([pathname filename],'r');
header=fread(fid1,40,'uint8=>char');
data_size=fread(fid1,1,'uint32');
%read the wave data samples
[dta,count]=fread(fid1,inf,'uint16');
%close the file,only wav data samples are sufficient for extracting the text
fclose(fid1);

Explanation of the above set of code


1. The above set of code would be executed whenever the Select a .wav file button is pressed.
2. Next when the Hide Text button is selected and the Select a .wav file button is pressed then the
code would guide us through path and then file name to select the .wav file.
3. As the above sets of steps are executed it would make the Hide the Text button go enable.
4. Once the Hide the Text button is enabled it reads the selected .wav file and stores first 40 bytes in
the variable named header.
5. The next 41st to 44th bytes are clubbed together to make a single element and is stored in the variable
named data_size.
6. Then close the file, only wav data samples are sufficient for extracting the text.

Step: 3
Encryption:

lsb=1;

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 24

msg=get(handles.edit1,'string');
%get text message from editbox
msg
[ro,co]=size(msg);
ro
co
if ( (ro*co*8+28) > count )
msgbox('Message too big, select small message','Empty');
else
[m_msg,n_msg]=size(msg);
n_msg
m_msg
msg_double=double(msg);
msg_double%convert it to double
msg_bin=de2bi(msg_double,8);
[m,n]=size(msg_bin);
msg_bin
m
n
msg_bin_re=reshape(msg_bin,m*n,1);

%then convert message to binary


%size of message binary

%reshape the message binary in a column

vector
msg_bin_re
m_bin=de2bi(m_msg,10)';
m_bin %
n_bin=de2bi(n_msg,10)';
n_bin
len=length(msg_bin_re);
len
len_bin=de2bi(len,20)';
len_bin

%
%length of message binary

%convert the length to binary

%hide identity in first 8 wav data samples.


identity=[1 0 1 0 1 0 1 0]';
dta(1:8)=bitset(dta(1:8),lsb,identity(1:8));
%hide binary length of message from 9th to 28 th sample
dta(9:18)=bitset(dta(9:18),lsb,m_bin(1:10));
dta(19:28)=bitset(dta(19:28),lsb,n_bin(1:10));
%hide the message binary starting from 29th position of wave data samples
dta(29:28+len)=bitset(dta(29:28+len),lsb,msg_bin(1:len)');
randname=num2str(randint(1,1,[1 2000]));
%open a new wav file in write mode
fid2=fopen(['new' randname '.wav'],'w');
%copy the header of original wave file
fwrite(fid2,header,'uint8');
fwrite(fid2,data_size,'uint32');
%copy the wav data samples with hidden text in new file
fwrite(fid2,dta,'uint16');
fclose(fid2);
msgbox(['Your text is hidden in
set(hObject,'enable','off');

new' randname '.wav file'],'');

end

Explanation of the above set of code


1. Enter text in the edit box.
2. Get text message from edit box.
3. Then convert message to binary.
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 25

4. Reshape the message binary in a column.


5. Calculate length of message binary.
6. Convert the length to binary.
7. Hide identity in first 8 .wav data samples.
8. Hide binary length of message from 9th to 28th sample
9. Hide the message binary starting from 29th position of wave data samples.
10. Open a new .wav file in write mode
11. Copy the header of original wave file
12. Copy the wav data samples with hidden text in new file
13. Your text is hidden in new ' randname '.wav file
14.
Step: 5
Initialize Recover Process

% --- Executes on button press in radiobutton2.


function radiobutton2_Callback(hObject, eventdata, handles)
% hObject
handle to radiobutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of radiobutton2
set(hObject,'value',1);
set(handles.text2,'string','Select a wav file in which text is already hidden');
set(handles.pushbutton2,'enable','off');

Explanation of the above set of code


Recover Text button when enabled select a.wav file in which text is already hidden

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 26

Step: 6
Decryption Process

lsb=1;
identity=bitget(dta(1:8),lsb)';
if identity==[1 0 1 0 1 0 1 0]
%extract the length of text from first 9th to 28th wav data samples
len_bin=zeros(20,1);
m_bin=zeros(10,1);
n_bin=zeros(10,1);
m_bin(1:10)=bitget(dta(9:18),lsb);
n_bin(1:10)=bitget(dta(19:28),lsb);
%convert the length to decimal
%len=bi2de((len_bin)');
m=bi2de(m_bin');
n=bi2de(n_bin');
len=m*n*8;
secmsg_bin=zeros(len,1);
%extract the lsb from wave data sample
secmsg_bin(1:len)=bitget(dta(29:28+len),lsb);
secmsg_bin_re=reshape(secmsg_bin,len/8,8);
secmsg_double=bi2de(secmsg_bin_re); %convert it to binary
secmsg=char(reshape(secmsg_double,m,n)); %convert to char(ASCII)
%size(secmsg)
%secmsg=reshape(secmsg,m,n/8);
set(handles.edit1,'string',secmsg);
else
msgbox('File has no hidden text','Empty');
end

Explanation of the above set of code


1. Extract the length of text from first 9th to 28th wav data samples
2. Convert the length to decimal
3. Extract the LSB from wave data sample
4. Convert it to binary
5. Convert to character (ASCII)
6. If message is empty then display File has no hidden text
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 27

CHAPTER 5
IMAGE STEGANOGRAPHY

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 28

IMAGE STEGANOGRAPHY
A. Image Files
As Duncan Sellars [7] explains To a computer, an image is an array of numbers that represent light
intensities at various points, or pixels and These pixels make up the images raster data.Pixels are
displayed horizontally row by row. In a color scheme, the number of bits is known as the bit depth
and this basically refers to the number of bits assigned to each pixel [1]. Moreover the smallest bit
depth in the color scheme is 8 that is 8- bits are utilized to represent the color of each pixel. Both
Monochrome and gray scale images usually utilize 8 bits for each pixel and such bits are capable of
displaying up to 256 different colors or shades of gray. One morepoint to add is that almost all the
color variation for the pixels of 24-bit image are derived from three basic color
terms: red, green, and blue, and each of these colors is represented by 8-bits [3].Thus, in any given
pixel, the number of different shades of red, green, and blue can reach 256 that adding up to more
than 16 million combinations that finally result in more than 16 million colors. The most prominent
image formats, exclusively on the internet are the GIF, JPEG, and to lesser degree PNG format. The
important issue to touch here is that most of the steganography techniques attempt to exploit the
structure of these formats. However some literary contribution use the bitmap format (BMP) simply
because of its simple and uncomplicated data structure [8] [9].
B. RGB Image Files
The RGB image has 24 bits values per pixel represent by (00000000, 00000000 and 00000000) for
black and (11111111, 11111111 and 11111111) for white pixels. The RGB image is the most suitable
because it contains a lot of information that help in hiding the secret information with a bit change in
the image resolution which does not affect the image quality and make the message more secure. In
this research paper the RGB images are used as a carrier message to hide the secret message by using
new proposed method.

6.1 INTRODUCTION
With the recent advances in computing technology and its intrusion in our day to day life, the need for
private and personal communication has increased. Privacy in digital communication is desired when
confidential information is being shared between two entities using computer communication. To provide
secrecy in communication we use various techniques. One such technique is Steganography [1-2] that is
the art of hiding the fact that communication is taking place, by hiding information in other information.
Classification of stenography techniques based on the cover modifications applied in the embedding
process is as follows:
A. Least significant bit (LSB) method

This approach [3-8] is very simple. In this method the least significant bits of some or all of the bytes
inside an image is replaced with a bits of the secret message.
B. Transform domain techniques

This approach [9-10] embeds secret information in the frequency domain of the signal. Transform domain
methods hide messages in significant areas of the cover image which makes them more robust to attacks
such as: compression, cropping, and some image processing, compared to LSB approach.
C. Statistical methods

This approach [11] encodes information by changing several statistical properties of a cover and uses a
hypothesis testing in the extraction process. The above process is achieved by modifying the cover in such a
way that some statistical characteristics change significantly i.e. if "1" is transmitted then cover is changed
otherwise it is left as such.
D. Distortion technique

In this technique [12-15] the knowledge of original cover in the decoding process is essentail at the
receiver side. Receiver measures the differences with the original cover in order to reconstruct the
sequence of modification applied by sender.
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 29

6.2PROPOSED ALGORITHM
The proposed algorithm includes four parts in it:1. User-defined key This includes the key entered by user to encrypt the message. The key should be an
integer between 0-255. This key will help to provide security to the hidden message because even if third
party will get the stego image he/she cannot extract the message without exact key.
2. Encryption - In this part of algorithm the message is encrypted using key by applying the method of
encryption that is XOR the message binary values with the key and gets the cipher message.
3. Embedding Using embedding algo given below,message is embedding into an image of RGB format.
4. Extraction The message can be extracted if the exact key is known.

6.3 Embedding algorithm


Input: RGB image file, a secret text message, and a key.
Output: Stego image
Begin
Step1: Select the canvas image in which the message will hide into the 255*255 matrix and the message
file (should include characters only) to hide.
Step2: Enter the encryption key to encrypt the message file between 0-255.
Step3: Now convert the message into their ASCII integer values
Step3 (a): Apply header to the beginning of the message (so that at the extraction time it will easy to find
from where our message is starting).
Step3 (b): XOR the binary format of message with the key entered by user.
Step4: convert the message into the image file of the same dimensions.
Step5: Hide the data points using the RGBBGRRG order.
Step5 (a): Hide the data along the columns moving from left to right through the target image.
Step6: Determine whether or not we have reached the end of the image. Then need to move to the
next
column and reset our pattern to the top row.
Step7: step6 will follow until the complete message is hidden into the image.
Step8: Convert the RGB stego file into the bitmap file format.
End

6.4 Extraction algorithm


Input: Import the image with hidden message and the same key will be entered by user when embed the
message
Output: RGB image file and the text message file.
Extraction algorithm follows all the same steps but in reverse order and in the last step the message file and
the image file will save separately.

6.5 PROGRAMMING ENVIRONMENT


The MATLAB is high-performance language for technical computing integrates computation, visualization,
and programming in an easy-to-use environment where problems and solutions are expressed in familiar
mathematical notation. MATLAB is an interactive system whose basic data element is an array that does not
require dimensioning. It allows you to solve many technical computing problems, especially those with
matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar noninteractive language such as C or Fortran. The image processing tool is used to implement the algorithm.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 30

6.6 IMPLEMENTATION RESULTS


This algorithm is implemented using MATLAB 7.6.0 and gives satisfactory results. Figures are shown
below to show the execution results. The message hidde
n in the image is hello how are you

Figure1. Window showing execution of algorithm

Figure2. Cover image to hide the message.

Figure3. Stego image with hidden message


.

Result for the extraction algorithm:As for extraction, image file with hidden message is input and we get two files as output one is text message
file and other is cover image file. Both are shown below:-

Figure4. Stego image with hidden message

2011-2015

Figure5. Text file extracted from stego image.

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 31

6.7 MATLAB CODE:(1)GUI FUNCTION:if nargin==0


arg = 'initialize';
else
% Retrieve/redefine (See definitions below) Mainly for easy reading.
hands = get(gcf,'userdata');
pos = get(gcbf,'position');
checkd = hands(1); % For user to choose to decode a MSG.
checke = hands(2); % For user to choose to encode a MSG.
edit1 = hands(3); % Space for user to enter MSG.
edit2 = hands(4); % Space for user to enter key.
frame1 = hands(5);
frame2 = hands(6);
push1 = hands(7); % Indicates user is done entering MSG.
push2 = hands(8); % Indicates user is done entering KEY.
static1 = hands(9);
static2 = hands(10);
static3 = hands(11);
static4 = hands(12);
static5 = hands(13);
end
switch arg
case 'initialize' % Creation of GUI and storage of handles.
counter=0; % This is where the length of MSG is stored.
h_fig = figure('name','Text Hider','position',[460 760 300 80],...
'menubar','none','resize','off');
col = get(h_fig,'color');
checkd=uicontrol(h_fig,'style','checkbox','position',[140 20 60 20],...
'string','Decode','backgroundcolor',col,'callback',...
'txthide(''decode'')','fontweight','bold');
checke=uicontrol(h_fig,'style','checkbox','position',[140 50 60 20],...
'string','Encode','fontweight','bold',...
'backgroundcolor',col,'callback',...
'txthide(''encode'')');
edit1=uicontrol(h_fig,'style','edit','horizontalalignment','left',...
'max',9,'min',1,'visible','off','KeyPressFcn',...
'txthide(''count'')','userdata',counter);
edit2=uicontrol(h_fig,'style','edit','horizontalalignment','left',...
'max',9,'min',1,'visible','off');
frame1=uicontrol(h_fig,'style','frame','visible','off');
frame2=uicontrol(h_fig,'style','frame','visible','off');
push1=uicontrol(h_fig,'style','pushbutton','string','done',...
'callback','txthide(''done1'')','visible','off');
push2=uicontrol(h_fig,'style','pushbutton',...
'string','done','callback','txthide(''done2'')',...
'visible','off');
static1=uicontrol(h_fig,'style','text','visible','off',...
'string','Enter the message you wish to hide.',...
'fontweight','bold','backgroundcolor',col);
static2=uicontrol(h_fig,'style','text','position',[30 33 75 20],...
'strin','Choose one:','fontweight','bold',...
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 32

'backgroundcolor',col);
static3=uicontrol(h_fig,'style','text','visible','off',...
'string','Enter the key for decoding.',...
'fontweight','bold','backgroundcolor',col);
static4=uicontrol(h_fig,'style','text','visible','off',...
'string','Message Length:',...
'fontweight','bold','backgroundcolor',col);
static5=uicontrol(h_fig,'style','text','visible','off',...
'string','0','foregroundcolor','blue',...
'fontweight','bold','backgroundcolor',col);
hands=[checkd checke edit1 edit2 frame1 frame2 push1 push2 static1...
static2 static3 static4 static5];
set(h_fig,'userdata',hands); % Store handles in figures userdata.
case 'encode' % The user has chosen to encode a MSG.
set(gcbf,'position',[pos(1) pos(2)-300 300 380]);
set(checkd,'enable','off','position',[140 320 60 20]);
set(checke,'position',[140 350 60 20],'enable','off');
set(edit1,'visible','on','position',[30 50 245 200],'fontsize',...
10,'string',[' Maximum Number of Characters ',...
'
is 1000. See Counter Below'],'foregroundcolor',...
'red'); % Issue a reminder about the max MSG length.
set(frame1,'visible','on','position',[30 295 245 3],...
'backgroundcolor','black');
set(push1,'visible','on','position',[230 10 45 28]);
set(static1,'visible','on','position',[30 260 245 20]);
set(static2,'position',[30 333 75 20]);
set(static4,'visible','on','position',[28 4 100 28]);
set(static5,'visible','on','position',[130 4 50 28]);
pause(1.75); % Displays reminder only a short time.
set(edit1,'foregroundcolor','black','string','','fontsize',9)
(2)ENCODE FUNCTION:num2add = 1000-length(msg); % Number of spaces to add to end of MSG.
if num2add < 0, error('This message is too long to encode.'), end
newmsg = [msg,repmat(' ',1,num2add)]; % 1000 chars always encoded.
msgmat = dec2bin(newmsg)-48; % Each row is a bin. rep. of an ascii char.
[filen pth]=uigetfile({'*.bmp';'*.tif';'*.jpg'},'Choose Image To Encode.');
if isequal(filen,0) || isequal(pth,0)
success = []; return % User cancelled.
end
pic1 = imread([pth filen]);
B = pic1(:,:,1); [piclngth pichght] = size(B); % Choose the first page.
dim1 = piclngth-2; dim2 = pichght-3; keyb = key(end:-1:1);
rows = cumsum(double(key));
columns = cumsum(double(keyb)); % Coord pairs for KEY (rows,columns)
A = zeros(dim1,dim2); % This matrix will house the hiding points.
A = crtmtrx(A,rows,columns,dim1,dim2,key);
idx = find(A==1); % This same index will be used for pic matrix.
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 33

for vv = 1:1000 % This is the encoder.


for uu = 1:7
if msgmat(vv,uu)==1;
if rem(B(idx(uu+7*(vv-1))),2)==0
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))+1;
end
elseif rem(B(idx(uu+7*(vv-1))),2)==1
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))-1;
end
end
end
newpic = pic1; newpic(:,:,1) = B;
[filen pth] = uiputfile({'*.bmp';'*.tif'},'Save Encoded File As');
if isequal(filen,0) || isequal(pth,0)
success = []; return
end % User cancelled.
imwrite(newpic,[pth filen])
success = 1;
(2)DECODE FUNCTION:function msg = decode(key)
% DECODE(key) Decodes the message hidden by encode in pic, using key.
[filen pth] = uigetfile({'*.bmp';'*.tif'},'Choose Image To Decode.');
if isequal(filen,0) || isequal(pth,0)
msg = []; return
end % User cancelled.
pic2 = imread([pth filen]);
B = pic2(:,:,1); [piclngth pichght] = size(B); % Choose the top page.
dim1 = piclngth-2; dim2 = pichght-3; keyb = key(end:-1:1);
rows = cumsum(double(key)); columns = cumsum(double(keyb));
A = zeros(dim1,dim2); % This matrix houses the hiding points.
A = crtmtrx(A,rows,columns,dim1,dim2,key);
idx = find(A==1); msgmat = zeros(1000,7);
for vv = 1:1000 % This is the decoder.
for uu = 1:7
if rem(B(idx(uu+7*(vv-1))),2)==1
msgmat(vv,uu) = 1;

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 34

6.8 OUTPUT AND RESULT:(1)encoding process:Guide: Graphical User Interface Tools.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 35

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 36

(2)Decodng process

CONCLUSION;In this paper the steganography algorithm is presented and implementation results on MATLAB 7.6.0 are
shown. The secure steganography algorithm has been developed to satisfy all proposed requirements.
Almost all the objectives have been met. Execution is successful by achieving the objectives. Results are
analyzed and are satisfactory according to requirements. Yes, of course, it needs to be more advanced but
still it is highly secure technique.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 37

CHAPTER 6
Applications

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 38

6.1 APPLICATIONS
1. USAGE IN MODERN PRINTERS
Steganography is used by some modern printers, including HP and Xerox brand color laser printers.
Tiny yellow dots are added to each page. The dots are barely visible and contain encoded printer serial
numbers, as well as date and time stamps.
Example from modern practice
The larger the cover message is (in data content termsnumber of bits) relative to the hidden
message, the easier it is to hide the latter. For this reason, digital pictures (which contain large amounts of
data) are used to hide messages on the Internet and on other communication media. It is not clear how
commonly this is actually done. For example: a 24-bit bitmap will have 8 bits representing each of the three
color values (red, green, and blue) at each pixel. If we consider just the blue there will be 28 different values
of blue. The difference between 11111111 and 11111110 in the value for blue intensity is likely to be
undetectable by the human eye. Therefore, the least significant bit can be used (more or less undetectably)
for something else other than color information. If we do it with the green and the red as well we can get one
letter of ASCII text for every three pixels.
Steganography can be used for digital watermarking, where a message (being simply an identifier) is
hidden in an image so that its source can be tracked or verified (for example, Coded Anti-Piracy), or even
just to identify an image (as in the EURion constellation)
2. ALLEGED USE BY TERRORISTS
When one considers that messages could be encrypted steganographically in e-mail messages,
particularly e-mail spam, the notion of junk e-mail takes on a whole new light. Coupled with the "chaffing
and winnowing" technique, a sender could get messages out and cover their tracks all at once.

An example showing how terrorists may use forum avatars to send hidden messages. This avatar contains
the message "Boss said that we should blow up the bridge at midnight." encrypted with
http://mozaiq.org/encrypt using "vxj" as password.
In October 2001, the New York Times published an article claiming that al-Qaeda had used
steganography to encode messages into images, and then transported these via e-mail and possibly via
USENET to prepare and execute the September 11, 2001 terrorist attack.
3. ALLEGED USE BY INTELLIGENCE SERVICES
In 2010, the Federal Bureau of Investigation revealed that the Russian foreign intelligence service
uses customized steganography software for embedding encrypted text messages inside image files for
certain communications with "illegal agents" (agents under non-diplomatic cover) stationed abroad.
4. STEGANOGRAPHY USED IN NETWORK
All information hiding techniques that may be used to exchange steganograms in telecommunication
networks can be classified under the general term of network steganography. This nomenclature was
originally introduced by Krzysztof Szczypiorski in 2003. Contrary to the typical steganographic methods
which utilize digital media (images, audio and video files) as a cover for hidden data, network
steganography utilizes communication protocols' control elements and their basic intrinsic functionality. As
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 39

a result, such methods are harder to detect and eliminate. Typical network steganography methods involve
modification of the properties of a single network protocol. Such modification can be applied to the PDU
(Protocol Data Unit), to the time relations between the exchanged PDUs, or both (hybrid methods).
Moreover, it is feasible to utilize the relation between two or more different network protocols to
enable secret communication. These applications fall under the term inter-protocol steganography.
Network steganography covers a broad spectrum of techniques, which include, among others:

Steganophony - the concealment of messages in Voice-over-IP conversations, e.g. the employment


of delayed or corrupted packets that would normally be ignored by the receiver (this method is called
LACK - Lost Audio Packets Steganography), or, alternatively, hiding information in unused header
fields.
WLAN Steganography the utilization of methods that may be exercised to transmit steganograms
in Wireless Local Area Networks. A practical example of WLAN Steganography is the HICCUPS
system (Hidden Communication System for Corrupted Networks) .

Steganography is applicable not limited to, the following areas: Confidential communication and secret data storing
Protection of data alteration
Access control system for digital content distribution
Media Database systems
The area differs in what feature of the steganography is utilized in each system.
5. CONFIDENTIAL COMMMUNICATION
The "secrecy" of the embedded data is essential in this area.
Historically, steganography have been addressed in this area. Steganography provides us with:
(A) Potential capability to hide the existence of confidential data
(B) Hardness of detecting the hidden (i.e., embedded) data
(C) Enhancing the secrecy of the encrypted data
In practice, when you use some steganography, you must first select a vessel data according to
the size of the embedding data. The vessel should be innocuous. Then, you embed the
confidential data by using an embedding program (which is one component of the
steganography software) together with some key. When extracting, you (or your party) use an
extracting program (another component) to recover the embedded data by the same key (
"common key" in terms of cryptography). In this case you need a "key negotiation" before you
start communication.
One simplest application is to your private journal writing.
Attaching a stego file to an e-mail message is another example in this application area. But you
and your party must do a "sending-and-receiving" action that could be noticed by a third party.
So, e-mailing is not a completely secret communication method.
There is an easy method that has no key-negotiation. We have a model of "Anonymous Covert
Mailing System." See the reference [7].
There is some other communication method that uses the Internet Webpage. In this method you
don't need to send anything to your party, and no one can detect your communication.
Each secrecy based application needs an embedding process which leaves the smallest
embedding evidence. You may follow the following.
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 40

(A) Choose a large vessel, larger the better, compared with the embedding data.
(B) Discard the original vessel after embedding.
For example, in the case of Qtech Hide & View, it leaves some latent embedding evidence even
if the vessel has a very large embedding capacity. You are recommended to embed only 25% or
less (for PNG / BMP output) of the maximum capacity, or only 3% of the vessel size (for JPEG
output)..
6. PROTECTION FROM DATA ALTERATION
We take advantage of the fragility of the embedded data in this application area.
We asserted in the Home Page that "the embedded data can rather be fragile than be very
robust." Actually, embedded data are fragile in most steganography programs. Especially, Qtech
Hide & View program embeds data in an extremely fragile manner. We demonstrate this in the
other page.
However, this fragility opens a new direction toward an information-alteration protective system
such as a "Digital Certificate Document System." The most novel point among others is that "no
authentication bureau is needed." If it is implemented, people can send their "digital certificate
data" to any place in the world through Internet. No one can forge, alter, nor tamper such
certificate data. If forged, altered, or tampered, it is easily detected by the extraction program.
Just visit this page and see the reference [9].
7. ACCESS CIONTROL FOR DIGITAL DATABASE SYSTEM
In this area embedded data is "hidden", but is "explained" to publicize the content.
Today, digital contents are getting more and more commonly distributed over Internet than
before. For example, music companies release new albums on their Webpage in a free or
charged manner. However, in this case, all the contents are equally distributed to the people who
can make access to the page. So, an ordinary Web distribution scheme is not suited for a "caseby-case" and "selective" distribution. Of course it is always possible to attach digital contents to
e-mail messages and send them to the customers. But it will takes a lot of cost in time and labor.
If you have some valuable content, which you think it is distributable if someone really needs it,
and if it is possible to upload that content on Internet in some covert manner. And if you can
issue a special "access key" to extract the content selectively, you will be very happy about it. A
steganographic scheme can help realize this type of system.
We have developed a prototype of an "Access Control System" for digital content distribution
through Internet. The following steps explain the scheme.
(1) A content owner classify his/her digital contents in a folder-by-folder manner, and embed the
whole folders in some large vessel according to a steganographic method using folder access
keys, and upload the embedded vessel (stego data) on his/her own Webpage.
(2) On that Webpage the owner explains the contents in depth and publicize worldwide. The
contact information to the owner (post mail address, e-mail address, phone number, etc.) will be
posted there.
(3) The owner may receive an access-request from a customer who watched that Webpage. In
that case, the owner may (or may not) creates an access key and provide it to the customer (free
or charged)..
In this mechanism the most important point is, a "selective extraction" is possible or not.
In fact we have already developed such a selective extraction program to implement the system.
However, we will not go down to the details about this.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 41

8. MEDIA DATABASE SYSTEM


In this application area of steganography secrecy is not important, but unifying two types of
data into one is the most important.
Media data (photo picture, movie, music, etc.) have some association with other information. A
photo picture, for instance, may have the following.
(1) The title of the picture and some physical object information
(2) The date and the time when the picture was taken
(3) The camera and the photographer's information
Formerly, these are annotated beside the each picture in the album.
Recently, almost all cameras are digitalized. They are cheap in price, easy to use, quick to shoot.
They eventually made people feel reluctant to work on annotating each picture. Now, most
home PC's are stuck with the huge amount of photo files. In this situation it is very hard to find a
specific shot in the piles of pictures. A "photo album software" may help a little. You can sort
the pictures and put a couple of annotation words to each photo. When you want to find a
specific picture, you can make a search by keywords for the target picture. However, the
annotation data in such software are not unified with the target pictures. Each annotation only
has a link to the picture. Therefore, when you transfer the pictures to a different album software,
all the annotation data are lost.
This problem is technically referred to as "Metadata (e.g., annotation data) in a media database
system (a photo album software) are separated from the media data (photo data) in the database
managing system (DBMS)." This is a big problem.
Steganography can solve this problem because a steganography program unifies two types of
data into one by way of embedding operation. So, metadata can easily be transferred from one
system to another without hitch. Specifically, you can embed all your good/bad memory (of
your sight-seeing trip) in each snap shot of the digital photo. You can either send the embedded
picture to your friend to extract your memory on his/her PC, or you may keep it silent in your
own PC to enjoy extracting the memory ten years after. Qtech Hide & View v02 may be a good
program for such purposes.
9. TO WRAP UP THIS PAGE
We have exemplified four steganography-applicable areas, and provided some technical
information.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 42

CHAPTER 7
Advantages & Disadvantages

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 43

7.1 ADVANTAGES & DISADVANTAGES 7.1.1


Advantages:
1. Audio based Steganography has the potential to conceal more information:
Audio files are generally larger than images
Our hearing can be easily fooled
Slight changes in amplitude can store vast amounts of information
2. The flexibility of audio Steganography is makes it very potentially powerful :
The methods discussed provide users with a large amount of choice and makes the technology
more accessible to everyone. A party that wishes to communicate can rank the importance of
factors such as data transmission rate, bandwidth, robustness, and noise audibility and then
select the method that best fits their specifications.
For example, two individuals who just want to send the occasional secret message back and
forth might use the LSB coding method that is easily implemented. On the other hand, a large
corporation wishing to protect its intellectual property from "digital pirates" may consider a
more sophisticated method such as phase coding, SS, or echo hiding.
3. Another aspect of audio Steganography that makes it so attractive is its ability to combine with
existing cryptography technologies.
Users no longer have to rely on one method alone. Not only can information be encrypted, it
can be hidden altogether.
4. Many sources and types makes statistical analysis more difficult :
Greater amounts of information can be embedded without audible degradation
5. Security :
Many attacks that are malicious against image Steganography algorithms (e.g. geometrical
distortions, spatial scaling, etc.) cannot be implemented against audio Steganography
schemes. Consequently, embedding information into audio seems more secure due to less
steganalysis techniques for attacking to audio.
As emphasis placed on the areas of copyright protection, privacy protection, and surveillance
increases, Steganography will continue to grow in importance as a protection mechanism.
Audio Steganography in particular addresses key issues brought about by the MP3 format,
P2P software, and the need for a secure broadcasting scheme that can maintain the secrecy of
the transmitted information, even when passing through insecure channels
7.1.2

Disadvantages:

1. Embedding additional information into audio sequences is a more tedious task than that of images,
due to dynamic supremacy of the HAS over human visual system.
2. Robustness: Copyright marks hidden in audio samples using substitution could be easily manipulated
or destroyed if a miscreant comes to know that information is hidden this way.
3. Commercialized audio Steganography have disadvantages that the existence of hidden messages can
be easily recognized visually and only certain sized data can be hidden.
4. Compressing an audio file with lossy compression will result in loss of the hidden message as it will
change the whole structure of a file. Also, several lossy compression schemes use the limits of the
human ear to their advantage by removing all frequencies that cannot be heard. This will also remove
any frequencies that are used by a Steganography system which hides information in that part of the
spectrum.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 44

CHAPTER 8
Conclusion & Future Scope

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 45

8.1 CONCLUSION
This report has looked in detail at the major techniques used for data hiding in audio files. First we gave an
overview of Steganography and in particularPhase Coding, Spread Spectrum and Echo Hiding in the
concept of Audio Steganography. Secondly we described in detail, various Audio Steganography algorithms
namely LSB Coding and implemented the same using MATLAB.At the end, feasibility of Audio
Steganography was evaluated by considering its the pros and cons.

8.2 STEGANOGRAPHY: FUTURE SCOPE


Steganography Offers Bright Prospects for Commercial Data Hiding As steganography continues on its
evolutionary path researchers have unearthed new platforms where steganographic techniques could be
employed to hide information seamlessly. Such research efforts have rekindled the research and
development efforts oriented towards steganography platforms and steganalysis and a number of researchers
are working towards discovering new platforms that miscreants could potentially use to hide information.
For instance, researchers have shown that voice over Internet protocol (VoIP) could emerge into a popular
platform for steganography owing to its ubiquity and the difficulty in detecting hidden information in VoIP
streams. In addition to VoIP, platforms such as images and other multimedia content are expected to be
widely used for concealing information. "Current research in steganography is focused on identifying
various platforms through which one can hide information, notes the analyst of this research service. Apart
from the traditional platforms such as audio, video, and images, researchers are looking for additional
platforms through which information can be hidden." An interesting idea under consideration is to have a
separate steganographic channel in a network to send messages. Although each mode has many benefits, it is
very difficult to ascertain the single best platform to send hidden messages. Steganography is capable of
mitigating piracy by aiding copyright marking. In the future, digital camera manufacturers could implement
steganographic features as a part of camera firmware to annotate pictures with the photographer's copyright
information.
Camcorder manufacturers could also follow suit and implement steganography and watermarking
techniques for protecting video content captured on camcorders and video cameras. Going forward,
legitimate applications such as tagging of multimedia content with hidden information could become an
important application area for steganography.
There is a distinct lack of awareness about steganography, particularly among the business
community. A major challenge associated with the field is convincing organizations to deploy tools to detect
insider use of steganography, which requires complete awareness of the way data could be embedded and
various approaches toward detecting this activity. Currently, steganography represents a classical paradox: It
is next to impossible to convince people to look for something they cannot see and do not think anyone is
using because there is no large body of empirical data to prove that steganography is being used to transmit
information outside of corporate networks. The main reason for the absence of large body of empirical data
is, however, the lack of adoption of steganalysis tools in enterprises. "With steganography ideally suited for
protecting intellectual property, implementing steganalysis and steganography tools could be beneficial for
businesses," says the analyst.
"However, companies are skeptical about adopting steganography as they do not find tangible
monetary benefits."As the possibility of steganography being used with predominantly malicious intent is
high, enterprises and national security organizations need to recognize the threats posed by steganography
and implement the right countermeasures. Government and security enterprises must take the lead and
implement measures to increase the awareness about steganography. Industry leaders need to work with
researchers and channel their R&D efforts toward development of effective technologies/solutions that
would provide substantial benefits. Standard bodies could also take assistance from enterprises for
developing techniques that could cost effectively improve the technology.
This Frost & Sullivan research service titled Steganography: Future of Information Hiding provides an
analysis of the trends that are shaping the domain of steganography and offers approaches that could help in
its commercialization. Within this analysis, Frost & Sullivan has identified the challenges in the industry, as
well as the drivers and restraints in the market.
2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 46

APPENDIX
WAVESPECIFICATIONS
The WAVE file specifications came from Microsoft. The WAVE file format use RIFF chunks, each
chunk consisting of a chunk identifier, chunk length and chunk data.

1. Wave File Format


Wave files have a master RIFF chunk which includes a WAVE identifier followed by sub-chunks. The data
is stored in little-endian byte order.
Field

Length

Contents

ckID

Chunk ID: "RIFF"

Cksize

Chunk size: 4+n

WAVEID

WAVE ID: "WAVE"

WAVE chunks

Wave chunks containing format information and


sampled data

2. Format Chunk
The Format chunk specifies the format of the data. There are 3 variants of the Format chunk for
sampled data. These differ in the extensions to the basic Formant chunk.
Field

Length

Contents

ckID

Chunk ID: "fmt"

Cksize

Chunk size: 16 or 18 or 40

wFormatTag

Format code

nChannels

Number of interleaved channels

nSamplesPerSec

Sampling rate (blocks per second)

nAvgBytesPerSec

Data rate

nBlockAlign

Data block size (bytes)

wBitsPerSample

Bits per sample

cbSize

Size of the extension (0 or 22)

wValidBitsPerSample

Number of valid bits

dwChannelMask

Speaker position mask

SubFormat

16

GUID, including the data format code

The standard format codes for waveform data are given below. The references above give many
more format codes for compressed data, a good fraction of which are now obsolete.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 47

Format Code

PreProcessor Symbol

Data

0x0001

WAVE_FORMAT_PCM

PCM

0x0003

WAVE_FORMAT_IEEE_FLOAT

IEEE float

0x0006

WAVE_FORMAT_ALAW

8-bit ITU-T G.711 A-law

0x0007

WAVE_FORMAT_MULAW

8-bit ITU-T G.711 -law

0xFFFE

WAVE_FORMAT_EXTENSIBLE

Determined by SubFormat

3. PCM Format
The first part of the Format chunk is used to describe PCM data.

For PCM data, the Format chunk in the header declares the number of bits/sample in each sample
(wBitsPerSample). The original documentation (Revision 1) specified that the number of bits per
sample is to be rounded up to the next multiple of 8 bits. This rounded-up value is the container size.
This information is redundant in that the container size (in bytes) for each sample can also be
determined from the block size divided by the number of channels (nBlockAlign / nChannels).

This redundancy has been appropriated to define new formats. For instance, Cool Edit uses a format
which declares a sample size of 24 bits together with a container size of 4 bytes (32 bits) determined
from the block size and number of channels. With this combination, the data is actually stored as 32bit IEEE floats. The normalization (full scale 223) is however different from the standard float
format.

PCM data is two's-complement except for resolutions of 1-8 bits, which are represented as offset
binary.

4. Non-PCM Formats
An extended Format chunk is used for non-PCM data. The cbSize field gives the size of the extension.

For all formats other than PCM, the Format chunk must have an extended portion. The extension can
be of zero length, but the size field (with value 0) must be present.
For float data, full scale is 1. The bits/sample would normally be 32 or 64.
For the log-PCM formats (-law and A-law), the Rev. 3 documentation indicates that the bits/sample
field (wBitsPerSample) should be set to 8 bits.
The non-PCM formats must have a Fact chunk.

1. Extensible Format
2. The WAVE_FORMAT_EXTENSIBLE format code indicates that there is an extension to the
Format chunk. The extension has one field which declares the number of "valid" bits/sample
(wValidBitsPerSample). Another field (dwChannelMask) contains a bits which indicate the mapping
from channels to loudspeaker positions. The last field (SubFormat) is a 16-byte globally unique
identifier (GUID).

With the WAVE_FORMAT_EXTENSIBLE format, the original bits/sample field (wBitsPerSample)


must match the container size (8 * nBlockAlign / nChannels). This means that wBitsPerSample must

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 48

be a multiple of 8. Reduced precision within the container size is now specified by


wValidBitsPerSample.
The number of valid bits (wValidBitsPerSample) is informational only. The data is correctly
represented in the precision of the container size. The number of valid bits can be any value from 1
to the container size in bits.
The loudspeaker position mask uses 18 bits, each bit corresponding to a speaker position (e.g. Front
Left or Top Back Right), to indicate the channel to speaker mapping. More details are in the
document cited above. This field is informational. An all-zero field indicates that channels are
mapped to outputs in order: first channel to first output, second channel to second output, etc.
The first two bytes of the GUID form the sub-code specifying the data format code, e.g.
WAVE_FORMAT_PCM.
The
remaining
14
bytes
contain
a
fixed
string,
"\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71".

The WAVE_FORMAT_EXTENSIBLE format should be used whenever:

PCM data has more than 16 bits/sample.


The number of channels is more than 2.
The actual number of bits/sample is not equal to the container size.
The mapping from channels to speakers needs to be specified.

6. Fact Chunk
All (compressed) non-PCM formats must have a Fact chunk (Rev. 3 documentation). The chunk contains at
least one value, the number of samples in the file.
Field

Length

Contents

ckID

Chunk ID: "fact"

Cksize

Chunk size: minimum 4

Number of samples (per channel)

dwSampleLength

The Rev. 3 documentation states that the Fact chunk "is required for all new new WAVE formats",
but "is not required for the standard WAVE_FORMAT_PCM files". One presumes that files with
IEEE float data (introduced after the Rev. 3 documention) need a Fact chunk.
The number of samples field is redundant for sampled data, since the Data chunk indicates the length
of the data. The number of samples can be determined from the length of the data and the container
size as determined from the Format chunk.
Their is an ambiguity as to the meaning of "number of samples" for multichannel data. The
implication in the Rev. 3 documentation is that it should be interpreted to be "number of samples per
channel".
The
statement
in
the
Rev.
3
documentation
is:
"The <nSamplesPerSec> field from the wave format header is used in conjunction with the
<dwSampleLength> field to determine the length of the data in seconds."
With no mention of the number of channels in this computation, this implies that dwSampleLength is
the number of samples per channel.
There is a question as to whether the Fact chunk should be used for (including those with PCM)
WAVE_FORMAT_EXTENSIBLE files. One example of a WAVE_FORMAT_EXTENSIBLE with
PCM data from Microsoft, does not have a Fact chunk.

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 49

7. Data Chunk
The Data chunk contains the sampled data.
Field

Length

Contents

ckID

Chunk ID: "data"

Cksize

Chunk size: n

Samples

sampled data
pad byte

2011-2015

0 or 1

Padding byte if n is odd

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 50

ASCII Value for symbol and Numbers:

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 51

BIBLIOGRAPHY
References

[1]: On Embedding of Text in Audio A case ofSteganography


Submitted by:PramathaNathBasu

[2]:Data Hiding in Audio Signal: A Review


Submitted by:PoulamiDutta,Debnath Bhattacharyya

[3]:Adaptive and Efficient Audio Data Hiding Method in Temporal Domain.


Submitted by:Ahmad Delforouzi , Mohammad Pooyan

[ 4]: An Optimized Method for Concealing Data using Audio Steganography


Submitted by:Md. Shafakhatullah Khan,V.VijayaBhasker , V. Shiva Nagaraju

[5]:Hiding Text in Audio Using LSB Based Steganography.


Submitted by:K.P.Adhiyaand Swati A. Patil,

[6]:Matrix matching method for SecretCommunication usingImage Steganography.


Submitted by:Jasvinder KAUR, Manoj DUHAN, Ashok KUMAR, Raj Kumar YADAV.

[7]:High Confidentiality Based Secured Communication through Audio.


Submitted by:S. Suganya, S. Swaminathan, H. Manikandan.

[8]:A Robust Image Steganography using DWT Difference Modulation (DWTDM).


Submitted by:Souvik Bhattacharyya ,GautamSanyal

[9]:Implementation of ETAS (Embedding Text in AudioSignal) Model to Ensure Secrecy


Submitted by:K. Geetha and P. VanithaMuthu

[10]:Secret Communication through Audio for Defense Application


Submitted by:P. N. S. Sailaja, B. Chinnarao, K. Rajeswari& G. V. Sridhar

[11]:A Robust Method for Encrypted Data Hiding Technique Based on Neighborhood PixelsInformation.
Submitted by:Ali Shariq Imran, M. YounusJaved, and NaveedSarfrazKhattak

[12]:Hiding data in images by simple LSB substitution


Submitted by:Chi-Kwong Chan & L.M. Cheng

[13]:Data Hiding by LSB Substitution Using GeneticOptimal Key-Permutation


Submitted by:Marghny Mohamed, Fadwa Al-Afari and Mohamed Bamatraf

[14]:Image based Secret Communication using Double Compression


Submitted by:ChaitanyaKommini, KamaleshEllanti and SrinivasuluAsadi

[15]:New Data Hiding Algorithm in MATLAB using Encrypted secret message


Submitted by:AgniswarDutta, Sankar Das, ShalabhAgarwal, AsokeNath and Abhirup Kumar Sen

[17]:STEGANOGRAPHY: AN OVERVIEW
Submitted by:Jammi Ashok, Y.Raju, S.MunishankaraiahAndK.Srinivas

[18]:Advanced Steganographic Approach for Hiding Encrypted Secret Message in LSB, LSB+1, LSB+2 and
LSB+3 Bits in Non standard Cover Files.
Submitted by:JoyshreeNath,Sankar Das,ShalabhAgarwal and AsokeNath

2011-2015

(STENOGRAPHIC COMMUNICATION SYSTEM)

Page- 52

You might also like