0% found this document useful (0 votes)
18 views28 pages

Image Steganography

This document discusses image steganography, a technique for hiding secret information within digital images without altering their appearance. It outlines the process of encoding and decoding messages using algorithms, primarily implemented in Python, and highlights the importance of confidentiality in communication. The document also includes a literature review on cryptography and steganography basics, along with system requirements for implementing the steganographic process.

Uploaded by

epencil32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views28 pages

Image Steganography

This document discusses image steganography, a technique for hiding secret information within digital images without altering their appearance. It outlines the process of encoding and decoding messages using algorithms, primarily implemented in Python, and highlights the importance of confidentiality in communication. The document also includes a literature review on cryptography and steganography basics, along with system requirements for implementing the steganographic process.

Uploaded by

epencil32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Image Steganography:

Hiding Information in
Digital Images

Under the supervision of

Dr. Ashish Kumar

by

Vaibhav Sharma, 20217711621

School of Engineering & Technology


Vivekananda I n s t i t u t e of Professional Studies -Technical Campus
Pitampura, Delhi - 110034

1
ABSTRACT

Steganography is the process of hiding the information that communication is taking


place, whereas image-based steganography is the process of hiding information in an
input image. The main motive of this technique is to hide the important information
byte by byte in an image's pixels [1]. The input image can be of any size but must be
greater than the size of the input message. This process is useful when we need to
send some important information to somebody without anybody else noticing the
secret information [2]. After the transmission, the receiver should also use the same
technique that was used for encoding to decode the message [3].
This process hides the data in such a manner that there will be no noticeable changes
in the image, thus hiding the existence of the data [6]. Each and every byte of data is
converted into its binary equivalent and then processed to get stored in the image
pixels. The language used for this process is Python with some of its built-in libraries.
For the image processing, we use the Python Imaging Library (PIL) [5].
Steganography usually deals with the way of hiding the existence of communicated
data in such a way that it remains confidential [6]. It maintains secrecy between the
two communicating bodies [4]. Secrecy is achieved in image steganography by
embedding data into the cover images and generating stego-images [6].

2
Table of Content
Page
Chapter Name Section
No.

Chapter 1: INTRODUCTION .........

1.1 What is Steganography .........

1.2 History .........

Chapter 2: LITERATURE REVIEW .........

2.1 Cryptography basics .........

2.1.1 Cryptography drawbacks .........

2.2 Steganography basics .........

2.3 Steganography vs LSB .........

algorithm
.........
Chapter 3: REQUIREMENT ANALYSIS .........
3.1 Functional requirements
3.2 Non-functional requirements .........

3.3 System requirements .........

3.3.1 Software requirements .........

3.3.2 Hardware requirements .........

Chapter 4: IMAGE STEGANOGRAPHY .........

4.1 Types of steganography .........

4.1.1 Text steganography .........

4.1.2 Image steganography .........

4.1.3 Audio steganography .........

4.1.4 Video steganography .........

4.2 Steganography in image .........

3
Page
Chapter Name Section
No.

Chapter 5: HOW IT WORKS .........

5.1 Implementation .........

5.1.1 Technical details .........

5.1.2 The encoding process ......

5.1.3 Creation of user space .........

5.1.4 The decoding process .........

Chapter 6: BRIEF ALGORITHM .........

IMPLEMENTATION
6.1 LSB (Least significant bit) .........

6.1.1 Embedding phase procedure .........

6.1.2 Masking and filtering .........

Chapter 7: SYSTEM DESIGN .........

7.1 Use case diagram .........

7.2 Activity diagram .........

Advantages and disadvantages .........

Conclusion .........

References .........

4
Chapter 1 INTRODUCTION

1.1 What is Steganography?


The word "stegano" means cover, and "graphical" means write. Thus, "stegano" and "graphy"
combine to describe the process in which we hide important information inside an image
using some encoding technique [1]. This process not only hides the data but also conceals the
communication, meaning others will not know whether any communication is taking place
[6].
Steganography is a secret process that only the person encoding the secret message (i.e., the
sender) and the recipient (i.e., the receiver) are aware of. In other words, it is also known as
the study of unperceivable communication [5]. Steganography involves inputting an image by
the user and encoding it with secret data to generate a "stego-image," which is slightly
changed from the original image, but the difference is unnoticeable [2].
In modern times, steganography is used in many places, one significant example being in
military duty stations. Here, steganography is often the only safe medium to use, as they don’t
want their secret information to be shared with individuals across borders [6]. Similar
processes were seen in ancient times, where kings would shave their commanders' heads to
write messages on them and then hide the writing to avoid suspicion [3].

