Secure Data Transmission Using Aes-Merged

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 66

SECURE DATA TRANSMISSION USING AES

PROJECT PHASE II REPORT

Submitted by

SULAIMAN MOHAMED NAZEER (LMC20CS066)

KAILAS SHAJI (LMC20CS045)

SIDHIQ N S (LMC20CS064)
to

the APJ Abdul Kalam Technological University

in partial fulfilment of the requirements for the award of the Degree

of

Bachelor of Technology

in

Computer Science and Engineering

Department of Computer Science and Engineering


Lourdes Matha College of Science and Technology

Lourdes Hills, Kuttichal

APRIL 2024
DECLARATION

We undersigned hereby declare that the project report “Secure Data Transmission using AES”,
submitted for partial fulfilment of the requirements for the award of degree of Bachelor of
Technology of the APJ Abdul Kalam Technological University, Kerala is a bonafide work done
by us under supervision of Ms. Betty P Justin, Assistant Professor, Department of CSE. This
submission represents our ideas in our own words and where ideas or words of others have
been included; we have adequately and accurately cited and referenced the original sources.
We also declare that we have adhered to ethics of academic honesty and integrity and have not
misrepresented or fabricated any data or idea or fact or source in our submission. We
understand that any violation of the above will be a cause for disciplinary action by the institute
and/or the University and can also evoke penal action from the sources which have thus not
been properly cited or from whom proper permission has not been obtained. This report has
not been previously formed the basis for the award of any degree, diploma or similar title of
any other University.

Place: Thiruvananthapuram

Date: 29/04/2024

SULAIMAN MOHAMED NAZEER

KAILAS SHAJI

SIDHIQ N S
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

LOURDES MATHA COLLEGE OF SCIENCE AND TECHNOLOGY

LOURDES HILLS, KUTTICHAL

CERTIFICATE

This is to certify that the report entitled “SECURE DATA TRANSMISSION USING AES”
submitted by Sulaiman Mohamed Nazeer, Kailas Shaji, Sidhiq N S to the APJ Abdul Kalam
Technological University in partial fulfilment of the requirements for the award of the Degree
of Bachelor of Technology in Computer Science and Engineering is a bonafide record of the
mini project work carried out by him/her under my guidance and supervision. This report in
any form has not been submitted to any other University or Institute for any purpose.

Ms. Betty P Justin External Supervisor


(Internal Supervisor)
Assistant Professor
Department of CSE

Dr. Smitha J.C


Associate Professor & HOD
Department of CSE
i

ACKNOWLEDGEMENT

The project on the topic “Detection of Real-Time Deep-Fake Videos” was taken as a part
of the curriculum for the award of B. Tech degree in Computer Science Engineering.

At the outset, we thank almighty God for making our endeavour a success. We also express
our gratitude to Dr. Smitha J C, Head of Department for providing us with adequate
facilities, ways and means by which we were able to complete this project.

We express our sincere gratitude to our project coordinator Ms. Priya Sekhar and our
project guide Ms. Betty P Justin, Computer Science Department for constant support and
valuable suggestions without which the successful completion of this project would not
have been possible.

We express our immense please and thankfulness to all the teachers and staff of the
Department of Computer Science, LMCST for their cooperation and support. We would
also like to thank some of our seniors, who helped us in all ways they could when we were
stuck on important conjectures during this effort of ours.

Last but not the least, we thank all others, especially our classmates and our family
members who in one way or another helped us in the successful completion of this work.
ii

ABSTRACT

Several of cryptographic techniques are being used to preserve security and could be
classified as: symmetric and asymmetric.

A symmetric algorithm named as Advance Encryption Standard (AES) is selected for


enhancement due to its applicability and widely used algorithm. In AES, among the four stages
that are used for encryption and decryption, Sub Bytes and Mix Column produce more delay.
From the two, mix column accounts 60% of the whole delay. To overcome these challenges, in
the designed symmetrical cryptography algorithm mix column stage is replaced by bitwise
reverse transposition technique. This helps to improve the speed efficiency of the existing
Advance Encryption Standard (AES) and Modified Advance Encryption Standard (MAES)
algorithm. The simulation result of our Bitwise Reverse Transposition technique resulted in
better encryption speed and decryption speed time when compared with original Advance
Encryption Standard (AES) and Modified

Advance Encryption Standard (MAES): 128.953% and 115.4% encryption and


decryption speed performance. This is because of bitwise reverse transposition. Taking average
of ten trials; 140.8% increased the throughput because of bitwise reverse transposition.

Hence, our proposed Enhanced-Efficiency Advanced Encryption Standard (EE-AES)


has better encryption and decryption speed performance and throughput when compared to
original Advance Encryption Standard (AES) and Modified Advanced Encryption Standard
(MAES).
iii

TABLE OF CONTENTS

Contents Page No

ACKNOWLEDGEMENT i

ABSTRACT ii

LIST OF FIGURES iv

CHAPTER 1- INTRODUCTION 1

1.1 INTRODUCTION 1

1.1 OBJECTIVE 3

1.2 PROBLEM STATEMENT 5

CHAPTER 2- LITERATURE REVIEW 7

CHAPTER 3- METHODOLOGY 14

CHAPTER 4- DESIGN 19

CHAPTER 5- WORKING DESCRIPTION 30

5.1 MODULES 30

5.2 FRONTEND AND BACKEND 32

CHAPTER 6- OUTPUT AND RESULT 36

CHAPTER 7- CONCLUSION 37

7.1 CONCLUSION 37

7.2 FUTURE SCOPE 38

REFERENCES 40

APPENDIX 41
iv

LIST OF FIGURES

No Title Page No

4.1 EE-AES Decryption structure of proposed Algorithm 19

4.2 EE-AES encryption 20

4.3 The Internal structure of bitwise reverse transportation 26

4.4 EE-AES encryption process with 128 bit 26

5.2.1 Text for encryption 34

5.2.2 Plain text is converted into cipher text 34

5.2.3 Generated key and our key are entered to Decrypt 35

6.1 “HI HOW ARE YOU” message is decrypted 36


Secure Data Transmission using AES 1

CHAPTER 1
INTRODUCTION

1.1 INTRODUCTION

Cryptography is the process of changing plain text into encrypted text and
encrypted text back to plain text. Cryptography in most literature is classified into
symmetric and asymmetric cryptography Advanced Encryption Standard (AES) is
one of the most popular symmetric cryptography encryptions with block cipher
structure. Every round within the secret writing method, contains four operations:
Sub Byte, Shift Rows, Mix Column and Add Round Key

The algorithm is capable to use key lengths of 128, 192 and 256 bits and
also, the range of rounds 10, 12 and 14 severally. AES has four stages for encrypting
and decrypting message. These are: Sub Bytes, Shift Rows, Mix Columns and Add
Round Key.

Cryptography is the practice and study of techniques for secure


communication in the presence of third parties, often referred to as adversaries. It
involves creating codes and ciphers to protect sensitive information from being
intercepted or accessed by unauthorized users. Cryptography has been used
throughout history, dating back to ancient civilizations like the Egyptians and
Greeks, who used simple substitution ciphers to conceal their messages. Today, it
plays a crucial role in various fields such as cybersecurity, finance, and national
security.

There are two main branches of cryptography:

Symmetric Key Cryptography: In this approach, both the sender and receiver use
the same secret key to encrypt and decrypt messages. While it's efficient, the
challenge lies in securely sharing the key between the communicating parties.

Public Key Cryptography: Also known as asymmetric cryptography, it uses a pair


of keys - a public key for encryption and a private key for decryption. The public
key can be freely distributed, allowing anyone to encrypt messages, but only the

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 2

holder of the corresponding private key can decrypt them. This method overcomes
the key distribution problem of symmetric key cryptography.

Cryptography employs various algorithms and protocols to ensure


confidentiality, integrity, and authenticity of data. Some common cryptographic
techniques include encryption algorithms like AES (Advanced Encryption
Standard) and RSA (Rivest-Shamir-Adleman), as well as cryptographic hash
functions like SHA-256 (Secure Hash Algorithm 256-bit).

