Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
72 views57 pages

Lucas Abiodun Final Project

Uploaded by

missybrooke562
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views57 pages

Lucas Abiodun Final Project

Uploaded by

missybrooke562
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 57

IMAGE ENCRYPTION AND DECRYPTION

LUCAS, ABIODUN OLUWABUSAYOMI


(CSC/2018/1103)

A PROJECT SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE,

FACULTY SCIENCE, FEDERAL UNIVERSITY OYE EKITI, EKITI STATE, NIGERIA

IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE AWARD OF THE

DEGREE OF BACHELOR OF SCIENCE (BSc.) IN COMPUTER SCIENCE

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

entry in the reference list.

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

breach of university regulations and will be dealt with accordingly.

COPYRIGHT

The copyright of this project and report belongs to Federal University Oye Ekiti, Ekiti State,

Nigeria.

Student’s Full Name: ____________________________ Signature: _______________

Date: _________________________________________

ii
CERTIFICATION

This is to certify that the research reported in this thesis was carried out by LUCAS, Abiodun

Oluwabusayomi with the Matriculation Number CSC/2018/1103 in the Department of

Computer Science, Faculty of Science, Federal University Oye-Ekiti, Ekiti State, Nigeria, for the

award of Bachelor of Science Degree in Computer Science.

_______________________ _________________
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

support and encouragement, which enabled me to accomplish my research work.

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

successful completion of my program.

My deepest appreciation goes to my supervisor, Dr. Fagbuagun, for his unwavering support,

sincerity and guidance throughout my research work.

I sincerely thank my Head of Department, Dr. Lawrence Adewole.

My acknowledgment would not be complete without mentioning my Mum, Mrs. Kudirat

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

my sincere gratitude for your integral support over the years.

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

CHAPTER ONE: INTRODUCTION


1.1 Background of the Study 1
1.2 Statement of the Problem 2
1.3 Aim and Objectives of the Study 3
1.4 Scope of the Study 3
1.5 Significance of Study 4
1.6 Justification of the Study 4
1.7 Limitations of the Study 5
1.8 Organization of Thesis 6

CHAPTER TWO: LITERATURE REVIEW


2.1 Introduction to Image Encryption and Decryption 8
2.2 Theoretical Background 9
2.2.1 Cryptography Fundamentals 10
2.2.2 Key Management 11

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

CHAPTER THREE: METHODOLOGY


3.1 Research Approach 25
3.2 System Architecture 25
3.3 Key Generation 30
3.4 Image Encryption Process 28
3.5 Image Decryption Process 30
3.6 Evaluation 31

CHAPTER FOUR: RESULTS AND DISCUSSION

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

CHAPTER FIVE: SUMMARY, CONCLUSION AND RECOMMENDATIONS


5.1 Summary 37
5.2 Conclusion 37
5.3 Contributions to Knowledge 38
5.4 Recommendations 38
5.5 Future Work 39

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

GUI – Graphical User Interface

CPU – Central Processing Unit

MSE – Mean Squared Error

RGB – Red Green Blue (color model)

GHz – Gigahertz

HDD – Hard Disk Drive

RAM – Random Access Memory

OS – Operating System

CNN – Convolutional Neural Network

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

implementation of an image encryption and decryption system designed to ensure the

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

decryption phases. Additionally, the MSE value was calculated to be 0.908430514121886,

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

1.1 Background to the study

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.

Cryptography is the science of secure communication, encompassing techniques to convert

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

would be unable to comprehend the content without the decryption key.

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

unauthorized personnel from obtaining sensitive patient data.

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

prominent encryption technique used in image security is the application of cryptographic

algorithms like AES (Advanced Encryption Standard) to pixel data. These algorithms are

mathematically designed to be computationally secure, making it extremely difficult for

unauthorized individuals to reverse-engineer the encryption process and obtain the original

image.

1.2 Statement of Problem

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,

investigate vulnerabilities in existing algorithms, develop efficient solutions, and explore