COVER IMAGE

5
The above pictured diagram can be summed up to image steganography. The secret message
is the important information which user wants to hide. Cover is the image which will be used
to hide the data. The algorithm used will combine these two and will generate a secret key
without which nobody can access the information not even the reciever.
Applications of steganography
• Confidential communication.
• Protection of data alteration. 3.
• E-commerce.
• Media
• Database system.
• Digital watermarking.

1.2 HISTORY
The first record of steganography technique was recorded in 440BC. Aristagoras was sent by
his leader histiaeus, by shaving the leader of his most confided worker, writing the messages
onto his scalp and send him out after his hair was regrown. He was sent with full guidance
of what to do, when he steps out from here.

Steganography principle
Secret messages are covered within the cover of the object by a secret hiding algorithm and
sent to the receiver's end. The receiver then applies the reverse process on the cover image to
reveal the secret information [1]. The secret message is covered within the cover image
using a steganographic algorithm in a way that does not change the actual image [6]. The
results are now in a new image, the stego-image, which does not appear different from the
original image from a third-party viewpoint; however, there exists a secret message [2]. The
purpose of using an image is not important; it serves only as a carrier for the hidden message
[3].
The secret message is embedded into the cover object by the steganographic algorithm and
sent to the receiver's end. The receiver then performs the reverse action on the cover image,
enabling them to retrieve the secret data [5]. A suitable image, known as the cover or carrier,
is chosen. The secret message is then embedded inside the cover using the steganographic
6
algorithm in such a way that it does not alter the original image information in any human-
visible way [4]. The results are now in a new image, the stego-image, which does not appear
different from the original [6].
Almost any file type can be used for this process, but those with large redundancy are more
convenient. The redundant bits of a target are those bits that can be altered without visible
changes. Image and audio files especially comply with this requirement since images are a
popular cover or carrier target used for steganography [2]. Within the range of digital
images, many other image file formats exist, each associated with different steganographic
algorithms [5]. The secret message is embedded into the cover object by the steganographic
algorithm and sent to the receiver's side. The receiver then performs the reverse action on
the stego-image to reveal the secret information [6].
algorithms, tries to save the perceptive type of the original images. The Suitable image,
known the cover or carrier, are chosen. The secret message is then embedded inside the
cover by using the steganographic algorithm, in a particular way that do not changes the
original image info in any human perceptible way. The results are new images, the stego-
image, that are not viewed different from the original info. From an observer‟s view, the
being of a secret message are (visibly) out of sight. The purpose of using image is of not
importance, it serve only and only as a carrier for out of sight message.

Fig: (ii) steganography model

Summary: The first task is to open the software. In our case this software asks for
authentication so every user have to enter there username and passwords for the security
purpose. If the id-pass matches. 7
Six options get available in-front of user as :
• Input the message.
• Input the cover-image.
• Generate a stego-image.
• Generate a secret key.
• Send image to the receiver.
• Abort.
• Help.

A use case diagram helps the devloper to know how the user will interact with the software.
First user enters the secret message that he/she wants to share anonymously. After this
he/she inputs the picture and after validiating the image size and data size information gets
covered up inside picture and a stego image is generated. At the other end(i.e. receiver‟s
end), receiver gets the stego-image(i.e. generated image) and applies the reverse formula it.
After that only the secret content could be achieved.

8
Chapter 2: LITERATURE REVIEW

2.1 Cryptography basics


