Project Report Final
Project Report Final
Belagavi-590018, Karnataka
A
PROJECT REPORT
ON
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted by
CERTIFICATE
It is certified that the project work entitled “IMAGE STEGANOGRAPHY
TOOL” carried out by RISHAV UPADHYAY (1BH20CS029), SAURABH SHARMA
TIMILSINA (1BH20CS034), SHREYA KUMARI (1BH20CS040), SUVAM
SHARMA (1BH20CS046) are the bonafide students of Bangalore Technological
Institute, Bangalore in partial fulfilment for the award of Bachelor of Engineering in
Computer Science and Engineering of the Visvesvaraya Technological University,
Belagavi during the year 2023-2024 It is certified that all corrections/suggestions indicated
for Internal Assessment have beenincorporated in the report deposited in the departmental
library. The project report has been approved as it satisfies the academic requirements in
the respect of the project work prescribed for the said degree.
External Viva
2.
BANGALORE TECHNOLOGICAL INSTITUTE
Bengaluru - 35
(An ISO 9001:2015 Certified Institute)
Department of Computer Science & Engineering
DECLARATION
We, the students of final year Computer Science and Engineering, Bangalore
Technological Institute, Bengaluru, hereby declare that the project entitled “IMAGE
STEGANOGRAPHY TOOL” has been independently carried out by us under the
guidance of Mrs. Shylaja D N, Assistant Professor, Department of Computer Science and
Engineering, Bangalore Technological Institute, Bengaluru and submitted in partial
fulfillment of the requirements for the award of the degree in Bachelor of Engineering in
Computer Science and Engineering of the Visvesvaraya Technological University,
Belagavi during the academic year 2023-24.
We also declare that to the best of our knowledge and belief the work reported here does
not form or part of any other dissertation on the basis of which a degree or award was
conferred on an early occasion of this by any other.
PLACE :
DATE :
I
ABSTRACT
Steganography, the clandestine art of concealing communication, thrives on
embedding information within other data, with digital images emerging as a prime carrier
due to their ubiquity on the Internet. With a plethora of steganographic techniques
available, each with distinct strengths and weaknesses, the choice of method depends on
specific application requirements. Some prioritize the absolute invisibility of hidden data,
while others emphasize the capacity to conceal larger messages. This paper provides an
overview of image steganography, delving into its methodologies, applications, and the
characteristics of effective steganographic algorithms. By examining the suitability of
various techniques for different scenarios, it aims to elucidate the diverse landscape of
image steganography and guide practitioners in selecting the most appropriate approach for
their needs.
II
CONTENTS
TITLE PAGE NO.
ACKNOWLEDGEMENT I
ABSTRACT II
CONTENTS III
LIST OF FIGURES VI
CHAPTERS
1. INTRODUCTION 1
1.1 Introduction to Project 1
1.2 Aim of the project 3
1.3 Scop of the project 3
2. LITERATURE SURVEY 4
2.1 Literature Survey on proposed system 4
3. SYSTEM ANALYSIS 9
3.1 Problem Statement 9
3.2 Existing System 9
3.3 Proposed System 11
3.4 Feasibility Study 11
3.4.1 Economic Feasibility 11
3.4.2 Technical Feasibility 12
3.4.3 Social Feasibility 12
4. REQUIREMENT SPECIFICATION 13
4.1 Hardware and Software Requirement 13
4.1.1 Software Requirement 13
4.1.2 Hardware Requirement 13
4.2 Resource Requirement 13
4.2.1 Python 13
4.2.1.1 Python Libraries 14
4.2.2 Integrated Development Environments (IDEs) 17
4.2.2.1 Visual Studio Code 17
III
5. METHODOLOGY 19
5.1 General Architecture 19
5.2 Design Phase 20
5.2.1 Data Flow Diagram 20
5.2.2 Use Case Diagram 20
5.2.3 Activity Diagram 22
5.2.4 Activity Design 24
5.2.5 Interface Structure Design 26
6. ALGORITHM 27
6.1 LSB Algorithm 27
7. MODULES 32
7.1 PIL(Python Imaging Library) 32
7.2 Fernet 33
7.3 Datetime 35
7.4 Base64 35
7.5 Hashlib 37
7.6 OS 39
8. IMPLEMENTATION AND TESTING 42
8.1 Input and Output 42
8.2 Implementation 42
8.2.1 Tools Used 41
8.2.2 Implementation Details of Modules 43
8.3 Testing 48
8.3.1 Unit Testing 50
8.3.2 Integration Testing 52
8.3.3 Acceptance Testing 52
8.3.4 Test Case for System Testing 53
9. WORKING 54
9.1 Efficiency of the proposed system 54
9.2 PSNR and MSE 54
9.3 Sample Code 55
10. RESULTS 64
10.1 Results 64
11. SCREENSHOTS 67
IV
12. CONCLUSION AND FUTURE WORK 71
12.1 Conclusion 71
12.2 Future Work 71
REFERENCES 73
V
LIST OF FIGURES
FIGURE NO. FIGURE NAME PAGE NO.
1.1 Steganography method & retrieving 2
Of Secret Data
5.1 Architecture Diagram of hideEm 19
5.2 Context Diagram 20
5.3 Data flow Diagram 20
5.4 Use Case Diagram for hideEm 22
5.5 Activity Diagram for Encryption 24
5.6 Activity Diagram for Decryption 25
5.7 Interface Structure Design of HideEm 26
6.1 Image Pixel distribution in RGB 29
Channel
6.2 Input on changing the MSB and LSB 29
6.3 Performing the Arm Curl 44
8.1 Performing Left Arm Curl 44
8.2 Performing Right Arm Curl 45
8.3 Performing Sit Ups 45
8.5 Performing Squat 46
11.1 Performing Push Ups 46
11.2 Performing Pull Ups 47
11.3 Counting Reps 48
11.4 Report of the Performed Exercise 48
11.5
11.6
11.7
VI
LIST OF TABLES
TABLE NO. TABLE NAME PAGE NO.
4.1 Python Libraries and Tools 10
VII
IMAGE STEGANOGRAPHY TOOL 2023-2024
Chapter 1
INTRODUCTION
1.1 Introduction to Project
Project hideEm is created as a tool for secret communication among people where data
privacy is denied by the government or any form. It can be very useful in the places where
cryptography in internet is not allowed to be used. In such places, if you want to have a
secure communication, you can use this tool that will take a message from users, encrypt
it first and hide it into the provided image. The tool than prepares a new image with the
encrypted message inside. The quality change in image, or the hidden message won’t be
visible to any naked eye nor will the hidden message will be detected by any tool or
technology, used to filter the internet traffic.
In an age where digital communication pervades every aspect of our lives, ensuring the
confidentiality and integrity of sensitive information has become paramount. Amidst this
backdrop, image steganography emerges as a potent technique for covert communication,
allowing individuals to conceal messages within seemingly innocuous images.
Steganography, derived from the Greek words "steganos" (covered) and "graphia"
(writing), encompasses the art of hiding information within other data, thereby obscuring
the very existence of communication itself. The ubiquity of digital images on the internet
makes them an ideal carrier for concealed messages, as they attract minimal suspicion
during transmission. Image steganography tools leverage a diverse array of techniques to
embed secret data within images, ranging from simple LSB (Least Significant Bit) insertion
to more sophisticated algorithms that alter pixel values or frequencies. The allure of image
steganography lies in its ability to evade detection by unauthorized parties, including
automated monitoring systems and human observers. Unlike encryption, which encrypts
data into an unreadable format, steganography hides the existence of communication
altogether, making it an invaluable tool for scenarios where the mere act of encryption may
arouse suspicion. In this context, the development of robust and user-friendly image
steganography tools becomes imperative. These tools empower individuals to
communicate securely in environments where traditional encryption methods may be
restricted or monitored. Moreover, they provide a means for preserving privacy and
confidentiality in a digital landscape fraught with surveillance and censorship. The purpose
of this paper is to introduce and explore one such image
Chapter 2
LITERATURE SURVEY
[2]. Carrier Image Rearrangement to Enhance the Security Level of LSB Method of Data
Steganography (Year: Jan 2022).
This paper was proposed by Prof. Mohamad K. Abu Zalata, Dr. Mohamad T. Barakat, Prof.
Ziad A. Alqadi. A method to enhance the security level of the Least Significant Bit (LSB)
[3]. A Novel RGB Image Steganography Using Simulated Annealing and LCG via LSB
(Year:20 Jan 2022).
This paper was proposed Mohammed J. Bawanwh, Emad Fawzi Al-Shalabi, Obaida M. Al-
Hazaimeh. This paper introduces a novel and resilient framework for color image
steganography, amalgamating Linear Congruential Generator (LCG), simulated annealing
(SA), Caesar cryptography, and LSB substitution method into a unified system. The aim is
to mitigate the risks posed by steganalysis and securely transmit data to its intended
destination. The framework utilizes Simulated Annealing (SA), with the assistance of
Linear Congruential Generator (LCG), to identify the optimal minimum path for concealing
information within a cover color image (RGB). Subsequently, the confidential message
undergoes encryption and is embedded within the RGB image path, serving as the host
medium, through a combination of Caesar and LSB procedures. Both the embedding and
extraction processes of the secret message necessitate a shared understanding between the
sender and receiver, encompassing SA initialization parameters, LCG seed, Caesar key
agreement, and secret message length. Without the correct knowledge of the manipulation
process, intruders conducting steganalysis will be unable to detect or decipher the secret
message concealed within the host image. Simulated Annealing (SA), inspired by the
heating and cooling of metals, serves as an optimization search method to tackle linear and
non-linear problems. By mimicking the metal annealing process, SA begins with an initial
[5]. A Visual Cryptography Based Data Hiding Technique for Secret Data Encryption and
Decryption (Year: Dec 2021).
This paper was proposed Sonal Karade, Prof. Savita Chouhan. This paper introduces a visual
cryptography that is used to hide secret data within images, where an image is divided into
multiple shares without the need for computation. These shares can then be superimposed to
reveal the hidden key image or text through human perception. Initially, the model involved
a page of cipher text and a transparency page (secret key), where the original text could be
obtained by superimposing the transparency over the cipher text. Later advancements
introduced the (k,n) secret sharing scheme, where secret shares are distributed among
participants, and the secret is revealed only when a sufficient number of shares are combined.
Visual cryptography has since been extended to color images, with techniques developed
based on color decomposition and the use of RGB/CMY images. In this field, traditional
approaches like Cryptography, Steganography, and Data Hiding can also be utilized.
Cryptography focuses on mathematical techniques for data security, while steganography
hides messages within seemingly normal mediums, such as images, without arousing
suspicion. Data hiding conceals the existence of secret information, while cryptography
protects the content of messages. Reversible data hiding in encrypted images has gained
attention, where data is embedded in the host media and can be recovered without loss. This
hidden data can include authentication data or author information related to the image.
Chapter 3
SYSTEM ANALYSIS
3.1. Problem Statement
The strict prohibition of Secure Socket Layer (SSL) usage in countries like Iran,
Cuba, and Sudan poses significant risks to online communication security. Without
SSL encryption, internet traffic remains vulnerable to attacks such as Network
Sniffing and Man-in-the-Middle attacks. This leaves personal data exposed and
susceptible to interception by government entities or malicious actors with sufficient
resources. In such environments, sharing sensitive information like organizational
server passwords or credentials carries inherent risks of exposure by hackers.
However, utilizing image steganography tools provides a solution to this dilemma.
By hiding secret messages within images, sensitive information remains encrypted
and protected from interception. Even if third parties intercept the traffic, they will
only see the image and will be unable to extract the hidden messages without access
to the steganography tool. This approach helps mitigate the risks associated with
unencrypted internet traffic in environments where SSL usage is restricted.
SteganPEG accomplishes a task very quickly and without errors throughout the
entire process. As it would be expected from such a small app, it remains light on
the system resources, so it doesn’t burden computer performance, nor interfere
with other programs’ functionality. To sum it up, SteganPEG seems to be the right
choice in case you are looking for a simple-to-use encryption application that
comes packed with only a few dedicated parameters, and is suitable especially for
rookies.
● Hide’N’Send is a small utility which offers steganography. It lets you hide any
kind of file behind a JPG image file. It supports hashing and encryption too. This
means that you can hide your data by encrypting. This adds an extra layer of
security. The interface of the tool is simple and offers two tabs — one to hide data
and other to extract data. You can select the options accordingly. Just run the tool,
select the image file, then select the file which you want to hide, select the
encryption type and then hide the data in the image. Use the same tool again to
extract the hidden information in the image.
● Camouflage is another steganography tool that lets you hide any type of file inside
of a file. There is no kind of restriction in the software for hiding the file. Use of
the tool is simple and easy: you can just right-click on any file and select the
Camouflage option. To extract your sensitive data from the file, right-click and
select uncamouflage. You can also set a password to encrypt the hidden data inside
the file. The project is no longer in development, but you can use the old file for
your work. It still performs well and you can use it to hide your confidential data
inside an image.
● OpenStego can hide any data within an image file. It also does watermarking
image files with an individual signature. It can be used to detect unauthorized file
copying. This tool has standard licensing on watermark technology and image
with message may be distinguished by any people.
● RSteg is yet another Steganography tool developed using Java. You need to
have Java installed on your machine to run RSteg. Another striking advantage is
its portable feature. Hence no need to install it, just run and the software windows
pop up.
● Our Secret is yet another Image Steganography Tool which allows hiding files,
text and messages in photos. It these files are combined with images, then the final
image will be of more size. But this tool make sure that the size of final image is
not abnormal.
● This proposed system is to create a Image Steganography Tool that allows user
to embed the secret information within an image and maintain the integrity of
the secret data with the Advanced Encryption Standard (AES) using a Pre-shared
Key (PSK).
● Users will be able to easily embed photos into images using a built-in browse
function, preview the modifications, and export the modified images with
specified filenames and saving directories.
● The tool will also display the occupied space by the hidden files, allowing users
to optimize data embedding.
● Here, in the system, the LSB algorithm is slightly modified to gain the efficiency
of flow of the program for better time complexity. The program only utilizes the
red channel of the RGB color and leave others unchanged.
● The average Peak Signal to Noise Ratio (PSNR) of the our tool generating the
result of 101.454.
The feasibility study for the Image Steganography Tool aims to assess the practicality and
viability of developing such a tool. This study evaluates various aspects, including
technical, economic, operational, and scheduling considerations, to determine the project's
feasibility. It consists three parts:
The economic feasibility of our project primarily revolves around the development costs
The system under development is built on Python and its modules, a technology widely
supported by computing systems worldwide. The basic hardware requirements, such as
ARM Cortex or Pentium 4 processors, 500 MB of RAM, and 5 GB of storage, are common
place in today's computing landscape. As such, the technology used to develop the program
is highly adaptable and applicable to current computing environments. This ensures
compatibility across various systems and makes the program accessible to a wide range of
users, regardless of their hardware specifications.
Social feasibility of the Image Steganography Tool involves assessing its acceptability and
impact within society. This encompasses considerations such as ethical implications, user
perceptions, and societal attitudes towards privacy and security. While steganography
inherently raises concerns about potential misuse for illicit activities, such as covert
communication for malicious purposes, its legitimate applications for safeguarding privacy
and enabling secure communication are widely recognized. Therefore, social feasibility
hinges on educating users about responsible usage, fostering awareness of privacy concerns,
and promoting ethical guidelines for employing steganography tools. By emphasizing the
tool's role in preserving confidentiality and protecting sensitive information in an era of
pervasive surveillance, its social feasibility can be enhanced, fostering greater acceptance and
adoption within society.
Chapter 4
REQUIREMENT SPECIFICATION
4.2.1 Python
Guido van Rossum began working on Python in the late 1980s as a successor to the ABC
programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was
released in 2000. Python 3.0, released in 2008, was a major revision not completely
backward-compatible with earlier versions. Python 2.7.18, released in 2020, was the last
release of Python 2. Python was conceived in the late 1980s by Guido van Rossum at
In 2022, Python 3.10.4 and 3.9.12 were expedited and 3.8.13, and 3.7.13, because of
many security issues. When Python 3.9.13 was released in May 2022, it was announced
that the 3.9 series (joining the older series 3.8 and 3.7) would only receive security fixes
in the future. On September 7, 2022, four new releases were made due to a potential denial-
of-service attack: 3.10.7, 3.9.14, 3.8.14, and 3.7.14.
In 2024, Python 3.11.8 and Python 3.12.2 was released on February 6. Python 3.8.19,
Python 3.9.19 and Python 3.10.14 were updated on March 19, 2024. Python version 3.11.9
was released on April 2, 2024. As of April 9, 2024, the latest version of Python 3 is Python
3.12.3. This recent release likely includes various improvements, bug fixes, and potentially
new features to enhance the functionality and performance of the language. Users are
encouraged to update to the latest version to take advantage of these advancements and
ensure compatibility with the latest developments in the Python ecosystem. Python 3.13
will be released on October 1, 2024 and currently the maintenance status is pre-release.
Normally, a library is a collection of books or is a room or place where many books are
stored to be used later. Similarly, in the programming world, a library is a collection of
precompiled codes that can be used later on in a program for some specific well-defined
operations. Other than pre-compiled codes, a library may contain documentation,
configuration data, message templates, classes, and values, etc.
A Python library is a collection of related modules. It contains bundles of code that can be
used repeatedly in different programs. It makes Python Programming simpler and
convenient for the programmer. As we don’t need to write the same code again and again
for different programs. Python libraries play a very vital role in fields of MachineLearning,
Data Science, Data Visualization, etc.
As is stated above, a Python library is simply a collection of codes or modules of codes that
we can use in a program for specific operations. We use libraries so that we don’t need to
write the code again in our program that is already available. But how it works. Actually,
in the MS Windows environment, the library files have a DLL extension(Dynamic Load
Libraries). When we link a library with our program and run that program, the linker
automatically searches for that library. It extracts the functionalities of that library and
interprets the program accordingly. That’s how we use the methods of a library in our
program. We will see further, how we bring in the libraries in our Python programs.
Name Function/s
● Code editor: A text editor with advanced features such as syntax highlighting,
code completion, and refactoring tools.
● Debugger: A tool that allows developers to inspect the state of a program while it
is running and find and fix errors.
● Testing tools: Features for creating and running automated tests for a software
project.
● Version control integration: Support for working with version control systems such
as Git, allowing developers to track changes to their code and collaborate with
others.
● Build and deployment tools: Features for building and deploying software, such as
support for compiling code and creating packages.
There are many IDEs available for different programming languages, each with its own set
of features and target audience. Some IDEs are general-purpose, while others are
specialized for a particular language or type of development. IDEs are commonly used by
software developers to write, test, and debug code more efficiently.
Visual Studio Code (VS Code) is a popular, open-source code editor developed by
Microsoft. It is available for Windows, macOS, and Linux, and it supports a wide range of
programming languages and platforms.
VS Code is designed to be lightweight and fast, with a focus on simplicity and productivity.
It includes a range of features for code editing, such as syntax highlighting, code
completion, and error highlighting, as well as support for debugging and testing. It also
includes support for version control systems such as Git, and it can be extended with
plugins to add additional functionality.
VS Code is known for its extensibility and customization options. It includes numerous
built-in extensions, as well as a marketplace where developers can find and install
extensions created by the community. These extensions can add new features to VS Code,
such as support for additional languages or tools, or they can customize the editor to
better suit the needs of the developer.
Visual Studio Code is a source-code editor that can be used with a variety of programming
languages, including C, C#, C++, Fortran, Go, Java, JavaScript, Node.js, Python, Rust. It
is based on the Electron framework,[20] which is used to developNode.js web applications
that run on the Blink layout engine. Visual Studio Code employs the same editor
component (codenamed "Monaco") used in Azure DevOps(formerly called Visual Studio
Online and Visual Studio Team Services).
Out of the box, Visual Studio Code includes basic support for most common programming
languages. This basic support includes syntax highlighting, bracket matching, code folding,
and configurable snippets. Visual Studio Code also ships with IntelliSense for JavaScript,
TypeScript, JSON, CSS, and HTML, as well as debugging support for Node.js. Support for
additional languages can be provided by freely available extensions on the VS Code
Marketplace.
Instead of a project system, it allows users to open one or more directories, which can
then be saved in workspaces for future reuse. This allows it to operate as a language-
agnostic code editor for any language. It supports many programming languages and a set
of features that differs per language. Unwanted files and folders can be excluded from the
project tree via the settings. Many Visual Studio Code features are not exposed through
menus or the user interface but can be accessed via the command palette.
Source control is a built-in feature of Visual Studio Code. It has a dedicated tab inside of
the menu bar where users can access version control settings and view changes made to the
current project. To use the feature, Visual Studio Code must be linked to any supported
version control system (Git, Apache Subversion, Perforce, etc.). This allows users to create
repositories as well as to make push and pull requests directly from the Visual Studio Code
program.
Chapter 5
METHODOLOGY
5.1 General Architecture
The below architectural diagram shows how the system works and it is demonstrating the
role of users in the developed program.
External Entities:
1. User : Represents the external user interacting with the "hideEm" tool,
providing input data and receiving the modified image as output.
Processes:
1. Prerequisite Tester: This process verifies the prerequisites required for the
tool to run, such as the availability of necessary libraries or dependencies.
2. Menu Dispatcher: Handles the user interface and menu navigation, guiding
the user through the different functionalities of the tool.
3. Image Selector: Selects the original image file provided by the user for
embedding the hidden message.
4. Message Encoder: Encrypts the message provided by the user using
cryptographic algorithms to enhance security.
5. Message Decoder: Decrypts and extracts the hidden message from the
modified image, if required by the user.
6. Message Extractor: Extracts the hidden message from the modified image.
7. New Image Generator: Generates the modified image with the hidden
message embedded, or creates a new image file with the extracted message.
Select Image:
Actor: User
Description: The user selects an image file to be used as the carrier for hiding the text
message.
Activity diagram describes how the image is loaded in the system , encrypted text is then
encoded into the image to develop stego-image for encryption part as well as vice-versa for
part of decryption.
Chapter 6
ALGORITHM
6.1 LSB Algorithm
The LSB (Least Significant Bit) Algorithm, particularly when applied to the R-channel of
an image, stands as one of the most prevalent methods in modern steganography. This
technique capitalizes on the least noticeable bit of a pixel's information in an image. It
proves most effective when the carrier file is longer than the message and when the image
is grayscale. In a 24-bit image, LSB techniques can encode three bits into each pixel,
facilitating the concealment of data within the image. Despite its simplicity in
implementation, LSB insertion is susceptible to attacks. Steganography has found its way
into various digital technologies, from embedding watermarks in currency to encoding
metadata in MP3 files. It's even utilized for copyright protection, embedding ownership
information within files. However, the fragility of LSB steganography is evident, as minor
alterations to the image's color palette or simple manipulations can obliterate the hidden
message, highlighting the need for robust security measures in digital concealment
methods.
The R-channel LSB (Least Significant Bit) algorithm is a method used in steganography,
which is the practice of hiding information within digital images. In this algorithm, a carrier
image is chosen, and its red channel (one of the color channels in the image) is manipulated
to conceal a secret message. Each pixel in the image is represented by three color values:
red, green, and blue. By altering the least significant bit (the binary digit with the least
impact on the pixel's color) of the red channel, the algorithm embeds bits of the secret
message into the image. Since the changes made to the least significant bit are subtle, they
are typically imperceptible to the human eye. To extract the hidden message, the process is
reversed, and the altered least significant bits are read from the image. If encryption was
used before embedding the message, decryption is required to reveal the original content.
While the R-channel LSB algorithm is straightforward and effective, it's essential to
recognize that it may not provide robust security against advanced detection methods.
Therefore, additional security measures may be necessary depending on the application's
requirements.
R-channel LSB algorithm serves as a versatile tool in digital image processing, offering a
range of applications in communication, security, and copyright protection. Its ability to
conceal information within images while maintaining visual integrity makes it a valuable
technique in various domains. The R-channel LSB (Least Significant Bit) algorithm finds
numerous applications in digital image processing and steganography. Some of its common
uses include:
Secret Communication: One of the primary uses of the R-channel LSB algorithm is
for secret communication. By embedding messages or data within the least
significant bits of the red channel of an image, users can conceal information within
images, making it difficult for unauthorized individuals to detect or intercept the
hidden data.
Copyright Protection: The algorithm can also be employed for copyright protection
in digital media. Copyright information or ownership details can be embedded
within images using LSB steganography, allowing creators to assert ownership and
protect their intellectual property rights.
Digital Watermarking: R-channel LSB can be utilized for digital watermarking,
where imperceptible marks or identifiers are embedded into images to authenticate
their origin or ownership. Watermarking helps to deter unauthorized use or
distribution of copyrighted images and serves as a form of digital authentication.
Data Hiding in Multimedia: In addition to images, the R-channel LSB algorithm
can be extended to hide data in multimedia files such as audio and video. By
manipulating the least significant bits of multimedia files, users can embed
additional data or metadata, enhancing the file's functionality or security.
Steganalysis and Security: While the R-channel LSB algorithm is commonly used
for covert communication, it is also subject to steganalysis techniques aimed at
detecting hidden information. As a result, the algorithm is utilized in security
applications to analyze and detect the presence of hidden data in digital images,
aiding in forensic investigations and digital forensics.
In Figure 6.2 above, it's illustrated that modifying the Most Significant Bit (MSB) of a value
will result in a more significant change to the final value compared to altering the Least
Significant Bit (LSB). The MSB holds the highest weight in determining the value of a binary
number, and thus, changing it can lead to substantial adjustments in the overall value.
Conversely, the LSB carries the least weight and has minimal impact on the final value when
altered. This observation underscores the principle that modifications to the MSB are more
noticeable and impactful, while changes to the LSB are relatively subtle and have less influence
on the outcome.
Figure 6.3: Pixel before and after insertion of the secret message
Encryption Algorithm:
Step 1: Start
Step 2: Take message, password and image from user
Step 3: Encrypt the message with the password
Step 4: Encode the encrypted message into binary form
Step 5: Hash the password and attach an escape sequence in the end
Step 6: Attach the password before encoded message
Step 7: While encoded data is not hidden
For each pixel in image
Get red color code
Encode the color code into 8-bit binary
Replace the 2 bit from LSB with 2 bit MSB of encoded data
Update the pixel data in image
If encoded data is hidden
Encoded data is hidden
Step 8: Stop
Decryption Algorithm:
Step 1: Start
Step 2: Take the password and image with hidden message form users
Step 3: For each pixel in image
Get red color code
Encode the color code into 8-bit binary
Append the two from LSB of encoded color code to a string
If last 32 bit of string is password escape sequence
Store password bits as string
Segment the password in 7-bit each and convert to ASCII character
If password does not match
Go to step 1
If last 48 bit of string is message escape sequence
Break
Step 4: Segment the message in 7-bit each
Step 5: Convert the segmented bits to corresponding ASCII character to get cypher text
Step 6: Use password to decrypt the extracted cypher
Step 7: Display the plain text
Step 8: Stop
Chapter 7
MODULES
Image Enhancement: PIL offers tools for enhancing the quality and appearance of
images. This includes adjusting brightness, contrast, saturation, and sharpness, as
well as applying color corrections and gamma adjustments. Image Filtering: PIL
supports various image filtering techniques, such as blurring, sharpening, edge
detection, and noise reduction. These filters can be applied to images to achieve
desired visual effects or to preprocess images before further analysis.
Image Drawing: PIL allows users to draw shapes, text, and other graphics directly
Image File I/O: PIL supports a wide range of image file formats for reading and
writing images, including popular formats such as JPEG, PNG, GIF, BMP, and TIFF.
It also provides functionality for converting between different image formats.
This module is not preloaded with Python. So to install it execute the following command in
the command-line:
7.2 Fernet
The Fernet library in Python is a part of the cryptography package and is specifically designed
for secure encryption and decryption of data. Fernet is a symmetric encryption algorithm,
meaning that it uses the same key for both encryption and decryption. It provides a simple and
secure way to encrypt data, making it suitable for a wide range of applications, including
securing sensitive information in web applications, storing encrypted data in databases, and
transmitting encrypted messages over insecure channels.
The fernet module of the cryptography package has inbuilt functions for the generation of the
key, encryption of plaintext into ciphertext, and decryption of ciphertext into plaintext using
the encrypt and decrypt methods respectively. The fernet module guarantees that data encrypted
using it cannot be further manipulated or read without the key. The Fernet library in Python
offers a convenient and secure solution for encrypting and decrypting data. Its simplicity,
robustness, and cross-platform compatibility make it a popular choice for securing sensitive
information in Python applications.
Methods Used:
generate_key(): This method generates a new fernet key. The key must be kept safe as
it is the most important component to decrypt the ciphertext. If the key is lost then the
user can no longer decrypt the message. Also if an intruder or hacker gets access to the
key they can not only read the data but also forge the data.
Symmetric Encryption: Fernet uses symmetric encryption, where the same secret
key is used for both encryption and decryption. This simplifies the encryption
process and makes it easier to manage keys securely.
Secure Key Generation: Fernet generates secure random keys using cryptographic
algorithms, ensuring that the keys are unpredictable and resistant to brute-force
attacks.
Easy-to-Use API: The Fernet library provides a simple and intuitive API for
encrypting and decrypting data. Developers can easily integrate Fernet encryption
into their Python applications with minimal effort.
7.3 Datetime
The datetime module supplies classes for manipulating dates and times. While date and
time arithmetic is supported, the focus of the implementation is on efficient attribute
extraction for output formatting and manipulation. The datetime module is a powerful and
versatile tool for working with dates and times in Python, offering a wide range of
functionalities for various date and time-related tasks. It offers functionalities for creating,
manipulating, and formatting dates, times, and time intervals.
There are 6 main classes when it comes to datetime in Python.
Date: By date, we mean the conventional concept of dates with effect to the
Gregorian Calander. Very naturally, the date class in Python is explained with the
attributes like day, month, and year.
Time: The next class that is discussed here is called time. This class is independent
of any day. Here it is generally assumed that each day has 24*60*60 seconds. The
attributes of the time class in Python include minute, second, microsecond, hour,
and tzinfo.
Datetime: Datetime in Python is the combination between dates and times. The
attributes of this class are similar to both date and separate classes. These attributes
include day, month, year, minute, second, microsecond, hour, and tzinfo.
Timedelta: You can think of timedelta as the variation between two different dates,
time, or datetime examples to microsecond resolution.
Tzinfo: tzinfo is nothing but an attribute. It can provide you different timezone-
related information objects.
Timezone: This class can deploy the tzinfo abstract base class in terms of a fixed
offset from the UTC. Here, you are looking into the new UTC version 3.2.
7.4 Base64
A built-in module in Python, the base64 library offers functions for encoding and decoding
binary data to and from base64 strings, effectively converting any binary data to plain text.
A common encoding method called base64 converts binary data into a string of printable
ASCII characters.
This module provides functions for encoding binary data to printable ASCII characters and
decoding such encodings back to binary data. It provides encoding and decoding functions
The RFC 4648 encodings are suitable for encoding binary data so that it can be safely sent
by email, used as parts of URLs, or included as part of an HTTP POST request. The
encoding algorithm is not the same as the uuencode program.
There are two interfaces provided by this module. The modern interface supports encoding
bytes-like objects to ASCII bytes, and decoding bytes-like objects or strings containing
ASCII to bytes. Both base-64 alphabets defined in RFC 4648 (normal, and URL- and
filesystem-safe) are supported.
The legacy interface does not support decoding from strings, but it does provide functions
for encoding and decoding to and from file objects. It only supports the Base64 standard
alphabet, and it adds newlines every 76 characters as per RFC 2045. Note that if you are
looking for RFC 2045 support you probably want to be looking at the email package
instead.
7.5 Hashlib
The hashlib module in Python provides functions for hashing data using various
cryptographic hash algorithms. Hashing is a process of converting input data (such as a
string or a file) into a fixed-size string of bytes, typically for the purpose of ensuring data
integrity, password storage, or digital signatures. Hashlib provides a convenient and
efficient way to hash data for a wide range of applications, including data integrity
verification, password storage, and digital signatures.
This module implements a common interface to many different secure hash and message
digest algorithms. Included are the FIPS secure hash algorithms SHA1, SHA224, SHA256,
SHA384, SHA512, (defined in the FIPS 180-4 standard), the SHA-3 series (defined in the
FIPS 202 standard) as well as RSA’s MD5 algorithm (defined in internet RFC 1321). The
terms “secure hash” and “message digest” are interchangeable. Older algorithms were
called message digests. The modern term is secure hash.
There is one constructor method named for each type of hash. All return a hash object with
the same simple interface. For example: use sha256() to create a SHA-256 hash object.
You can now feed this object with bytes-like objects (normally bytes) using the update
method. At any point you can ask it for the digest of the concatenation of the data fed to it
so far using the digest() or hexdigest() methods.
To allow multithreading, the Python GIL is released while computing a hash supplied more
than 2047 bytes of data at once in its constructor or .update method.
Constructors for hash algorithms that are always present in this module are sha1(),
sha224(), sha256(), sha384(), sha512(), sha3_224(), sha3_256(), sha3_384(), sha3_512(),
shake_128(), shake_256(), blake2b(), and blake2s(). md5() is normally available as well,
though it may be missing or blocked if you are using a rare “FIPS compliant” build of
Python. These correspond to algorithms_guaranteed.
Additional algorithms may also be available if your Python distribution’s hashlib was
linked against a build of OpenSSL that provides others. Others are not guaranteed available
on all installations and will only be accessible by name via new().
● Password Storage: Hashing algorithms provided by hashlib are commonly used for
storing passwords securely in databases. Instead of storing passwords in plaintext,
they are hashed using algorithms like SHA-256 or SHA-512 before being stored.
When a user attempts to log in, their password is hashed and compared to the stored
hash value for authentication.
● Digital Signatures: Hash functions play a crucial role in digital signatures, where
they are used to generate a unique fingerprint (hash) of a message or document. This
hash value is then encrypted with the sender's private key to create a digital signature.
Recipients can verify the integrity and authenticity of the message by decrypting the
digital signature using the sender's public key and comparing it to the hash of the
original message.
● Data Integrity Verification: Hashing is often used to verify the integrity of data
during transmission or storage. By generating a hash of the data before transmission
or storage, and then comparing it to the hash of the received or retrieved data, one can
ensure that the data has not been altered or corrupted.
● File Verification: When downloading files from the internet, users can verify the
integrity of the downloaded files by comparing their hash values to those provided by
the source. This ensures that the files have not been tampered with during transmission
and that they are identical to the original files.
● Cryptographic Key Derivation: Hash functions are used in key derivation functions
(KDFs) to derive cryptographic keys from passwords or other input data. This ensures
that the keys used for encryption and decryption are securely generated from a
relatively weak source of randomness.
7.6 OS
Python has a built-in os module with methods for interacting with the operating system,
like creating files and directories, management of files and directories, input, output,
environment variables, process management, etc. The os module has the following set of
methods and constants.
This module provides a portable way of using operating system dependent functionality. If
you just want to read or write a file see open(), if you want to manipulate paths, see the
os.path module, and if you want to read all the lines in all the files on the command line see
the fileinput module. For creating temporary files and directories see the tempfile module,
and for high-level file and directory handling see the shutil module.
The design of all built-in operating system dependent modules of Python is such
that as long as the same functionality is available, it uses the same interface; for
example, the function os.stat(path) returns stat information about path in the same
format (which happens to have originated with the POSIX interface).
Extensions peculiar to a particular operating system are also available through the
os module, but using them is of course a threat to portability.
All functions accepting path or file names accept both bytes and string objects, and
result in an object of the same type, if a path or file name is returned.
2. Path Manipulation:
3. Process Management:
os.execv(path, args): Replace the current process with a new one using
the given executable file.
os.execl(path, arg0, arg1, ...): Replace the current process with a new
one using the given executable file and arguments.
4. Environment Variables:
5. Miscellaneous:
Chapter 8
8.2 Implementation
The project hideEm follows a modular architecture, where the application is built by
integrating multiple modules together. Each module serves a specific purpose or functionality
within the program, and they are developed independently before being integrated to form the
complete application. This modular approach allows for better organization, maintenance, and
scalability of the codebase. Additionally, it facilitates easier testing and debugging of
individual components, as well as the ability to replace or update modules without affecting
the entire system. The modular design of hideEm enhances its flexibility and robustness,
enabling efficient development and management of the software.
Menu Selector module in the program serves as the initial entry point for users and facilitates
navigation among various options available in the application. When the program is initiated,
the Menu Selector module is invoked, presenting users with a menu of options such as hiding
a message, viewing a hidden message, exiting the program, accessing help, and more. Users
can input their choice, and the Menu Selector module reads this input to determine the next
action to be performed. Based on the user's selection, the module switches the program to
execute the corresponding task or functionality, directing the flow of the program accordingly.
As the index module, it plays a crucial role in orchestrating the overall functionality of the
application, providing users with a seamless and intuitive interface to interact with the system.
Image Selector module in the program enables users to select the desired image in which data
is to be hidden. This module operates by first presenting users with a list of available files and
folders within the current directory. Users can then input a numeric value corresponding to their
choice. If a folder is selected, the module navigates the user to that directory for further
exploration. However, if a file is chosen, the module verifies whether the selected file is an
image. If the chosen file is indeed an image, the program proceeds to select that file.
Additionally, the Image Selector module includes error handling mechanisms to detect and
handle invalid user input, ensuring a smooth and error-free selection process. The Image
Selector module plays a crucial role in facilitating the selection of the appropriate image file
for data hiding within the program.
Message Encryption Module serves a critical role in the program by handling the
encryption of user messages before they are hidden within images. This module prompts
the user to input both an encryption key and the message to be encrypted. Using the AES
algorithm, the module encrypts the message using the provided key, ensuring its
confidentiality. Additionally, the module hashes the encryption key to further secure it,
and attaches an escape sequence at the end of both the password hash and the ciphertext.
This additional step enhances security by preventing unauthorized access to the
encrypted message, even if hackers manage to extract pixel data from the image. By
encrypting the message and securing the encryption key, the Message Encryption
Module effectively protects sensitive information from potential threats.
Image Generator module plays a crucial role in the program by working in conjunction
with the Message Encryption Module to conceal encrypted messages within images.
This module utilizes the Image Selector Module to obtain the user-selected image and
then employs the Python Imaging Library (PIL) to extract the pixel data of the image.
Once the pixel data is extracted, the module manipulates the red pixel color code to
embed the encrypted message within the image. Additionally, the module creates a copy
of the entire color palette and generates a new image with the hidden message embedded
in it. Finally, it saves a copy of the modified image in the user's home directory, ensuring
that the original image remains intact. The Image Generator module is responsible for
seamlessly integrating encrypted messages into images while preserving the integrity of
the original image file.
Message Exporter module serves a dual purpose within the program. Firstly, it acts as
a display for the extracted message, allowing users to view the decrypted content directly
within the program interface. This feature enhances user convenience by providing
immediate access to the concealed information. Additionally, the module facilitates the
8.3 Testing
System testing of the software is a testing conducted on a system which is complete,
integrated system that works as a whole. System testing is a critical testing procedure that
must be conducted by software developer before the system released. During system testing
it can evaluate the system’s compliance with its activities in systemtesting test not only the
design of the system, but also the behavior and the believed expectations result from the
customer. In addition, various complex test cases that used to test the system are according
to the business process requirements which are collected from the user. Meanwhile, errors
or bugs that detected during the testing is required software developer look into it from the
initial step of the business process to the end of the process to ensure it have expected result
in order to solve the errors or bugs to determine the degree of system stability.
Testing is a crucial phase in the development process of any software application, including
the hideEm image steganography tool. The testing phase ensures that the application
functions as intended, meets user requirements, and operates reliably under various scenarios.
In the context of hideEm, testing encompasses several key aspects:
Unit Testing: Unit testing involves testing individual components or modules of the
application in isolation. Each module, such as the Message Encryption Module, Image
Generator Module, Message Extractor Module, and others, is tested to verify its
functionality according to specifications. This ensures that each component performs
its intended task accurately and reliably.
Security Testing: Security testing is crucial for a steganography tool like hideEm,
which deals with sensitive data encryption and hiding. This testing ensures that the
application's encryption and hiding mechanisms are robust and secure against potential
attacks or vulnerabilities. Security testing may involve validating encryption
algorithms, checking for vulnerabilities in input validation, and ensuring secure storage
of sensitive information.
Regression Testing: Regression testing ensures that recent code changes or updates do
not adversely affect existing functionality. It involves retesting previously tested
features and functionalities to ensure that they still work correctly after modifications.
Regression testing is essential for maintaining the overall quality and stability of
Unit Testing is a primary testing process for the developed hideEm system. It involves
testing individual units or components of the software, such as modules, functions, or
procedures, to verify their correctness and suitability for use. This testing method allows
developers to identify any issues or defects within these units before integrating them into
the larger system. Unit Testing is essential for ensuring the functional correctness of each
independent module and detecting any errors early in the development cycle. It serves as
the first level of testing before integration testing, helping to maintain the overall quality
and reliability of the hideEm system.
Here, in the unit testing all the major functions being provided by each module of the project
are tested with predefined conditions and outcomes are mentioned below.
Integration testing indeed plays a critical role in the software testing process, typically occurring
as the second level following unit testing. Unlike unit testing, which focuses on testing
individual components or units in isolation, integration testing involves verifying that these
units work together harmoniously as designed. In a typical software project, numerous modules,
often developed by different programmers, need to seamlessly integrate to achieve the desired
functionality. Integration testing specifically targets errors that may arise from the combination
of these modules. Its primary objective is to ensure that all units collaborate effectively to
perform their tasks correctly within the broader context of the software system. Through
integration testing, potential defects and inconsistencies in the interaction between modules are
identified and addressed, contributing to the overall quality and reliability of the software
product.
Acceptance Testing is a method of software testing where a system undergoes evaluation for
acceptability, aiming to ensure compliance with business requirements and readiness for
delivery. This formal testing process aligns with user needs, requirements, and business
processes to assess whether the system meets acceptance criteria. Typically conducted by end
users or clients, acceptance testing verifies the software's suitability before deployment to the
production environment. It occurs after functional, integration, and system testing phases,
focusing on validating end-to-end business flow rather than simple errors or system
functionality. Carried out in a dedicated testing environment with production-like data,
acceptance testing serves as a crucial step in determining whether the system is ready for
acceptance and deployment.
Chapter 9
WORKING
The proposed system uses very less computational resources and is free of cost
when it comes to its implementation. So it is very efficient moreover it can be improved
in performance via giving stringer confidence interval for recognition.
where:
MAX is the maximum possible pixel value of the image (e.g., 255 for an 8-bit
grayscale image or 1 for a normalized image).
MSE is the Mean Squared Error between the original and reconstructed images.
MSE quantifies the average squared difference between corresponding pixels of the
original and reconstructed images. It provides a numerical measure of the average
magnitude of the error between the two images. The formula for MSE is:
MSE=MN1∑i=0M−1∑j=0N−1(I(i,j)−K(i,j))2
where:
𝐼 ( 𝑖 , 𝑗 ) I(i,j) is the pixel value of the original image at position ( 𝑖 , 𝑗 ) (i,j).
𝐾 ( 𝑖 , 𝑗 ) K(i,j) is the pixel value of the reconstructed image at position ( 𝑖 , 𝑗 )
(i,j).
import os
import selectImage as si
import time
import intro
import about
import hideMessage as hm
import showMessgae as sm
def checkPython():
check = os.system('python --version')
check2 = os.system('python3 --version')
if check != 0 and check2 != 0:
print("Err:: This program needs python to run. Please install
python and try again...")
quit()
def showErr():
global error
return error
error = ""
def main(ack):
os.chdir(f"{os.path.dirname(__file__)}")
global error
si.clear()
intro.showBrand()
if ack == "hidden":
print(f"\nYour message is hidden in {os.path.expanduser('~')}")
if ack == "about":
print(f"\nDeveloped by Suvam and team! ")
if len(error) > 1:
print(f'\nError::: {showErr()}\n')
if len(error) > 1:
print(f'\nError::: {showErr()}\n')
try:
selectedNumber = int(input(f"Select your option (0-{optionRange}): "))
if selectedNumber == 0:
si.clear()
print(open("./txtFiles/smile.txt", "r").read())
time.sleep(5)
si.clear()
quit()
elif selectedNumber == 1:
si.start()
print(f"Full path of your image is {si.getName()}")
time.sleep(0.5)
if si.getName() == "[EXIT]":
main("")
else:
hm.hide(si.getName())
main("hidden")
elif selectedNumber == 2:
si.start()
print(f"Full path of your image is {si.getName()}")
time.sleep(0.5)
if si.getName() == "[EXIT]":
main("")
else:
sm.show(si.getName())
main("shown")
elif selectedNumber == 3:
about.aboutApp()
main("about")
elif selectedNumber > 3 or selectedNumber < 0:
error = "Number out of range"
main("")
else:
error = "Unexpected error occurred..."
except ValueError:
error = "Only number accepted"
os.chdir(f"{os.path.dirname(__file__)}")
error = ""
aspShowRun = False
optionRange = "3"
si.clear()
time.sleep(0.05)
si.clear()
checkPython()
main("")
import time
from datetime import datetime
import os
from PIL import Image
from cryptography.fernet import Fernet
import base64
import hashlib
def getText():
password = input("Password to lock message (Don't use [MAIN] as your
password): ")
os.system("cls")
remain = 32 - len(password)
password = password + '0' * remain
passByte = bytes(password, 'ascii')
hashPass = hashlib.md5(passByte)
basePass = base64.b64encode(passByte)
hashPass = str(hashPass.digest())
password = hashPass + "[{^]"
encodedText = ""
text = password + message
for char in text:
acsiiOfChar = ord(char)
binOfChar = f"{acsiiOfChar:08b}"
encodedText = encodedText + binOfChar
return encodedText
def hide(imageName):
os.system("cls")
text = getText()
os.system("cls")
pixelToHide = len(text) / 2
img = Image.open(imageName)
loadImg = img.load()
pixelCount = 0
textStart = 0
textEnd = textStart + 2
for y in range(img.size[1]):
if pixelCount == pixelToHide:
break
for x in range(img.size[0]):
r, g, b = img.getpixel((x, y))
binR = f"{r:08b}"
textSection = text[textStart: textEnd]
textStart = textStart + 2
textEnd = textStart + 2
encodedBinR = binR[:6] + textSection
encodedDecR = int(encodedBinR, 2)
loadImg[x, y] = (encodedDecR, g, b)
pixelCount = pixelCount + 1
if pixelCount == pixelToHide:
break
img.save(f"{os.path.expanduser('~')}/encoded-{datetime.now()}.{'jpg'}",
format="jpg")
img.close()
print("\nMessage hidden successfully...")
time.sleep(1)
import os
import time
def clear():
os.system('cls')
def showErr():
global error
return error
def start():
def getLenOfDir():
global userDir
return len(os.listdir(userDir))
def select():
global userDir, error, imageName, admin
cls()
if len(error) > 0:
print(f'\nError::: {showErr()}\n')
error = ""
try:
fileNumber = int(input(f"Select file number (1-{getLenOfDir()}): "))
if getLenOfDir() >= fileNumber >= 1:
selectedFile = os.listdir(userDir)[fileNumber - 1]
newUserDir = f"{userDir}/{selectedFile}"
if os.path.isdir(newUserDir) and '.' not in selectedFile:
os.chdir(newUserDir)
userDir = newUserDir
select()
elif fileNumber == 0:
end()
else:
error = "Number out of range"
select()
except ValueError:
error = "Only numbers accepted"
select()
def getName():
global imageName
return imageName
def end():
global imageName
imageName = "[EXIT]"
admin = ""
error = ""
imageName = None
userDir = None
import base64
import hashlib
from cryptography.fernet import Fernet
import time
import os
from datetime import datetime
escSeqForMessage = "001000000101101101000101010011100100010001011101"
escSeqForPassword = "01011011011110110101111001011101"
def writeTextToFile(text):
global imgName, fileExp
fileName = f"{os.path.expanduser('~')}/{datetime.now()}.txt"
fileExp = fileName
openFile = open(fileName, 'w')
openFile.write(text)
def refineText(text):
global passkey
refinedText = text.replace(f"{passkey}b'", "")
refinedText = refinedText.replace("' [END]", "")
return refinedText
def hold(text):
checkToExit = input("\nEnter 'q!' to exit without saving and 'w!' to save
and exit: ")
if checkToExit == 'q!':
return
elif checkToExit == 'w!':
writeTextToFile(text)
si.clear()
print(f"Your message is saved in {fileExp}")
holding = input("Enter to continue...")
else:
hold(text)
def display(text):
global passToDecrypt
fernet = Fernet(passToDecrypt)
text = fernet.decrypt(bytes(text, 'ascii'))
text = str(text)
remove = text[:2]
text = text.replace(remove, "")
remove = text[-1]
text = text.replace(remove, "")
return text
def checkPassword():
global escSeqForPassword, imgName, passwordFlag, wrongCount, passkey,
passToDecrypt
password = input("Decryption Key (to goto menu: [MAIN]): ")
if password == '[MAIN]':
returnFlag = '[MAIN]'
return returnFlag
else:
remain = 32 - len(password)
password = password + "0" * remain
passByte = bytes(password, 'ascii')
hashPass = hashlib.md5(passByte)
basePass = base64.b64encode(passByte)
password = str(hashPass.digest()) + '[{^]'
passkey = password
passToDecrypt = basePass
encodedPassword = ""
passwordFromImage = ""
for char in password:
acsiiOfChar = ord(char)
binOfChar = f"{acsiiOfChar:08b}"
encodedPassword = encodedPassword + binOfChar
img = Image.open(imgName)
for y in range(img.size[1]):
if len(passwordFromImage) >= 32:
if passwordFromImage[-32:] == escSeqForPassword:
break
for x in range(img.size[0]):
r, g, b = img.getpixel((x, y))
binR = f'{r:08b}'
passwordFromImage = passwordFromImage + binR[6:]
if len(passwordFromImage) >= 32:
if passwordFromImage[-32:] == escSeqForPassword:
break
if passwordFromImage == encodedPassword:
return '[YES]'
else:
return "[NO]"
def show(imageName):
global escSeqForMessage, passwordFlag, wrongCount, imgName
imgName = imageName
passwordFlag = 0
wrongCount = 0
si.clear()
status = checkPassword()
if status == '[YES]':
for y in range(img.size[1]):
if len(binText) >= 48:
if binText[-48:] == escSeqForMessage:
break
for x in range(img.size[0]):
r, g, b = img.getpixel((x, y))
binR = f"{r:08b}"
binText = binText + binR[6:]
if len(binText) >= 48:
if binText[-48:] == escSeqForMessage:
break
startText = 0
endText = startText + 8
decodedMessage = ""
loopBinText = len(binText) / 8
loopCount = 0
while loopCount < loopBinText:
slicedBits = binText[startText: endText]
startText = startText + 8
endText = startText + 8
desSlicedBits = int(str(slicedBits), 2)
decodedMessage = decodedMessage + chr(desSlicedBits)
loopCount = loopCount + 1
message = ""
imgName = ""
Chapter 10
RESULTS
10.1 Results
PSNR-Value represent Peak Signal to Noise Ratio which is the peak-error comparison
between two images. It is used to show the efficiency of our tool. Also to mention that using
original Image of low quality will result in low PSNR value it is already is low quality. The
image we used are of 3341 X 5011 resolution with 72 Dpi and 24 bit depth. The message
encoded is “Hello World” and password used is “test123”.
1.
100.02
2.
102.75
3.
99.30
4.
95.55
5.
102.73
6.
104.80
7.
103.1
8.
99.21
9.
105.3
10.
101.78
Chapter 11
SCREENSHOTS
Chapter 12
CONCLUSION AND FUTURE WORK
12.1 CONCLUSION
In this era of technological advancement, “hideEm” emerges as a valuable asset, facilitating
secure sharing of confidential data among users. Particularly beneficial for organizations
and individuals unable to invest in robust security measures like GRE or IPSec, hideEm
offers a practical solution to safeguard sensitive information when transmitting over public
networks. However, the program's effectiveness ultimately depends on user diligence, with
factors such as encryption key length and complexity directly impacting its security. While
hideEm currently offers essential steganography features, ongoing updates and
enhancements will ensure it remains aligned with evolving user needs and security
standards, reinforcing its position as a reliable tool for protecting sensitive data in the digital
age.
The project entitled “hideEm” represents a robust and efficient solution for image
steganography, offering users a reliable method to conceal sensitive data within image files
securely. Through its modular architecture and seamless integration of encryption
algorithms, users can encrypt messages and hide them within images, ensuring
confidentiality and protection against unauthorized access. The program's intuitive
interface and user-friendly design make it accessible to a wide range of users, while its
comprehensive testing ensures reliability and performance. hideEm's ability to effectively
hide data within images, coupled with its encryption capabilities, makes it a valuable tool
for protecting sensitive information in various applications. As technology continues to
advance, hideEm stands as a testament to the ongoing innovation in data security and
privacy.
Conduct regular usability testing sessions to gather user feedback and insights for
further improving the user interface.
Explore emerging encryption algorithms and protocols to assess their suitability for
integration into the project, focusing on enhancing data security.
Establish a dedicated support system or community forum where users can seek
assistance, report issues, and share insights for ongoing improvement.
Continuously monitor and track industry trends and regulatory requirements related
to data security and privacy to ensure compliance and alignment with best practices.
REFERENCES
[1] Shahid Rahman, Jamal Uddin, Habib Ullah Khan, Hameed Hussain, Ayaz Ali khan,
Muhammad Zakarya (24 November 2022). A Novel Steganography Technique for Digital
Images Using the Least Significant Bit Substitution Method. IEEE Journal, 101109.
[2] Prof. Mohamad K. Abu Zalata, Dr. Mohamad T. Barakat, Prof. Ziad A. Alqadi
(January 2022). Carrier Image Rearrangement to Enhance the Security Level of LSB
Method of Data Steganography. International Journal of Computer Science and Mobile
Computing (IJCSMC), Volume 11, 1047760.
[4] Temitayo Ejidokun, Olusegun O. Omitola, Kehinde Adeniji, Ifeoma Nnamah (25 January
2022). Implementation and Comparative Analysis of Varient of LSB Steganographic
Method. SAUPEC Conference (2022), 101109
[5] Sonal Karade, Prof. Savita Chouhan (December 2021). A Visual Cryptography Based
Data Hiding Technique for Secret Data Encryption and Decryption. International Journal
of Engineering Associates (IJEA), Volume 10, 2320-0804.