innovative methodologies to ensure secure visual data transmission and storage in today's

dynamic digital environment.

1.3.2 Objectives

The objectives of this study are to:

(i) design an image encryption and decryption system for safe data transmission on

networks;

(ii) implement the design in (i) above; and

(iii) carry out performance evaluation of the system.

1.4 Scope of the Study

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

exploring optimization strategies to enhance the computational efficiency of these algorithms

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-

world feasibility of proposed solutions.

1.5 Significance of the Study

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.

1.6 Justification of the Study

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

encryption methods. The study's potential cross-disciplinary applications and contributions to

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.

1.7 Limitations of the Study

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,

there might be constraints on conducting exhaustive evaluations of all available encryption

methods. Secondly, the study's simulations and small-scale implementations might not fully

capture the intricacies of real-world scenarios, potentially limiting the generalizability of

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

arise in large-scale, real-world implementations. Lastly, the availability of computational

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

and contribute to the broader understanding of image security in digital communication.

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

outline of the thesis structure.

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,

introducing the proposed research.

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

evaluating the system.

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

Mean Squared Error (MSE).

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

2.1 Introduction to Image Encryption and Decryption

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

confidentiality by converting readable data, or plaintext, into an unreadable form known as

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

is particularly relevant in applications like telemedicine, satellite imaging, and surveillance,

where images need to be protected against potential attacks while ensuring that only authorized

parties have access to the content.

Cryptography is the foundation of image encryption, providing the necessary tools and

algorithms to transform and secure images. It involves various techniques, including

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).

2.2 Theoretical Background

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

techniques that protect images from unauthorized access and tampering.

2.2.1 Cryptography Fundamentals

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:

symmetric and asymmetric. Symmetric cryptography, also known as private-key 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,

making it suitable for scenarios where secure key distribution is challenging.

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

confidentiality, integrity, and authenticity of visual information. As images are frequently

transmitted across networks, cryptographic algorithms prevent unauthorized access and

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

and integrity of images even in the face of potential threats.

2.2.2 Key Management

Effective key management is a crucial aspect of cryptographic security, particularly for

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)

is often employed to manage keys more effectively.

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

securely exchange encryption keys without needing a pre-established secure communication

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).

2.3 Image Encryption Techniques

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.

2.3.1 Block Ciphers

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

limitations include vulnerability to certain cryptanalysis techniques and higher computational

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.

2.3.2 Stream Ciphers

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.

2.3.3 Chaos-Based Encryption

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

compared to traditional techniques. Chaos-based encryption is particularly advantageous for

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,

shows potential for revolutionizing image encryption by leveraging quantum mechanics to

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

safeguarding image data against evolving cyber threats.

2.4 Image Decryption Techniques

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

process depends on the type of encryption system employed—either symmetric or asymmetric.

Both techniques play vital roles in different contexts, from secure communications to digital

signatures.

2.4.1 Symmetric Key Decryption

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

systems to prevent key compromise during transmission and storage.

2.4.2 Asymmetric Key Decryption

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

communications and digital signatures, ensuring both confidentiality and authenticity. In

practical implementations, such as those found in secure email systems and blockchain

technologies, asymmetric encryption offers significant security benefits. According to a study by

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

protection of sensitive data is paramount.

2.5 Security Features in Image Encryption and Decryption

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.

2.5.1 Integrity Protection

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,

immediately signaling tampering. This method helps detect unauthorized modifications to

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.

2.5.2 Authentication and Authorization

Authentication and authorization mechanisms are critical components of image encryption

security, as they verify the identity of users who are allowed to access encrypted data.

Authentication protocols, such as password-based authentication, biometrics, and token-based

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

password, is compromised. Alhussain et al. (2021) highlighted the effectiveness of MFA in

enhancing image encryption security by significantly reducing the risks associated with

credential theft and unauthorized access to sensitive data.

2.5.3 Secure Transmission Protocols

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,

preventing interception or unauthorized access during transmission. SSL/TLS uses asymmetric

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

