Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

tanuj

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 64

MINI PROJECT REPORT

IMAGE STEGANOGRAPHY

A report submitted in partial fulfillment of the requirements for

MASTER’S IN COMPUTER APPLICATION’S

Submitted by
Tanuj Bhandari (2301530140104)

Under Supervision
of
Name: Mr. Sachin Kumar Gupta
Designation: Assistant professor

Department Of Computer Application’s


Lloyd Institute of Engineering and Technology, Greater Noida

1
Lloyd Institute of Engineering and Technology, Greater Noida
Department of Computer Application’s

CERTIFICATE

This is to certify that the “Mini Project on Image Steganography” submitted by Aditi Mishra, Anjali
Sharma and Tanuj Bhandari is their work done by them and submitted during 2024 – 2025 academic year,
in partial fulfillment of the requirements for the award of the degree of MASTER’S IN COMPUTER
APPLICATION’S.

Supervisor
Mr. Sachin Kumar Gupta
Assistant Professor

2
ACKNOWLEDGEMENT
I take this opportunity to express my heartfelt gratitude and sincere appreciation to all those who supported
and guided me throughout the completion of me Mini Project for the MCA course.

First and foremost, I would like to extend my sincere thanks to my project guide, Sachin sir, for their
invaluable guidance, constant encouragement, and timely feedback. Their expertise, insightful suggestions,
and dedication have played a crucial role in shaping this project.

I am also deeply grateful to the faculty members and the department of MCA at Lloyd Institute Of
Engineering and Technology for providing the necessary resources and a conducive learning environment to
successfully complete the project.

A special thanks to my family and friends for their unwavering support, patience, and motivation. Their
belief in me gave me the strength to overcome challenges and stay focused on the project.

Finally, I would like to express my gratitude to all those who directly or indirectly contributed to this
project. This project would not have been possible without their support.

Thank you all for being a part of this journey.

Tanuj Bhandari
MCA
Lloyd Institute Of Engineering and Technology
02/01/2025

3
ABSTRACT

This report presents the detailed analysis and implementation of an Image Steganography, developed as part
of the Master of Computer Applications (MCA) program. The objective of this project is to design and
develop an efficient solution for securely hiding the data in the image, utilizing modern software
development techniques and technologies. The system aims to securely hide information within an image in
such a way that the presence of the hidden data is undetectable to casual observers or attackers. The main
objectives of image steganography include concealment, security, capacity, stealth, and Robustness.

The project employs Python Django Html Css and Javascript to ensure robustness, scalability, and ease of
use. The system architecture is designed to Cover Image Characteristics, Embedding Domain, Data
Embedding Technique, Payload Capacity, Robustness, and Security Perceptual Quality Steganalysis
Resistance Extraction Mechanism, facilitating a smooth and intuitive user experience. The implementation
includes features such as Data Embedding, Data Extraction, and Encryption Support, ensuring that the
system meets the requirements specified in the project scope.

Throughout the development process, various challenges were encountered, such as Maintaining Image
Quality, Data Security and User Interface Challenges. These were addressed by applying techniques like
LSB, encrypting the secret data before embedding it into the image, by creating an intuitive interface The
project’s outcomes have demonstrated successful implementation, with results indicating improved
efficiency, accuracy, and user satisfaction.

This project provides a comprehensive solution to hiding information to image and serves as a practical
demonstration of the application of advanced computing principles in real-world scenarios.

4
OBJECTIVES

The primary objectives of this Mini Project are:

1. To Design and Develop a Functional System:


o To create a user-friendly and efficient software solution that addresses the core
problem of [state the problem, e.g., inventory management, student information
system, etc.].
2. To Implement Relevant Technologies:
o To apply modern technologies and programming languages such as Html, CSS,
python, and javascript in the development of the system.
3. To Enhance System Efficiency:
o To ensure the system operates with high performance, processing data quickly
while maintaining optimal resource usage and reliability.
4. To Build a Scalable Architecture:
o To design an architecture that can scale easily as per the growing needs,
ensuring flexibility and future enhancement capabilities.
5. To Incorporate Key Features:
o To integrate important functionalities such as data encryption, and decryption in
a seamless manner.
6. To Ensure Data Security:
o To implement appropriate security measures to safeguard sensitive data,
ensuring secure transactions and information management.
7. To Conduct Comprehensive Testing:
o To rigorously test the system for bugs, performance issues, and user acceptance,
ensuring the final product meets the desired requirements and is error-free.
8. To Provide a Real-World Solution:
o To deliver a practical and effective solution that can be deployed in real-world
scenarios, adding value to the target users or organization.

5
List of Figure

FIGURES: Page No.


1. Use Case Diagram 20
2. Activity Diagram 21
3. Class Diagram 22
4. Sequence Diagrams 23
5. State Chart Diagram 23
6. DFD Level 0 24
7. DFD Level 1 25
8. DFD Level 2 26
9. Fig 1 Steganography Process 9
10. Fig 1 Home Page Image 28
11. Fig 2.1 About us Image 28
12. Fig 2.2 About us Image 28
13. Fig 3.1Encryption Page Image 29
14. Fig 3.2 Encryption Page Image 29
15. Fig 4.1 Decryption Page Image 30
16. Fig 4.2 Decryption Page Image 31