As technology advances, cryptography continues to evolve to meet the


growing challenges of securing digital communications and transactions in an
increasingly interconnected world.

AES (Advanced Encryption Standard) stands as one of the most robust and
widely adopted cryptographic algorithms, serving as a cornerstone in securing
sensitive data across various applications. Its development emerged as a response
to the necessity for a more secure and efficient encryption standard than its
predecessors. Let’s delve into an introduction on AES and its significance in
cryptography.

In the late 20th century, the need for a stronger encryption standard became
apparent as older algorithms like DES (Data Encryption Standard) were becoming
vulnerable to advanced cryptanalysis techniques. In 1997, the U.S. National
Institute of Standards and Technology (NIST) initiated a competition to develop a
new encryption standard. This led to the selection of the Rijndael algorithm,
developed by Vincent Rijmen and Joan Daemen, as the AES in 2001.

AES is a symmetric-key algorithm, meaning the same key is used for both
encryption and decryption. It operates on fixed block sizes of data, typically 128
bits, and supports key lengths of 128, 192, or 256 bits, offering flexibility in
balancing security and performance.

AES stands as a testament to the advancements in cryptographic research,


providing a robust and efficient solution for securing data in a wide array of
applications. Its widespread adoption and proven security make it an indispensable

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 3

tool in the modern digital landscape, where the protection of sensitive information
is paramount.

The S-box (substitution box) is a crucial component in the AES algorithm,


responsible for non-linear transformations during the encryption process.
Traditionally, AES employs a static S-box, a fixed table of substitution values.
However, introducing a dynamic S-box involves generating the substitution values
dynamically based on a key or other parameters, adding an extra layer of security
and adaptability.

The encryption process with a dynamic S-box retains the fundamental steps
of AES but incorporates the dynamically generated substitution values. These
values are typically derived from the encryption key or other parameters, ensuring
that each encryption session utilizes a unique set of substitution values.

The integration of a dynamic S-box into AES enhances its suitability for
applications requiring high levels of security and adaptability. This includes secure
communication channels, data storage systems, and cryptographic protocols where
the ability to adjust encryption parameters dynamically can mitigate emerging
threats.

1.2 OBJECTIVE

Understanding AES: Gain a comprehensive understanding of the AES encryption


algorithm, including its underlying principles, encryption process, and security
features. Implementing AES from scratch allows for a deeper grasp of its inner
workings.

Exploring S-box Dynamics: Investigate the concept of dynamic S-boxes and their
impact on encryption security. Analyze how dynamically generated substitution
values enhance the resilience of AES against cryptanalytic attacks.

Implementing Dynamic S-box: Develop algorithms and methods to dynamically


generate substitution values for the S-box based on input parameters such as

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 4

encryption keys or other variables. Implement mechanisms to ensure randomness


and uniqueness of generated values.

Security Analysis: Conduct a comprehensive security analysis of the AES


algorithm with a dynamic S-box. Evaluate its resistance to various cryptanalytic
techniques, including differential and linear cryptanalysis, and compare its
performance against AES with a static S-box.

Performance Evaluation: Measure the computational overhead introduced by the


dynamic S-box generation process. Assess the impact on encryption and decryption
speeds, memory usage, and overall efficiency compared to traditional AES
implementations.

Application Development: Integrate the AES algorithm with a dynamic S-box into
practical applications or use cases. Develop software tools or libraries that leverage
this enhanced encryption scheme to secure sensitive data in real-world scenarios.

Documentation and Education: Document the project thoroughly, including


design decisions, implementation details, and performance evaluations. Create
educational materials such as tutorials, articles, or presentations to share insights
gained from the project with the broader community.

Contributions to Cryptography: Contribute to the advancement of cryptographic


research and practice by sharing findings, insights, and innovative approaches
discovered during the project. Publish papers or participate in conferences and
workshops to disseminate knowledge and engage with peers in the field.

Open-Source Contribution: Consider releasing the project as open-source


software to foster collaboration and enable others to build upon and extend the
work. Encourage contributions from the community to further refine and improve
the implementation.

Real-world Impact: Aim to create a project that not only serves as a learning
experience but also has practical applications and implications for cybersecurity.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 5

Strive to develop encryption solutions that can enhance data security and privacy in
various domains, contributing to a safer digital ecosystem.

1.3 PROBLEM STATEMENT

The problem statements in this project are:

Using a dynamic S-box instead of a static S-box introduces several


challenges and potential problems that need to be addressed. Here are some problem
statements to consider:

• Security Risks: While dynamic S-boxes offer enhanced security through


variability, the dynamic generation process introduces new attack vectors.
Adversaries might attempt to exploit weaknesses in the S-box generation
algorithm or predict substitution values, compromising the overall security
of the encryption scheme.
• Complexity and Overhead: Implementing a dynamic S-box adds complexity
to the encryption algorithm, potentially increasing computational overhead
and memory requirements. Generating substitution values dynamically may
involve additional computational steps, impacting the efficiency and
performance of the encryption process.
• Randomness and Uniqueness: Ensuring randomness and uniqueness of
dynamically generated substitution values is crucial for security. However,
generating truly random values and guaranteeing uniqueness across
different encryption sessions or keys can be challenging, potentially leading
to patterns or vulnerabilities that attackers could exploit.
• Key Management: Dynamic S-boxes may require tighter integration with
key management systems to ensure that substitution values are generated
securely and consistently across different encryption keys. Managing the
lifecycle of dynamically generated S-boxes, including key rotation and
distribution, adds complexity to key management practices.
• Compatibility and Interoperability: Introducing a dynamic S-box into an
existing cryptographic ecosystem may pose compatibility challenges with
legacy systems or interoperability issues with other encryption algorithms.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 6

Ensuring seamless integration and compatibility with standard encryption


protocols and libraries is essential for widespread adoption.
• Cryptanalysis and Evaluation: The security of a dynamic S-box needs to be
rigorously evaluated against various cryptanalytic techniques, including
differential and linear cryptanalysis. Assessing the resilience of the
encryption scheme to attacks and vulnerabilities specific to dynamic S-
boxes is critical for determining its effectiveness and suitability for real-
world applications.
• Performance Trade-offs: The dynamic generation of S-box substitution
values may impact the performance of the encryption algorithm, particularly
in terms of speed and resource utilization. Balancing security requirements
with performance considerations is essential to ensure that the encryption
scheme remains practical and efficient for use in high-performance
computing environments.
• Resource Constraints: In resource-constrained environments such as
embedded systems or IoT devices, the overhead introduced by dynamic S-
box generation may be prohibitive. Optimizing the implementation to
minimize resource usage while maintaining security is essential for
deploying the encryption scheme in such environments.
• Standardization and Adoption: Dynamic S-boxes may lack standardization
compared to static S-boxes, potentially hindering their widespread adoption
and acceptance in industry standards and regulatory frameworks.
Collaborating with standardization bodies and industry stakeholders to
establish best practices and guidelines for using dynamic S-boxes can help
promote their adoption.
• Usability and User Experience: Introducing complexity into encryption
algorithms may impact usability and user experience, particularly in
applications where ease of use is critical. Designing intuitive interfaces and
providing clear documentation and guidance on using encryption with
dynamic S-boxes can help mitigate usability challenges and ensure that
users can effectively leverage the enhanced security features.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 7

CHAPTER 2
LITERATURE REVIEW

Amina Msolli Abdel Hamid Helali Haythem Ameur Hassen Maaref. (2017). Secure
Encryption for Wireless Multimedia Sensors Network. 18. Retrieved from
www.ijacsa.thesai.org

The security in wireless multimedia sensor network is a crucial challenge


engendered by environmental, material constraint requirements and the energy
consumption. Standard encryption algorithms do not agree with the real-time
applications on this network. One of the solutions to the challenges mentioned
above is to maintain the safety and reduce the energy consumption. In this article,
a new approach with a high-energy efficiency, a high level of security and a big
robustness against the statistics and differential attacks is presented in this paper.
The new approach called Shift-AES admits simple operations such as the
substitution, the transposition by or-exclusive and shift. It keeps the principle of
Shannon for the diffusion and the confusion. Some criteria to measure the
performances of the approach such as the visual inspection, histogram analysis,
entropy images, the correlation of two adjacent pixels, the analysis against
differential attacks, and the analysis of performance at the level run-time and
throughput are successfully realized