their study on encrypted communication protocols.

2.5.4 Audit and Compliance

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

industries handling sensitive data like healthcare.

2.6 Challenges in Image Encryption

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

complexity, real-time constraints, cryptanalysis threats, and key management issues.

2.6.1 Computational Complexity


Encrypting high-resolution images demands significant computational resources due to the large

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

Encrypting images or videos in real-time, such as in live streaming or video conferencing,

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

encryption and transmission. To address these challenges, researchers are focusing on

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,

improving both speed and performance.

2.6.3 Cryptanalysis and Threats


Cryptanalysis refers to the study of methods for breaking encryption algorithms to reveal

plaintext from ciphertext. Brute-force attacks, statistical analysis, and differential attacks are

common forms of cryptanalysis targeting image encryption systems. As encryption techniques

evolve, so too do the methods used by attackers to exploit vulnerabilities in encryption

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,

including those posed by advancements in cryptographic analysis.

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

security of encrypted images. Additionally, managing encryption keys on a large scale,

especially in enterprise or cloud environments, poses scalability challenges. The complexity of

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,

particularly in large-scale applications.

2.7 Related works

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

image communication. Research by Noor et al. (2018) provides a comprehensive review of

traditional encryption methods applied to images. Their study highlights the application of

established cryptographic algorithms such as the Data Encryption Standard (DES) and the

Advanced Encryption Standard (AES) in the realm of image encryption.

Data Encryption Standard (DES)

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,

noting the algorithm’s simplicity but limited security in modern contexts.

Advanced Encryption Standard (AES)

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

image encryption tasks.

21
2.7.2 Computational Image Encryption Techniques

Recent advancements in computational image encryption have introduced new methodologies

and enhanced security measures. Mandeep et al. (2021) offer an insightful overview of

contemporary encryption techniques, emphasizing the role of chaos theory, quantum encryption,

and hybrid approaches.

Chaos Theory

Chaos-based encryption techniques leverage chaotic maps to produce pseudo-random sequences

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

securing image data against unauthorized access.

Quantum Encryption

Quantum encryption, particularly Quantum Key Distribution (QKD), represents a significant

leap in securing image transmission. Mandeep et al. (2021) highlight the use of quantum

principles to create unbreakable encryption channels, offering promising advancements for

secure image communication in sensitive environments.

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

as a standard in protecting visual data across various sectors.

Advancements in encryption techniques have expanded beyond classical methods, incorporating

innovative approaches such as chaos-based and quantum encryption. Chaos-based encryption

leverages complex, unpredictable patterns to secure images, providing significant resistance to

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

principles of quantum mechanics.

Sector-specific studies have demonstrated the practical applications of these encryption

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,

where confidentiality is crucial. Similarly, advancements in multimedia encryption techniques

address the needs of digital media and copyright protection, ensuring that intellectual property

remains secure against unauthorized access and manipulation. These studies underline the

continued relevance of both established and cutting-edge encryption methods in safeguarding

sensitive visual information in diverse contexts.

24
CHAPTER 3

METHODOLOGY

3.1 Research Approach

This chapter details the methodology used to develop the image encryption and decryption

system. The project implements a cryptographic approach to securing digital images by

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.

3.2 System Architecture

The system would be designed as a desktop application with a graphical user interface that

facilitates user interaction for image encryption and decryption processes.

25
Figure 3.2: Flow chart for image encryption and decryption

The core components of the system architecture include the user interface, encryption algorithm,

decryption algorithm, and image handling procedures.

3.2.1 User Interface

The user interface (UI) is developed using the Tkinter library in Python, which provides a simple

and effective way to create GUI applications.

3.2.2 Encryption Algorithm

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

matrix and ending with the transformation of the image data.

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.

Image Encryption Process

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

while maintaining the necessary data for decryption.

3.2.3 Decryption Algorithm

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

used in the encryption process.

3.3 Key Generation

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.

3.4 Image Encryption Process

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