6
TABLE OF CONTENT

Declaration 1
Certificate 2
Acknowledgement 3
Abstract 4
List of Figure 5
Table of content 6
Chapter 1. Introduction 8
1.1 Objective 11
1.2 Need of Project 11
Chapter 2. Feasibility Study 12
2.1 Purpose 13
2.2 Scope 13
Chapter 3. Software Specific Requirement 15
3.1 Overall Description 16
3.2 Product Perspective 16
3.3 Product Functions 17
3.4 User Characteristics 17
3.5 Functional Requirements 18
3.6 Non- Functional Requirements 18
Chapter 4. System Design
19
4.1 Use Case Diagram 20
4.2 Activity Diagram 20
4.3 Class Diagram 22

6
4.4 Sequence Diagrams 23
4.5 Data Flow Diagram 24
4.6 State Chart Diagram 23
4.7 DFD Level 0 24
4.8 DFD Level 1 25
4.9 DFD Level 2 26
Chapter 5. GUI/Coding 27
Chapter 6. Technological Environment 58
6.1 Hardware Requirements 59
6.2 Software Requirements 59
Chapter 7. Conclusion 60
7.1 Project Limitation 61
7.2 Future Scope 61
References 63

7
Chapter 1
Introduction

8
Introduction

Steganography is a Greek word which means concealed writing. The word steganos means
covered and graphial means writing. Thus, steganography is not only the art of hiding data but
also hiding the fact of transmission of secret data. Steganography hides the secret data in another
file in such a way that only the recipient knows the existence of message. In ancient time, the
data was protected by hiding it on the back of wax, writing tables, stomach of rabhits or on the
scalp of the slaves. But todays most of the people transmit the data in the form of text, Images,
video, and audio over the medium. In order to safely transmission of confidential data, the
multimedia object like audio, video, images are used as a cover sources to hide the data.
Steganography is defined as the study of invisible communication. Steganography usually deals
with the ways of hiding the existence of the communicated data in such a way that it remai
confidential. It maintains secrecy between two communicating parties. In image steganography,
secrecy is achieved by embedding data into cover image and generating a stego-image. There are
different types of steganography techniques each have their strengths and weaknesses. In this
paper, we review the different security and data liding techniques that are used to implement a
steganography such as LSB, ISB, MLSB etc.

Figure 1: Steganography
Process

9
In todays world, the communication is the basic necessity of every growing area. Everyone
wants the secrecy and safety of their communicating data. In our daily life, we use many secure
pathways like internet or telephone for transferring and sharing information, but it's not safe at a
certain level. In order to share the information in a concealed manner two techniques could be
used. These mechanisans are cryptography and steganography. In cryptography, the message is
modified in an encrypted form with the help of encryption key which is known to sender and
receiver only. The message cannot be accessed by anyone without using the encryption key.
However, the transmission of encrypted message may easily arouse attackers suspicion, and the
encrypted message may tims be intercepted, attacked or decrypted violently. In order to
overcome the shortcomings of cryptographic techniques, steganography techniques have been
developed. Steganography is the art and science of communicating in such a way that it hides the
existence of the communication. Thus, steganography hides the existence of data so that no one
can detect its presence. In steganography the process of hiding information content inside any
multimedia content like image, audio, video refered as a Embedding. For increasing
confidentiality of communicating data both techniques may combined. Application of
Steganeography

i) Confidential Communication
ii) Protection of Data Alteration
in) Access Control System for Digital Content Distribution
iv) E-Commerce
v) Media
vi) Database Systems.

10
1.1 Objective
The objective of this project is to design and implement an effective image steganography
system capable of securely embedding sensitive information within digital images. This system
aims to ensure the confidentiality of the hidden data while maintaining the visual quality of the
carrier image, making any alterations imperceptible to the human eye. A key focus of the project
is to maximize the data embedding capacity while preserving the image's integrity.
Additionally, the project seeks to create a robust system that can withstand common
manipulations, such as compression, resizing, and noise, ensuring the hidden data remains intact
under various conditions. The implementation will prioritize efficient methods for embedding
and retrieving data, ensuring ease of use and reliability for authorized users. To enhance security,
encryption or similar mechanisms will be incorporated, ensuring only authorized individuals can
access and extract the embedded information. Lastly, the system will aim to resist detection by
steganalysis tools, providing a discreet and secure solution for applications like secure
communication, digital watermarking, and copyright protection

1.2 Need of Project


The need for an image steganography project arises from the growing demand for secure
communication and data protection in an increasingly digital world. In scenarios where sensitive
information needs to be transmitted or stored, traditional encryption methods, while secure, can
draw attention to the presence of confidential data. Image steganography addresses this challenge
by hiding information within digital images, making it nearly invisible and thereby reducing the
risk of detection by unauthorized parties.
This project is essential in applications like secure message transmission, copyright protection,
and digital watermarking, where maintaining confidentiality, authenticity, and integrity is crucial.
It provides an additional layer of security by ensuring that even if the carrier image is
intercepted, the hidden data remains concealed without raising suspicion. Furthermore, as digital
images are ubiquitous in modern communication, this technique offers a versatile and practical
solution for embedding and safeguarding data discreetly.
The project also addresses the need to develop techniques resilient to image modifications, such
as compression or noise, ensuring the hidden data remains accessible under various conditions.
By achieving these goals, the project contributes to advancing secure communication methods
and protecting sensitive information in a digital landscape prone to surveillance and cyber
threats.