Arnab Rahman Chowdhury, Junayed Mahmud, Abu Raihan Mostofa Kamal, Md.
Abdul Hamid, Member. (2018). MAES: Modified Advanced Encryption Standard
for Resource Constraint Environments IEEE.

A new 1-dimensional Substitution Box is proposed by formulating a novel


equation for constructing a square matrix in affine transformation phase of MAES.
Efficiency rate of MAES is around 18.35% in terms of packet transmission which
indicates MAES consumes less energy than AES and it is applicable for Resource
Constraint Environments. MAES, a lightweight version of Advanced Encryption

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 8

Standard (AES) which meets the demand by formulating a novel equation for
constructing a square matrix in affine transformation phase of MAES and is
applicable for Resource Constraint Environments.

Ayushi Arya et al. (2016). Effective AES Implementation, International Journal of


Electronics and Communication, Engineering & Technology, (6-7).

In this paper the existing AES algorithm implementation is done at various


platforms to achieve better results. AES with number of technologies are studied
and analyzed well to promote the performance of the encryption methods also to
ensure the security proceedings. To sum up, all the methods are useful for real-time
encryption enhancing the performance parameters of AES algorithm. Each
technique is unique in its own way, which might be suitable for different
applications. Everyday new methods for implementing AES are evolving hence fast
and secure conventional encryption techniques will always work out with high rate
of security and improved performance parameters as encryption time, decryption
time and through put at encryption or decryption end.

M. Vaidehi and B. Justus Rabi. (2015, December). EnhancedMix Column Design


for AES Encryption ISSN.

The main aim of the current research work is to reduce the complexity path
of AES (Advanced Encryption Standard) Encryption. Architecture of MixColumn
transformation has been optimized in this research work. Traditional methods of
MixColumn transformation methods have been realized and re-designed by
reducing the redundant logical functions. Verilog Hardware Description Language
(Verilog HDL) has been used to design the optimized MixColumn transformation
of AES Encryption. Further optimized MixColumn design has been incorporated
into AES Encryption with appropriate input points. Common Sub-expression
Elimination (CSE) algorithm is used in developed AES Encryption algorithm.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 9

Proposed optimized MixColumn design offers 10.93% improvements in hardware


slices, 13.6% improvements in LUTs and 1.19% improvements in delay
consumption than traditional MixColumn design. Further proposed optimized
MixColumn design has been incorporated into AES Encryption design. Further,
proposed optimized MixColumn based AES Encryption design offers 4.75%
improvements in silicon area, 4.56% reduction in power consumption than
traditional MixColumn based AES Encryption. In future, proposed optimized
MixColumn design will be useful in space and terrestrial applications for exhibiting
secure transmissions.

Mary James, Deepa S Kumar P. G Scholar (2016, March 03). An Optimized Parallel
Mix column and Sub bytes’ design in Lightweight Advanced Encryption Standard.
International Journal Computational Engineering Research (IJCER) ISSN.

This paper presents a high speed, FPGA implementation of AES Encryption


and Decryption (acronym for Advance Encryption Standard, also known as
Rijndael Algorithm) in which the different steps of AES is applied in a parallel
manner. This implementation can reduce the latency in which the process of
implementation is reduced in a drastic manner. The paper deals with a comparison
of the normal implementation of steps of AES and the parallel implementation.
Inorder to increase the throughput of the AES encryption process the latency of the
AES process should be reduced. Among Add Round Key, Sub Bytes, Shift Rows
and Mix Columns, Sub Bytes and Mix Columns produce more latency. The
execution delay of Mix Columns results in 60 percent of the total latency. Therefore
Parallel Mix Columns is used inorder to reduce the latency. In this the block
computes one column at a time such that the four columns are executed at the same
time rather than each byte executing at a time. In Parallel Sub Bytes, four columns
are executed at the same time rather than each byte executing at a time, this reduces
the latency. Encryption is the process of encoding information so it cannot be read
by hackers. The information is encrypted using algorithms and is converted into
unreadable form, called cipher text. The authorized person will decode the

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 10

information using decryption algorithms. The cryptography algorithms are of three


types -symmetric cryptography (using 1 key for encryption/decryption),
asymmetric cryptography (using 2 different keys for encryption/decryption), and
cryptographic hash functions using no keys (the key is not a separate input but is
mixed with the data).

Mohammed Nazeh Abdul Wahid, Abdulrahman Ali, Babak Esparham and


Mohamed Marwan, (2018, JUNE 22). A Comparison of Cryptographic Algorithms:
DES, 3DES, AES, RSA and Blowfish for Guessing Attacks Prevention ISSN.

In this paper, the analysis has been done based on the following metrics: [1].
i- Encryption time: The time taken to convert plaintext to ciphertext is encryption
time. Encryption time depends upon key size, plaintext block size and mode. In our
experiment, we have measured encryption time in milliseconds. Encryption time
affects performance of the system [3]. Encryption time must be less making the
system fast and responsive.

i- Decryption time: The time to recover plaintext from ciphertext is called


decryption time. The decryption time is desired to be less similar to
encryption time to make system responsive and fast. Decryption time
affects performance of system. In our experiment, we have measured
decryption time is milliseconds. iii- Memory used: Different encryption
techniques require different memory size for implementation. This
memory requirement depends on the number of operations to be done by
the algorithm, key size used, initialization vectors used and type of
operations. The memory used impacts cost of the system. It is desirable
that the memory required should be as small as possible. iv- Avalanche
effect: In cryptography, a property called diffusion reflects cryptographic
strength of an algorithm. If there is a small change in an input, the output
changes significantly. This is also called avalanche effect. We have
measured Avalanche effect using hamming distance. Hamming distance
in information theory is measure of dissimilarity. We find hamming

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 11

distance as sum of bit-by-bit xor considering ASCII value, as it becomes


easy to implement programmatically. A high degree of diffusion i.e. high
avalanche effect is desired. Avalanche effect reflects performance of
cryptographic algorithm. v- Entropy: is the randomness collected by an
application for use in cryptography that requires random data. A lack of
entropy can have a negative impact on performance and security. vi-
Number of bits required for encoding optimally: the number of bits
required to encode an encrypted character should be less. Since, the
encrypted bit will be transmitted over a network

Mustafa Emad Hameed (2018, October 20). Review on Improvement of Advanced


Encryption Standard (AES) Algorithm based on Time Execution, Differential
Cryptanalysis and Level of Security. Journal of
Telecommunication, Electronic and Computer Engineering.

Multimedia data (text, audio, image, animation and video) have been widely
used in the past few years for advanced digital content transmission. With the
network technology focusing on Internet of Things (IoT) nowadays, the security of
the multimedia content has raised researchers' concerns. The exchange of digital
data over a network has exposed the multimedia data to various kinds of abuse such
as Brute-Force attacks, unauthorized access, and network hacking. Therefore, the
system must be safeguarded with an efficient media-aware security framework such
as encryption methods that make use of standard symmetric encryption algorithms,
which will be responsible for ensuring the security of the multimedia data. For the
encryption of electronic data, one of the most prominent cryptographic algorithms
is the Advanced Encryption Standard algorithm: A symmetric block cipher that was
established by the U.S. National Institute of Standards and Technology (NIST).
However, some of the challenges arising from the use of this algorithm are
computational overhead, use of a fixed S-Box (which is a point of weakness) and
pattern problems, which occur when handling more complex multimedia data such
as text, image and video. Many researchers have carried out research aiming at

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 12

improving the algorithm’s performance. This paper summarizes the modifications


and benchmarks the performance results of the modified AES algorithms proposed
by researchers in the previous studies.

Rizky Riyaldhia, et al, (2017., October 13-14). Improvement of advanced


encryption standard algorithm with shift row. Elsevier B. V. Retrieved from
www.sciencedirect.com