Cryptography is the process in which users try to communicate secretly in front of adversaries
[1]. In cryptography, beyond encoding and decoding, the most important feature is the
cryptographic hash [3]. To encode the secret message by the sender and decrypt the secret
message by the receiver, both parties must use the same secret key generated by the algorithm
[6]. This can be done on any message that users want to share secretly, such as sending emails
privately [5]. Hashing in cryptography is the process of generating fixed-length strings from a
user-entered message [4].
The three basic types of cryptography commonly used are cryptographic hash functions,
asymmetric key systems, and symmetric key systems. The strength of a cryptographic system
is directly proportional to the length of the key [2]. This clarifies the fact that the key is picked
randomly each time the user enters the secret data. There are many kinds of attacks that could
be used against cryptographic systems [6].

2.1.1 Cryptography drawbacks


A strong encryption, authentication, and digitally signed information can be difficult to access
even for legitimate users at crucial times of decision-making [1]. The systems or PC
frameworks could be assaulted and rendered non-functional by an adversary [2]. High
availability, one of the fundamental aspects of information security, cannot be ensured solely
through the use of cryptographic techniques [3]. Different strategies are required to prepare
for threats, for example, denial of service or complete breakdowns of information systems [4].
In addition to cryptographic algorithms, we need to implement administrative security to
safeguard the system [6]. Cryptography is the process that helps us send secret data privately
but does not protect us from system vulnerabilities [5].

2.2 Steganography basics


Steganography mainly aims to hide secret data within a cover image input by the user in such
a way that no third party will be able to detect the presence of communication by simply
viewing the image [1]. This process is quite different from watermarking. In steganography,
we convert every bit of the input message into its binary equivalent and then iterate through
each pixel, changing its value according to the corresponding binary value of the message [2].
9
The secret message is concealed within the cover object using a secret hiding algorithm and
sent to the receiver [3]. The receiver then applies the reverse process on the cover image to
reveal the secret information [4]. The important secret message entered by the user is covered
with the image, which is also input by the user, using steganographic algorithms in a way that
does not change the actual image when viewed by a third party [5]. The results yield a new
image, the stego-image, which does not visually differ from the original image but carries
very important information. The existence of the secret message is only visible to the receiver
when the secret key is entered correctly [6]. The purpose of using an image is not significant;
it serves merely as a carrier for the hidden message, like an envelope [7]. The secret
information is embedded into the cover image by a steganographic algorithm and then sent to
the receiver, who performs the reverse action on the cover image to reveal the secret message
[8].
Almost any file type could be used for steganography, but the type that is more suitable are
those with a large degree of redundancy. Redundancy could be known as the bit of an target
that provide correct far greater than important for the object‟s use and display. The redundant
bits of an target is those bit that could be altered without the alteration being known easily.
Image and audio files especially comply with this need, while research had also open other
file type that could be used for info hiding. There are four main type of file formats that could
be used for steganography. Since, images are quite famous cover or carrier target used for
steganography. In the range of digital images many other image file format exist, most of
them for particular applications. For those different image file format, other steganographic
algorithm exist. The secret message is embedded into the cover object by out of sight
algorithm and are sent to a receiver side. The receiver then performs the reverse action on the
cover info and reveals the secret info. The embedding, i.e. steganography algorithms, tries to
save the perceptive type of the original images. The Suitable image, known the cover or
carrier, are chosen. The secret message is then embedded inside the cover by using the
steganographic algorithm, in a particular way that do not changes the original image info in
any human perceptible way. The results are new images, the stego-image, that are not viewed
different from the original info. From an observer‟s view, the being of a secret message are
(visibly) out of sight. The purpose of using image is of not importance, it serve only and only
as a carrier for out of sight message.

10
2.3 Steganography vs LSB algorithm
The byte of each pixel holds one message bit, while the rest of the bits in the pixel remain
unchanged [1]. Steganography is the secret process known only to the one encoding the secret
message inside the image (i.e., the sender) and the one for whom the message is being
encoded (i.e., the receiver) [2]. In other words, steganography is also known as the study of
unperceivable communication [3].
The term "steganography" is derived from Greek and literally means "secure writing" [4]. A
steganography system consists of three elements: cover images, the secret messages, and the
stego-image [5]. Digital images are represented using a 2-D matrix of color intensities at each
grid point [6]. Typically, grey images use 8 bits per pixel [7].

11
Chapter 3: REQUIREMENT ANALYSIS

3.1 FUNCTIONALS REQUIREMENTS

The ways in which the system works:

• Login:

Login function will help the system in order to check both the receiver and sender
authenticity, if the entered detail is correct the system will move to encoding phase otherwise
it will exit from the system.
Secret information: In this process the sender have two options whether it could upload the
secret data file or it could write it.
• Cover image :
Cover image is the image which is chosen for the process, in this the secret message will get
hidden.
Sender: The person who wants to send the secret information to someone with the help of
steganographic system.
• Receiver :
Receiver receives the stego image and after system validates the authenticity it opens the
option for decrypting the image to get the hidden text inside that stego-image.

3.2 NON-FUNCTIONAL REQUIREMENTS

• Safety requirements:
For the safety purpose the sender and receiver should have the same software to encrypt an
decrypt the message and the secret key generated by the algorithm should not be shared with
other than the receiver.
• Security requirements:

As the software hides the secret information so it should not get into wrong hands.
• Software quality attributes:

The quality of the software is a very important issue which maintained in such a way that the
communication can only be take place with the help of image between sender and receiver.
12
Fig –(iii) Generation of stego image

3.3 SYSTEM REQUIREMENTS


3.3.1 SOFTWARE REQUIREMENTS
• Bootstrap.
• OS: Windows 10 or above (Done via Windows 11)
3.3.2 HARDWARE REQUIREMENTS
• Minimum hardware requirements: entium 3166 HZ or Higher 128 mb RAM
• Intell I5 2.50 GHZ 8GB Ram
• NVIDIA Tesla P100 GPU 2016 3584 Cuda cores 16 GB

13
Chapter 4: IMAGE STEGANOGRAPHY

4.1 Types of steganography

4.1.1 Text steganography


This is a method in which we hide the secret information inside the other text file, the main
motive in this process is to share our secret information with the help of another normal
message which doesn’t get suspicious. .
There are a lot of strategies which is accessible for embedding information in text file. Text
steganography could be acheived by changing some text organizing, or by adjusting quality of
several component. The goal into develop a coding method that is reliably decode able yet
largely different to the reader point of view. The three coding technique that we propose
illustrate different approaches rather than form an exhaustive list of documents marketing
technique. This technique could be used either separately or joint. These are as follows:

• Word-move coding: This is a method in which a changing of record is done by a level plane
relacing the words area inside the content line to encoded the report perfectly.
• Line-move coding: This is a technique in which we change a record by vertically moving the
content line areas to encoded the archive extraordinarily.
• Feature-coding: This is a method in which we either apply to a format file
or to a bitmaps images of a file.

4.1.2 Audio steganography


In sound steganography, we insert mystery message into digitized sound sign which output
slight modifying of double grouping of the relating sound document. There are a few
strategies are accessible for sound steganography. We will have a short report presentation on
some of sound. It includes concealing knowledge in sound documents. This techniques
shrouds the information in WAV, AU and MP3 sound records. There are many type of
strategies for sound steganography. These techniques are:

1. Lower bit encoding.


2. Phase encoding. 3. Spread Spectrum

14
Fig – (iv) security system

4.1.3 Video steganography

It is a method of steganography in which we hide the secret infromation inside the video file.
In this discrete co-sine transforms is used to alter the digit which are used to hide the info in
each of the image in the videos, which can only be detected by some software but is
unnoticeable by the humans eye.

Configurations utilized by videos steganography are Mp4, MPEG, AVI.

15
Fig – (v) compression and embedding domain

4.2. STEGANOGRAPHY IN IMAGES


Storing data inside pictures is a popular procedure these days [1]. An image with a secret
message hidden inside is spreading over the WWW very quickly [2]. The utilization of
steganography in source groups has been researched by German steganographic expert Niels
Provos, who created a calculating group that detects the presence of hidden messages within
images posted on the net [3]. However, after checking one million pictures for information, no
hidden messages were found, suggesting that the actual use of steganography is still quite
limited [4].
Image steganography is the process of storing data inside an image so that it does not become
apparent to unintended users trying to detect the hidden messages or information [5]. To hide
a message inside an image without changing its properties, the source must be maintained in
noisy areas with many variations so that less attention is drawn to the alteration [6]. The most
commonly used technique is the least significant bit (LSB) method to modify the cover image
[7]. These techniques can be employed with varying degrees of success on different types of
image files [8].
Image steganography is performed on images, and the corresponding secret data is also
decrypted to recover the message from the image [9]. Since this can be done in several
different ways, image steganography is studied, and one of the methods is used to
demonstrate it [10]. Image steganography refers to concealing information[12].
16
Chapter-5: HOW IT WORKS