11
Chapter 2
Feasibility study

12
Feasibility study

2.1 Purpose

The primary purpose of image steganography is to securely embed information within digital
images in a manner that ensures the information remains hidden and imperceptible to
unauthorized observers. This technique enables discreet communication, data protection, and
copyright management without attracting attention to the presence of sensitive data.

Image steganography is often used to ensure confidentiality in situations where the mere
existence of encrypted data could raise suspicion. By concealing information within seemingly
innocuous images, it provides a covert channel for transmitting sensitive messages or files.
Additionally, it serves as a tool for digital watermarking, enabling the embedding of ownership
or authenticity markers within media files to prevent unauthorized use or tampering.

Overall, the purpose of image steganography is to enhance data security, support covert
communication, and enable the protection of intellectual property, making it a valuable tool in
various domains, including cybersecurity, digital rights management, and secure information
exchange.

2.2 Scope
The scope of image steganography is broad, with applications spanning various
fields where secure and covert data transmission is essential. Its versatility and
integration with digital communication make it a valuable tool in today's
information-driven world. Below are the key aspects of its scope:

1. Secure Communication: Image steganography allows sensitive data to be embedded in


digital images for covert transmission, ensuring confidentiality and reducing the risk of
detection during communication.
2. Digital Watermarking: It is widely used for embedding copyright information or
ownership markers within images and videos, providing protection against unauthorized
use or duplication.
3. Data Authentication: Image steganography can embed metadata or signatures within
images to verify their authenticity and detect tampering or forgery.
4. Cybersecurity: In cybersecurity, it is applied to embed sensitive data within images as a
means of secure storage or exchange, adding an extra layer of protection.
5. Intellectual Property Protection: Content creators and businesses use image
steganography to embed invisible identifiers or branding in digital assets, safeguarding
intellectual property rights.

13
6. Defense and Intelligence: Governments and intelligence agencies leverage
steganography for secure transmission of sensitive information during operations where
secrecy is critical.
7. Forensic Applications: Steganography is employed in digital forensics to hide evidence
or securely mark forensic data for investigations.
8. Steganographic Research: Advancing the field through research to develop more
robust, secure, and imperceptible methods, enhancing resistance to detection and
increasing capacity.

As technology continues to evolve, the scope of image steganography will expand further into
fields like artificial intelligence, blockchain for secure tagging, and augmented reality, offering
innovative solutions for secure data management and transmission.

14
Chapter 3
Software Requirements
Specification

15
Software Requirements Specification

3.1 Overall Description


Image steganography is a technique used to conceal secret information within digital images,
ensuring the hidden data remains undetectable to the naked eye. It involves embedding data, such
as text, files, or multimedia, into an image in a way that the image's appearance remains virtually
unchanged. By leveraging the redundancy in image data, methods like the Least Significant Bit
(LSB) modification allow for subtle changes to pixel values that are imperceptible to human
observers. The result is a stego-image that looks identical to the original cover image while
securely containing the embedded information. Image steganography finds applications in secure
communication, digital watermarking, data integrity verification, and forensic investigations.
Despite its advantages in secrecy and data protection, it faces challenges like limited storage
capacity and vulnerability to detection through steganalysis or image manipulation. With its
ability to discreetly embed data, image steganography serves as a vital tool in cybersecurity and
covert information exchange.

3.2 Product Perspective


The product perspective of image steganography highlights its role as a security and privacy-
enhancing technology that integrates seamlessly into digital communication systems. It functions
as a covert data embedding tool, using digital images as carriers to conceal sensitive information
without altering their visual appearance. This makes it particularly valuable in applications where
discretion is paramount, such as secure messaging, copyright protection through digital
watermarking, and covert data storage. From a user standpoint, the technology is designed to be
imperceptible, ensuring that the embedded data does not interfere with the usability or quality of
the carrier image. It often complements encryption by adding an additional layer of security,
ensuring that even if intercepted, the existence of the hidden data remains undetectable. As a
product, image steganography must balance efficiency, robustness, and ease of integration into
existing workflows, while addressing challenges like limited data capacity, resistance to image
compression, and vulnerability to steganalysis. It serves industries such as cybersecurity, digital
forensics, and intellectual property protection, offering a discreet and reliable solution for secure
information handling.

16
3.3 Product Function
The primary function of image steganography is to securely embed hidden data within digital
images while maintaining the visual integrity of the original image. This allows users to transmit
or store confidential information without raising suspicion. The process involves encoding secret
data into the pixel values of the cover image, often using techniques like Least Significant Bit
(LSB) manipulation or frequency-domain transformations. The steganographic system must also
ensure robust extraction of the hidden data under various conditions, such as image resizing,
compression, or basic editing. Advanced functions may include encryption of the embedded data
for added security and adaptive embedding methods to make detection through steganalysis more
challenging. Additional features can include watermarking for copyright protection, data
integrity verification by embedding verification codes, and compatibility with diverse image
formats and resolutions. These functions collectively make image steganography a versatile and
effective tool for secure communication, digital rights management, and covert data handling.