Cyber Security has become rising issue in recent years where encryption is
one of solution and has an important role in data protection. Encryption algorithms
that widely used in information security are asymmetric and symmetric. Advanced
Encryption Standard (AES) is one of symmetric encryption that most used often
and the most secure encryption today. However, AES encryption has slow
computation. Our experiment shows that both of algorithm’s combination needs
3.045 milliseconds for 1024 bytes of data and increase 3-4 milliseconds for 2048
bytes of data and so on. This paper proposes a novelty method to improve AES
algorithm with Shift Row and S.Box modification for Mix Column transformation.
The result show that our optimization has reduced 3 milliseconds and continue to
increase as the number of bytes increases. Percentage average of the optimization
is 86.143%.

Shashi B. Rna, Puneet Kumar, (2015. November 24). Development of modified


AES algorithm for data security. Elsevier

The Advanced Encryption Standard (AES) is a Federal Information


Processing Standard (FIPS) which was declared after an encryption algorithm
standard competition by National Institute of Standards and Technology (NIST) in
2001. AES is one of the encryption techniques which are used most frequently
because of its high efficiency and simplicity. It is the highly secure algorithm. AES
is a symmetric block cipher uses the same key for the encryption as well as for

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 13

decryption process. It has been found that the AES is different from the data
encryption standard (DES). In AES, the block and key size can be chosen
independently from 128, 160, 192, 224, 256 bits whereas in case of DES it is 56
bits. AES differ from DES as it not uses the feistel network. In feistel structure, half
of the data block is generally used to modify the other half of the data block and
then these halves are swapped. In case of AES the entire data block is processed in
parallel during each round using substitutions and permutations. It has been found
that the symmetric cipher is divided into two categories: stream cipher and block
cipher.

In stream cipher, one symbol is generally used such as character or bit for
the encryption and decryption process. It consists of Plaintext stream, Ciphertext
stream and Key stream. Whereas, for block cipher encryption is done together with
the plaintext symbol of m (m > 1) by creating the same size ciphertext symbol
grouped together. From the definition, in a block cipher single key is generally used
for the encryption even if the key consists of the multiple values.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 14

CHAPTER 3
METHODOLOGY

The Advanced Encryption Standard (AES) stands as a pinnacle of modern


cryptographic techniques, revered for its robust security, efficiency, and widespread
adoption across various applications. Developed by Vincent Rijmen and Joan
Daemen, AES emerged from the need for a stronger encryption standard to replace
the aging Data Encryption Standard (DES). Its journey from a NIST competition
winner in 2001 to becoming the de facto encryption standard underscores its
significance in securing sensitive data in the digital age.
At its core, AES is a symmetric-key encryption algorithm, meaning the same
key is used for both encryption and decryption. Operating on fixed block sizes of
data, typically 128 bits, AES supports key lengths of 128, 192, or 256 bits, offering
flexibility to balance security and performance requirements. The encryption
process entails a series of meticulously designed transformations, including key
expansion, substitution, permutation, and mixing operations across multiple rounds,
culminating in the production of ciphertext from plaintext.
One of the key strengths of AES lies in its resistance to various
cryptographic attacks, including brute force, differential, and linear cryptanalysis.
Its carefully crafted mathematical structure and the rigorous selection process
during its development contribute to its resilience against emerging threats.
Moreover, AES has undergone extensive scrutiny and analysis by cryptographers
worldwide, further validating its security claims and cementing its status as a trusted
encryption standard.
The applications of AES are vast and diverse, spanning secure
communication protocols, disk encryption, wireless networks, digital rights
management systems, and more. Its efficiency and reliability make it indispensable
for safeguarding data in transit and at rest, protecting critical information in both
personal and enterprise environments.
In conclusion, the AES algorithm represents a pinnacle of cryptographic
achievement, embodying decades of research, innovation, and standardization
efforts. Its robust security, efficiency, and versatility make it an essential tool in the

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 15

modern digital landscape, where the protection of sensitive data is paramount. As


technology evolves and threats continue to evolve, AES remains steadfast as a
cornerstone of encryption, ensuring the confidentiality and integrity of information
in an ever-changing world.
In this section we have proposed Enhanced Efficiency Advanced
Encryption Standard (EE-AES) to improve the original AES and MAES algorithms.
The proposed algorithm is discussed in the following sections as follows: Figure 2
shows the overall design of AES, MAES and EE-AES algorithm. The figure shows
the stage difference between MAES algorithm and AES is in 1st and 3rd stages
while the difference between EE-AES is on 3rd stage. The primary goal of the
proposed EE-AES scheme is to enhances the computational time of the AES and
modified AES algorithm. In the proposed EE-AES design, the mix column stage is
replaced with a bitwise reverse transposition. This operation decreases the
calculation demands of the original design mix column stage of AES with keeping
the security level of AES algorithm. Therefore, to improve efficiency of AES
algorithm among its 4 stages, mix columns stage is substituted by our new stage
called bitwise reverse transposition technique. The proposed diagram of the EEAES
encryption and decryption process with 128-bit design

Bit Wise Reverse Transposition Rule

The Bit-Wise Reverse Transposition Rule represents a novel approach to


data encryption, offering a unique blend of simplicity and effectiveness in securing
digital information. This technique operates on the principle of bitwise
manipulation, where individual bits of data are transposed according to a
predetermined rule set. Unlike traditional encryption methods that rely on complex
algorithms and mathematical operations, the Bit-Wise Reverse Transposition Rule
leverages the inherent properties of binary representation to obfuscate data in a
straightforward yet robust manner.

At its core, the Bit-Wise Reverse Transposition Rule involves the reversal
of bit positions within a binary representation of data. By systematically rearranging

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 16

the order of bits, the original data undergoes a transformation that renders it
unintelligible to unauthorized entities without the corresponding decryption key.
This transposition process follows a predefined rule set, dictating the sequence and
magnitude of bit reversals based on factors such as key parameters, encryption
rounds, or other configurable parameters.
One of the key advantages of the Bit-Wise Reverse Transposition Rule lies
in its simplicity and efficiency. Unlike more complex encryption techniques that
require significant computational resources and processing overhead, this method
can be implemented with minimal computational cost, making it suitable for
resource-constrained environments such as embedded systems or IoT devices.
Furthermore, its reliance on bitwise operations ensures high performance and
scalability, enabling seamless integration into diverse computing platforms and
architectures.
Despite its simplicity, the Bit-Wise Reverse Transposition Rule offers a high
level of security against unauthorized access and data breaches. The inherent
randomness introduced by the bitwise transposition process enhances the
cryptographic strength of the encryption scheme, making it resistant to brute-force
attacks and cryptanalytic techniques. Moreover, the reversible nature of the
transposition ensures that decrypted data retains its original integrity and structure,
facilitating seamless data recovery and transmission.
In conclusion, the Bit-Wise Reverse Transposition Rule represents a
compelling approach to data encryption, offering a balance of simplicity, efficiency,
and security. Its reliance on bitwise manipulation and systematic transposition
provides a robust foundation for safeguarding digital information in a wide range
of applications and use cases. As cybersecurity threats continue to evolve,
innovative encryption techniques like the Bit-Wise Reverse Transposition Rule
offer a promising solution for protecting sensitive data in an increasingly
interconnected and digitized world.
We have proposed efficient data encryption technique that can be named as
bitwise reversed transposition operation, which enhances data encryption speed of
AES algorithm by using bitwise reverse transposition, which remove the
complexity of addition and multiplication operations of the current mix column

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 17

stage of AES. The proposed EE-AES algorithm’s, bitwise reversed transposition


operation, mathematical model or rules and algorithms of bitwise reverse
transposition stage are discussed as follows: Examples of bitwise reversed
transposition string of an array input and output.

Algorithm of Bitwise Reverse Transposition Stage

First Accept 4x4 hexa value String Array;