5.1 Implementation

5.1.1 Technical details are as follows:


1. Using python imaging library (PIL) for importing the image inside the compiler. 1)
from PIL import IMAGE.

2. img=image.open(path). Interfaces is build into the packages contain all the


required classes and method which is necessary for any changes made in the
image.
5.1.2 The encoding phase
The steganography’s method performed in LSB coding. The offset of the cover- image
which has to perform is retrieved from its header. That offset is left as it is to preserve the
integrity of the header, and from the next bytes, the encoding process gets started to hide
the secret information. For this process, the first task will be to get the input carrier files
which have to perform for the process.

Fig: (vi) encoding process

17
5.1.3 Creation of user space

1. User spaces are created in order to save the original files, So that all the
changes which are necessary is done in this.

2. In the object of I/p Image, using img=image.open(path) methods we took the original
image.

5.1.4 The decoding process


The offset of the image are retrieved from its header. Create the user space using the
same process as in the encoding. The data of image are taken into byte array. And
above byte array are written into the decoded text file, which leads to the original
message.

18
Chapter 6: BRIEF ALGORITHM IMPLEMENTATION

6.1 LSB (Lease significant bit)


There are two kinds of method for the process of image steganography:

• Transform method
• Spatial method

The method we used is Spatial method

In this process, the one of most commonly used method are LSB substitution methods.
LSB methods are a very easy way in order to put data in a cover image for the process. In
steganography, LSB substitute form are mostly used. Since every images has three
component (RED, GREEN, BLUE). This pixel info is then saved in original format in one
bytes each. The 1st bit store secret info for each and every pixel could be changed to store
the hidden info.

The secret infromation has to be the same size as of the image or it can be smaller also. The
(LSB) based method is a spatial methods But when we talk about noise deduction technique
this method is vulnerable. The (most significant bit) of the data images is to be stored in the
LSB of the images(i.e. cover images.) It are true that the pixel in an image is store in the
form of bit.

The change could not be detect by human visuals system (HVS) w.r.t intensity
and color of a pixels. When we change the LSB bits.Algorithms of LSB
methods of steganography, embedding phases and extracting phases these are
two phase of LSB method.

Algorithms are given below for both of the phases:

1. ENCODING PHASE:

Step 1: Array name (image_array) store all the pixel from the i/p image and extract Step2:

Array called (message_array) save text files of all extract messsage.

Step 2: Character retrieved from the stego-keys is to be saved in an array called key_array. A
stego- key or secret key is the pair of alphabets or numbers which is used to prove the
authenticity of the user. This key is generally with sender and receiver only.
19
Step 3: From keys-array the first pixel and character is used and gets placed in the first
component of the image pixels. If there is some left characters in keys-array, then it also gets
placed into the LSB of upcoming pixel.

Step 4: The end of the key is filled with with some digit that is either even or odd depending
upon the value.

Step 5: place each word of the message array in each components of upcoming pixel by
replacing it.

Step 6: Repeat step six until all the words gets placed.

Step 7: Again if it ends the place some encoding symbol to indicate end of the character.

Step 8: All the i/p character will be hide after the process done. The most straightforward
steganography procedures insert the bit of the message legitimately into least huge piece
planes of the spread pic in a deterministic succession. Balancing the least noteworthy piece do
not bring about human-recognizable distinction on the grounds that the sufficiency of the
changes are little. To shroud a mystery message inside a pic, a legitimate spread picture are
required. Since this strategy utilizes bits of every pixel in the picture, it is important to utilize
a lossy pressure position, generally the shrouded data will become mixed up in the change of
a loosy pressure calculation. When using a 24 piece shading pic, a touch of every single one
of the red, green and blue shading part can be utilized, so an aggregate of 3 bit can be put
away in every pixels. For instances, the accompanying matrices can be consider as 3 pixel of
a 24 piece shading pic, utilizing 9 byte of main memory.

