Research Project Report
Research Project Report
by
We hereby declare that this thesis is based on the results found by ourselves.
Materials of work found by other researcher are mentioned by reference. This thesis,
neither in whole nor in part, has been previously submitted for any degree.
Rasedul Mannan
Roll:201781
ii
CERTIFICATE
This is to certify that the thesis entitled Dual-Layer Security for Medical
Images Using AES Encryption and Steganography has been prepared and
submitted by Mst Sonali Akter Swarna, Rasedul Mannan, and Mahmodol
Hassan Monna in partial fulfillment of the requirement for the degree of Bachelor
of Science (honors) in Information and Communication Technology on February 2025.
Accepted and approved in partial fulfilment of the requirement for the degree
Bachelor of Science (honors) in Information and Communication Technology.
iii
ACKNOWLEDGEMENTS
We are honored for the opportunity to convey our sincere appreciation and thanks
to everyone who contributed to the creation of this report.
This thesis is performed under the supervision of Prof K M Akkas Ali, Professor,
Institute of Information Technology(IIT), Jahangirnagar University, Savar, Dhaka.
He has provided us with several books, journals, and papers pertaining to the current
research during the course of the work. We would not have been able to complete
the project work efficiently and on schedule without his assistance, courteous sup-
port, and the generous time he provided. First and foremost, we want to express
our sincere gratitude to him for his leadership, insightful advice, encouragement and
amicable assistance.
We are incredibly grateful to Professor Dr. Risala Tasin Khan, Director of IIT at
Jahangirnagar University in Savar, Dhaka, for supporting us in delivering the project
within the time frame. We also want to express our gratitude to the other IIT fac-
ulty members who, whether directly or indirectly, contributed to the success of this
project by contributing their great guidance.
We want to thank all the other sources we got useful information from. We owe a
debt of gratitude to everyone who has assisted us in finishing this task.
Lastly, we would like to thank all of the IIT staff, our friends, and family for encour-
aging us and cooperating with us throughout the project.
iv
ABSTRACT
v
LIST OF ABBREVIATIONS
vi
LIST OF FIGURES
Figure
vii
LIST OF TABLES
Table
viii
TABLE OF CONTENTS
DECLARATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
CERTIFICATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . iv
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
LIST OF ABBREVIATIONS . . . . . . . . . . . . . . . . . . . . . . . . . vi
CHAPTER
I. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Least Significant Bit(LSB) . . . . . . . . . . . . . . 2
1.1.2 AES (Advanced Encryption Standard) . . . . . . . 2
1.1.3 AES and steganography . . . . . . . . . . . . . . . . 2
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Research Outline . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Studies on Least Significant Bit Technique . . . . . . . . . . . 5
2.3 Studies on AES . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Studies on Steganography in Medical Image Security . . . . . 7
ix
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 System Configuration . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Software Tools and Libraries Required for Implementation . . 9
3.3.1 Programming Environment . . . . . . . . . . . . . . 9
3.3.2 Platform for implementation . . . . . . . . . . . . . 9
3.3.3 Numpy Library . . . . . . . . . . . . . . . . . . . . 10
3.3.4 Pandas Library . . . . . . . . . . . . . . . . . . . . 11
3.3.5 Math Library . . . . . . . . . . . . . . . . . . . . . 11
3.3.6 Scikit-image Library . . . . . . . . . . . . . . . . . . 12
3.3.7 Sewar Library . . . . . . . . . . . . . . . . . . . . . 12
3.3.8 Pillow Library . . . . . . . . . . . . . . . . . . . . . 13
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 System Architecture . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1 Workflow Diagram . . . . . . . . . . . . . . . . . . . 14
4.3 Encryption & Decryption Technique . . . . . . . . . . . . . . 16
4.3.1 Encryption Process . . . . . . . . . . . . . . . . . . 16
4.3.2 AES encryption . . . . . . . . . . . . . . . . . . . . 19
V. Result Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 Datasets and Results . . . . . . . . . . . . . . . . . . . . . . . 23
5.3 Encryption and Decryption process . . . . . . . . . . . . . . . 25
5.4 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . 26
5.4.1 Encryption and Decryption Time . . . . . . . . . . 26
5.4.2 Peak Signal-to-Noise Ratio (PSNR) . . . . . . . . . 27
5.4.3 Mean-Squared Error(MSE) . . . . . . . . . . . . . . 28
5.4.4 Comparison of PSNR,SSIM,MSE values . . . . . . . 29
5.4.5 Security Analysis and Attack Resistance . . . . . . 30
VI. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
x
CHAPTER I
Introduction
1.1 Overview
1
solution that uses AES and Blowfish[4]. Disinformation is information that has been
purposefully disseminated that is knowingly false or inaccurate
2
1.2 Problem Statement
Concerns about data integrity, patient confidentiality, and cyber threat preven-
tion have grown as a result of the increased use of digital medical imaging. Medi-
cal photos are a major target for hackers, illegal access, and data breaches because
they frequently contain sensitive personal health information. Traditional encryption
techniques leave observable traces that could draw in attackers, even though they are
successful at protecting data. Similarly, if independent steganographic methods are
uncovered, they might not offer enough protection. Therefore, creating a strong secu-
rity architecture that not only encrypts private medical data but also makes sure that
its existence isn’t seen is the difficult part. The growing use of digital medical imaging
has raised concerns about patient confidentiality, data integrity, and preventing cyber
threats. Because medical pictures often contain sensitive personal health information,
they are a prime target for hackers, illicit access, and data breaches. Even though tra-
ditional encryption methods are effective in protecting data, they leave visible traces
that can attract attackers. In a similar vein, separate steganographic techniques may
not provide adequate security if they are discovered. The challenging element, then,
is developing a robust security architecture that not only encrypts sensitive medical
data but also ensures that its existence is hidden.
1.3 Motivation
Global connectivity and cyberspace usage have increased the cyber risks and made
security a vital issue. Therefore, we need to ensure the secure transmission of data
through global networks. One way to achieve this is by using image steganography,
which is the technique of hiding data inside an image. By doing so, we can enhance
the data security and reliability of communication. We will use a modified Pixel Value
Differencing method for image steganography, which can maintain the image quality
and the data capacity.
1.4 Objective
• To implement AES encryption for securing sensitive patient data before em-
bedding it in medical images.
3
• To use steganographic techniques for concealing encrypted data within med-
ical images.
1.5 Limitations
• The dual-layer security system might introduce potential visual quality trade-
offs, where some distortion in the medical images could be noticeable.
The report’s remaining sections are organized as follows: In Chapter II, a litera-
ture review is provided, discussing relevant work on AES encryption and steganogra-
phy techniques, with a focus on LSB and hybrid steganographic methods. Chapter
III introduces the system environment and tools used to build the dual-layer security
model, including the specific software and programming tools employed. Chapter
IV outlines the system architecture, workflow diagram, and details the proposed mod-
ified steganography technique combined with AES encryption. Chapter V presents
the result analysis, where the performance of the proposed model is evaluated based
on various image quality and security metrics. Finally, Chapter VI concludes the
thesis by summarizing the results and suggesting future improvements for enhancing
the dual-layer security approach.
4
CHAPTER II
Literature Review
2.1 Introduction
N. Jain, S. Meshram, and S. Dubey [8] used every eight dark pixels in a grayscale
image is regarded as a byte, with the low bit containing the binary value of each char-
acter. This makes the primary method of least significant bit steganography more
secure. By inverting particular LSBs in the cover image, the technique uses bit inver-
sion to improve stego-image quality by decreasing the number of modified LSBs and
raising PSNR. In order to reliably retrieve the message image, it stores bit patterns
for inversion. It uses the RC4 algorithm to randomly hide message bits within cover
image pixels, increasing robustness and preventing unauthorized extraction [9][10].
5
This study focuses on a steganography system that securely embeds messages in
audio, video, and images to prevent unwanted access using the LSB technique [12].
This paper investigates GIF image steganography and presents ”StegCure,” a plat-
form that utilizes three different LSB insertion algorithms [13].
The Advanced Encryption Standard (AES) has been extensively studied due to its
robustness, efficiency, and widespread adoption in securing sensitive data. Originally
established by the National Institute of Standards and Technology (NIST) in 2001,
AES has been implemented in various cryptographic applications, including secure
communication, cloud storage, and embedded systems.
Rijmen and Daemen [17] introduced the Rijndael algorithm, which became the
foundation of AES. Their research demonstrated the algorithm’s resistance to com-
mon cryptographic attacks, such as differential and linear cryptanalysis, while ensur-
ing high-speed performance on both hardware and software platforms.
Biryukov and Khovratovich [18] later analyzed the security of AES against related-
key attacks and discovered some theoretical vulnerabilities in reduced-round versions
of AES-192 and AES-256. However, their findings confirmed that the full AES im-
plementation remains resistant to practical cryptographic attacks.
Bogdanov et al. [19] introduced the Biclique attack, which marginally reduces the
complexity of an exhaustive key search on AES. Despite this, their study concluded
that AES remains computationally secure for practical applications, as the attack
does not significantly reduce AES’s overall security strength.
In the field of hardware acceleration, Feldhofer et al. [20] explored lightweight AES
implementations for resource-constrained environments, such as RFID systems and
IoT devices. Their research optimized AES for low-power consumption and minimal
6
memory usage while maintaining cryptographic robustness.
These studies indicate that AES remains one of the most secure and efficient en-
cryption standards, with continuous research focusing on further enhancing its secu-
rity, optimizing performance, and addressing emerging cryptographic[21][22] threats.
Medical image security has become increasingly important due to the rising con-
cerns over the privacy and confidentiality of patient data. In recent years, steganogra-
phy has been explored as a robust technique to secure medical images by embedding
sensitive information, such as patient records, in a manner that is imperceptible to
the human eye. One of the critical challenges in medical image security is ensur-
ing that the embedding process does not degrade the quality of the image, as these
images are often used for diagnosis. A significant body of research has focused on
integrating cryptographic techniques with steganography to provide dual-layer pro-
tection. Hussain et al. (2015) introduced a pixel-value differencing (PVD) technique
for embedding encrypted data in medical images while ensuring minimal distortion.
This method focuses on preserving the visual quality of the image, making it suit-
able for use in diagnostic settings [23]. Furthermore, Rajesh and Murugesan (2014)
proposed combining AES encryption with steganography for securing medical im-
ages, specifically DICOM images. Their method showed that AES encryption not
only protects sensitive medical data but also maintains the integrity and diagnostic
quality of the image when embedded [24]. On the other hand, Channappayya et al.
(2017) investigated the adaptive embedding techniques to balance the trade-off be-
tween data security and image quality in medical images. Their work suggested that
adaptive approaches could be used to fine-tune the embedding process according to
the characteristics of the image, thus minimizing the negative impact on image qual-
ity while enhancing security [25]. Moreover, the integration of machine learning with
steganographic techniques is a growing area of interest. Recent studies, such as those
by Virdia et al. (2020), have explored the use of deep learning models to optimize the
steganographic embedding process, ensuring robust data protection without compro-
mising the image’s utility for medical diagnosis [26]. These advancements highlight
the importance of combining encryption and steganography in medical image secu-
rity, while also addressing the challenges of computational complexity and real-time
processing requirements for large image datasets.
7
CHAPTER III
3.1 Introduction
The important system architecture and tools will be discussed in this chapter.
Section 3.2 includes a good idea of the major architecture required. The tools we
used to construct our proposed methodology architectures are discussed in Section
3.3.
Table 3.1 shows the system configuration that is required to implement the system.
Each of these components is represented by a row in the table below.
Component Specification
RAM 16 GB
8
3.3 Software Tools and Libraries Required for Implementa-
tion
The system is built on the Python IDE Jupyter, which makes use of the Python
programming language and resources. Math library for performing mathematical
operations like finding GCD.
Python is one of the most widely used programming languages because there are
so many libraries available for it. The structural, object-oriented, and functional
programming paradigms are only a few of the many ones that Python supports. Be-
cause of its simple syntax, programmers can utilize this language on several systems.
Python can be used for a variety of tasks, including creating software workflows,
managing enormous volumes of data, and performing challenging mathematical op-
erations. possibilities. Python has made working with it simple thanks to libraries
like Random, Math, and Crypto.Cipher. This system was also developed using the
Python programming language and capabilities of the Python library due to Python’s
straightforward structure.
Open source platform Visual Studio is utilized in our work. VS is a free and
open source scientific environment designed and developed by and for scientists, en-
gineers, and data analysts. Visual Studio can be useful for protecting sensitive data
and ensuring secure communication between different parties. Implementing crypto-
graphic approaches on an open-source platform like Visual Studio involves choosing
a suitable different library, setting up the development environment, defining the
steganographic operations, integrating the steganographic library, writing the nec-
essary code, and testing and debugging our code. By following these steps, Visual
Studio project can securely encrypt, decrypt, sign, and verify data as required. We
also used other IDE for our benefit, like anaconda jupyter, google colab or Pycharm.
We calculate different result using the google colab and jupyter notebook. And we
used a numerous number of libraries for that purpose. Python libraries and packages
that are used in execution are listed in table 3.2 of this document.
9
No. Packages Name Description
• Dot Product: n
X
dot product = a · b = ai · b i
i=1
• Matrix Multiplication:
n
X
C = A · B, Cij = Aik · Bkj
k=1
The pandas library in Python is a fundamental tool for data manipulation and
analysis, centered around two main data structures: Series and DataFrame are two of
the fundamental building blocks for designing intuition and for efficient data analysis.
Series is one-dimensional labeled array objects can hold values of different datatypes
and DataFrame is two-dimensional labeled data structure like excel, consists of col-
umn with different datatypes. NaN values are pandas’ way of dealing with missing
data, it also supports quality input/output features with multiple file formats and pro-
vides more elaborate operations such as joining dataframes, altering the structure,
and aggregating data with speed. It easily interfaces with other Python frames, for
example, numpy for numerical computing and matplotlib for displaying information,
and is hugely notable with data researchers, analysts, and scholars for its adaptability
capability in dealing with organized data.
Python comes with a built-in library called the math library that offers a number
of mathematical operations and constants. For common mathematical operations
including trigonometry, logarithms, exponentials, and cross tabulations, the library
offers functions. Every versions of Python include the math library, which is a com-
ponent of the standard library. The math library offers a variety of functions for
frequent mathematical computations, which can save programmers a ton of time and
11
effort. This is one of the library’s main advantages. The library is exceptionally
trustworthy, has undergone extensive testing, and is frequently used in engineering
and scientific applications.
scikit-image is a suite of open source tools that allow for Python image processing
via low-level data structures based on NumPy and using efficient algorithms from
SciPy. It offers a set of functions addressing geometric operations on images, color
space conversion, filtering, and feature extraction. The io module from scikit-image
also allows for reading and writing of images in multiple formats and provides efficient
methods for conversion of the inspected images into arrays (ndarray) for further
analysis. img-as-float and img-as-ubyte are some of the basic functions that are used
to cast/Safe conversion between different data types to the appropriate image data
type to be processed in the next step with no data loss.
• Histogram Equalization:
• Gaussian Filter:
2
x + y2
1
Output(x, y) = exp − ∗ Input(x, y)
2πσ 2 2σ 2
Sewar is a python based open source library for full-reference image quality assess-
ment. It also contains precise implementations of Mean Squared Error (MSE), Peak
Signal/Noise Ratio (PSNR), Structural SIMilarity Index (SSIM), and Multi-Scale
Structural SIMilarity Index (MSSSIM). These metrics define a measure of match or
non-match between two images, which are useful in assessing the quality of images
used in steganography. sewar’s functions are utilized to evaluate the effects of embed-
ding chosen kinds of hidden messages on images, which is principally to determine
whether these changes are distinguishable by human observers or not.
m−1 n−1
1 XX
MSE = [I(i, j) − K(i, j)]2
mn i=0 j=0
12
MAX2
PSNR = 10 · log10
MSE
(2µx µy + c1 )(2σxy + c2 )
SSIM(x, y) =
(µ2x
+ µ2y + c1 )(σx2 + σy2 + c2 )
• Image Resizing:
• Image Cropping:
13
CHAPTER IV
4.1 Introduction
The details of the suggested system model will be covered in this section. Section
4.2 discusses the method. 4.3 depicts the proposed system’s workflow. Section 4.4
goes over the proposed algorithm.
We will encrypt the patient data into cipher text using AES algorithm and then
embed the cipher text into the medical images using LSB steganography technique.In
our work we utilize both cryptography and steganography. In order to get more
security to the data we combine both the technique. This model’s methodology is
divided into two Layers:
1.Encryption Layer encrypts the text data into cipher text using AES algorithm.
2.Steganography Layer embed the encrypted data into the medical images..
The working process of these mentioned sections is shown in the workflow diagram
of Figure 4.1.
Figure 4.1 Represents the proposed The system workflow for securing medical
images using AES encryption and LSB steganography follows a sequential process.
It begins with selecting a medical image, typically in DICOM format, as input. The
image is then encrypted using the AES algorithm with a secret key, converting it
into an unreadable cipher image. This encrypted image is embedded into a cover
14
Start
AES Encryption
Stego-Image Generation
Secure Transmission
AES Decryption
End
image using Least Significant Bit (LSB) steganography, modifying pixel values to
hide the data while maintaining imperceptibility. The resulting stego-image is then
transmitted or stored securely, appearing as a normal image to avoid detection. At
the receiver’s end, the cipher image is extracted from the stego-image using the LSB
extraction process. The extracted encrypted image is then decrypted using the AES
decryption key, restoring the original medical image while ensuring its confidentiality
and integrity. This dual-layer security approach enhances both data protection and
stealth, making medical image transmission and storage more secure.
15
4.3 Encryption & Decryption Technique
The encryption process for medical image security using AES encryption and LSB
steganography has several key steps. It begins with the preprocessing of medical im-
ages, where the original medical image is prepared for use as a cover image for embed-
ding encrypted data. Meanwhile, patient data and the diagnosis report are collected
as sensitive text data that must be secured. Then, the patient information gathered
is encrypted using the Advanced Encryption Standard (AES), which converts the
plaintext information to ciphertext, ensuring confidentiality and unauthorized access
prevention. AES encryption consists of multiple rounds of substitution, permutation,
and key mixing transformations, which render the information highly secure against
cryptographic attacks. Once the data is encrypted, it is prepared to be embedded
into the medical image using Least Significant Bit (LSB) steganography.
The preprocessed medical image is analyzed to determine suitable pixel locations
where the encrypted data can be embedded so that there is no perceptible change in
the visual quality of the image. The encrypted data is embedded into the least sig-
nificant bits of the selected pixels in a manner that makes the changes imperceptible
to the human eye while maintaining the integrity of the image. The LSB technique
ensures that the embedded data will be invisible, as the changes in the least signifi-
cant bits do not affect the image visually. After embedding, the final stego medical
image is generated, which appears exactly the same as the original medical image but
contains encrypted patient information embedded in it. This offers a double-layer
security system where the information is encrypted with AES encryption, and the
LSB steganography conceals it within an image, adding another layer of protection.
We now have the encryption process complete with the final stego image that
can now be securely stored, transmitted, or further processed, ensuring patient data
confidentiality and integrity and defending against unauthorized access or tampering.
This technique is very useful in telemedicine and secure medical information exchange,
where the patient’s privacy must be guarded. By combining encryption and steganog-
raphy, this system provides a very secure and efficient method for guarding sensitive
medical records from cyber theft and unauthorized disclosure.
16
Start Encryption Process
End Process
17
4.3.1.1 Decryption Process
AES Decryption
the description process.It starts with the retrieval of the stego medical image, which
is visually identical to the original medical image but contains secret encrypted data
embedded within it using the least significant bit (LSB) steganography method. The
18
first step is LSB extraction, where the system extracts the least significant bits of
the image in a way that it extracts the concealed encrypted patient information
without altering the content of the image. The extraction process maintains the
concealed binary information and still makes the image suitable for further processing.
The extracted encrypted information then undergoes AES decryption to restore the
original patient data.
The extracted data is fed into the AES decryption process, which processes it
using a preassigned secret key. The decryption translates the operations used in the
encryption, including mixing of the keys, substitution, and permutation, to change
the ciphertext into its original plaintext. This guarantees that the recovered data will
be accurate and not altered from the original form prior to encryption. After the AES
decryption process is completed, the final output is the restored patient information
and diagnosis report. The decrypted information is readable and may be accessed
securely for medical purposes.
The entire decryption process ensures that the confidential medical information
remains secure during transmission and storage and allows authorized individuals
to retrieve it in an efficient way. The two-layer security approach, which combines
steganography and encryption, provides a satisfactory level of confidentiality and
protection against unauthorized access, and therefore it is an effective method for
protecting medical records.
In general, the AES encryption cycle converts the plaintext into ciphertext in a
chain of operations that keep the information safe for patients and their diagnosis
reports.It transforms the input message into binary code to allow encryption. Then,
the secret key is expanded into a number of round keys via the Rijndael key schedule,
and therefore a separate key is assigned for each round of encryption. The encryption
starts with an initial add round key step, where the binary data is done on by an
XOR operation with the first round key. The main encryption process consists of a
series of rounds, depending on the AES variant (10, 12, or 14 rounds for AES-128,
AES-192, and AES-256, respectively). Each round employs subBytes, replacing bytes
using an S-Box to introduce non-linearity, shiftRows, rotating rows in the 4×4 state
matrix to achieve diffusion, mixColumns, spreading data influence across the block
for further diffusion, and addRoundKey, where the round key is added to the data
via XOR. The final round skips the mixColumns step but still employs subBytes,
shiftRows, and addRoundKey to ensure reversibility for decryption.
19
This figure 4.4 depicts the AES encryption process in details. The cipher algorithm
Initial Round
Nr-1 Rounds
Final Round
Ciphertext Output
concludes with the generation of ciphertext, ensuring patient data is secure and un-
readable without the decryption key. The generated ciphertext is embedded into
a medical image using LSB steganography, offering further security, ensuring that
data is secure to store and transmit. This two-layer approach ensures confidential-
ity, integrity, and unauthorized protection for confidential medical records.The AES
encryption process ensures secure and efficient protection of sensitive medical infor-
mation before embedding it using steganography.
20
4.3.2.1 LSB Steganography
Figure 4.5 shows a Least Significant Bit(LSB) algorithm to embed the encrypted
data into the medical images. The LSB steganography process begins by taking a
LSB Encoding
End
21
cover medical image and encrypted patient data as inputs. The least significant bit
(LSB) coding process of embedding encrypted patient data within a medical image
begins with selecting a suitable cover medical image to serve as the carrier for the
hidden information. The image is preprocessed wherein it is checked for format com-
patibility, resized if necessary, and converted into a pixel matrix in order to facilitate
easier data embedding. Simultaneously, the encrypted patient data, either in text
or binary form, is converted into a binary stream to facilitate bit-level manipulation.
Pixel selection is the next step where specific pixels of the cover image are chosen
based on a predecided approach, i.e., random choosing or sequential embedding, such
that the changes remain imperceptible and do not affect the quality of the image.
Once the pixels are chosen, the least significant bit of each chosen pixel’s color chan-
nel (usually the blue channel of RGB images due to sensitivity in the human eye) is
modified by substituting it with a single bit of the encrypted binary sequence. The
embedding process continues bit by bit and pixel by pixel on the selected pixels until
the entire encrypted data sequence is successfully embedded within the image. After
embedding all the bits, the modified image is generated as a stego medical image,
which is perceptually indistinguishable from the original cover image but securely
stores the hidden patient information. Finally, the integrity of the stego image is ver-
ified to ensure that embedding has not introduced visible distortions or compromised
the diagnostic usefulness of the image. This two-layer security solution enforces confi-
dentiality by making sure that the sensitive data is both encrypted and imperceptibly
embedded, making it safe from unauthorized use during storage and transport.
22
CHAPTER V
Result Analysis
5.1 Introduction
This chapter presents the results of the dual-layer security system for medical
images, integrating AES encryption and LSB-based steganography. The objective
was to create a robust mechanism that ensures both confidentiality and integrity
of sensitive medical data by employing advanced cryptographic techniques alongside
image-based data hiding methods. Through a series of experiments, we evaluated the
system’s performance based on several key factors, including encryption time, image
quality, and overall security. The results demonstrate that AES encryption effectively
secures medical images, making unauthorized access highly challenging. On the other
hand, the LSB-based steganography technique successfully hides the encrypted data
within the medical images with minimal distortion, preserving the image’s visual
integrity. Further analysis shows that our dual-layer approach not only enhances the
overall security but also maintains the practical usability of the medical images in
real-world scenarios, such as secure medical image transmission and storage. When
compared to existing single-layer security techniques, our approach proves to be more
reliable and resistant to potential attacks, making it a promising solution for the
protection of sensitive medical information.
The dataset used in this study consists of medical images from publicly available
sources, including X-rays, CT scans, and MRI scans. These images were chosen to
represent a variety of medical conditions and sizes to assess the system’s performance
under different scenarios. The images were selected based on their relevance to medi-
cal diagnostics and their compatibility with image processing techniques. Each image
23
was pre-processed to ensure uniformity in terms of resolution and format before ap-
plying the dual-layer security system.We’ve used so many data’s like Figure 5.1 and
5.2. We’ve just included two here.We’ve used key = ”Thequickbrownfoxjumpsover-
thedogz” for AES Encryption process.This key has size 32 bytes.
24
5.3 Encryption and Decryption process
25
Figure 5.4: Decryption process of the Algorithm
The performance of the proposed dual-layer security system was evaluated pri-
marily in terms of image quality preservation. The LSB-based steganography method
successfully embedded the encrypted data into medical images without causing no-
ticeable visual distortion. The Peak Signal-to-Noise Ratio (PSNR) values were used
to assess the image quality after data embedding, and the results showed minimal
degradation, indicating that the hidden data did not significantly affect the image’s
usability for medical purposes. This demonstrates the method’s ability to maintain
the integrity of medical images while ensuring data security.
The AES algorithm’s encryption and decryption times were analyzed in the con-
text of securing medical images. Although AES encryption provides robust secu-
rity, it introduces a noticeable delay, particularly for larger images. The encryption
process tends to be slower, while decryption is marginally faster but still remains
time-consuming. Despite these delays, the processing times are deemed acceptable
for applications where high security is paramount.
26
To enhance efficiency, various optimization techniques can be applied. One ap-
proach is leveraging parallel processing using multi-core architectures or GPU ac-
celeration to distribute encryption and decryption workloads. Another possible im-
provement is the use of optimized AES modes, such as AES-GCM, which combines
encryption and authentication in a single step, reducing computational overhead.
Additionally, fine-tuning the key expansion process and reducing redundant compu-
tations can contribute to performance gains. Implementing lightweight cryptographic
techniques or hybrid encryption methods can further balance security and efficiency
in real-time applications. These enhancements can make AES more suitable for large-
scale medical data security while maintaining its cryptographic strength.
Table 5.1: Encryption and Decryption Time for Different size images
The performance of the dual-layer security system, utilizing AES encryption and
LSB-based steganography, was evaluated based on the image quality through Peak
Signal-to-Noise Ratio (PSNR). As shown in Figure 5.5, the PSNR values indicated
minimal distortion after encryption and decryption, confirming that the medical im-
ages maintained high quality throughout the process. These results highlight the
system’s ability to preserve image integrity while ensuring robust security.
Higher PSNR values suggest that the embedded data had a negligible impact on
27
image quality, making the system suitable for medical applications where image clarity
is crucial. The slight variations in PSNR across different images may be attributed
to the varying complexity and texture of the medical images. To further improve the
image quality, adaptive embedding techniques or optimized bit allocation strategies
could be explored. Additionally, employing alternative steganographic methods, such
as transform domain techniques, may further enhance security while maintaining high
PSNR values. Overall, the results validate the effectiveness of the proposed approach
in achieving both security and image fidelity.
The performance of the dual-layer security system, utilizing AES encryption and
LSB-based steganography, was assessed using Mean-Squared Error (MSE) and Peak
Signal-to-Noise Ratio (PSNR) to evaluate the image quality. As shown in Figure 5.6,
the MSE values were low, indicating minimal distortion in the encrypted images. Cor-
respondingly, the PSNR values confirmed that the image quality was well-preserved
after encryption and decryption. These results demonstrate the system’s effectiveness
in maintaining high-quality medical images while providing robust security.
28
Figure 5.6: MSE Analysis
This section evaluates the effectiveness of the dual-layer security system, combin-
ing AES encryption and LSB-based steganography, using key performance metrics:
Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), and Mean
Squared Error (MSE). These metrics help quantify the image quality before and af-
ter encryption/decryption processes. The combined graph in Figure 5.7 presents the
results for PSNR, SSIM, and MSE (multiplied by a factor), offering a comprehensive
assessment of the encryption’s impact on the medical
PSNR: Measures the peak signal-to-noise ratio between the original and en-
crypted image, with higher values indicating less distortion and better image quality.
SSIM: Evaluates the structural similarity between the original and encrypted
images, with values closer to 1 indicating better similarity.
MSE: Quantifies the average squared error between the original and encrypted
images. Lower values of MSE indicate minimal distortion.
Together, these metrics validate that the proposed dual-layer security system
maintains image integrity while providing robust encryption for medical images.
29
Figure 5.7: Comparison of PSNR,SSIM,MSE values
The security of the dual-layer system was tested against two common attacks:
Brute-Force Attacks and Statistical Attacks.
Brute-Force Attacks: AES encryption, with its complex key structure and
large key space, is highly resistant to brute-force attacks. Even with modern compu-
tational power, breaking AES encryption through brute force would take an infeasible
amount of time, ensuring that unauthorized access to encrypted medical data is highly
unlikely. Furthermore, the strength of AES increases with the key size—128-bit, 192-
bit, and 256-bit keys make brute-forcing exponentially more difficult. This immense
key space guarantees a robust defense against brute-force attempts. Additionally, the
computational overhead introduced by AES encryption is a necessary trade-off for
the high security it provides, making it highly reliable for safeguarding sensitive data
such as medical images.
Statistical Attacks: The LSB-based steganography technique is designed to
minimize detectable patterns in the image, reducing vulnerability to statistical analy-
sis. Unlike traditional methods, the low-level changes made by embedding encrypted
data do not significantly alter the statistical properties of the image, making it resis-
tant to statistical attacks aimed at revealing hidden information. This is particularly
important when embedding medical data, as the integrity of the image must be pre-
30
served while ensuring that the hidden information remains undetected. Furthermore,
the combination of AES encryption and LSB steganography further mitigates the risk
of statistical attacks. Even if an attacker were to attempt a statistical analysis, the
encrypted data would be indecipherable without the key, thus preventing successful
extraction of hidden information.
Moreover, advanced techniques, such as entropy analysis and histogram analy-
sis, may be employed by attackers to detect patterns in the stego-image. However,
the use of AES encryption before embedding the data makes the stego-image ap-
pear indistinguishable from the original image, enhancing the system’s resilience to
these attacks. Researchers continue to explore ways to refine steganographic meth-
ods to improve both security and the transparency of the hidden data, ensuring that
these systems can withstand future attacks and remain effective in securing sensitive
medical information.
31
CHAPTER VI
Conclusion
6.1 Conclusion
While the dual-layer security system using AES encryption and LSB-based steganog-
raphy provides strong protection, We recognize that there are still challenges to over-
come. One of the main limitations is the computational complexity, which impacts
the speed of processing, especially when working with larger medical images. To ad-
dress this, We plan to optimize the algorithm to reduce this complexity, allowing the
system to handle larger datasets more efficiently. This could involve exploring more
advanced steganographic techniques or leveraging parallel processing to improve both
32
encryption and decryption times. Additionally, We aim to enhance the system’s scal-
ability to support high-resolution images and videos, catering to the growing needs of
healthcare data management. We also believe that improving the system’s resilience
against newer threats, such as machine learning-based attacks or quantum cryptog-
raphy, will be important. Lastly, integrating the system with real-world healthcare
applications and ensuring it works seamlessly with existing standards like DICOM
would make it more practical and user-friendly for professionals in the field.
33
References
[1] J. Liu, Y. Ke, Y. Lei, Z. Zhang, J. Li, P. Luo, M. Zhang, and X. Yang, “Recent
advances of image steganography with generative adversarial networks,” arXiv
preprint arXiv:1907.01886, 2019.
[4] S. Singh and N. Kaur, “Blowfish encryption algorithm for information security,”
ARPN Journal of Engineering and Applied Sciences, vol. 10, no. 10, pp. 4716–
4719, 2015.
[5] N. Asad and I. Shayeb, “A modification of least significant digit (lsd) digital
watermark technique,” International Journal of Computer Applications, vol. 179,
pp. 4–6, 2018.
[7] O. T. Nisha, “Audio steganography with intensified security and hiding capac-
ity,” Master’s thesis, Hajee Mohammad Danesh Science and Technology Univer-
sity, 2023.
[8] N. Jain, S. Meshram, and S. Dubey, “Image steganography using lsb and edge–
detection technique,” International Journal of Soft Computing and Engineering
(IJSCE), vol. 2, no. 3, pp. 217–222, 2012.
34
[9] N. Akhtar, P. Johri, and S. Khan, “Enhancing the security and quality of lsb
based image steganography,” in 2013 5th International Conference and Compu-
tational Intelligence and Communication Networks, pp. 385–390, IEEE, 2013.
[11] S. M. Karim, M. S. Rahman, and M. I. Hossain, “A new approach for lsb based
image steganography using secret key,” in 14th international conference on com-
puter and information technology (ICCIT 2011), pp. 286–291, IEEE, 2011.
[13] L. Por, W. Lai, Z. Alireza, T. Ang, M. Su, and B. Delina, “Stegcure: a com-
prehensive steganographic tool using enhanced lsb scheme,” Delina, Faculty of
Computer Science and Information Technology University of Malaya, vol. 50603,
2008.
[14] J. Fridrich, M. Goljan, and R. Du, “Detecting lsb steganography in color, and
gray-scale images,” IEEE multimedia, vol. 8, no. 4, pp. 22–28, 2001.
[17] J. Daemen and V. Rijmen, The Design of Rijndael: AES - The Advanced En-
cryption Standard. Springer-Verlag, 2002.
35
on Cryptographic Hardware and Embedded Systems (CHES 2004), pp. 357–370,
2005.
[22] M. Kumar, “Design and analysis of pairing-friendly elliptic curves for crypto-
graphic primitives,” 2023.
36