Then convert hexa value to binary;
Next apply reverse order bit wise in byte by byte;
Then convert binary to hexa value;
Finally, Display 4x4 hexa value String array;
or
Accept Input I
Get Length of I, L
Declare Input matrix IM
Declare BitRevorder of Input = BR
For (i = 0; I < L; i++)
Im[i]=GetAscii(I[i]);
Decimal = get Decimal (Im[i]);
BR[i] = getBitReverse (decimal);
Display: IM
: BRmatrix

1) Taking the 1st row elements of the input to the 1st column in the output, and
then interchanging _ 21 with _ 31 and reverse bit wise in the output.

2) Taking the 2nd row elements of the input to the 3rd column in the output,
and then interchanging _ 23 with _ 33 and reverse bit wise in the output.

3) Taking the 3rd row elements of the input to the 2 nd column in the output,
and then interchanging _ 22 and _ 32 and reverse bit wise in the output.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 18

4) Taking the 4th row elements of the input to the 4th column in the output, and
then interchanging _ 24 and _ 34 and reverse bit wise in the output. This
method is not similar to the original AES and MAES design method. It
showed easy operation and better efficiency as compared to the existing mix
column of AES and MAES method. In this method we take an array.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 19

CHAPTER 4

DESIGN

a. EE-AES Decryption structure of proposed Algorithm

Fig 4.1: EE-AES Decryption structure of proposed Algorithm

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 20

b. EE-AES encryption

Fig 4.2: EE-AES encryption

Implementation and Performance Evaluation

Our proposed algorithm, EE-AES is implemented and compared with


original AES algorithm based on the following evaluation metrics: efficiency
(Encryption time, decryption time), and throughput. The implementation is
conducted using Intel-R, Core-TM i5, CPU 2.7-GHz, 64-bit Processor with 4 GB

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 21

of RAM. We have implemented these algorithms using NetBeans IDE 8.0.1


software. Input to the algorithm is a block of 128-bit plaintext (data) and a 128-bit

Encryption Speed

The Encryption time is one of the vital parameters when observing


performance of any kind of cipher [13]. Comparison of Encryption time taking
average of 10 trials
(16 byte) for AES, MAES and EE-AES algorithms of 10 trials Encrypting plaintext
into ciphertext using AES (Advanced Encryption Standard) or a message encryption
scheme involves a series of steps designed to transform the input data into a
secure and unintelligible form. Here are the steps for encrypting plaintext using
AES and a message encryption scheme (MES):

AES Encryption:

1. **Key Expansion:** The encryption key undergoes a key expansion process to


generate a set of round keys used in the encryption process. This expands the
original key into multiple round keys required for each round of encryption.

2. **Initial Round Key Addition:** The plaintext is XORed with the initial round
key. This operation adds an additional layer of randomness to the plaintext and
prepares it for subsequent rounds of encryption.

3. **Rounds:** AES encryption involves multiple rounds of substitution,


permutation, and mixing operations. Each round consists of the following steps:

- **SubBytes:** Each byte of the state matrix undergoes a byte substitution using
a predefined S-box lookup table.

- **ShiftRows:** The rows of the state matrix are shifted cyclically to the left by
different offsets.

- **MixColumns:** The columns of the state matrix are mixed using a matrix
multiplication operation.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 22

- **Round Key Addition:** Each round key is XORed with the state matrix,
adding additional randomness to the data.

4. **Final Round:** The final round of encryption skips the MixColumns


operation. Instead, it includes SubBytes, ShiftRows, and the final round key
addition.

5. **Output:** After completing the specified number of encryption rounds, the


resulting state matrix represents the ciphertext. The ciphertext is extracted from the
state matrix and can be transmitted or stored securely.

Sure, here are the steps for encrypting plaintext into ciphertext using AES
(Advanced Encryption Standard), M-AES (Masking AES), and EE-AES
(Evaluating Encryption with AES):

M-AES (Masking AES):

1. Masking: Apply a masking scheme to both the plaintext and the key to protect
against side-channel attacks. This involves XORing the plaintext and key with
random masks generated for each round.

2. Masked AES Encryption: Perform the AES encryption process using the masked
plaintext and key. Follow the same steps as AES encryption, but with the masked
inputs.

3. Output: The resulting ciphertext is obtained from the masked AES encryption
process.

EE-AES (Evaluating Encryption with AES):

1. Evaluation Circuit Generation: Construct an evaluation circuit for AES


encryption. This circuit represents the AES encryption algorithm in a boolean logic
form.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 23

2. Encryption Circuit Evaluation: Evaluate the encryption circuit using


cryptographic techniques such as Yao's Garbled Circuits or Fully Homomorphic
Encryption (FHE). This step encrypts the plaintext and generates the ciphertext
without revealing intermediate values or the encryption key.

3. Output: Obtain the ciphertext from the evaluated encryption circuit.

Each of these approaches offers different trade-offs in terms of security,


performance, and suitability for specific applications. AES provides a standardized
and widely accepted encryption method, while M-AES enhances security by
protecting against side-channel attacks, and EE-AES focuses on secure computation
techniques to ensure confidentiality during the encryption process. The choice of
encryption method depends on the specific security requirements and constraints of
the application.

DECRYPTION SPEED

The decryption speed of a cipher in AES (Advanced Encryption Standard)


is a crucial aspect to consider when evaluating its practicality and efficiency for
real-world applications. Decryption speed refers to the rate at which ciphertext can
be decrypted back into the original plaintext using the AES decryption algorithm.
Several factors influence the decryption speed of AES:

1. Algorithmic Complexity: The decryption algorithm of AES involves several


complex operations, including inverse substitution, inverse permutation, and key
addition. The computational complexity of these operations affects the decryption
speed, with more complex algorithms generally requiring more processing time.

2. Key Schedule: The key schedule algorithm in AES generates round keys from
the original encryption key, which are used during decryption. The efficiency of the
key schedule algorithm impacts the decryption speed, as generating round keys for
each decryption round adds computational overhead.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 24

3. Implementation Efficiency: The efficiency of the AES decryption


implementation plays a significant role in determining decryption speed. Optimized
implementations that leverage hardware acceleration, parallelization, and efficient

The decryption speed of a cipher in EE-AES (Evaluating Encryption with


AES) can vary depending on several factors, including the complexity of the
encryption circuit, the cryptographic techniques used for secure computation, and
the efficiency of the underlying cryptographic primitives.

In EE-AES, the decryption process involves evaluating the encryption


circuit using cryptographic techniques such as Yao's Garbled Circuits or Fully
Homomorphic Encryption (FHE). These techniques allow for secure computation
of the encryption process without revealing intermediate values or the encryption
key. However, they typically incur additional computational overhead compared to
traditional decryption methods.

The decryption speed in EE-AES is influenced by the efficiency of the


cryptographic techniques employed for secure computation. Fully Homomorphic
Encryption, for example, allows for arbitrary computations on encrypted data but is
known to be computationally intensive, especially for complex circuits like AES
encryption. On the other hand, Yao's Garbled Circuits offer better performance for
circuits with fixed functionality but may still require significant computational
resources.

Other factors that can impact decryption speed in EE-AES include the size
of the encryption circuit, the choice of cryptographic parameters, and the hardware
platform used for computation. Optimizations such as parallelization, circuit
simplification, and hardware acceleration can help improve decryption speed in EE-
AES implementations.

Overall, while EE-AES offers strong security guarantees by protecting


against information leakage during the decryption process, its decryption speed may
be slower compared to traditional decryption methods due to the additional
computational overhead involved in secure computation techniques. However,

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 25

ongoing research and advancements in cryptographic protocols and hardware


optimization techniques continue to improve the efficiency and performance of EE-
AES implementations, making them more practical for real-world applications.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 26

Fig 4.3: The Internal structure of bitwise reverse transportation

Fig 4.4: EE-AES encryption process with 128 bit

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 27

Designing a system for encrypting and decrypting data using AES


(Advanced Encryption Standard) involves several components and considerations.
Here's a high-level design for such a system:

1. **Encryption Module:**

- **Input:** Plaintext data to be encrypted.

- **Output:** Ciphertext data.

- **Functionality:** This module takes plaintext data as input and encrypts it