(00100111 11101001 11001000) (0010011111001000 11101001)

(11001000 00100111 11101001)

When the character H, which binary value equals 01101000, are inserted, the following

(00100111 11101000 11001000)

(00100110 11001000 11101000)

(11001000 00100111 11101001)

20
Fig(vii)activity diagram(i)

21
22
6.1.2 Masking and filtering
In this method we normally iter through each pixel and change it according to the
corresponding message bit such that the cover image doesn‟t change in a noticible manner,the
last pixel of each word is made odd and even respectively in order to know the ending of each
and every word in an image.In this method the main motive is to hide the data in such a
manner that the tiny change in the color of the image is not visible by the third party. In other
words the image should look like the old image itself.

23
Chapter 7: SYSTEM DESIGN

1.1 Use case diagram

24
1.2 Activity Diagram

25
Advantages and disadvantages
Advantages of steganography
• Difficult to detect by someone who does not know about this communication, whether the
transaction is taking place or not.
• In order to view the hidden message user should have to enter the secret key which was
generated using the steganographic algorithm.
• Easy to implement with the help of LSB algorithm.
• Can be used in arm forces and intelligence agencies.

Disadvantages of steganography

• Sender and receiver should have the same software to encrypt or decrypt message.
• If encryption key is lost, then important information will be lost too.
• The cover image used should have size greater than the message bytes.

• Hidden information can be viewed by attackers if proper encryption algorithm used.


• Encryption may effect luminance of the cover image.

26
Conclusion

• Steganography is still in it‟s nascent age.


• The importance of steganography has not been noticed yet, where it is preferred
over all its close rival for “Encryption”.

It is analysed that time is not far away when the importance of steganograohy
would be realized by organizations and the arm forces in particular. Until then
New technique are being discovered and implemented.

27
References

1. Fridrich, Jessica; Goljan, M.; Soukal, D. (2004). "Searching for the Stego Key" (PDF).
Proceedings of SPIE, Electronic Imaging, Security, Steganography, and Watermarking
of Multimedia Contents VI. 5306: 70–82. Bibcode: 2004SPIE.5306...70F. Retrieved 23
January 2014.
2. Pahati, OJ (2001-11-29). "Confounding Carnivore: How to Protect Your Online
Privacy". AlterNet. Archived from the original on 2007-07-16. Retrieved 2008-09-02.
3. Petitcolas, FAP; Anderson, RJ; Kuhn, MG (1999). "Information Hiding: A Survey"
(PDF). Proceedings of the IEEE. 87(7): 1062–1078. CiteSeerX 10.1.1.333.9397.
doi:10.1109/5.771065. Retrieved 2008-09-02.
4. "Polygraphiae (cf. p. 71f)" (in German). Digitale Sammlungen. Retrieved 2015-05-02.
5. "The Origin of Modern Steganography".
6. Cheddad, Abbas; Condell, Joan; Curran, Kevin; McKevitt, Paul (2010). "Digital Image
Steganography: Survey and Analysis of Current Methods". Signal Processing. 90(3):
727–752. doi:10.1016/j.sigpro.2009.08.010.
7. "Audio Steganography: Echo Data Hiding". SlideFinder. Retrieved 2019-09-17.
8. "Secure Steganography for Audio Signals".
9. Cheddad, Abbas; Condell, Joan; Curran, Kevin; McKevitt, Paul (2009). "A Skin Tone
Detection Algorithm for an Adaptive Approach to Steganography". Signal Processing.
89(12): 2465–2478. doi:10.1016/j.sigpro.2009.04.022.
10. Akbas, E. Ali (2010). "A New Text Steganography Method by Using Non-Printing
Unicode Characters" (PDF). Engineering & Technology Journal. 28(1).
11. Aysan, Zach (2017-12-30). "Zero-Width Characters". Retrieved January 2, 2018. In
early 2016, I realized that it was possible to use zero-width characters, like zero-width
non-joiner or zero-width space, to fingerprint text. Even with just a single type of zero-
width character, the presence or absence of the non-visible character is enough bits to
fingerprint even the shortest text.
12. Aysan, Zach (2018-01-01). "Text Fingerprinting Update". Retrieved January 2, 2018.

You might also like