it can only be retrieved through decryption using the same key.

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

proceeding with the encryption process.

3.4.2 Grayscale Conversion

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.

3.4.3 Key Generation

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

element-wise manipulation to produce an encrypted image that is unrecognizable without the

key.

3.5 Image Decryption Process

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

displayed to the user via the GUI.

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

used as a metric to evaluate the performance of the decryption process.

31
CHAPTER FOUR

IMPLEMENTATION AND RESULTS ANALYSIS

4.1 Introduction

This chapter presents the results of the development and implementation of the image encryption

and decryption system. It includes screenshots of the interfaces, descriptions of functionalities,

and discussions on the performance.

4.2 Hardware and Software Requirements

The project needs user hardware and software in order to carry out the focused aim and

objectives of the research.

4.2.1 Hardware Requirement

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

connections between systems within the office environment

 Windows 7/8/10

 4GB RAM or more

 256GB HDD or more

 Intel core [email protected]

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

to the computer to execute.

 Operating System: Windows 7/8/10/11

 Programming Language: Python

4.3 System User interface and experience

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

images, the layout ensures a smooth and intuitive workflow.

Figure 4.3: Splash Screen of the system.

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.

4.4.1 Encryption Process

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

resulting encrypted image is displayed and saved.

Figure 4.4.1a: Decryption Image of the system.

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.

Figure 4.4.1b: Decryption Image of the system.

4.5 Evaluating the Convolutional Neural Network

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

efficiency in preserving image quality.

Figure 4.5: Report for the encryption and decryption system

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

significant loss of quality. The system successfully implemented a grayscale conversion,

Gaussian key generation, and element-wise encryption process, providing both security and

accuracy. The performance evaluation demonstrated a near-perfect accuracy rate, ensuring

minimal error during the encryption-decryption cycle.

The system meets its intended objectives, showcasing robustness and reliability in handling

sensitive image data.

36
CHAPTER FIVE

SUMMARY, CONCLUSION, AND RECOMMENDATIONS

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

to develop a user-friendly desktop application. The encryption mechanism involved converting

images to grayscale, generating a key using a Gaussian distribution, and encrypting the image

through element-wise division. The decryption process reversed this transformation by

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

accuracy and minimal loss of image quality.

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

perspective on encryption methods, potentially enhancing security measures for image

protection. Additionally, the development of a practical desktop application using Python and

Tkinter provides a functional tool for secure image handling.

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

contributions advance the understanding and application of image encryption technologies.

5.4 Recommendations

Based on the findings, several recommendations are proposed to enhance the system’s

functionality and performance. To further improve security, incorporating additional measures

such as multi-factor authentication or advanced cryptographic techniques could provide more

robust protection against potential vulnerabilities. Performance optimization is also suggested to

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

cryptographic techniques, such as asymmetric encryption or hybrid systems, could offer

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

generation or anomaly detection in encrypted images could provide innovative solutions to

enhance security. Additionally, conducting real-world testing and scalability assessments in

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

and provide valuable improvements to the current system.

39
REFERENCES

Ahmed, I., Khan, S., & Younis, M. (2020). Secure image transmission in telemedicine and

medical

imaging: A review. Journal of Medical Systems, 44(6), 109.

Ahmed, M., Adeel, A., Rehman, S. U., & Ullah, N. (2020). Image encryption using chaos-based

encryption algorithms: A review. Journal of King Saud University-Computer and

Information Sciences, 32(6), 696-704.

Alhussain, T., Alhazmi, A., & Ameen, M. (2021). Enhancing image encryption security through

multi-factor authentication. Journal of Information Security, 12(2), 95-107.

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

Information Management, 62, 102397.

Alsmirat, M. A., Qader, T. S., & Alsmirat, M. S. (2019). A review on symmetric key

cryptographic algorithms. Journal of Information Security and Applications, 45, 63-75.

Chen, H., & Zhang, S. (2019). A survey of image encryption techniques based on chaotic maps.