using the AES encryption algorithm. It utilizes the AES encryption key to generate
the necessary round keys and performs the encryption rounds as per the AES
specification.

- **Key Management:** Ensure secure handling and storage of encryption keys,


including key generation, distribution, and storage.

2. **Decryption Module:**

- **Input:** Ciphertext data to be decrypted.

- **Output:** Plaintext data.

- **Functionality:** This module takes ciphertext data as input and decrypts it


using the AES decryption algorithm. It utilizes the same AES encryption key used
for encryption to generate the round keys and performs the decryption rounds in
reverse order compared to encryption.

- **Key Management:** Ensure proper handling and protection of decryption


keys to prevent unauthorized access to decrypted data.

3. **Key Management:**

- **Key Generation:** Securely generate encryption and decryption keys using a


cryptographically secure random number generator.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 28

- **Key Storage:** Store encryption and decryption keys securely, using


techniques such as key derivation and encryption to protect them from unauthorized
access.

- **Key Distribution:** Establish secure channels for distributing encryption


keys to authorized parties, ensuring confidentiality and integrity during key
exchange.

- **Key Rotation:** Implement procedures for periodically rotating encryption


keys to mitigate the risk of key compromise and improve overall security.

4. **Integration and APIs:**

- **API Design:** Define clear and well-documented APIs for interacting with
the encryption and decryption modules, specifying input/output formats, error
handling, and security considerations.

- **Integration with Applications:** Integrate the encryption and decryption


modules into relevant applications or systems that require data encryption, ensuring
seamless operation and compatibility.

5. **Security Considerations:**

- **Secure Communication:** Use secure channels for transmitting encrypted


data and encryption keys, such as TLS/SSL.

- **Data Integrity:** Implement mechanisms to ensure the integrity of encrypted


data, such as message authentication codes (MACs) or digital signatures.

- **Protection Against Attacks:** Implement countermeasures to protect against


common cryptographic attacks, such as brute force attacks, chosen plaintext attacks,
or side-channel attacks.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 29

- **Secure Coding Practices:** Adhere to secure coding practices and principles,


such as input validation, parameterized queries, and proper error handling, to
prevent security vulnerabilities in the implementation.

6. **Testing and Validation:**

- **Unit Testing:** Conduct thorough unit testing of the encryption and


decryption modules to ensure correctness and functionality.

- **Integration Testing:** Validate the integration of the encryption and


decryption modules with other systems or applications to ensure compatibility and
interoperability.

- **Security Testing:** Perform security testing, including vulnerability


assessments and penetration testing, to identify and mitigate potential security risks
and weaknesses in the system.

By following this design approach and considering key components such as


encryption/decryption modules, key management, security considerations,
integration, and testing, you can develop a robust and secure system for encrypting
and decrypting data using AES.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 30

CHAPTER 5

WORKING DESCRPITION

5.1 MODULES

There are 2 modules

1.System

2.User

In the context of AES (Advanced Encryption Standard) encryption, the


terms "system" and "user" typically refer to different components or entities
involved in the encryption process. While they may not be traditional modules
within the AES algorithm itself, they represent distinct aspects of the overall
encryption system. Let's explore how the concepts of "system" and "user" relate to
AES encryption:

1. System: -

The "system" refers to the environment or infrastructure within which AES


encryption is implemented. This includes the hardware, software, protocols,
and processes that facilitate the encryption and decryption of data.

- In the context of AES encryption, the system may encompass various


components such as encryption libraries, cryptographic modules, key management
systems, and secure communication protocols.

- The system ensures that AES encryption is performed securely and efficiently,
providing the necessary resources and mechanisms for encrypting and decrypting
data according to the AES specification.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 31

- Additionally, the system may enforce security policies, access controls, and
auditing mechanisms to protect the confidentiality and integrity of encrypted data
and ensure compliance with regulatory requirements.

2. User:

- The "user" refers to the individual or entity responsible for initiating or


interacting with the AES encryption process. This could be an end-user, application,
service, or system administrator.

- Users may perform various tasks related to AES encryption, such as:

- Providing input data (plaintext) to be encrypted - Specifying encryption


parameters, such as encryption keys, initialization vectors (IVs), and encryption
modes.

- Initiating the encryption process through an application or cryptographic API.

- Managing encryption keys, including generation, storage, and distribution.

- Verifying the integrity and authenticity of decrypted data.

- Users interact with the AES encryption system to achieve specific security
objectives, such as protecting sensitive information, ensuring secure
communication, or complying with regulatory requirements.

- User involvement is critical for the effective and secure operation of AES
encryption, as users are responsible for making key decisions and implementing
encryption practices that align with their security needs and operational
requirements.

While "system" and "user" may not be modules within the AES algorithm itself,
they play essential roles in the broader context of AES encryption, encompassing
the technical and human aspects of securely encrypting and decrypting data.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 32

Together, they form a cohesive framework for implementing and managing AES
encryption within an organization or system environment.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 33

5.2 FRONTEND AND BACKEND

❖ The working of the project is mainly based on frontend code and backend
code.
❖ Backend code uses Python language and frontend code use the combination
of HTML, CSS and JavaScript languages.
❖ The file name of the frontend code is index.html and the file name of the
backend code is app.py.

Backend (app.py)

❖ In backend code, import some libraries like NumPy, random,


❖ import numpy is the NumPy module in Python. It is later represented as
np. NumPy is a Python library used for working with arrays. It has
functions for working in domain of linear algebra, Fourier transform, and
matrices. It is an open-source project, which can use it freely. NumPy
aims to provide an array object that is up to 50x faster than traditional
Python lists. NumPy stands for Numerical Python.
❖ After the import of those libraries, initialize the Flask application object
in the Python module.
❖ Flask is a web framework that allows developers to build lightweight web
applications quietly and easily with Flask libraries.
❖ The random library in Python stands as a versatile tool for generating
random numbers and conducting various probabilistic simulations. Its
utility extends across a multitude of domains, from scientific research to
game development, where randomness plays a crucial role. By importing
the random library, Python users gain access to a rich set of functions for
generating random numbers, shuffling sequences, selecting random
elements, and conducting probabilistic experiments.
❖ At its core, the random library harnesses pseudo-random number
generators (PRNGs) to produce sequences of seemingly random numbers.
These generators rely on deterministic algorithms to generate sequences

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 34

of numbers that exhibit statistical properties akin to true randomness.


While not truly random, PRNGs offer sufficient unpredictability for most
practical purposes, serving as indispensable tools for generating random
data in various applications.
❖ The math library in Python stands as a fundamental tool for performing
mathematical operations and computations with ease and precision.
Importing the math library unlocks a plethora of functions and constants,
empowering developers to tackle a wide array of mathematical tasks
effortlessly. From basic arithmetic operations to advanced trigonometric
functions and logarithmic calculations, the math library serves as an
indispensable resource for mathematical programming in Python.

Frontend (index.html)

❖ Frontend code is used to design the web page, which is created with the
help of IP Address (127.0.0.1:500).

• To convert plain text into cipher text we need to click on the start encryption
button or the Encrypt button on the top.
• By clicking on the encrypt button there will be a page shown with columns
to enter the key and the plain text.
• For eg we type the text as “HI, how are you” and set the key as
“Ilovemycountry..,,,”.
• By clicking on the submit answer button a 16 bit key forms and that key will
be the end users decryption key.
• On the next page it shows as “Give the encryption” on that column we have
to enter this 16 bit digits which is generated by S-box.
• And to the column down to the key box we have to enter the key we provided
(Ilovemycountry..,,).
• And click on the submit answer button.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 35

• We get the Decrypted text as “HI HOW ARE YOU”

Fig 5.2.1: Text for encryption

• “HI HOW ARE YOU” is the text the text that was given for converting into
cipher text.
• And the “ilovemycountry” is given as the encrypting key and clicking the
submit answer.

Fig 5.2.2: Plain text is converted into cipher text

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 36

• A key is generated by the S box

Fig 5.2.3: Generated key and our key are entered to Decrypt

• This generated key and our key is entered to Decrypt

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 37

CHAPTER 6

OUTPUT AND RESULT