3.4 User Characteristics


Users of image steganography typically come from fields where security, privacy, and data
integrity are paramount. These users range from individuals seeking secure communication, to
organizations like law enforcement, journalists, and intelligence agencies who require covert
channels to transmit sensitive information. Digital content creators and businesses may also use
image steganography for copyright protection, embedding watermarks or intellectual property
markers in their media. The typical user often requires a basic understanding of cryptography and
digital data handling, though modern tools are designed to be user-friendly, allowing non-experts
to easily implement steganography without technical expertise. Advanced users, such as
cybersecurity professionals and forensic analysts, might leverage more sophisticated techniques
to ensure robustness against detection or to recover hidden data from compromised or altered
images. Overall, the common characteristic among users is the need for discreet, secure, and
reliable methods of embedding and extracting data in ways that are invisible to unauthorized
observers

17
3.5 Functional Requirements
The functional requirements of image steganography include the ability to securely embed and
extract hidden data within digital images without visibly altering the image’s appearance. The
system must support various types of data embedding, including text, files, or other images,
using methods like Least Significant Bit (LSB) manipulation or frequency domain
transformations. It should also provide encryption options to protect the embedded data, ensuring
that even if the stego-image is intercepted, the hidden information remains secure. The extraction
process must be reliable and capable of recovering the data from the image, even in the face of
common manipulations such as compression or resizing. Additionally, the system should be able
to handle various image formats (JPEG, PNG, BMP, etc.) and maintain compatibility across
different devices and platforms. The software must be user-friendly, offering intuitive interfaces
for both embedding and extraction, while ensuring the integrity of the hidden data is preserved
throughout the process. Finally, advanced functionality may include features like watermarking
for copyright protection and resistance to steganalysis techniques, making the hidden data harder
to detect.

3.6 Non-Functional Requirements


The non-functional requirements of image steganography focus on aspects such as performance,
security, and usability, ensuring the system operates efficiently and reliably under different
conditions. The system should be capable of embedding and extracting hidden data with minimal
impact on the image quality, preserving the visual integrity even after multiple iterations of
embedding and compression. It must operate efficiently, providing fast processing times for
embedding and extraction, regardless of the image size or the complexity of the hidden data.
Security is a critical non-functional requirement, ensuring that the hidden data is resistant to
unauthorized extraction and detection, even through advanced steganalysis techniques.
Additionally, the software should be resilient to common image manipulations like resizing,
cropping, or compression, with the embedded data remaining intact and recoverable. Usability is
another important factor, as the system should offer an intuitive interface that makes the process
accessible to both technical and non-technical users. The system should also be scalable,
supporting a variety of image formats and handling varying sizes of data without compromising
performance. Lastly, the system should be robust and able to handle potential errors or
corruptions in the image without losing data or functionality.

18
Chapter 4
System Design

19
System Design

4.1 Use Case Diagram


A Use Case Diagram at its simplest is a representation of a user's interaction with the system.
First user writes secret text then he selects cover image and data gets hidden inside Image, then
user sends stego image to receiver through image. At the receiver side, user selects the stego
image and applies decryption on stego image. After that he can get text hidden in the text.

Figure 1: Use Case Diagram


4.2 Activity Diagram
Purpose: An example of UML activity diagram describing behavior of the Stego System kar
Secure Communication
Summary: Activity is started by opening stego woftware. Stego software anks for authen tiration
by entering username and pa. I шептe and passwords are correct. Stego software suthenticates

20
user Four options get aruilable frout of mer as 1. Generate steg Image 2. Get secret code. 2. Send
image 4. About 5, Help
 User can generate steps image ly hiding secret data in it.
 User can get his secret code by decoding image.
 User can send stogo image to another mer by send image option
 User can know about software by clicking on about option.
 User can look for help in case he needs it.
 User can terminate stego software by clicking

Figure 2: Activity Diagram

21
4.3 Class Diagram
There are four following clases
1. Stego module
2. Encryption
3. Unstego module
4. Decryption
 Stego module: secret module consists of two attributes secret text and cover image as
well as two operations as select secret text() and select cover image().
 Encryption: Encryption is the process of hiding secret text into cover image
 Ustego Module: It takes input from stego image that is stego image.
 Decryption: It separates the secret text from the image.

Figure 3: Class Diagram

22
4.4 State Chart Diagram
System is in the Idle state, when user open it. After login correctly state changes from login to
stego module where user writes secret code. After writing secret code state passes to Fetch Image
in which secret code is embedded inside image For decoding image state changes from Fetch
image to Unstego module. User can exit system auccessfully after decryption of image

Figure 4 State Chart Diagram

4.5 Sequence Diagram


Sequence diagrams are a popular dynamic modeling solution in UML because they specifically
focus on lifelines, or the processes and objects that live simultaneously, and the messages
exchanged between them to perform a function before the lifeline ends in which there are five
lifelines:
1. User
2. Steg Module
3. Encryption
4. Unsteg
5. Decryption

