Professional Documents
Culture Documents
On
“Image Steganography “
(Project Coordinator 1)
Mrs. K. Kusumalatha
(Project Coordinator 2)
1
Sreenidhi Institute of Science & Technology (Autonomous)
2022-2023
DEPARTMENT OF ELECTRONICS & COMPUTER ENGINEERING
SREENIDHI INSTITUTE OF SCIENCE AND TECHNOLOGY
(AUTONOMOUS)
CERTIFICATE
This is to certify that the INFORMATION SECURITY Project work entitled “Image
Dr.D. Mohan
HOD, ECM Dept.
2
DECLARATION
This is to certify that the INFORMATION SECURITY Lab Project Report titled
Ghatkesar, Hyderabad.
The report is based on the project work done entirely by us and not copied from any
other source.
P.SRAVANTHI 20311A1911
M.ADHVAITH 20311A1914
L.YASHWANTH 20311A1918
M.LAHARI 20311A1928
3
ACKNOWLEDGMENT
I take immense pleasure in thanking HOD Dr.D. MOHAN, Principal Dr. Ch. Shiva
Reddy and our Executive Director C.V TOMYand all faculty members of ECM
department for having permitted me to carry out this Lab Project work.
P.SRAVANTHI 20311A1911
M.ADHVAITH 20311A1914
L.YASHWANTH 20311A1918
M.LAHARI 20311A1928
4
ABSTRACT
The word steganography means” covered in hidden writing”. The object of steganography is to
send a message through some innocuous carrier (to a receiver while preventing anyone else
from knowing that a message is being sent to all. Computer based steganography allows changes
to be made to what are known as digital carriers such as images or sounds .The changes
represent the hidden message, but result if successful in no discernible change to the carrier.
The information may be nothing to do with the carrier sound or image or it might be
information about the carrier such as the author or a digital watermarking or fingerprint
.In steganography information can be hidden in carriers such as images, audio files, text
files, and video and data transmissions. When message is hidden in the carrier a stego carrier
is formed for example a stego-image. Hopefully it will be perceived to be as close as
possible to the original carrier or cover image by the human senses. Images are the most
widespread carrier medium. The are used for steganography in the following way. The
message may firstly be encrypted. They are used for steganography in the following
way. The message may firstly be encrypted. The sender embeds the secret message to be sent
into a graphic file. This results in the production of what is called stego-image. Additional
secret data may be needed in the hiding process e.g. a stego-key etc. This stego-image
is then transmitted to the recipient
5
INDEX
1 Introduction 7
2 Objective 8
4 Implementation 10-15
5 Working 16
7 Conclusion 18
8 References 19
6
CHAPTER-1
INTRODUCTION
7
CHAPTER-2
OBJECTIVE
Like many security tools, steganography can be used for a variety of reasons, some good,
some not so good.Legitimate purposes can include things like watermarking images for
reasons such as copyright protection. Digital watermarks (also known as
fingerprinting, significant especially in copyrighting material) are similar to
steganography in that they are overlaid in files, which appear to be part of the original
file and are thus not easily detectable by the average person.
Steganography can also be used as a way to make a substitute for a one-way hash value
(where you take a variable length input and create a static length output string to verify that
no changes have been made to the original variable length input).
Steganography can be used to tag notes to online images (like post-it notes attached to
paper files).
If someone was trying to steal data, they could conceal it in another file or files and
send it out in an innocent looking email or file transfer.
8
CHAPTER- 3
Software Requirement
Microsoft windows 2000, XP, Vista, Windows 7 etc
Java Development Kit (jdk):1.4, 1.5
Hardware Requirements
Pc/AT 533 and above with MMX
64 MB RAM and above
Mouse or Pointing Devices
Minimum of 80 MB Hard Disk Space
9
CHAPTER 4
IMPLEMENTATION
CODE:
def genData(data):
# of given data
newd = []
for i in data:
newd.append(format(ord(i), '08b'))
return newd
10
# Pixels are modified according to the
datalist = genData(data)
lendata = len(datalist)
imdata = iter(pix)
for i in range(lendata):
imdata.__next__()[:3] +
imdata.__next__()[:3]]
pix[j] -= 1
if(pix[j] != 0):
11
pix[j] -= 1
else:
pix[j] += 1
# pix[j] -= 1
# message is over.
if (i == lendata - 1):
if (pix[-1] % 2 == 0):
if(pix[-1] != 0):
pix[-1] -= 1
else:
pix[-1] += 1
else:
if (pix[-1] % 2 != 0):
pix[-1] -= 1
pix = tuple(pix)
yield pix[0:3]
yield pix[3:6]
12
yield pix[6:9]
w = newimg.size[0]
(x, y) = (0, 0)
if (x == w - 1):
x=0
y += 1
else:
x += 1
def encode():
if (len(data) == 0):
13
raise ValueError('Data is empty')
newimg = image.copy()
encode_enc(newimg, data)
newimg.save(new_img_name, str(new_img_name.split(".")[1].upper()))
def decode():
data = ''
imgdata = iter(image.getdata())
while (True):
imgdata.__next__()[:3] +
imgdata.__next__()[:3]]
binstr = ''
14
for i in pixels[:8]:
if (i % 2 == 0):
binstr += '0'
else:
binstr += '1'
if (pixels[-1] % 2 != 0):
return data
# Main Function
def main():
if (a == 1):
encode()
elif (a == 2):
else:
# Driver Code
if __name__ == '__main__' :
15
CHAPTER-5
WORKING
If two users exchanged media files over the internet, it would be more difficult to
determine whether these files contain hidden messages than if they were
communicating using cryptography.
Image Steganography –
As the name suggests, Image Steganography refers to the process of hiding data within
an image file. The image selected for this purpose is called the cover image and the
image obtained after steganography is called the stego image.
How is it done?
An image is represented as an N*M (in case of grayscale images) or N*M*3 (in case
of color images) matrix in memory, with each entry representing the intensity value of
a pixel. In image steganography, a message is embedded into an image by altering the
values of some pixels, which are chosen by an encryption algorithm. The recipient of
the image must be aware of the same algorithm in order to know which pixels he or
she must select to extract the message.
16
CHAPTER-6
RESULTS AND OUTPUT
17
CHAPTER-7
CONCLUSION
Image Steganography. Images are an excellent medium for concealing
information because they provide a high degree of redundancy - which means that
there are lots of bits that are there to provide accuracy far greater than necessary for
the object's use (or display). Steganography techniques exploit these redundant bits to
hide the information/payload by altering them in such a way that alterations cannot be
detected easily by humans or computers. Color depth and definition. However, after
checking one million images, no hidden messages were found, so the practical use of
steganography still seems to be limited. Image Steganography is the technique of
hiding the data within the image in such a way that prevents the unintended user from
the detection of the hidden messages or data.
18
CHAPTER-8
REFERENCES
19