Fig 6.1: “HI HOW ARE YOU” message is decrypted

• The encrypted text “HI HOW ARE YOU” has been decrypted as thus the output
is obtained.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 38

CHAPTER 7

CONCLUSION

7.1 CONCLUSION

The project based on AES with a dynamic S-box for hiding ciphertext
represents a compelling endeavour at the forefront of cryptographic innovation,
aiming to enhance the security and resilience of data encryption techniques against
sophisticated adversaries. By introducing a dynamic S-box, the project explores a
novel approach to concealing ciphertext, leveraging the adaptability and variability
of dynamically generated substitution values. This innovative technique offers a
potent defense mechanism against cryptanalytic attacks, effectively obscuring the
encrypted data from unauthorized access and decryption attempts.
At the heart of the project lies the AES algorithm, a cornerstone of modern
cryptography renowned for its robust security and efficiency. By integrating a
dynamic S-box into the AES encryption process, the project endeavours to augment
the cryptographic strength of AES, mitigating vulnerabilities associated with static
S-boxes and enhancing the overall security posture of encrypted data. Through
meticulous design and implementation, the project aims to demonstrate the efficacy
and practicality of employing dynamic S-boxes in real-world encryption scenarios.
The project's objectives encompass various aspects of cryptographic
research and development, including algorithmic design, implementation, security
analysis, and performance evaluation. By elucidating the underlying principles of
AES with a dynamic S-box, the project seeks to deepen our understanding of
advanced encryption techniques and their applicability in securing sensitive
information across diverse domains. Furthermore, the project endeavours to
contribute to the broader cryptographic community by sharing insights, findings,
and best practices gleaned from the research process.
In addition to its technical merits, the project holds significant implications for
cybersecurity and data privacy, addressing pressing concerns surrounding the
confidentiality and integrity of digital communications and transactions. By
advancing the state-of-the-art in encryption technology, the project endeavours to

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 39

empower individuals, organizations, and society at large to safeguard their digital


assets and preserve their privacy in an increasingly interconnected and data-driven
world. Ultimately, the project represents a testament to the relentless pursuit of
innovation and excellence in the field of cryptography, with far-reaching
implications for the future of secure communication and information security.

7.2 FUTURE SCOPE

Key areas where AES-based secure data transmission is expected to have


significant future impact:

Quantum-Safe Cryptography: With the advent of quantum computing, traditional


cryptographic algorithms, including RSA and ECC, may become vulnerable to
quantum attacks. AES, with its symmetric-key structure, is considered more
resistant to quantum attacks. Research into quantum-safe AES variants and
quantum-resistant key exchange mechanisms will be crucial for ensuring the long-
term security of AES-based data transmission.

Internet of things: The proliferation of Internet of Things (IoT) devices introduces


new security challenges due to their diverse architectures, resource constraints, and
susceptibility to attacks. AES, with its efficiency and flexibility, is well-suited for
securing communication between IoT devices and gateways. Future advancements
may focus on lightweight implementations of AES tailored to the constraints of IoT
environments while maintaining strong security guarantees.

Post-Quantum Secure Channels: As organizations prepare for the post-quantum


era, there will be a growing need for secure communication channels that resist both
classical and quantum attacks. AES-based secure channels, integrated with post-
quantum key exchange protocols like NTRUEncrypt or Lattice-based
cryptography, can provide robust protection against emerging threats.

Homomorphic Encryption: Homomorphic encryption enables computation on


encrypted data without decrypting it, offering enhanced privacy and security for
data processing in the cloud. AES-based homomorphic encryption schemes, such

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 40

as Fully Homomorphic Encryption (FHE) or Somewhat Homomorphic Encryption


(SHE), hold promise for secure data transmission in scenarios where privacy-
preserving computation is paramount.

Blockchain and Distributed Ledger Technologies (DLT): AES encryption can


play a crucial role in securing transactions and data stored on blockchain networks
and distributed ledgers. Future research may explore novel consensus mechanisms,
smart contract designs, and privacy-preserving techniques based on AES to enhance
the security and scalability of blockchain-based systems.

5G and Beyond: The rollout of 5G networks brings opportunities for ultra-fast,


low-latency communication but also introduces new security risks. AES-based
encryption will continue to be a cornerstone in securing data transmission over 5G
networks, with advancements focusing on integrating AES with emerging security
standards and protocols tailored to 5G architecture.

Edge Computing Security: Edge computing architectures decentralize data


processing and storage, bringing computation closer to the data source. AES
encryption will be essential for securing data transmission between edge devices
and central servers, with future developments focusing on optimizing AES for edge
computing environments while preserving security and efficiency.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 41

REFERENCES
[1] Amina Msolli Abdel Hamid Helali Haythem Ameur Hassen Maaref. (2017).
Secure Encryption for Wireless Multimedia Sensors Network.18. Retrieved
from www.ijacsa.thesai.org
[2] Arnab Rahman Chowdhury, Junayed Mahmud, Abu Raihan Mostofa Kamal,
Md. Abdul Hamid, Member. (2018). MAES: Modified Advanced Encryption
Standard for Resource Constraint Environments IEEE.

[3] Ayushi Arya et al. (2016). Effective AES Implémentation. International


Journal of Electronics and Communication Engineering & Technology, (6-7).

[4] M. Vaidehi and B. Justus Rabi. (2015, December). Enhanced Mix Column
Design for AES Encryption ISSN.

[5] Mary James, Deepa S Kumar P. G Scholar (2016, March 03). An Optimized
Parallel Mix column and Sub bytes’ design in Lightweight Advanced
Encryption Standard. International Journal Computational Engineering
Research (IJCER) ISSN, (25 – 26).
[6] Mohammed Nazeh Abdul Wahid, Abdulrahman Ali, Babak Esparham and
Mohamed Marwan, (2018, JUNE 22). A Comparison of Cryptographic
Algorithms: DES, 3DES, AES, RSA and Blowfish for Guessing Attacks
Prevention ISSN.
[7] Mustafa Emad Hameed (2018, October 20). Review on Improvement of
Advanced Encryption Standard (AES) Algorithm based on Time Execution,
Differential Cryptanalysis and Level of Security. Journal of
Telecommunication, Electronic and Computer Engineering. Retrieved from
https://www.researchgate.net/publication/323081584, Iraq
[8] Rizky Riyaldhia, et al, (2017., October 13-14). improvement of advanced
encryption standard algorithm with shift row. Elsevier B. V. Retrieved from
www.sciencedirect.com

[9] Shashi B. Rna, Puneet Kumar, (2015. November 24). Development of


modified AES algorithm for data security. Elsevier.

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 42

APPENDIX

APPENDIX 1: Project working

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 43

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 44

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 45

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 46

APPENDIX 2:CODING

Frontend Code (index.html)

!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>EE-AES Encryptor-Decryptor</title>
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/unicons.css">
<link rel="stylesheet" href="static/css/owl.carousel.min.css">
<link rel="stylesheet" href="static/css/owl.theme.default.min.css">
<!-- MAIN STYLE -->
<link rel="stylesheet" href="static/css/tooplate-style.css">

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 47

</head>
<body>
<!-- MENU -->
<nav class="navbar navbar-expand-sm navbar-light">
<div class="container">
<a class="navbar-brand" href="/home"><i class='uil uil-user'></i> EE-AES
Encryptor-Decryptor</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<span class="navbar-toggler-icon"></span>
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
<!-- CONTACT -->
<section class="contact py-5" id="contact">
<div class="container">
<div class="row">
<div class="col-lg-5 mr-lg-5 col-12">
<img src="static/images/OIP.jpg" class="img-fluid" alt="project image">
</div>
<div class="col-lg-6 col-12">
<div class="contact-form">
<h4 class="mb-4">Decrypted Text</h4>
<h6 class="mb-4">{{enc}}</h6>
</div>
</div>

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 48