23
The user selects cover image and text to be hide by LSB algorithm In which algorithm is
implements on that cover image and hides the secret text.
After completion of process the system takes input for newly generated image.
As user gives input, image is saved in respective directory.
Saved image in directory is opened and Unsteg operation is performed on the Image and original
message is obtained.

Figure 5: Sequence Diagram

4.6 DFD Level 0


Steganography system takes inputs as secret text message as well as cover image and generates
stego image

24
.

Figure 6: DFD Level 0

4.7 DFD Level 1


In DFD Level 1 the main task that is performed that is secret text message in added to the image
by replacing some of the bits and it is sent to the receiver side through email

Figure 7: DFD Level 1


25
4.8 DFD Level 2
Secret text is added to the image by replacing Least Significant Bits(LSB) in which least
significant bits are replaced and stego file is created. For decrypting image to get secret message.

Figure 8: DFD Level 2

26
Chapter 5
GUI /Coding

27
GUI / Coding

Figure 1: Home Page

Figure 2.1: About us

28
Figure 2.2 About Us

Figure 3.1: Encryption Page

Figure 3.2: Encryption Page

29
Figure 3.3: Encryption Page

Figure 4.1: Decryption Page

30
Figure 4.2: Decryption Page

Figure 4.3: Decryption Page

Source Code
31
VIEWS.PY
from django.shortcuts import render
import stepic
from PIL import Image # importing the Image module from the PIL library.
import io

# Create your views here.


def about(request):
return render(request, 'about.html')

def index(request):
return render(request, 'index.html')

def hide_text_in_image(image, text):


data = text.encode('utf-8')
'''encode('utf-8') on a string, it translates the human-readable
characters into a sequence of bytes using the UTF-8 encoding.
The result is a bytes object in Python.'''
return stepic.encode(image, data)
#stepic.encode method is called to hide these bytes within the image

def encryption_view(request):
message = ''
if request.method == 'POST':
text = request.POST['text']
image_file = request.FILES['image']

32
image = Image.open(image_file)

# Convert to PNG if not already in that format


if image.format != 'PNG': # checks whether the image format is not PNG.
image = image.convert('RGBA')
# image is converted to RGBA mode if it's not already
# This ensures the image has the correct color channels.
buffer = io.BytesIO()
# A BytesIO object is created,
# which is a binary stream (an in-memory bytes buffer).
image.save(buffer, format="PNG")
image = Image.open(buffer)

# hide text in image


new_image = hide_text_in_image(image, text)

# save the new image in a project folder


image_path = 'project_folder/encrypted_images/' + 'new_' + image_file.name
new_image.save(image_path, format="PNG")

message = 'Text has been encrypted in the image.'

return render(request, 'encryption.html', {'message': message})

def decryption_view(request):
text = ''
if request.method == 'POST':
image_file = request.FILES['image']

33
image = Image.open(image_file)

# Convert to PNG if not already in that format


if image.format != 'PNG':#checks whether the image format is not PNG.
image = image.convert('RGBA')
#image is converted to RGBA mode if it's not already
#This ensures the image has the correct color channels.
buffer = io.BytesIO()
#A BytesIO object is created,
# which is a binary stream (an in-memory bytes buffer).
image.save(buffer, format="PNG")
image = Image.open(buffer)

# extract text from image


text = extract_text_from_image(image)

return render(request, 'decryption.html', {'text': text})

def extract_text_from_image(image):
data = stepic.decode(image)
# uses the decode function from the stepic library to extract the
# hidden data from the given image. This hidden data is
# typically stored as bytes.
if isinstance(data, bytes):
return data.decode('utf-8')
return data