Journal of Optical Communications and Networking, 11(4), A11-A25.

Chen, X., & Zhao, Z. (2022). Image encryption and decryption based on improved chaotic

systems. Journal of Information Security Research, 15(2), 113-128.

Chen, X., Zhang, X., & Liu, Y. (2021). RSA cryptosystem and its applications in secure

communication: A survey. IEEE Access, 9, 20834-20845.

40
Chanal, P. M., & Kakkasageri, M. S. (2020). Security and privacy in IoT: A survey. Wireless

Personal Communications, 115(2), 1667-1693.

Gupta, S., Sharma, A., & Kumar, M. (2020). Key management and cryptographic systems: A

survey. Computer Networks, 180, 107340.

Jain, R., & Gupta, P. (2020). An overview of cryptographic techniques for image encryption and

their performance evaluation. Security and Privacy, 18(4), 23-34.

Khan, A., Kumar, A., & Rathi, S. (2022). Secure image encryption techniques based on chaotic

maps: A comprehensive review. Future Generation Computer Systems, 129, 284-301.

Kumar, R., Patel, R., & Prakash, A. (2019). Hybrid encryption techniques for real-time

applications: Balancing security and efficiency. IEEE Transactions on Information

Forensics and Security, 14(5), 1215-1226.

Li, X., Zhang, Y., & Wang, X. (2020). Optimizing encryption algorithms for high-resolution

images. Computers & Security, 93, 101795.

Liu, J., Wang, Y., & Yang, Z. (2020). Symmetric key encryption methods for image security: A

comparative study. Journal of Cryptographic Engineering, 10(3), 157-172.

Mandeep, S., Kumar, A., & Saini, R. (2021). Computational techniques in image encryption:

Chaos theory and quantum encryption. Journal of Computational and Applied

Mathematics, 384, 113162.

Noor, M., Shah, S., & Rehman, A. (2018). Classical image encryption techniques: A

comprehensive review. Journal of Cryptology, 31(3), 567-594.

41
Sharma, M., Singh, R., & Joshi, A. (2021). Modern cryptographic techniques and their

application in securing digital images. Journal of Computer Security, 30(3), 345-368.

Sharma, P., & Kumar, N. (2020). Encrypted communication protocols: SSL/TLS and beyond.

IEEE Access, 8, 188073-188085.

Singh, J., & Gupta, A. (2020). Key management challenges in large-scale encryption systems.

Security and Privacy, 18(1), 22-35.

Singh, R., Kumar, A., & Bansal, A. (2020). AES and its applications in symmetric key

encryption. Journal of Information Security, 22(2), 76-89.

Xu, H., Zhang, Y., & Wu, L. (2019). Key management challenges in cryptographic systems: A

survey. Computers & Security, 87, 101589.

Zhao, Q., Liu, Z., & Yang, X. (2021). Chaos-based encryption for enhanced image security: A

review. Nonlinear Dynamics, 104(3), 2255-2272.

Zhou, W., & Fang, X. (2021). Emerging cryptanalysis techniques and their implications for

image encryption. IEEE Transactions on Cybernetics, 51(7), 3381-3393.

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

# function defined to get the file name of image is selected


def getfilename(path):
a = path.split(r'/')
fname = a[-1]
a = fname.split('.')
a = a[0]
return a

# function defined to open the image file


def openfilename():
filename = filedialog.askopenfilename(title='"pen')
return filename

# function defined to open the selected image

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

# function defined for make the sketch of image selected


def en_fun():
global x, image_encrypted, key
# print(x)
image_input = cv2.imread(x, 0)# 'C:/Users/aakas/Documents/flower.jpg'
(x1, y) = image_input.shape
image_input = image_input.astype(float) / 255.0
print(image_input)

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.")

# function defined to make the image sharp


def de_fun():
global image_encrypted, key
image_output = image_encrypted * key
image_output *= 255.0
cv2.imwrite('image_output.jpg', image_output)

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

You might also like