Project Report Final
Project Report Final
Page | II
CERTIFICATE
It is certified that the work contained in the project titled Shooter Game by Jahanvi has been
carried out under my guidance and that this work has not been submitted elsewhere for a degree.
Signature of Guide
Dr. Sunita Rani
Department of CSE/IT
BPSMV
Page | III
ACKNOWLEDGEMT
This work is just not an individual contribution till its completion. I take
this opportunity to express a deep gratitude towards my teacher, for
providing excellent guidance encouragement and inspiration throughout the
training work without his invaluable guidance, this work would never have
been a successful one.
Last but not the least, we wish to thank our parents for financing our studies in
this college as well as for constantly encouraging us to learn engineering. Their
personal sacrifice in providing this opportunity to learn engineering is
gratefully acknowledged.
Page |
IV
TABLE OF CONTENTS
1 Introduction 6–7
3 System Design 10 – 13
5 System Implementation 17 – 29
7 References 34
Page | 5
INTRODUCTION
PROJECT SUMMARY
Steganography is the art of hiding information and an effort to conceal the existence of
the embedded information. It serves as a better way of securing message than
cryptography which only conceals the content of the message not the existence of the
message. Original message is being hidden within a carrier such that the changes so
occurred in the carrier are not observable. In this paper we will discuss how digital
images can be used as a carrier to hide messages. This paper also analyses the
performance of some of the steganography tools. Steganography is a useful tool that
allows covert transmission of information over an over the communications channel.
Combining secret image with the carrier image gives the hidden image. The hidden
image is difficult to detect without retrieval.
PURPOSE
Page | 6
For example, when a secret message is hidden within a cover image, the resulting
product is a stego-image.
A possible formula of the process may be represented as:
cover medium + embedded message + stego key = stego-medium
Fig. 2
(Phase of Steganography)
SCOPE
Steganography can be a solution which makes it possible to send news and information
without being censored and without the fear of the messages being intercepted and
traced back to us. It is also possible to simply use steganography to store information on
a location. For example, several information sources like our private banking
information, some military secrets, can be stored in a cover source. When we are
required to unhide the secret information in our cover source, we can easily reveal our
banking data and it will be impossible to prove the existence of the military secrets
inside. Steganography can also be used to implement watermarking. Although the
concept of watermarking is not necessarily steganography, there are several
steganographic techniques that are being used to store watermarks in data. The main
difference is on intent, while the purpose of steganography is hiding information,
watermarking is merely extending the cover source with extra information.
Page | 7
SYSTEM ANALYSIS
USER CHARACTERISTICS
Page | 8
HARDWARE AND SOFTWARE REQUIREMENT
HARDWARE SPECIFICATION
Processor Intel Pentium 4 or later
RAM 2 GB or more
Hard Disk 20 GB or more
Mouse Standard Mouse
Keyboard Standard Keyboard
SOFTWARE SPECIFICATION
Operating System Windows 7, Linux or later
Language Python 3
Libraries Used Numpy, Pandas, OS, Matplotlib, CV
IDE Jupyter Notebook
Page | 9
SYSTEM DESIGN
Unusual patterns in a stego image are suspicious. For example, there are some disk
analysis utilities that can filter hidden information in unused partitions in storage
devices. Filters can also be used to identify TCP/IP packets that contain hidden or
invalid information in the packet headers. TCP/IP packets used to transport information
across the Internet have unused or reserved space in the packet headers. Digital image
steganography and its derivatives are growing in use and application. In areas where
cryptography and strong encryption are being outlawed, citizens are looking at
steganography to circumvent such policies and pass messages covertly. As with the
other great innovations of the digital age: the battle between cryptographers and
cryptanalysis, security experts and hackers, record companies and pirates,
steganography and Steganalysis will continually develop new techniques to counter
each other.
The disabling or removal of hidden information in images is dependent on the image
processing techniques. For example, with LSB methods of inserting data, simply
compressing the image using lossy compression is enough to disable or remove the
hidden message. There are several available steganographic detection tools such as
Encase by Guidance Software Inc., ILook Investigator by Electronic Crimes Program,
Washington DC, various MD5 hashing utilities, etc.
Page | 10
PROBLEM AND WEAKNESSES OF CURRENT SYSTEM
Detection: Steganography can be detected if a person has the right tools and
techniques, so it is not a foolproof method of securing communication.
Complexity: Steganography can be complex and requires specialized tools and
knowledge to implement effectively.
Lengthy Transmission Time: Hiding data within an image can be a time- consuming
process, especially for large files, which can slow down the transmission of data.
Susceptibility to Data Loss: The hidden message may be lost or distorted during the
transmission or processing of the image, resulting in a loss of data. Misuse:
Steganography can be misused for illegal activities, including hiding malicious
code or malware within an image, making it difficult to detect and prevent
cybersecurity attacks.
STEGANOGRAPHIC MODEL
Page | 11
As found in the above picture, both the first picture file(X) and mystery message
(M) that should be covered up are taken care of into a steganographic encoder as info.
Steganographic Encoder work, f (X, M, K) inserts the mystery message into a spread
picture record by utilizing procedures like least critical piece encoding. The subsequent
stego picture looks fundamentally the same as your spread picture record, with no
obvious changes. These finishes encoding. To recover the mystery message, stego
object is taken care of into Steganographic decoder. This paper will assist you with
implementing picture steganography utilizing Python. It will assist you with composing
a Python code to conceal instant messages utilizing a procedure called Least Significant
Bit.
Fig. 5.1
(RGB Pixel)
Fig. 5.2
(Bit Details)
Page | 12
From the above image it is clear that, if we change MSB it will have a larger impact on
the final value but if we change the LSB the impact on the final value is minimal, thus
we use least significant bit steganography.
Every pixel contains three qualities which are Red, Green, Blue, these qualities run
from 0 to 255, at the end of the day, they are 8-piece esteems. Let’s take a case of how
this strategy functions, assume you need to shroud the message “howdy” into a 4x4
picture which has the accompanying pixel esteems:
[(225, 12, 99), (155, 2, 50), (99, 51, 15), (15, 55, 22), (155, 61, 87), (63, 30, 17),
(1, 55, 19), (99, 81, 66), (219, 77, 91), (69, 39, 50), (18, 200, 33), (25, 54, 190)]
Utilizing the ASCII Table, we can change over the mystery message into decimal
qualities and afterward into parallel: 0110100 0110101.Now, we repeat over the pixel
esteems individually, subsequent to changing over them to twofold, we supplant every
least noteworthy piece with that message bits successively The subsequent pixel
esteems in the wake of performing LSBS is as demonstrated as follows:
[(224, 13, 99), (154, 3, 50), (98, 50, 15),(15, 54, 23),(154, 61, 87),(63, 30, 17),(1,
55, 19),(99, 81, 66),(219, 77, 91),(69, 39, 50),(18, 200, 33),(25, 54, 190)]
Sampling Patterns
There are three sampling patterns available in H.264 that allow to reduce the amount of
stored chroma information: 4:4:4, 4:2:2 and 4:2:0. They are illustrated in Figure 4. 4:2:0
is most common since the human eye usually does not notice any difference to the
original image even though the number of chroma samples is reduced to a quarter.
Fig. 6
(Different sampling patterns)
Page | 13
TESTING
TESTING PLAN
Any system, to be successful, must be thoroughly tested, and well managed test plan
should be prepared before actual testing is being performed. “Modules” have been
developed and need to be tested in a manner that can reduce occurring of defects as low
as possible. Following are the activities we planned to test the system.
One test activity “Basis Path Testing” that will try to cover all paths in the
system. This activity identifies all paths that provide different functionality of the
system, and also other paths to reach at that functionality.
Other testing activity is “Control Structure Testing”, which will test each and
every condition with positive and negative data combination.
This testing activity will also perform “Data Floe Testing” in which it will be
tested how the data re following the system. And will also check whether the data
entered from one procedure, is reflected whenever it requires or not.
All conditions will be tested with “Boundary Value Analysis” where different input will
be given to test whether the system is functioning with boundary values or not.
TESTING STRATEGY
CONTENT TESTING:
Page | 14
Content Testing attempt to uncover this and many other problems before the user
encounter them.
INTERFACE TESTING
Interface design model is reviewed to ensure that generic quality criteria established for
all user interfaces have been achieved and that application specific interface design
issue has been properly addressed.
Page | 15
Fig. 11.1 Fig. 11.2
(Cover Image) (Stego Image)
Page | 16
SYSTEM IMPLEMENTATION
SYSTEM CODING
else:
t1=t-48
t2=t1^170
res = bin(t2)[2:].zfill(8) add+="0110"+res
i+=1 res1=add+"111111111111"
print("The string after binary conversion appyling all the transformation :- " +
(res1))
length = len(res1)
print("Length of binary after conversion:- ",length)
HM_SK="" ZWC={"00":u'\u200C',"01":u'\u202C',"11":u'\u202D'
,"10":u'\u200E'}
file1 = open("Sample_cover_files/cover_text.txt","r+")
nameoffile = input("\nEnter the name of the Stego file after Encoding(with
extension):- ")
file3= open(nameoffile,"w+", encoding="utf-8") word=[]
for line in file1: word+=line.split()
i=0 while(i<len(res1)):
s=word[int(i/12)] j=0
x=""
HM_SK=""
while(j<12):
x=res1[j+i]+res1[i+j+1] HM_SK+=ZWC[x]
j+=2 s1=s+HM_SK
file3.write(s1) file3.write("
") i+=12
t=int(len(res1)/12) while
Page | 17
t<len(word):
file3.write(word[t]) file3.write("
") t+=1
file3.close() file1.close()
print("\nStego file has successfully generated")
Page | 18
bits:",temp)
lengthd = len(temp)
print("\nLength of encoded bits:- ",lengthd) i=0
a=0
b=4
c=4
d=12
final=''
while i<len(temp):
t3=temp[a:b] a+=12
b+=12
i+=12
t4=temp[c:d] c+=12
d+=12 if(t3=='0110'):
decimal_data = BinaryToDecimal(t4) final+=chr((decimal_data ^
170) + 48)
elif(t3=='0011'):
decimal_data = BinaryToDecimal(t4) final+=chr((decimal_data ^
170) - 48)
print("\nMessage after decoding from the stego file:- ",final)
Page | 19
elif type(msg) == int or type(msg) == np.uint8: result=format(msg, "08b")
else:
raise TypeError("Input type is not supported in this function")
return result
def encode_img_data(img):
data=input("\nEnter the data to be Encoded in Image :")
if (len(data) == 0):
raise ValueError('Data entered to be encoded is empty')
nameoffile = input("\nEnter the name of the New Image (Stego Image) after
Encoding(with extension):")
no_of_bytes=(img.shape[0] * img.shape[1] * 3) //
8
if(len(data)>no_of_bytes):
raise ValueError("Insufficient bytes Error, Need Bigger Image or give
Less Data !!")
data +='*^*^*'
binary_data=msgtobinary(data) print("\n")
print(binary_data)
length_data=len(binary_data)
for i in img:
for pixel in i:
nframes=song.getnframes() frames=song.readframes(nframes)
Page | 21
frame_list=list(frames) frame_bytes=bytearray(frame_list)
data = input("\nEnter the secret message :- ") res = ''.join(format(i, '08b') for i
in
bytearray(data, encoding ='utf-8'))
print("\nThe string after binary conversion :- "
+ (res))
length = len(res)
print("\nLength of binary after conversion :- ",length)
for c in data:
bits = bin(ord(c))[2:].zfill(8) result.extend([int(b) for b in bits])
j=0
for i in range(0,len(result),1):
res = bin(frame_bytes[j])[2:].zfill(8) if res[len(res)-4]==
result[i]:
frame_bytes[j] = (frame_bytes[j] &
253) #253: 11111101
else:
frame_bytes[j] = (frame_bytes[j] & 253) |
2
frame_bytes[j] = (frame_bytes[j] & 254) |
result[i]
Page | 22
j=j+1
stego file
(with extension) :- ")
with wave.open(stegofile, 'wb') as fd: fd.setparams(song.getparams())
fd.writeframes(frame_modified)
print("\nEncoded the data successfully in the audio file.")
song.close()
nframes=song.getnframes() frames=song.readframes(nframes)
frame_list=list(frames) frame_bytes=bytearray(frame_list)
if(p==1):
break
res = bin(frame_bytes[i])[2:].zfill(8) if res[len(res)-2]==0:
extracted+=res[len(res)-4] else:
extracted+=res[len(res)-1]
def KSA(key):
key_length = len(key)
S=list(range(256)) j=0
for i in range(256):
j=(j+S[i]+key[i % key_length]) % 256
S[i],S[j]=S[j],S[i]
return S
S=KSA(key)
cipher=keystream^plaintext ctext=''
for c in cipher: ctext=ctext+chr(c)
return ctext
Page | 24
def decryption(ciphertext): print("Enter the key : ")
key=input() key=preparing_key_array(key)
S[i],S[j]=S[j],S[i]
return S
decoded=keystream^ciphertext dtext=''
for c in decoded: dtext=dtext+chr(c)
return dtext
def embed(frame):
data=input("\nEnter the data to be Encoded in Video :")
data=encryption(data)
print("The encrypted data is : ",data) if (len(data) == 0):
raise ValueError('Data entered to be encoded is empty')
data +='*^*^*'
binary_data=msgtobinary(data) length_data =
len(binary_data)
index_data = 0 for i in
frame:
for pixel in i:
r, g, b = msgtobinary(pixel) if index_data <
length_data:
Page | 25
pixel[0] = int(r[:-1] + binary_data[index_data], 2)
index_data += 1
if index_data < length_data: pixel[1] = int(g[:-1] +
binary_data[index_data], 2)
index_data += 1
if index_data < length_data: pixel[2] = int(b[:-1] +
binary_data[index_data], 2)
index_data += 1
if index_data >= length_data:
break
return frame
def decode_vid_data(frame_):
cap = cv2.VideoCapture('stego_video.mp4') max_frame=0;
while(cap.isOpened()): ret, frame =
cap.read() if ret == False:
break
max_frame+=1
print("Total number of Frame in selected Video
:",max_frame)
print("Enter the secret frame number from where you want to extract data")
n=int(input())
vidcap = cv2.VideoCapture('stego_video.mp4') frame_number = 0
while(vidcap.isOpened()):
frame_number += 1
ret, frame = vidcap.read() if ret == False:
break
if frame_number == n:
extract(frame_) return
def main():
print("\t\t STEGANOGRAPHY")
while True:
print("\n\t\t\tMAIN MENU\n")
print("1. IMAGE STEGANOGRAPHY {Hiding Text in Image cover file}")
print("2. TEXT STEGANOGRAPHY {Hiding Text in Text cover
file}")
print("3. AUDIO STEGANOGRAPHY {Hiding Text in Audio cover file}")
print("4. VIDEO STEGANOGRAPHY {Hiding Text in Video cover file}")
Page | 27
print("5. Exit\n")
choice1 = int(input("Enter the Choice: ")) if choice1 == 1:
img_steg() elif
choice1 == 2:
txt_steg() elif choice1
== 3:
aud_steg() elif choice1
== 4:
vid_steg() elif choice1
== 5:
break
else:
print("Incorrect Choice") print("\n\n")
Page | 28
OUTPUT
Page | 29
CONCLUSION
Steganography is the art of hiding information and an effort to conceal the existence of
the embedded information. It serves as a better way of securing message than
cryptography which only conceals the content of the message not the existence of the
message. Original message is being hidden within a carrier such that the changes so
occurred in the carrier are not observable. In this paper we will discuss how digital
images can be used as a carrier to hide messages. This paper also analyses the
performance of some of the steganography tools. Steganography is a useful tool that
allows covert transmission of information over an over the communications channel.
Combining secret image with the carrier image gives the hidden image. The hidden
image is difficult to detect without retrieval.
Page | 30
APPLICATION AREA
Here are some potential applications of steganography in a project report:
Embedding Metadata:
Purpose: Include metadata within the document for organizational or tracking purposes.
Example: Embed information about the project, authors, or version details within the document
for reference.
Page | 31
Covert Communication in Collaborative Projects:
Purpose: Use steganography for covert communication within the document among
collaborators.
Example: Embed messages or comments within the text or images that are only visible to
specific collaborators who know the extraction method.
Page | 32
FUTURE SCOPE
In the near future, the most important use of steganographic techniques will probably
be lying in the field of digital watermarking. Content providers are eager to protect
their copyrighted works against illegal distribution and digital watermarks provide a
way of tracking the owners of these materials.
Steganography might also become limited under laws, since governments already
claimed that criminals use these techniques to communicate.
Page | 33
REFERENCES
http://www.nicetext.com/doc/isc01.pdf
http://www.beyonddiscovery.org/content/view.page.asp?I=1956, 2003 .
https://en.wikipedia.org/wiki/Steganography
https://www.youtube.com/watch?v=xepNoHgNj0w
https://www.freecodecamp.org/news/what-is-steganography-hide-data-inside-
data
https://www.wired.com/story/steganography-hacker-lexicon
Page | 34