into pictures and other media
Prof.Dr. Mihály Tóth
Seminar #1 in HTI 1
Phenomena of Steganography
Carrying (or Covering) media
• Which may be picture, video, sound file,
radio communication, even the
structure of a File system.
• The carry medium ought to look
The hidden information (or the
information to hide) called Stego
medium or Stego message.
• Which may be open message, but may
be encrypted one as well.
December 03 Seminar #1 in HTI 2
The Basic Types of Steganography
• Some elements of the redundant covering
medium are substituted by the elements of
the stego medium.
• Some elements of the covering medium are
selected to carry the hidden information.
• The relevant information is hidden in a
narrow-band region of a wide band noise.
The hiding (narrow) band is changed by
time to time. (Radio Communication.)
December 03 Seminar #1 in HTI 3
The Basic Types of Steganography
• The Stego message is made similar
to the structure of the covering
December 03 Seminar #1 in HTI 4
Some characteristics (1)
The most simple hiding methods (like
the substitution) cannot tolerate the
edition of the covering medium
• Compression, picture edition,
resizing, printing, copying, etc..
On the other hand it should be a basic
requirement, that the hidden
information ought to survive such
changes of the covering medium
December 03 Seminar #1 in HTI 5
Some characteristics (2)
The applied method strongly depends
• The characteristic of the covering
• The goal of the hiding
There exist cases when we do not
want the message being completely
December 03 Seminar #1 in HTI 6
Some characteristics (3)
There are some cases when hiding
has one common feature with
encryption, for recovering hidden
information one needs a KEY.
Nowadays Steganography is applied
mostly to put copy right information
to the media sold (This is known as
December 03 Seminar #1 in HTI 7
Ancient methods for hiding (1)
Aineas Taktikosz :Poliokretika
(360 A.D. )
– Every nth letter of a plaintext had to be
read, or nth letters of the words.
– Passing through a thread on holes of a
pottery disc whose holes are meant
different letters agreed in advance.
– Letters on a certain page of a book
signed by hardly visible dots. It is
applicable for newspapers or letters as
– Cutting the hair of a slave and writing
the message to his bald head skin.
(Herodotus about 450 A.D.)
December 03 Seminar #1 in HTI 8
Ancient methods for hiding (2)
–Sewing into clothes, shues, collar of a dog,
rein of a horse, or anything else.
–Writing it onto a blown bladder of a cow, then
compressing the bladder
–Writing between the rows of an innocent text
by invisible ink.
Naturally our ancestors applied
secret writings as well. They used
both substitution and permutation of
letters and other codes for light
December 03 Seminar #1 in HTI 9
Hiding methods in WW 2
In WW2 the hardly visible dots still were
used to denote the selected letters in a
newspaper, for example.
Many soldiers tried to send home hidden
messages that way, but the method was
well known by the censors. (If they cannot
discover the hiding method, they mixed the words
at least or put the stamp in an other position,
The encrypton of messages, however,
acquired more and more importance.
December 03 Seminar #1 in HTI 10
History of securing information
In ancient times hiding was preferred
rather then encryption.
Since the middle centuries
encryption (vs. Decryption) play
more and more important role.
Nowadays cryptographic methods
are preferred more then hiding
(when securing messages).
December 03 Seminar #1 in HTI 11
Goals of hiding nowadays
Hiding Copy-right into media.
Identifying message in a hidden way
• Identifying the sender or owner
• Identifying the individual addressee
• Hiding commercial information
In common name:
December 03 Seminar #1 in HTI 12
Hiding message in text
Denotating some way the letters of the
carrier text to hide a secret message in
it. For example
• Hardly visible dots below or above the
selected letters or marking them by
invisible ink. (Applied from ancient times
up to WW. II.
• Hardly visible dislocation of the selected
• Very little modification of the shapes of
• An example of dislocation of letters is
shown in the next slide.
December 03 Seminar #1 in HTI 13
December 03 Seminar #1 in HTI 14
Methods when the hidden information is
carried by the appearance of the text,
(not only the text file.)
Such a way the printed or copied text also
carries the hidden information. (E.g. a
confidential circular letter.)
This makes difficult to select out the
appropriate letters by a computer.
The printing/copying/scanning processes
bring additional problems to revoke the
December 03 Seminar #1 in HTI 15
Marking the selected letters in a
covering text by an other way.
Each font in the text occupies a standard
That area is not necessarily the same for each
font. For example the letter m is generally
wider then the letter i. (Proportional vs. fix
Any letter could be moved or modified a bit
within its standard font area. Such way
particular letters of a carrier text could be
The marked letters can be selected out of the
text by an appropriate program. (The text
could be photocopied as well.)
December 03 Seminar #1 in HTI 16
Moving the font out of its standard area
Done by Mr. Árpád
December 03 Seminar #1 in HTI 17
Moving the selected fonts
Text processors of Wysiwyg (what you see is
what you get) generally cannot do that.
(Word, WordPerfect, Desktop publishing
softwares, like Adobe’s PageMaker,
„Programmable” text processors
(like LateX) are able to do.
Such application needs a separate selecting
program which is able to accept picture files
as well. (E.g. scanned or copied texts). This
is not a simple job and the addressee must
have it in advance.
The character recogniser software loose such
December 03 Seminar #1 in HTI 18
Increasing the lenght of the vertical lines
in some characters (like b,d,h,k,l,p,q) with
a small amount is not prominent.
This also may carry information.
Arabic writing allows many decorative
variations of the letters in a text
Which may be used to mark selected
December 03 Seminar #1 in HTI 19
Methods for hiding coded
information into a text
At the ends of rows we may insert exra
spaces. Each space at a row-end may
represent a single bit. (Max 3 spaces, for
more then 3 could be conspicuous.)
In an A4 page there are 50 rows and
altogether 50x3 bit= 150 bits (less then 20
bytes) could be hidden such a way. This
method can resist compression.
One has to read the first letters of words
preceded by double spaces.
Modifying the font sizes or spaces.
December 03 Seminar #1 in HTI 20
Modifying the structure of the text
Synonims of some words can be used
instead of the original word, or
changing the linguistic structure of the
text (applicable in most cases)
Both of the above can be used to hide
Revocation the hidden information the
original text (like a key) is needed.
Very small amount of information can be
hidden that way. (Goal: identification)
December 03 Seminar #1 in HTI 21
Hiding information into pictures
1. If the picture (graphics) was
made directly for that purpose
See the example in the next
2. In so called cover pictures. (We
will come back to that.)
Using covering pictures is the most
frequent method of hiding
December 03 Seminar #1 in HTI 22
December 03 Seminar #1 in HTI 23
Hiding in covering pictures (1)
upon the way of
It cannot be applied in
case of color palette.
In case of the colors
represented by 3 color
bytes it is applicable,
Neighboring color coordinates may
denote very different colors.
December 03 Seminar #1 in HTI 24
Hiding in covering pictures (2)
The color of each pixel) is defined by 3 bytes.
(There are a couple of methods defining color.
This is just one of them.)
The different colors for a pixel can be as many as
2^(8*3)=16 777 216.
Though human eye is very sensitive, such an extreme
variety of colors cannot be distinguished. The color-
change of a pixel is not visible if the LSBs of the color bytes
are changed. (In fact the average number of changes affect
half of the color bytes only)
The hidden information is carried by the LSBs of
the color bytes.
Color information that belongs to each pixel of a picture
December 03 Seminar #1 in HTI 25
A rejtett üzenet bitjei
Changes of the three basic (additive)
colors (Sat:240, Lum: 120/112)
In the first row the LSB changed by 1 bit
In the second row the change is 1 bit at the
16th positional value.
December 03 Seminar #1 in HTI 26
In an other coordinata system:
Perhaps some very
little change of
255 255 255
239 239 239
some colors are
visible in the
second row of the
previous slide. It
happened on 256
grade scale of the
0 0 0
is also changed
from 120 to 112. 27
Seminar #1 in HTI
Changing the LSBs of the basic colors
cannot be detected by a visual way, at least
not on a computer screen. Changing,
however, the last four bits of a color byte
could be detected visually.
The reason for that is in the physiological
characteristic of the human eyes.
The black and white and gray-scale sensing
abilities of the human eyes are much better,
but in spite of that the gray-scale pictures
are more suitable for hiding information in
Changing LSBs the average byte change is
half of the total number of color bytes.
December 03 Seminar #1 in HTI 28
How much information could be
hidden in a picture?
In a Kodak format CD picture the maximum
number of pixels are 2048 x 3072 pixel. (
19 MB) A single digital photo is able to hide
2,3 MB (12 %) information such way that it
does not cause any visible change of the
I am going to demonstrate it by a program
developed by a student of mine, Mr. Péter
Teleki. It has been developed exactly for
experimental and demonstration purpose
and it operates very fast. Instead describing
the program I am to show some of its
December 03 Seminar #1 in HTI 29
Demonstrating how to hide information
in a bitmap format picture
In the following slides I am to show two
pictures in each slide.
The left picture is the one in which there is
no hidden information while the right one
contains a text of 4862 bytes in the LSBs
of the pixels.
To hide that big amount of information we
used the LSBs of all three color bytes of
the three basic colors.
December 03 Seminar #1 in HTI 30
LSB hiding in 24 bit bmp picture
The right picture contains 4862 hidden letters
December 03 Seminar #1 in HTI 31
Sizes of picture files shown
Bitmap 308 614 bytes 308 614 bytes
JPG 21 795 bytes 21 952 bytes
December 03 Seminar #1 in HTI 32
Four bit hiding
The following slides demonstrate the
case when the second half (i.e. four
bits) of the color bytes are used for
hiding. In those cases the changing
of the picture can be sensed visually
Exceptionally on the bigger areas of
the same or similarly colored parts of
December 03 Seminar #1 in HTI 33
Hiding by 1 bit Hiding by 4 bits
December 03 Seminar #1 in HTI 34
Though the hiding method shown is
very sensitive to the editing of the
covering picture, it has a
considerable advantage too:
It does not increase the size of the
for it utilizes its redundancy
(As it was shown by bitmap images
of Kandó sculpture)
December 03 Seminar #1 in HTI 35
Steganography covers even the existence of any
One disadvantage is that quite an amount of
covering information is needed to hide whatever
we want to. At least 8 to 10 times more if we
really want it to be non detectable.
Nevertheless if the fact of the hiding becomes
evident then the entire business is virtually
useless, if we had not encrypted the information in
The really big disadvantage is that editing or
compressing the picture do catastrophic damage
to the hidden information.
December 03 Seminar #1 in HTI 36
The electronic watermarking
It has at least two meanings as follows
• visible and
• non visible e-watermarks.
The problem is that visibility as such is
We may talk about hardly visible and
very much visible e-watermarks as well.
December 03 Seminar #1 in HTI 37
This is a hiding technology which is
suitable to produce both
• Non-detectable e-watermarks and
• e-watermarks of different grade of
The carrier medium is modified a
suitable way by the information to be
the watermark and the colors of the
pixels below the mask are modified.
The visibility depends upon the amount
December 03 Seminar #1 in HTI 38
Demonstrating masking (1)
December 03 Seminar #1 in HTI 39
Demonstrating masking (2)
December 03 Seminar #1 in HTI 40
The location of masked stego
information within the picture’s area
is NOT indifferent.
Essentially the same technology is
applied in case of video tapes or
• the watermark is put different locations
on the subsequent slides
• there is no watermark in EVERY slides of
December 03 Seminar #1 in HTI 41
DCT: Discrete Cosine Transformation
The JPEG technology
divides the picture
into 8x8 pixels mat-
rices, then it performs
a diagonal scanning
and quantize the
pixels’ difference to
the average pixel
color of the 8 by 8
matrix. When quanti-
zing it applies a modi-
Scanning the 8 by 8 pixels matrix
fied version of FFT.
December 03 Seminar #1 in HTI 42
DCT: Discrete Cosine Transformation
The floating point results got from
the scanning and quantizing can be
truncated either to downward or
upward correlating the bit values to
This technology is applied mostly to
December 03 Seminar #1 in HTI 43
The DCT can be a tool as well
to reveal hiding
For the close relation between DFT and
DCT the last one could be considered as a
kind of discrete frequency spectrum.
That spectrum is the one that changes
significantly if there is any hidden
information in a given picture.
In fact, the size of the picture file is also
increases when it contains hidden
It does not recover the hidden information
just detects its existence. (We’ll
demonstrate it later.)
December 03 Seminar #1 in HTI 44
The Spread Spectrum
Its principle was invented at the end of the
Second WW along with the RADAR
Such a communication applies a very wide
band spectrum, but
At a time a narrow band of that spectrum
carries valuable information only, while in all
the other part of the spectrum noise is
In addition the relevant narrow band is
changed by time to time following a pattern
that has been agreed upon between the
December 03 Seminar #1 in 45
Hiding information into
sound tracks (1)
The carrier is a digitized audio information.
In case of digital sound CDs the sampling
frequency standard is 44 kHz and
the quantizing resolution is at least 12 bits.
That yields an amplitude scale of 4096 levels, in
which changing the LSB means a 0.025 % relative
modification which is essentially a distortion.
Such an extremely little distortion cannot be
perceived by human ear.
In case of silent parts of a sound track it still may
December 03 Seminar #1 in HTI 46
Hiding information into
Both the hiding and the recovering
technology is essentially the same as
it was shown in case of covering
Naturally it needs computer and
Some commercial studio software are
prepared in advance to insert
December 03 Seminar #1 in HTI 47
The meaning of Steganography is
hiding information and the related
There is a principal difference between
Steganography and Encryption,
however they can meet at some points
They can be applied together, i.e.
encrypted information can be hidden in
addition. (As it will be demonstrated soon.)
December 03 Seminar #1 in HTI 48
To hide something a covering
medium is always needed. (Picture,
sound track, text or even the
structure of a file system, etc.)
The covering medium must be
redundant, otherwise the hidden
information could be detected easily.
(This is the conception of hiding into noise.)
December 03 Seminar #1 in HTI 49
The technology of hiding should
match the nature of the medium.
The hidden information should not be
lost, if the carrying medium is
edited, modified, formatted, re-sized,
compressed or printed.
That’s a difficult task to realize.
December 03 Seminar #1 in HTI 50
It’s an expectation as well, that the
fact of hidden information should be
impossible to detect by other then
On the other hand security services
should have methods to detect such
information. At least its existence.
Realizing a good trade-off there are
December 03 Seminar #1 in HTI 51
Nowadays the most popular application
of Steganography is hiding copy rights
and other commercial information.
Such kind of hidden information is
known as e-watermark.
The e-watermark is not always
invisible. There are cases when it is
made deliberately strikingly visible. E.g.
in case of trial versions of software.
December 03 Seminar #1 in HTI 52
Now a demonstration of a
commercial stego software
Seminar #1 in HTI 53