Lucas Abiodun Final Project
Lucas Abiodun Final Project
JULY, 2024
DECLARATION OF ORIGINALITY
This project is all my work, and it has not been copied in any part or in whole from any other
source except where duly acknowledged. As such, all use of previously published work (from
books, journals, magazines, internet, etc.) has been acknowledged within the main report to an
I agree that an electronic copy or hard copy of this report may be stored and used for the purpose
of plagiarism prevention and detection. I understand that cheating and plagiarism constitute a
COPYRIGHT
The copyright of this project and report belongs to Federal University Oye Ekiti, Ekiti State,
Nigeria.
Date: _________________________________________
ii
CERTIFICATION
This is to certify that the research reported in this thesis was carried out by LUCAS, Abiodun
Computer Science, Faculty of Science, Federal University Oye-Ekiti, Ekiti State, Nigeria, for the
_______________________ _________________
Name Date
(Project Supervisor)
_______________________ __________________
Name Date
(Head of Department)
iii
DEDICATION
I dedicate this research to Almighty God, the omniscient who knows the end from the beginning,
for granting me the insight, knowledge, and understanding that led to the successful completion
of this project. I also extend my heartfelt gratitude to my family for their moral and financial
iv
ACKNOWLEDGEMENT
I am deeply grateful to Almighty God, the Lord of all creation and the source of all wisdom, for
His boundless blessings, mercy, protection, provision and understanding that enabled the
My deepest appreciation goes to my supervisor, Dr. Fagbuagun, for his unwavering support,
Chukwuemeka, I am forever indebted to your support, guidance, and counseling. I pray that God
showers His blessings on you and grants you good health and wealth to enjoy the fruits of your
labor.
To my dear siblings, my brothers Lucas Opeyemi and Lucas Oluwadamilola, I thank you for
your encouragement, moral support and financial assistance throughout my academic journey.
Finally, to all the individuals I met during my years in school Oyeyeyemi Oluwadarasimi,
Adeleye Alaba, Adebisi Abosede, and all my friends and course mates not mentioned—I express
v
TABLE OF CONTENTS
Title Page i
Declaration of Originality ii
Certification iii
Dedication iv
Acknowledgment v
Table of Contents vi
List of Figures ix
List of Algorithms x
List of Abbreviations and Notations xi
Abstract xii
vi
2.3 Image Encryption Techniques 11 - 15
2.3.1 Block Ciphers 12
2.3.2 Stream Ciphers 13
2.3.3 Chaos-Based Encryption 13
2.3.4 Hybrid Techniques 14
2.4 Image Decryption Techniques 14
2.5 Relevance of Machine Learning in LAN Security 16 - 18
2.5.1 Integrity Protection 16
2.5.2 Authentication and Authorization 16
2.5.3 Secure Transmission Protocols 17
2.5.4 Audit and Compliance 17
2.6 Challenges in Image Encryption 18 - 20
2.6.1 Computational Complexity 18
2.6.2 Real-Time Applications 19
2.6.3 Cryptanalysis and Threats 19
2.6.4 Key Management Issues 20
2.7 Related Works 20
2.8 Synthesis 23
vii
4.1 Introduction 32
4.2 Hardware and Software Requirements 32 - 33
4.2.1 Hardware Requirement 32
4.2.2 Software Requirement 33
4.3 System User interface and experience 33
4.4 Encryption and decryption process 34
4.5 Evaluating the System 35
4.6 Conclusion 36
REFERENCES 40
APPENDIX 43
viii
LIST OF FIGURES
3.2: Flow chart for image encryption and decryption 25
4.3: Splash Screen of the system 33
4.4.1a: Decryption Image of the system 33
4.4.1b: Decryption Image of the system 34
4.5: Report for the encryption and decryption system 35
ix
LIST OF ALGORITHMS
Algorithm 3.2 – Gaussian Key Generation Algorithm 25
Algorithm 3.4 – Min-Max Scaling Algorithm for Normalization 28
x
LIST OF ABBREVIATIONS AND NOTATIONS
GHz – Gigahertz
OS – Operating System
xi
ABSTRACT
The security of digital image data has become a critical concern in various fields, including
healthcare, surveillance, and digital communication. This research presents the development and
confidentiality and integrity of sensitive images. The system utilizes key encryption techniques
based on Gaussian distribution for enhanced security. The encryption process begins by
converting the input image into a grayscale format to simplify computational tasks. A unique
encryption key is generated using a Gaussian distribution, which is then applied element-wise to
the grayscale image. The encrypted image is displayed and stored securely. The decryption
process reverses this operation by using the same key to retrieve the original image, ensuring
accuracy and minimal data loss. Performance evaluation was conducted using two key metrics:
accuracy and Mean Squared Error (MSE). The system achieved an accuracy rate of
99.9999787%, demonstrating near-perfect retention of image data during the encryption and
indicating a minimal error rate and thus ensuring high image quality throughout the process.
These results highlight the system's robustness and efficiency in handling image encryption and
decryption without significant information degradation. This research contributes to the field of
image security by introducing a practical and efficient encryption system with near-perfect
accuracy, low error rates, and a simple user interface. The system is particularly well-suited for
applications requiring the secure storage and transmission of sensitive digital images.
xii
CHAPTER ONE
INTRODUCTION
The security and privacy of sensitive information, including images, have become paramount
due to the widespread integration of technology in various aspects of our lives. As individuals,
organizations, and governments exchange vast amounts of visual data online, concerns regarding
the unauthorized access, tampering, and interception of these images have escalated
significantly. This has led to a heightened emphasis on employing robust security measures to
protect the confidentiality and integrity of such data (Chanal et al., 2020). Image encryption and
decryption, both integral components of modern cryptography, play a pivotal role in addressing
these concerns.
information into unreadable formats, which can only be converted back to a readable form by
authorized individuals possessing the appropriate decryption keys. Image encryption deals
explicitly with the transformation of visual data, such as photographs, diagrams, and medical
scans, into encrypted formats that are challenging to decipher without the correct keys.
Encryption ensures that even if an unauthorized party gains access to the encrypted images, they
This level of protection extends not only to stored images but also to images transmitted over
digital networks, making it significantly harder for attackers to intercept and understand the
information being exchanged (Alkhalil et al. 2021). Consider the case of medical imaging.
Hospitals frequently transmit sensitive medical images, such as X-rays and MRIs, between
departments or to specialists for diagnosis. These images contain private patient information and
1
must be kept confidential. Image encryption ensures that only authorized medical professionals
with the appropriate decryption keys can access and interpret these images, preventing
In industries like e-commerce and finance, image encryption is vital for securing financial
transactions and customer data. Websites that deal with user-generated content, such as social
media platforms, also rely on encryption to protect users' images from malicious actors. One
algorithms like AES (Advanced Encryption Standard) to pixel data. These algorithms are
unauthorized individuals to reverse-engineer the encryption process and obtain the original
image.
In the modern digital landscape, safeguarding image data has become crucial due to the frequent
exchange of images across various platforms. While traditional encryption techniques work well
for text, they often fall short when dealing with the complex nature and larger size of image files.
The growing threats of cyberattacks, particularly in fields like healthcare and multimedia,
highlight the need for more sophisticated methods to secure visual data.
This research explores innovative strategies for image encryption and decryption, aiming to
address the limitations of current techniques. By tackling the unique challenges of securing
pixel-based image data, the study seeks to contribute to the development of more secure and
efficient encryption methods. As noted by Chen and Zhao (2022), there is a critical demand for
encryption solutions that balance both security and the need for real-time processing.
2
1.3 Aim and Objectives
1.3.1 Aim
The project aims to analyze and enhance image encryption and decryption techniques,
innovative methodologies to ensure secure visual data transmission and storage in today's
1.3.2 Objectives
(i) design an image encryption and decryption system for safe data transmission on
networks;
The scope of the study encompasses a comprehensive investigation into image encryption and
decryption techniques within the realm of data security. The study will cover a wide range of
encryption algorithms, including both traditional and modern approaches, to assess their
applicability, vulnerabilities, and efficiency in securing visual data. The scope also involves
while preserving the integrity of encrypted images. Additionally, the study will delve into novel
encryption methodologies, considering their potential to address the complexities of image data
and adapt to real-time processing demands. The scope extends to practical applications across
3
various domains, including multimedia, healthcare, finance, and more. However, it is essential to
note that the study's scope will be limited to theoretical analysis, simulations, and potentially
small-scale implementations, with considerations for the computational complexity and real-
The significance of this study lies in its potential to advance the field of image encryption and
decryption, addressing critical challenges in data security and privacy in the digital age. By
evaluating existing encryption algorithms and identifying vulnerabilities, the study aims to
contribute insights that can guide the development of more robust image protection methods. The
optimization of algorithm efficiency holds practical importance as it can lead to faster encryption
and decryption processes, enabling secure real-time image transmission and processing.
Moreover, the exploration of novel encryption approaches tailored to the unique properties of
visual data has the potential to pave the way for innovative solutions that enhance image security
while maintaining quality. This study's findings could have broad applications across industries
such as healthcare, e-commerce, and multimedia, where secure image sharing is essential.
Ultimately, the research's outcomes could contribute to improved data protection practices,
bolstering trust and confidence in digital communication and facilitating the secure exchange of
visual information.
The study's justification stems from the critical need to secure sensitive visual data amidst an
escalating threat landscape and the burgeoning volume of image sharing. The unique challenges
4
posed by images, such as maintaining quality during encryption, coupled with the demand for
real-time applications, underscore the importance of dedicated research. With data breaches and
privacy concerns on the rise, reliable encryption techniques are pivotal in fostering user trust.
Moreover, legal mandates and technological progress amplify the urgency for effective image
academia and practical implementation further underscore its significance, as it seeks to address
contemporary data security challenges, yield novel solutions, and influence broader information
protection practices.
Despite its potential contributions, this study on image encryption and decryption is not without
limitations. Firstly, due to the complexity of encryption algorithms and the scope of the research,
methods. Secondly, the study's simulations and small-scale implementations might not fully
findings. Additionally, the fast-paced nature of technology advancements might render certain
optimization strategies or encryption techniques obsolete or less relevant over time. Furthermore,
the study's focus on theoretical analysis and simulations might overlook practical challenges that
resources and access to specialized hardware might influence the feasibility of implementing
certain encryption methods. Despite these limitations, the study aims to provide valuable insights
5
1.8 Project Organization
This thesis is organized into five chapters, each addressing different aspects of the research and
contributing to the overall understanding of the study’s objectives, methodologies, findings, and
implications.
Chapter One: This chapter provides an overview of the research problem, outlines the study’s
objectives, and presents the scope of the study. It also includes a justification for the study and an
Chapter Two: This chapter reviews relevant literature in the field of security, with a focus on
encryption and decryption. It discusses the strengths and limitations of existing approaches,
Chapter Three: This chapter details the system design, implementation, and technologies used
in the project. It explains how the encryption and decryption processes are carried out using a
Gaussian distribution-based encryption key and discusses the methodology for testing and
Chapter Four: In this chapter, the results of the system implementation are presented and
analyzed. The encryption and decryption system's performance is evaluated using accuracy and
6
Chapter Five: The final chapter summarizes the research findings, discusses the implications of
the study, and outlines the limitations and areas for future research. It concludes with a reflection
on the study’s contribution to the field of network security and the potential for future
advancements.
7
CHAPTER TWO
LITERATURE REVIEW
Data security has become a critical concern due to the widespread transmission and storage of
sensitive information across various platforms. Encryption plays a key role in ensuring data
ciphertext. Decryption, on the other hand, reverses this process, transforming ciphertext back
into its original plaintext form for authorized users. Together, encryption and decryption
safeguard data from unauthorized access, theft, and tampering, making them indispensable in
modern information security frameworks. When applied to images, these processes offer a robust
defense against unauthorized viewing or modification of visual data (Zhao et al., 2021).
Image encryption has become increasingly important as digital images are used and shared more
frequently across networks, social media platforms, medical applications, and cloud services.
The protection of image data is crucial in fields such as healthcare, where sensitive patient
information must be kept confidential, and in media industries, where copyrights and intellectual
property rights need to be maintained. Image encryption ensures that visual data can be securely
transmitted or stored without fear of interception or unauthorized use (Ahmed et al., 2020). This
where images need to be protected against potential attacks while ensuring that only authorized
Cryptography is the foundation of image encryption, providing the necessary tools and
8
mathematical functions, to encode data in ways that make it nearly impossible for unauthorized
entities to decipher without the correct decryption key. Cryptographic algorithms such as the
Advanced Encryption Standard (AES), Data Encryption Standard (DES), and chaotic encryption
models are frequently used to secure image data (Chen & Zhang, 2019). By applying these
methods, image encryption enhances the security of visual information, ensuring its integrity and
confidentiality while in transit or at rest. Cryptography also protects against data manipulation
and image tampering, making it vital in maintaining the authenticity of image files (Khan et al.,
2022).
There are two primary types of encryption used in securing images: private-key (symmetric) and
public-key (asymmetric) encryption. In private-key encryption, the same key is used for both
encryption and decryption, meaning both parties need to securely share the same key. This
method is typically faster and simpler but requires stringent key management (Liu et al., 2020).
In contrast, public-key encryption uses two keys: a public key for encryption and a private key
for decryption. The public key is shared openly, while the private key is kept secret by the
recipient. This model enhances security by ensuring that only the intended recipient with the
private key can decrypt the encrypted image, making public-key encryption widely used in
scenarios where secure key distribution is a challenge (Singh & Agrawal, 2021).
The theoretical foundation of image encryption is rooted in cryptography, which provides the
essential principles and tools needed to secure visual data. This section explores the fundamental
concepts of cryptography, including encryption types, key management, and their relevance to
9
image security. Understanding these principles is crucial for implementing robust encryption
Cryptography is the science of securing data through encoding techniques that make the
information unintelligible to unauthorized parties. There are two primary types of cryptography:
uses a single key for both encryption and decryption processes. This method is computationally
efficient and ideal for situations where the communicating parties can securely exchange the key
beforehand (Alsmirat et al., 2019). In contrast, asymmetric cryptography, also known as public-
key cryptography, uses two distinct keys—a public key for encryption and a private key for
decryption. The public key can be shared openly, while the private key remains confidential,
The basic components of cryptography include keys, ciphertext, and plaintext. The plaintext
refers to the original, unencrypted data, while the ciphertext is the encrypted, unreadable output
generated after encryption. A cryptographic key is a critical factor in the encryption process, as it
defines how plaintext is transformed into ciphertext. Different cryptographic algorithms use
varying key lengths and structures, with longer keys typically providing greater security. Over
time, cryptographic techniques have evolved, starting with early methods such as Caesar ciphers
to more advanced techniques like the Advanced Encryption Standard (AES). This evolution has
been driven by the need to counter increasingly sophisticated attacks, ensuring that cryptography
10
remains relevant in protecting sensitive data, including images, in a digital environment (Sharma
et al., 2021).
Cryptography is essential for securing image data because it provides a mechanism to ensure the
manipulation (Jain & Gupta, 2020). By encrypting image data, cryptography ensures that only
authorized users with the correct decryption key can access the content. Moreover, cryptography
helps protect against attacks that aim to alter or distort image data, preserving the original quality
encryption and decryption processes (Gupta et al., 2020). Secure key generation and distribution
are vital to ensure that encryption keys remain confidential and free from compromise. Poor key
management practices, such as weak key generation or insecure key storage, can undermine even
the most robust encryption algorithms. Key generation involves creating random, unpredictable
cryptographic keys, while key distribution deals with securely transmitting these keys to the
relevant parties. In symmetric cryptography, this process is more straightforward but requires
secure channels for key exchange. In asymmetric cryptography, public-key infrastructure (PKI)
Public-key infrastructure (PKI) provides a framework for secure key exchange in asymmetric
cryptography. PKI relies on trusted third-party certificate authorities (CAs) to issue digital
11
certificates that verify the authenticity of public keys. This infrastructure enables users to
channel. PKI plays an essential role in large-scale applications, such as securing internet
communications and digital transactions. However, managing encryption keys for large-scale
applications comes with several challenges, such as ensuring the secure storage, rotation, and
revocation of keys. Poor key management practices in these environments can lead to severe
security vulnerabilities, making it essential to adopt stringent measures for key handling (Xu et
al., 2019).
Image encryption techniques are essential for protecting visual data across various sectors. They
range from traditional cryptographic methods like block and stream ciphers to more advanced
approaches like chaos-based encryption and hybrid techniques. Each method offers unique
advantages and challenges, contributing to the overall goal of securing image data from
unauthorized access.
Block ciphers, such as the Advanced Encryption Standard (AES) and the Data Encryption
Standard (DES), encrypt data in fixed-size blocks, ensuring that the image is transformed into an
unrecognizable format. These ciphers are highly effective in image encryption due to their
structured approach, providing robust protection against common attacks. However, their
12
demands, especially for real-time applications. In fields like healthcare and finance, block
ciphers are commonly used to secure sensitive images such as medical scans and financial
documents, ensuring that only authorized personnel can access the decrypted data.
Stream ciphers, such as RC4, operate by encrypting data one bit or byte at a time, offering
greater flexibility in handling continuous data streams like video feeds or large image datasets.
These ciphers are more efficient in terms of processing speed compared to block ciphers, making
them suitable for real-time applications such as video encryption. However, stream ciphers can
be susceptible to certain vulnerabilities, such as weak key generation, which requires careful key
management to avoid security breaches. Stream ciphers are widely used in scenarios that require
high-speed encryption, such as live video streaming, where quick data processing is essential.
Chaos-based encryption leverages principles from chaos theory, using chaotic maps to generate
highly unpredictable encryption patterns. These methods, such as the Lorenz and Logistic maps,
provide superior security by increasing the randomness and complexity of the encryption process
image encryption due to its sensitivity to initial conditions, which ensures that even small
changes in the input lead to vastly different encrypted outputs. This approach offers significant
resistance to attacks like differential cryptanalysis and is gaining traction in modern encryption
systems for its ability to secure sensitive visual data more effectively.
13
2.3.4 Hybrid Techniques
Hybrid encryption techniques combine different algorithms to enhance security by mitigating the
weaknesses of individual methods. For instance, quantum encryption, though still in its infancy,
secure data. Another emerging method is DNA encryption, which mimics biological processes to
create robust encryption schemes that add layers of security. By combining these cutting-edge
technologies with traditional cryptography, hybrid techniques offer a promising future for
Decryption is a crucial process that transforms encrypted data back to its original form, ensuring
that only authorized parties can access the information. In image encryption, decryption allows
retrieval of the original image using the appropriate cryptographic keys. The security of this
Both techniques play vital roles in different contexts, from secure communications to digital
signatures.
Symmetric key decryption uses the same secret key for both encryption and decryption. Once an
image is encrypted, the same key is required to decrypt and retrieve the original image. This
14
method, while efficient and straightforward, has its limitations—primarily in the need to securely
exchange and store the secret key. If the key is compromised, the security of the entire image is
at risk, as unauthorized users could potentially decrypt the image. Singh et al. (2020) highlighted
the use of AES (Advanced Encryption Standard) in symmetric key decryption, showing its
effectiveness in protecting images, but emphasized the critical need for secure key management
Asymmetric key decryption, on the other hand, uses a pair of cryptographic keys—public and
private. The public key is used to encrypt the image, while the private key is required for
decryption. This method eliminates the risks associated with symmetric key systems, as the
private key does not need to be shared. Asymmetric encryption is widely used in secure
practical implementations, such as those found in secure email systems and blockchain
Chen et al. (2021), the RSA (Rivest-Shamir-Adleman) algorithm remains one of the most widely
used methods for secure decryption, particularly in sectors like finance and healthcare where the
Image encryption is not solely about converting an image into an unreadable format but also
ensuring that the encrypted data is secure throughout its lifecycle—during transmission, storage,
15
and access. To maintain a secure encryption-decryption process, several critical features such as
data integrity, authentication, secure transmission protocols, and regulatory compliance must be
implemented. These measures ensure that encrypted images remain tamper-proof, accessible
only to authorized individuals, and compliant with relevant regulations. This section explores
these essential security features and their role in safeguarding encrypted visual data.
Ensuring data integrity is paramount in image encryption, and cryptographic hash functions such
as SHA-256 are widely used to verify that the image has not been tampered with. A
cryptographic hash function generates a unique, fixed-size output (hash) from input data, which
serves as a fingerprint of the image. If any part of the image is altered, the hash value changes,
encrypted images during storage or transmission. Research by Singh et al. (2020) demonstrated
that hash functions combined with encryption algorithms provide a robust mechanism for
ensuring image data integrity, particularly in highly sensitive environments like healthcare.
security, as they verify the identity of users who are allowed to access encrypted data.
methods, ensure that only authorized users can decrypt and view the image. Multi-factor
authentication (MFA), which combines two or more verification methods, provides an additional
16
layer of security. It makes unauthorized access significantly harder even if one factor, such as a
enhancing image encryption security by significantly reducing the risks associated with
When encrypted images are transmitted over networks, ensuring that they remain secure in
transit is essential. Secure protocols such as SSL (Secure Sockets Layer) and TLS (Transport
Layer Security) create encrypted communication channels between the sender and receiver,
encryption to protect the communication channel, ensuring that encrypted image data cannot be
accessed by third parties while in transit. End-to-end encryption (E2EE) adds another layer of
security by guaranteeing that the image remains encrypted until it reaches the intended recipient,
making it essential for highly secure communication, as noted by Sharma and Kumar (2020) in
Regulatory frameworks, such as GDPR (General Data Protection Regulation) and HIPAA
(Health Insurance Portability and Accountability Act), govern the handling of encrypted data in
sectors like healthcare and finance, ensuring that sensitive information, including images, is
stored and transmitted securely. Compliance with these regulations often requires the use of
encryption, alongside strong audit mechanisms that track and record who accessed the encrypted
17
data and when. Audit trails serve as a critical component of accountability and incident detection.
According to Alqahtani et al. (2022), audit systems not only help track unauthorized access
attempts but also ensure organizations meet legal requirements for data protection, particularly in
Image encryption, while essential for protecting sensitive visual data, presents several technical
and practical challenges. These challenges are particularly pronounced when dealing with high-
resolution images, real-time applications, cryptanalysis threats, and key management. Each of
these aspects affects the effectiveness, security, and efficiency of image encryption systems. This
section delves into the main challenges faced in image encryption, including computational
amount of data involved. Strong encryption algorithms, such as AES and RSA, ensure data
security but require extensive processing power, especially for large images. This presents a
challenge when attempting to balance the strength of encryption with computational efficiency.
In scenarios requiring quick data processing, the high computational cost of encrypting and
decrypting images can lead to delays. According to Li et al. (2020), optimizing encryption
algorithms for faster processing without compromising security remains a key area of research in
image encryption.
18
2.6.2 Real-Time Applications
presents significant challenges, including latency and bandwidth limitations. The encryption
process can introduce delays, making it difficult to meet the low-latency demands of real-time
applications. Additionally, the large size of video data exacerbates bandwidth issues during
lightweight encryption algorithms that reduce processing time while maintaining adequate
security levels. For instance, Kumar et al. (2019) explored the use of hybrid encryption
techniques that strike a balance between security and efficiency for real-time applications,
plaintext from ciphertext. Brute-force attacks, statistical analysis, and differential attacks are
algorithms. Emerging threats, such as quantum computing, could further complicate image
encryption security. Researchers like Zhou and Fang (2021) have identified new attack vectors,
emphasizing the need for encryption systems that are resilient to both current and future threats,
19
2.6.4 Key Management Issues
Effective key management is critical to the security of image encryption systems. Poor key
storage practices, key loss, and key compromise are significant risks that can undermine the
ensuring secure key generation, distribution, and rotation increases as the number of keys and
users grows. Mismanagement of encryption keys can lead to unauthorized access or loss of
encrypted data. Singh and Gupta (2020) highlighted the importance of public-key infrastructure
(PKI) and secure key exchange protocols in addressing these key management issues,
Image encryption is a crucial field in data security, ensuring the confidentiality and integrity of
visual information across various applications. This section reviews classical encryption
techniques, such as DES and AES, alongside recent advancements in computational methods,
including chaos theory and quantum encryption. Additionally, it explores sector-specific studies,
focusing on how image encryption is tailored to meet the needs of healthcare and multimedia
industries.
20
2.7.1 Classical Image Encryption Techniques
Classical image encryption techniques have been pivotal in establishing the foundation for secure
traditional encryption methods applied to images. Their study highlights the application of
established cryptographic algorithms such as the Data Encryption Standard (DES) and the
DES, introduced in the 1970s, employs a symmetric key approach with a 56-bit key length.
While DES was once a standard, its vulnerability to brute-force attacks has led to its decline in
favor of more secure algorithms. Noor et al. (2018) discuss its application in image encryption,
AES, developed to address the shortcomings of DES, utilizes key sizes of 128, 192, and 256 bits.
Noor et al. (2018) demonstrate AES's superior security features and its efficiency in encrypting
image data. AES's robustness against various attack vectors makes it a preferred choice for many
21
2.7.2 Computational Image Encryption Techniques
and enhanced security measures. Mandeep et al. (2021) offer an insightful overview of
contemporary encryption techniques, emphasizing the role of chaos theory, quantum encryption,
Chaos Theory
for encryption. Mandeep et al. (2021) discuss how chaotic systems, such as the Logistic Map and
the Arnold Cat Map, provide high sensitivity to initial conditions, making them effective in
Quantum Encryption
leap in securing image transmission. Mandeep et al. (2021) highlight the use of quantum
22
Hybrid Techniques
Combining classical and modern encryption methods, hybrid techniques aim to maximize
security and performance. Mandeep et al. (2021) explore various hybrid approaches, such as
integrating AES with chaos-based methods, which offer enhanced robustness and resilience
against
cryptographic attacks.
2.8 Synthesis
The field of image encryption has evolved significantly, with both classical and contemporary
techniques contributing to the development of robust security measures. Early research focused
on traditional encryption methods such as the Data Encryption Standard (DES) and the
Advanced Encryption Standard (AES). DES, while foundational, has become obsolete due to its
susceptibility to brute-force attacks, as highlighted by Noor et al. (2018). In contrast, AES offers
improved security and efficiency, making it the preferred choice for modern image encryption
applications. Its enhanced encryption strength and resistance to cryptanalysis have established it
23
traditional attack methods. This approach, discussed by various researchers including Zhao et al.
(2021), enhances the security of image data by introducing higher levels of randomness and
complexity. Additionally, the exploration of quantum encryption, though still emerging, holds
promise for future-proofing image encryption against evolving cyber threats by utilizing the
techniques in fields such as healthcare and multimedia. For example, Ahmed et al. (2020)
emphasize the importance of secure image transmission in telemedicine and medical imaging,
address the needs of digital media and copyright protection, ensuring that intellectual property
remains secure against unauthorized access and manipulation. These studies underline the
24
CHAPTER 3
METHODOLOGY
This chapter details the methodology used to develop the image encryption and decryption
converting the original image into an encrypted format and then allowing decryption back to the
original image. The encryption and decryption process uses a mathematical key-based method to
ensure security.
The system would be designed as a desktop application with a graphical user interface that
25
Figure 3.2: Flow chart for image encryption and decryption
The core components of the system architecture include the user interface, encryption algorithm,
The user interface (UI) is developed using the Tkinter library in Python, which provides a simple
The encryption process is based on a key generation technique using a Gaussian (normal)
distribution. The generated key is used to transform the image into an encrypted format. The
encryption algorithm involves several mathematical steps, starting with the generation of a key
Key Generation
A key matrix of the same size as the grayscale image is generated using a Gaussian distribution
with a mean of 0 and a standard deviation of 0.1. The Gaussian distribution is defined by:
26
Where μ=0 (mean of the distribution), σ=0.1 (standard deviation of the distribution), x represents
the pixel value in the image. The key matrix is generated with values sampled from this
distribution and has the same dimensions as the image to ensure pixel-wise encryption.
Once the key is generated, the grayscale image is encrypted through an element-wise division of
the image pixel values by the corresponding values in the key matrix. The encrypted image E is
given by:
Where Ii,j represents the grayscale intensity of the image at position (i,j). Ki,j is the
corresponding key value from the Gaussian key matrix. Ei,j is the encrypted pixel value at
position (i,j). This step ensures that the original image is transformed into an unreadable format
The decryption algorithm is designed to reverse the encryption process and recover the original
image. The same key that was used for encryption is applied during decryption to ensure an
accurate recovery.
27
Image Decryption Process
To decrypt the image, the system multiplies each pixel of the encrypted image by the
corresponding value in the key matrix. The decryption formula is given by:
Where I′i,j is the decrypted pixel value at position (i,j), which should be equivalent to the
original pixel value Ii,j. 𝐸𝑖,𝑗 is the encrypted pixel value at position (i,j). 𝐾𝑖,𝑗 is the key value
The key generation process is a key step in the system, ensuring secure transformation of the
image data. A Gaussian distribution-based method is used to create a key matrix that matches the
dimensions of the grayscale image. This key matrix, with values randomly distributed around a
mean of 0 and a standard deviation of 0.1, is essential for encrypting the image.
The image encryption process is initiated through the user interface, allowing users to encrypt
image files. The encryption mechanism ensures the image data is transformed in such a way that
28
3.4.1 Image Selection
The first step in the encryption process is for the user to select the image that is to encrypted.
This is done by clicking the "Choose" button on the graphical user interface (GUI), which
triggers a dialog window. The dialog enables users to browse through their file system and select
an image file. Upon selection, the image is loaded and displayed in its original form in the GUI
for visual confirmation by the user. This ensures that the correct image is selected before
Once the image is selected, it undergoes a conversion to grayscale format. This conversion
simplifies the encryption process by reducing the complexity involved in handling RGB color.
The next crucial step in the encryption process is the generation of a random encryption key. The
key is created using a Gaussian distribution with a mean of 0 and a standard deviation of 0.1.
This approach ensures that the key values are randomly distributed around 0, with most values
clustered close to the mean. The key is generated to have the same dimensions as the grayscale
image to ensure that each pixel of the image is associated with a corresponding key value. This
random key plays a critical role in the encryption process, ensuring that the encrypted image is
unique and can only be decrypted using the exact same key.
29
3.4.4 Image Encryption
With both the grayscale image and the encryption key in place, the actual encryption operation is
performed. The image is divided element-wise by the key using NumPy's array manipulation
capabilities. This operation alters each pixel's intensity in the image based on the corresponding
value in the key. The division results in an encrypted image where the original pixel values are
obscured, making the image unrecognizable to the naked eye. This step ensures that the image
cannot be viewed or interpreted without access to the key used for encryption.
The encrypted image is then saved as a new file on the user's system for future use. Additionally,
the encrypted version is displayed in the GUI alongside the original image, providing the user
with a visual representation of the encryption result. This concludes the image encryption
process, ensuring that the image is securely stored and protected until it needs to be decrypted.
The encryption process uses a combination of grayscale conversion, random key generation, and
key.
The decryption process restores the encrypted image to its original format by reversing the
encryption steps. The user clicks the "Decrypt" button after the encryption process is complete.
The same encryption key generated during the encryption process is applied to the encrypted
image. The encrypted image is multiplied by the key element-wise to retrieve the original pixel
values.
30
The decrypted image is converted back to its original grayscale form, and the result is saved and
3.6 Evaluation
The evaluation of the encryption and decryption system is crucial to ensure the accuracy and
effectiveness of the implemented algorithms. In this project, the Mean Squared Error (MSE) was
31
CHAPTER FOUR
4.1 Introduction
This chapter presents the results of the development and implementation of the image encryption
The project needs user hardware and software in order to carry out the focused aim and
These are the physical elements of the system, commonly known as peripherals. To operate the
system, a fully equipped computer setup is needed, including a monitor, keyboard, printer, and
CPU. Additionally, other hardware components are necessary for establishing network
Windows 7/8/10
32
4.2.2 Software Requirement
This is the non-physical components of the system. It is a suite of program or instruction(s) given
The interface of the system features a clean and user-friendly design, allowing users to easily
navigate through the image encryption process. With clear buttons for selecting and processing
33
4.4 Encryption and decryption process
The encryption and decryption process in this system is designed to ensure secure transformation
of images into an unreadable format and their successful recovery to the original form.
The encryption process involves selecting an image through the GUI, converting it to grayscale
to simplify computations, and then generating a random encryption key based on a Gaussian
distribution. The grayscale image is encrypted by dividing it element-wise by the key, and the
34
4.4.2 Decryption Process
The decryption process involves loading an encrypted image and retrieving or generating the
encryption key used initially. The system then multiplies the encrypted image by the key to
recover and display the original grayscale image, ensuring the integrity of the encryption-
decryption cycle.
The performance metrics of the image encryption algorithm demonstrate an exceptional accuracy
of 99.9999787%, indicating that the process effectively retains the original image data during
35
both encryption and decryption phases. This high level of accuracy ensures that the encrypted
images can be successfully decrypted without any significant loss of information. Furthermore,
the Mean Squared Error (MSE) value of 0.908430514121886 reinforces the algorithm's
4.6 Conclusion
The image encryption and decryption system developed in this research has proven efficient and
effective in transforming images into unreadable formats and recovering them without
Gaussian key generation, and element-wise encryption process, providing both security and
The system meets its intended objectives, showcasing robustness and reliability in handling
36
CHAPTER FIVE
5.1 Summary
This chapter provides a comprehensive overview of the research, synthesizing the main findings
and drawing conclusions based on the developed image encryption and decryption system. The
focus of the study was to create a robust system capable of transforming digital images into an
encrypted format and accurately restoring them. The implementation utilized Python and Tkinter
images to grayscale, generating a key using a Gaussian distribution, and encrypting the image
multiplying the encrypted image with the same key. The performance of the system was
evaluated with metrics such as accuracy and Mean Squared Error (MSE), showcasing high
5.2 Conclusion
In conclusion, the developed image encryption and decryption system has proven effective in
securing digital images and ensuring their recovery with high fidelity. The system successfully
implemented the key-based encryption method using Gaussian distribution and demonstrated
robust performance through a high accuracy rate of 99.9999787% and a low MSE value of
0.9084. These results affirm the system’s ability to maintain image integrity throughout the
encryption-decryption cycle. The research has achieved its objectives, providing a reliable tool
for image security with practical applications in protecting sensitive digital content.
37
5.3 Contributions to Knowledge
This research contributes significantly to the field of image encryption by introducing a novel
key generation technique based on Gaussian distribution. This innovative approach offers a new
protection. Additionally, the development of a practical desktop application using Python and
The study also introduces the use of Mean Squared Error (MSE) as a performance metric,
offering a quantitative measure of the system’s effectiveness in preserving image quality. These
5.4 Recommendations
Based on the findings, several recommendations are proposed to enhance the system’s
handle larger image files more efficiently, which might involve refining the algorithm or
utilizing hardware acceleration. Expanding the system’s functionality to include features like
support for color images, batch processing, or cloud storage integration could enhance its utility
and user experience. Collecting user feedback could provide valuable insights into usability and
help identify areas for improvement, ensuring the application remains intuitive and effective.
38
5.5 Future Work
Future research could explore several avenues to build on this study. Investigating advanced
enhanced security features. Developing cross-platform versions of the system for macOS and
Linux would broaden its accessibility. Integrating machine learning techniques for automatic key
various environments could validate the system’s effectiveness and reliability under different
conditions. These future directions would contribute to advancing the field of image encryption
39
REFERENCES
Ahmed, I., Khan, S., & Younis, M. (2020). Secure image transmission in telemedicine and
medical
Ahmed, M., Adeel, A., Rehman, S. U., & Ullah, N. (2020). Image encryption using chaos-based
Alhussain, T., Alhazmi, A., & Ameen, M. (2021). Enhancing image encryption security through
Alqahtani, A., Alkhalefah, H., & Alabdulkarim, A. (2022). Audit and compliance mechanisms in
encrypted data systems: A case study of GDPR and HIPAA. International Journal of
Alsmirat, M. A., Qader, T. S., & Alsmirat, M. S. (2019). A review on symmetric key
Chen, H., & Zhang, S. (2019). A survey of image encryption techniques based on chaotic maps.
Chen, X., & Zhao, Z. (2022). Image encryption and decryption based on improved chaotic
Chen, X., Zhang, X., & Liu, Y. (2021). RSA cryptosystem and its applications in secure
40
Chanal, P. M., & Kakkasageri, M. S. (2020). Security and privacy in IoT: A survey. Wireless
Gupta, S., Sharma, A., & Kumar, M. (2020). Key management and cryptographic systems: A
Jain, R., & Gupta, P. (2020). An overview of cryptographic techniques for image encryption and
Khan, A., Kumar, A., & Rathi, S. (2022). Secure image encryption techniques based on chaotic
Kumar, R., Patel, R., & Prakash, A. (2019). Hybrid encryption techniques for real-time
Li, X., Zhang, Y., & Wang, X. (2020). Optimizing encryption algorithms for high-resolution
Liu, J., Wang, Y., & Yang, Z. (2020). Symmetric key encryption methods for image security: A
Mandeep, S., Kumar, A., & Saini, R. (2021). Computational techniques in image encryption:
Noor, M., Shah, S., & Rehman, A. (2018). Classical image encryption techniques: A
41
Sharma, M., Singh, R., & Joshi, A. (2021). Modern cryptographic techniques and their
Sharma, P., & Kumar, N. (2020). Encrypted communication protocols: SSL/TLS and beyond.
Singh, J., & Gupta, A. (2020). Key management challenges in large-scale encryption systems.
Singh, R., Kumar, A., & Bansal, A. (2020). AES and its applications in symmetric key
Xu, H., Zhang, Y., & Wu, L. (2019). Key management challenges in cryptographic systems: A
Zhao, Q., Liu, Z., & Yang, X. (2021). Chaos-based encryption for enhanced image security: A
Zhou, W., & Fang, X. (2021). Emerging cryptanalysis techniques and their implications for
42
APPENDIX
def getpath(path):
a = path.split(r'/')
# print(a)
fname = a[-1]
l = len(fname)
location = path[:-l]
return location
# function defined to get the folder name from which image is selected
def getfoldername(path):
a = path.split(r'/')
# print(a)
name = a[-1]
return name
43
def open_img():
global x, panelA, panelB
global count, eimg, location, filename
count = 0
x = openfilename()
img = Image.open(x)
eimg = img
img = ImageTk.PhotoImage(img)
temp = x
location = getpath(temp)
filename = getfilename(temp)
# print(x)
if panelA is None or panelB is None:
panelA = Label(image=img)
panelA.image = img
panelA.pack(side="left", padx=10, pady=10)
panelB = Label(image=img)
panelB.image = img
panelB.pack(side="right", padx=10, pady=10)
else:
panelA.configure(image=img)
panelB.configure(image=img)
panelA.image = img
panelB.image = img
44
mu, sigma = 0, 0.1 # mean and standard deviation
key = np.random.normal(mu, sigma, (x1, y)) + np.finfo(float).eps
# print(key)
image_encrypted = image_input / key
cv2.imwrite('image_encrypted.jpg', image_encrypted * 255)
imge = Image.open('image_encrypted.jpg')
imge = ImageTk.PhotoImage(imge)
panelB.configure(image=imge)
panelB.image = imge
mbox.showinfo("Encrypt Status", "Image Encryted successfully.")
imgd = Image.open('image_output.jpg')
imgd = ImageTk.PhotoImage(imgd)
panelB.configure(image=imgd)
panelB.image = imgd
mbox.showinfo("Decrypt Status", "Image decrypted successfully.")
# print(imgd)
# print(image_output)
45