</div>
</div>
</section>
<!-- FOOTER -->
<footer class="footer py-5">
<div class="container">
<div class="row">
<div class="col-lg-12 col-12">
<p class="copyright-text text-center">Copyright &copy; 2024
Company Name . All rights reserved</p>
<p class="copyright-text text-center">Designed by <a
rel="nofollow">EE-AES Encryptor-Decryptor</a></p>
</div>
</div>
</div>
</footer>
<script src="static/js/jquery-3.3.1.min.js"></script>
<script src="static/js/popper.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/Headroom.js"></script>
<script src="static/js/jQuery.headroom.js"></script>
<script src="static/js/owl.carousel.min.js"></script>
<script src="static/js/smoothscroll.js"></script>
<script src="static/js/custom.js"></script>
</body>
</html>

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 49

Backend code(app.py)

from flask import Flask, render_template, request, jsonify, Response ,session,


redirect

import numpy as np

import random

import numpy as np

import math

global sbox

global inv_sbox

global x

def generate_sbox(u_in=3.9985):

m=10000

x=np.random.rand(m)

x[0]=0.02

u=u_in

x_hex=[float.hex(x[0])]

for i in range (1,m):

x[i]=u*x[i-1]*(1-x[i-1])

x_hex.append(float.hex(x[i]))

s=[]

s_b=[]

for i in range(len(x_hex)):

s.append(x_hex[i][5]+x_hex[i][6])

for i in range(len(s)):

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 50

if len(s_b)<256:

if int(s[i],16) not in s_b:

s_b.append(int(s[i],16))

return s_b

def getSBoxValue(num):

return sbox[num]

Rcon = [0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36,

0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97,

0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72,

0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66,

0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04,

0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d,

0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3,

0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61,

0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,

0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,

0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc,

0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5,

0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a,

0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d,

0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,

0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35,

0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4,

0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 51

0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08,

0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a,

0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d,

0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2,

0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74,

0xe8, 0xcb ]

def getRconValue(num):

return Rcon[num]

def rotate(word):

return word[1:]+word[:1]

def core(word, iteration):

word = rotate(word)

for i in range(4):

word[i] = getSBoxValue(word[i])

word[0] = word[0] ^ getRconValue(iteration)

return word

def expandKey(key, size=16, expandedKeySize=176):

print(key)

currentSize = 0

rconIteration = 1

expandedKey = [0] * expandedKeySize

for j in range(size):

expandedKey[j] = key[j]

currentSize += size

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 52

while currentSize < expandedKeySize:

t = expandedKey[currentSize-4:currentSize]

if currentSize % size == 0:

t = core(t, rconIteration)

rconIteration += 1

for m in range(4):

expandedKey[currentSize] = expandedKey[currentSize - size] ^ t[m]

currentSize += 1

print(expandedKey)

return expandedKey

def convertString(string, start, end):

if end - start > 16: end = start + 16

ar = []

i = start

j=0

while len(ar) < 16:

ar.append(0)

while i < end:

ar[j] = ord(string[i])

j += 1

i += 1

return ar

def rowShift(s):

r=s.copy()

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 53

r[4:8]=s[5:8]+s[4:5]

r[8:12]=s[10:12]+s[8:10]

r[12:16]=s[15:16]+s[12:15]

return r

def bit_reverse(i, n):

return int(format(i, '0%db' % n)[::-1], 2)

def bit_reverse_transposition(s):

r=[]

for i in s:

r.append(bit_reverse(i,8))

return r

def encrypt(stringIn, key):

global sbox

global inv_sbox

global x

if len(key) % 16:

return None

expanded_key=expandKey(key)

plaintext = []

iput = [0] * 16

output = []

ciphertext = [0] * 16

cipherOut = []

firstRound = True

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 54

if stringIn != None:

cipher_text=[]

cipher_text_temp=[]

for j in range(int(math.ceil(float(len(stringIn))/16))):

start = j*16

end = j*16+16

if end > len(stringIn):

end = len(stringIn)

plaintext = convertString(stringIn, start, end)

for l in range(10):

stage_result=[]

for f in range(16):

stage_result.append(getSBoxValue(plaintext[f] ^
expanded_key[f+(l*16)]))

stage_result=rowShift(stage_result)

#print(stage_result)

stage_result=bit_reverse_transposition(stage_result)

plaintext=stage_result

final_result=[]

for f in range(16):

final_result.append(getSBoxValue(plaintext[f]))

final_result=rowShift(final_result)

for f in range(16):

cipher_text_temp.append(final_result[f] ^ expanded_key[f+160])

cipher_text.append(cipher_text_temp)

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 55

text_enc=""

for i in cipher_text[0]:

text_enc=text_enc+chr(i)

return cipher_text_temp

def get_inverse_sbox(sbox):

inv_sbox=[0]*256

for i in range(256):

inv_sbox[sbox[i]]=i

return inv_sbox

def getInvSBoxValue(num):

global sbox

global inv_sbox

global x

return inv_sbox[num]

def in_shift_rows(s):

r=s.copy()

r[4:8]=s[7:8]+s[4:7]

r[8:12]=s[10:12]+s[8:10]

r[12:16]=s[13:16]+s[12:13]

return r

def decrypt(stringIn, key):

if len(key) % 16:

return None

expanded_key=expandKey(key)

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 56

if stringIn != None:

tt=[]

for j in range(int(math.ceil(float(len(stringIn))/16))):

plaintext = stringIn[j*16:j*16+16]

cipher_text_temp=[]

for f in range(16):

cipher_text_temp.append(plaintext[f] ^ expanded_key[f+160])

cipher_text_temp=in_shift_rows(cipher_text_temp)

plaintext=[]

for f in range(16):

plaintext.append(getInvSBoxValue(cipher_text_temp[f]))

for l in range(10):

plaintext=bit_reverse_transposition(plaintext)

plaintext=in_shift_rows(plaintext)

stage_result=[]

for f in range(16):

stage_result.append(getInvSBoxValue(plaintext[f]))

stage_result_t=[]

for f in range(16):

stage_result_t.append(stage_result[f] ^ expanded_key[f+((9-l)*16)])

plaintext=stage_result_t

for i in plaintext:

tt.append(i)

stage_result_f=[]

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 57

stage_result_final=""

for i in tt:

if i!=0:

stage_result_final=stage_result_final+chr(i)

return stage_result_final

def gen_cypherkey(inp):

ck=[]

for i in range(len(inp)):

ck.append(ord(inp[i]))

cypher_key=ck[len(inp)-16:len(inp)]

return cypher_key,ck[:len(inp)-16]

app = Flask(__name__)

app.secret_key = "super_secret_key"

@app.route('/')

@app.route('/home')

def home():

return render_template('index.html')

@app.route('/encryptpage', methods=['POST','GET'])

def encryptpage():

return render_template('question.html')

@app.route('/decryptpage')

def decryptpage():

return render_template('result.html')

@app.route('/eval2', methods=['POST','GET'])

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 58

def eval2():

global sbox

global inv_sbox

global x

ans = request.form['message']

key = request.form['key']

cypherkey,sbox_val=gen_cypherkey(key)

ans=ans.replace("[","")

ans=ans.replace("]","")

ans=ans.split(",")

outp=[]

for i in ans:

outp.append(int(i))

temp=0

for i in range(len(sbox_val)):

temp=temp+sbox_val[i]

u=float("3.9"+str(temp))

sbox=generate_sbox(u)

inv_sbox=get_inverse_sbox(sbox)

y=decrypt(outp,cypherkey)

return render_template('decryptedout.html',enc=y)

@app.route('/eval', methods=['POST','GET'])

def eval():

global sbox

Department of Computer Science and Engineering LMCST


Secure Data Transmission using AES 59

global inv_sbox

global x

ans = request.form['message']

key = request.form['key']

cypherkey,sbox_val=gen_cypherkey(key)

temp=0

for i in range(len(sbox_val)):

temp=temp+sbox_val[i]

u=float("3.9"+str(temp))

sbox=generate_sbox(u)

inv_sbox=get_inverse_sbox(sbox)

x=encrypt(ans,cypherkey)

return render_template('encrptedout.html',enc=x)

if __name__ == '__main__

app.run(debug=True)

Department of Computer Science and Engineering LMCST

You might also like