34
About.html

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css2?
family=Pacifico&family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<title>About - Steganography</title>
<style>
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #f3f4f7, #e3e9ed);
margin: 0;
padding: 0;
}
.navbar {
background: linear-gradient(45deg, #6a11cb, #2575fc);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.navbar-brand {
font-size: 2rem;
font-family: 'Pacifico', cursive;
font-weight: bold;
color: #ffffff !important;
35
}
.content-container {
max-width: 800px;
margin: 30px auto;
padding: 30px;
background-color: #ffffff;
border-radius: 15px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.content-container h2 {
text-align: center;
font-size: 2.5rem;
color: #2575fc;
margin-bottom: 20px;
}
.section-title {
font-size: 1.8rem;
color: #6a11cb;
margin-bottom: 15px;
}

.section-content {
font-size: 1.2rem;
color: #333333;
line-height: 1.6;
}

.section-content ul {

36
margin-left: 20px;
}
.footer {
background: linear-gradient(135deg, #495057, #343a40);
color: #ffffff;
text-align: center;
padding: 20px;
font-size: 14px;
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}
.footer a {
color: #ff758c;
text-decoration: none;
}

.footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
{% include "navbar.html" %
<!-- About Content -->
<div class="content-container">
<h2>About Steganography</h2>
<div class="section">
<h3 class="section-title">📝 Introduction</h3>
<p class="section-content">

37
Steganography is the practice of concealing a secret message within an ordinary
message or file, without anyone else being aware that there is a hidden message. The goal of
steganography is to hide the existence of the message, so that it can be transmitted undetected.
Unlike cryptography, which relies on encryption to make a message unreadable to anyone who
doesn't have the key, steganography does not alter the message in any way. Instead, it hides the
message within the data of another file, such as an image or audio file, by subtly changing
certain bits of information. Steganography can be used for a variety of purposes, from covert
communication to digital watermarking, and has been used throughout history in various forms.
</p>
</div>

<div class="section">
<h3 class="section-title">🌱 Implementation</h3>
<p class="section-content">
The application converts the entire message to Base64 to avoid any conversion loss,
then it converts it to bytes hence to its bits. Then, it gets each pixel, breaks each pixel into its
channels (Red, Green, Blue and Alpha) and breaks down each channel into bits. Once this is
done, rest is just replacing each bit with the message's bits. Depending on your image, this
process can take a while. Once the process is completed, you can download the image.
</p>
</div>
<div class="section">
<h3 class="section-title">✨ Features</h3>
<ul class="section-content">
<li>Hide text messages inside images using LSB steganography.</li>
<li>Decode hidden text from an encoded image.</li>
<li>Support for multiple image formats (e.g., PNG, JPG).</li>
<li>Intuitive and responsive user interface .</li>
</ul>
</div>
</div>
<!-- Footer -->

38
<footer class="footer">
<p>Created with <span style="color: #ff758c;">&hearts;</span> by Your Name. <a
href="contact/">Contact Us</a></p>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>

Encryption.html

{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Encryption - Image Steganography Project</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css2?
family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
background: linear-gradient(135deg, #e3f2fd, #bbdefb);
color: #333333;
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;

39
}

.container {
margin-top: 50px;
padding: 20px;
background: #ffffff;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

h1 {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: #0d47a1;
text-align: center;
margin-bottom: 20px;
}

label {
font-size: 1rem;
font-weight: 600;
color: #333333;
}

.form-control-file,
.form-control {
background: #f5f5f5;
border: 1px solid #ddd;

40
border-radius: 8px;
padding: 10px;
}

.form-control::placeholder {
color: #aaaaaa;
}

.form-control-file:focus,
.form-control:focus {
border-color: #0d47a1;
box-shadow: 0 0 5px rgba(13, 71, 161, 0.5);
}

.btn-primary {
background: #1976d2;
border: none;
padding: 10px 20px;
font-size: 1rem;
font-weight: 600;
color: #ffffff;
border-radius: 5px;
transition: all 0.3s ease-in-out;
width: 100%;
}

.btn-primary:hover {
background: #1565c0;

41
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(21, 101, 192, 0.4);
}

.message {
margin-top: 20px;
font-size: 1.1rem;
text-align: center;
color: #1976d2;
}
</style>
</head>
<body>
{% include "navbar.html" %}
<div class="container">
<h1>Encrypt Your Image</h1>
<form action="{% url 'encryption' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="form-group">
<label for="image">Select an Image:</label>
<input type="file" class="form-control-file" id="image" name="image" required>
</div>
<div class="form-group">
<label for="text">Enter the Text:</label>
<textarea class="form-control" id="text" name="text" rows="3" placeholder="Type
your secret message here..." required></textarea>
</div>
<button type="submit" class="btn btn-primary">Encrypt Now</button>
</form>
42
</div>

{% if message %}
<div class="message">{{ message }}</div>
{% endif %}

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>

Decryption.html

{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Decryption - Image Steganography Project</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css2?
family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
background: linear-gradient(135deg, #e3f2fd, #bbdefb);
color: #333333;

43
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;
}
.container {
margin-top: 60px;
background: #ffffff;
padding: 40px 20px;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

h1 {
font-weight: 600;
color: #0d47a1;
margin-bottom: 30px;
}
label {
font-size: 1rem;
font-weight: 600;
color: #333333;
}

.form-control-file {
border: 1px solid #ddd;
padding: 10px;
border-radius: 8px;
background: #f5f5f5;

44
transition: all 0.3s;
}
.form-control-file:focus {
border-color: #0d47a1;
box-shadow: 0 0 5px rgba(13, 71, 161, 0.5);
}
.btn-primary {
background: #1976d2;
border: none;
padding: 12px 20px;
font-size: 1rem;
font-weight: 600;
color: #ffffff;
border-radius: 5px;
transition: all 0.3s ease-in-out;
width: 100%;
}
.btn-primary:hover {
background: #1565c0;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(21, 101, 192, 0.4);
}

.alert-success {
background: #e8f5e9;
border: 1px solid #81c784;
border-radius: 10px;
padding: 20px;

45
color: #2e7d32;
}
.alert-success h4 {
margin-bottom: 10px;
font-weight: 600;
}
.alert-success p {
font-size: 1rem;
margin: 0;
}
</style>
</head>
<body>
{% include "navbar.html" %}
<div class="container">
<h1 class="text-center">Decrypt Text from Image</h1>
<form class="mt-4" action="{% url 'decryption' %}" method="post"
enctype="multipart/form-data">
{% csrf_token %}
<div class="form-group">
<label for="image">Encrypted Image:</label>
<input type="file" name="image" id="image" class="form-control-file" required>
</div>
<input type="submit" value="Decrypt" class="btn btn-primary">
</form>
{% if text %}
<div class="alert alert-success mt-4">
<h4>Decrypted Text:</h4>
<p>{{ text }}</p>
46
</div>
{% endif %}
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>

Navbar.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css2?
family=Pacifico&family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<title>Stylish Navbar</title>
<style>
body {
margin: 0;
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #f3f4f7, #e3e9ed);
}

.navbar {

47
background: linear-gradient(45deg, #6a11cb, #2575fc);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.navbar-brand {
font-size: 2rem;
font-family: 'Pacifico', cursive;
font-weight: bold;
color: #ffffff !important;
transition: color 0.3s, text-shadow 0.3s;
}
.navbar-brand:hover {
color: #ffe259 !important;
text-shadow: 0 2px 5px rgba(255, 226, 89, 0.8);
}
.nav-link {
font-size: 1.2rem;
color: #ffffff !important;
font-weight: 600;
transition: color 0.3s, background-color 0.3s, transform 0.3s;
}

.nav-link:hover {
color: #ffe259 !important;
background-color: rgba(255, 226, 89, 0.2);
border-radius: 5px;
transform: scale(1.1);
}
.navbar-toggler {

48
border-color: #ffe259;
}
.navbar-toggler-icon {
background-image: url('data:image/svg+xml,%3Csvg
xmlns="http://www.w3.org/2000/svg" fill="%23ffe259" viewBox="0 0 30 30"%3E%3Cpath
stroke="rgba(255, 226, 89, 0.8)" stroke-width="2" stroke-linecap="round" stroke-
miterlimit="10" d="M4 7h22M4 15h22M4 23h22"/%3E%3C/svg%3E');
}

.nav-item {
margin: 0 8px;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark">
<a class="navbar-brand" href="/">Steganography</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/encryption">Encryption</a>
</li>
<li class="nav-item">
49
<a class="nav-link" href="/decryption">Decryption</a>
</li>
<!-- New About Us Button -->
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
</nav>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>

Index.html

{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<title>Image Steganography Project</title>
<style>
body {
background: linear-gradient(to right, #ff7b7b, #ff6a00, #ffcc00); /* Cool gradient
background */

50
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
overflow-x: hidden;
height: 100vh; /* Full viewport height */
}
/* Use Google Fonts for cool typography */
@import url('https://fonts.googleapis.com/css2?
family=Poppins:wght@500;600&family=Playfair+Display:wght@700&display=swap');

/* General text styling */


.cool-text {
font-family: 'Poppins', sans-serif;
color: #ffffff;
font-weight: 600;
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
line-height: 1.4;
}
.cool-title {
font-family: 'Playfair Display', serif;
font-size: 3em;
color: #000000; /* Black color for a classic look */
text-align: center;
margin-top: 5px;
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); /* Soft shadow for elegance */
}
.cool-subtext {
font-family: 'Arial', sans-serif;
font-size: 1.5em;
51
color: #333333; /* Dark gray for elegance */
text-align: center;
margin-top: 5px;
text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); /* Subtle but deeper shadow */
}
/* Container style */
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
height: 100%;
gap: 20px;
}

.image-container {
position: relative;
width: 45%;
height: 300px;
border-radius: 15px;
background: rgba(255, 255, 255, 0.9);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
overflow: hidden;
transition: transform 0.4s, box-shadow 0.4s, border-radius 0.4s;
display: flex;
justify-content: center;
align-items: center;
text-align: center;

52
}
.image-container:hover {
transform: scale(1.1) rotate(2deg);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
border-radius: 20px;
}
.image-container img {
width: 100%;
height: 100%;
object-fit: cover;
filter: grayscale(30%) brightness(0.95);
transition: filter 0.4s
}
.image-container:hover img {
filter: grayscale(0%) brightness(1);
}
.button-link {
position: absolute;
bottom: 15%;
left: 50%;
transform: translateX(-50%);
display: inline-block;
padding: 15px 30px;
background: linear-gradient(45deg, #ff7eb3, #ff758c);
color: #ffffff;
border: none;
border-radius: 30px;
text-decoration: none;

53
font-size: 18px;
font-weight: bold;
box-shadow: 0 4px 15px rgba(255, 87, 136, 0.4);
transition: all 0.4s;
}
.button-link:hover {
background: linear-gradient(45deg, #ff758c, #ff7eb3);
transform: translateX(-50%) scale(1.1);
box-shadow: 0 6px 20px rgba(255, 87, 136, 0.5);
}
.footer {
background: linear-gradient(135deg, #495057, #343a40);
color: #ffffff;
text-align: center;
padding: 20px;
font-size: 14px;
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}
.footer a {
color: #ff758c;
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
}

@media (max-width: 1024px) {


.image-container {

54
width: 80%;
}
.button-link {
font-size: 16px;
padding: 10px 20px;
}
}
@media (max-width: 768px) {
.image-container {
width: 100%;
margin: 15px 0;
}
.button-link {
font-size: 14px;
padding: 8px 18px;
}
.footer {
font-size: 12px;
}
}
</style>
</head>
<body>
{% include "navbar.html" %}
<div class="container">
<h1 class="cool-title">Welcome to the World of Image Steganography!</h1>
<p class="cool-subtext">Unveil hidden messages, explore the art of secret communication,
and discover the fascinating world where images speak louder than words.</p>

55
<div class="image-container">
<img src="{% static 'images/encryption.jpg' %}" alt="Encryption Image">
<a href="encryption/" class="button-link">Encrypt Now</a>
</div>
<div class="image-container">
<img src="{% static 'images/img2.jpg' %}" alt="Decryption Image">
<a href="decryption/" class="button-link">Decrypt Now</a>
</div>
</div>
<footer class="footer">
<p>Created with <span style="color: #ff758c;">&hearts;</span> by Your Name. <a
href="/">Contact Us</a></p>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>

Url.py

from django.contrib import admin


from django.urls import path
from stegano_app import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.index, name='index'),
path('encryption/', views.encryption_view, name='encryption'),
path('decryption/', views.decryption_view, name='decryption'),
56
path('about/', views.about, name='about')
]

Settings.py

STATIC_URL = '/static/'
# Add this line
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'),]

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'project_folder/encrypted_images/')

57
Chapter 6
Technological Environment

58
Technical Requirements

Technical requirements are the technical issues that must be considered to successfully complete
a project. These can include aspects such as performance, reliability and availability. In software
projects, technical requirements typically refers to how the software is built for example which
language it’s programmed in, which operating system it’s created for, and which standards it
must meet.

6.1 Hardware interfaces

Processor 2.0GHz
RAM 4 GB minimum, 8 GB recommended
Storage 50 GB minimum (SSD preferred)
Display 1366 X 768 resolution or higher

6.2 Software interfaces


Python 3.8+
Django 4.0+
SQLite
Libraries: OpenCV, Pillow, Stegano,Stepic.
Frontend: HTML, CSS, JavaScript
Operating System: Windows/Linux/MacOS
Web browser Google chrome

59
Chapter 7
Conclusion

60
Conclusion

The conclusion of a project on image steganography summarizes its significance and outcomes.
Image steganography effectively conceals sensitive information within digital images, providing
a secure means of communication. Through the implementation of algorithms like LSB (Least
Significant Bit) or advanced techniques, the project demonstrates how data can be embedded
imperceptibly, ensuring confidentiality without compromising image quality. The results validate
the robustness and efficiency of the chosen methods in resisting unauthorized access and
maintaining data integrity. This project underscores the importance of steganography in
cybersecurity and highlights its potential applications in secure data transmission, copyright
protection, and digital watermarking. Future work may focus on enhancing the capacity and
resilience of steganographic techniques against evolving cyber threats

7.1 Project Limitation


The project on image steganography, while innovative and useful, is not without limitations. One
major constraint is the limited data capacity of images, as embedding large amounts of
information can lead to noticeable distortions, making the hidden data easier to detect.
Additionally, steganographic content may be vulnerable to detection through advanced
steganalysis tools, particularly if the embedding process alters the image's statistical properties.
The technique also faces challenges with image compression, as formats like JPEG can degrade
or completely eliminate hidden data. Furthermore, the approach lacks inherent encryption,
meaning that if the hidden data is discovered, it can be extracted unless additional security
measures are implemented. Modifications to the image, such as resizing, cropping, or applying
filters, can corrupt or destroy the embedded information, highlighting the limited robustness of
the method. Finally, there are ethical and legal concerns, as steganography can be exploited for
malicious purposes, such as hiding harmful content or bypassing data transfer restrictions. These
limitations emphasize the need for further research to enhance the capacity, security, and
resilience of steganographic techniques

7.2 Future Scope


The future scope of image steganography is vast, with significant potential for advancement and
application in various domains. As digital communication continues to grow, the demand for
secure and covert data transmission will increase, driving the development of more robust and
sophisticated steganographic techniques. Future research can focus on enhancing the embedding

61
capacity while maintaining imperceptibility, allowing larger amounts of data to be hidden
without compromising image quality. The integration of artificial intelligence and machine
learning could enable adaptive steganography, improving resistance to steganalysis and making
detection

increasingly challenging. Additionally, advancements in quantum computing and cryptography


may be leveraged to create hybrid systems that combine encryption with steganography for
enhanced security. Emerging fields such as blockchain and Internet of Things (IoT) could also
benefit from steganographic methods to ensure secure data transfer and prevent unauthorized
access. Moreover, addressing challenges like robustness against image processing, compression,
and transmission errors will expand the usability of steganography in diverse environments,
including copyright protection, watermarking, and secure communication in hostile networks.
These developments highlight the promising role of image steganography in the evolving
landscape of cybersecurity and digital data management.

62
References

Books
N. Provos and P. Honeyman, Hide and Seek: An Introduction to Steganography, IEEE Security &
Privacy, 2003.

Research Papers
B. B. Zaidan, A. A. Zaidan, and H. A. Jalab, On the Differences between Hiding Information and
Cryptography Techniques: An Overview, Journal of Applied Sciences, 2010.

Online Resources
Tutorials on steganography on platforms like GeeksforGeeks and TutorialsPoint.
Research papers and articles from IEEE Xplore: https://ieeexplore.ieee.org/.
Tutorials: www.youtube.com, w3schools.com

Tools and Libraries


Open-source tools like Steghide or OpenStego for practical applications.
Python libraries such as Pillow and OpenCV for implementing custom steganographic methods.

63

You might also like