0% found this document useful (0 votes)
46 views30 pages

PBL Report SE Combinepdf

The document discusses encryption and decryption. It defines encryption as the process of encoding information to convert it to an unreadable format called ciphertext. Decryption is the reverse process of decrypting the ciphertext back to the original plaintext format. The document also describes different types of encryption methods like symmetric and asymmetric encryption, and discusses algorithms like AES, DES, RSA etc.

Uploaded by

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

PBL Report SE Combinepdf

The document discusses encryption and decryption. It defines encryption as the process of encoding information to convert it to an unreadable format called ciphertext. Decryption is the reverse process of decrypting the ciphertext back to the original plaintext format. The document also describes different types of encryption methods like symmetric and asymmetric encryption, and discusses algorithms like AES, DES, RSA etc.

Uploaded by

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

Encryption and Decryption

S.E. PBL PROJECT

Submitted in Partial Fulfillment of


the Requirements for the Degree of
BACHELOR OF ENGINEERING
In

COMPUTER ENGINEERING

By

DIKSHA POPAT GAIKWAD (SE-A-23027)


ABHISHEK SAKHARAM GHARAT (SE-A-23034)
MAYUR JIVAN HEBADE (SE-A-23038)
ADITYA SANJAY DHOLE (SE-A-23025)
AMIT BABAN SHENDGE (SE-B-2337)

Under the Guidance of

Prof. Trupti S. Bhase mam

DEPARTMENT OF COMPUTER ENGINEERING


CHOUDHARY ATTAR SINGH YADAV MEMORIAL TRUST
SIDDHANT COLLEGE OF ENGINEERING, SUDUMBARE,
PUNE 412109
CERTIFICATE

This is to certify that,


Diksha Popat Gaikwad (Roll No: SE-A-23027)
Abhishek Sakharam Gharat (Roll No: SE-A-23034)
Mayur Jivan Hebade (Roll No: SE-A-23038)
Aditya Sanjay Dhole (Roll No: SE-A-23025)

Amit Baban Shendge (Roll No: SE-B-2337)

submitted their PBL project report on “Encryption and Decryption” under my


guidance and supervision. The work has been done to my satisfaction and is as
per the partial fulfillment Term work of S.E. Computer Engineering through the
University of Pune during the academic year 2023-2024.

Prof. Trupti S. Bhase Prof. Sushma Shinde Dr. L. V. Kamble

Guide H.O.D. Principal

DATE:

PLACE:
ACKNOWLEDGEMENT

This is a great pleasure and immense satisfaction to express my deepest


sense of gratitude and thanks to everyone who has directly or indirectly helped
me in completing my PBL project work successfully.

I express my gratitude towards PBL project guide Prof. Trupti S. Bhase


mam Computer Engineering, Siddhant C.O.E., Sudumbare, Pune who guided and
encouraged me in completing the PBL project work in scheduled time. I would
like to thanks our Principal Dr. L. V. Kamble sir, for allowing us to pursue my
PBL project in this institute.

No words are sufficient to express my gratitude to our parents for their


unwavering encouragement. We also thank all friends for being a constant source
of my support.

DIKSHA POPAT GAIKWAD (SE-A-23027)


ABHISHEK SAKHARAM GHARAT (SE-A-23034)
MAYUR JIVAN HEBADE (SE-A-23038)
ADITYA SANJAY DHOLE (SE-A-23025)

AMIT BABAN SHENDGE (SE-B-2337)


TABLE OF CONTENT

Chapter no. Title/Caption Page no.


Abstract
1. Introduction 1
2. Encryption 2
3. Decryption 4
4. Types of Encryption and Decryption. 6
4.1. Symmetric Encryption 6
4.2. Asymmetric Encryption 8
5. Encryption Decryption algorithms 10
5.1. Symmetric key algorithms 10
5.1.1. AES 10
5.1.2. DES 13
5.1.3. ROT 13 15
5.2. Asymmetric key algorithms 16
5.2.1. RSA 16
5.2.2. DSA 16
6. Key management 18
7. Scope of Encryption and Decryption 19
8. About program 21
9. Conclusion 22
10. Bibliography 23
Appendices
LIST OF FIGURES

Figure no. Title/Caption Page no.


1.1 Cryptography mechanism 1
2.1 Encryption 2
3.1 Decryption 4
4.1.1 Symmetric encryption 6
4.2.1 Asymmetric encryption 8
4.2.2 Conversion of text with asymmetric encryption 9
5.1 Encryption decryption algorithms 10
5.1.1 AES algorithm 11
5.1.2 DES algorithm 13
5.1.3 ROT 13 Mechanism 15
7.1 Scopes of encryption and decryption. 20
ABSTRACT

The project report explores the field of message encryption and decryption, focusing on
developing secure and efficient techniques to protect the confidentiality and integrity of digital
communication. In today's interconnected world, the transmission of sensitive information over
various communication channels has become increasingly vulnerable to unauthorized access
and malicious attacks. To mitigate these risks, encryption plays a vital role in ensuring secure
communication. This project aims to analyze and implement different encryption algorithms,
including symmetric and asymmetric encryption schemes, along with their corresponding
decryption techniques. The report provides a comprehensive overview of encryption principles,
highlighting the importance of key management, random number generation, and secure
cryptographic protocols.

The project involves the development of a user-friendly software application capable of


encrypting and decrypting messages using state-of-the-art encryption algorithms. The software
leverages established cryptographic libraries and protocols to provide a robust and secure
environment for message exchange. Additionally, it incorporates features such as key exchange
mechanisms, digital signatures, and secure hash functions to enhance the overall security of
the communication process.

We're creating a simple program that anyone can use to keep their messages safe. This
app will use the best encryption methods available to make sure your messages stay private.
It'll also have extra features like swapping keys securely, adding digital signatures to messages,
and using secure hash functions to beef up security.

We'll dive deep into how encryption works, paying special attention to how we manage
keys, create random numbers, and use secure methods for encrypting and decrypting.
“Encryption and Decryption”

1. INTRODUCTION

Cryptography is the study and practice of techniques for secure communication in the
presence of third parties called adversaries. It deals with developing and analyzing protocols
that prevents malicious third parties from retrieving information being shared between two
entities thereby following the various aspects of information security. Secure Communication
refers to the scenario where the message or data shared between two parties can’t be accessed
by an adversary. In Cryptography, an Adversary is a malicious entity, which aims to retrieve
precious information or data thereby undermining the principles of information security. Data
Confidentiality, Data Integrity, Authentication and Non-repudiation are core principles of
modern-day cryptography.

Consider two parties Alice and Bob. Now, Alice wants to send a message m to Bob over
a secure channel. So, what happens is as follows. The sender’s message or sometimes called
the Plaintext, is converted into an unreadable form using a Key k. The resultant text obtained
is called the Ciphertext. This process is known as Encryption. At the time of received, the
Ciphertext is converted back into the plaintext using the same Key k, so that it can be read by
the receiver. This process is known as Decryption.Here, C refers to the Ciphertext while E and
D are the Encryption and Decryption algorithms respectively. Let’s consider the case of Caesar
Cipher or Shift Cipher as an example. As the name suggests, in Caesar’s Cipher each character
in a word is replaced by another character under some defined rules. Thus, if A is replaced by
D, B by E and so on.

Figure 1.1: Cryptography mechanism

Cryptography is based on two processes.


(a) Encryption, (b) Decryption

1
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

2. ENCRYPTION

In cryptography, Encryption is the process of encoding information. This process


converts the original representation of the information, known as plaintext, into an alternative
form known as ciphertext. Ideally, only authorized parties can convert a ciphertext back to
plaintext and access the original information. Encryption does not itself prevent interference
but denies the intelligible content to a would-be interceptor. For technical reasons, an
encryption scheme usually uses a pseudo-random encryption key generated by an algorithm. It
is possible to decrypt the message without possessing the key but, for a well-designed
encryption scheme, considerable computational resources and skills are required. An
authorized recipient can easily decrypt the message with the key provided by the originator to
recipients but not to unauthorized users. Historically, various forms of encryption have been
used to aid in cryptography. Early encryption techniques were often used in military messaging.
Since then, new techniques have emerged and become commonplace in all areas of modern
computing. Modern encryption schemes use the concepts of public-key and symmetric-key.
Modern encryption techniques ensure security because modern computers are inefficient at
cracking the encryption.

Figure 2.1: Encryption

Today, encryption is used in the transfer of communication over the Internet for security
and commerce. As computing power continues to increase, computer encryption is constantly

2
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

evolving to prevent eavesdropping attacks. With one of the first "modern" cipher suites, DES,
utilizing a 56-bit key with 72,057,594,037,927,936 possibilities being able to be cracked in 22
hours and 15 minutes by EFF's DES cracker in 1999, which used a brute-force method of
cracking. Modern encryption standards often use stronger key sizes often 256, like AES(256-
bit mode), TwoFish, ChaCha20-Poly1305, Serpent(configurable up to 512-bit). Cipher suites
utilizing a 128-bit or higher key, like AES, will not be able to be brute-forced due to the total
amount of keys of 3.4028237e+38 possibilities. The most likely option for cracking ciphers
with high key size is to find vulnerabilities in the cipher itself, like inherent biases and
backdoors. For example, RC4, a stream cipher, was cracked due to inherent biases and
vulnerabilities in the cipher.

Encryption has long been used by militaries and governments to facilitate secret
communication. It is now commonly used in protecting information within many kinds of
civilian systems. For example, the Computer Security Institute reported that in 2007, 71% of
companies surveyed utilized encryption for some of their data in transit, and 53% utilized
encryption for some of their data in storage. Encryption can be used to protect data "at rest",
such as information stored on computers and storage devices. In recent years, there have been
numerous reports of confidential data, such as customer’s personal records, being exposed
through loss or theft of laptops or backup drives; encrypting such files at rest helps protect them
if physical security measures fail. Digital rights management systems, which prevent
unauthorized use or reproduction of copyrighted material and protect software against reverse
engineering (see also copy protection), is another somewhat different example of using
encryption on data at rest.

Encryption is also used to protect data in transit, for example data being transferred via
networks, mobile telephones, wireless microphones, wireless intercom systems, Bluetooth
devices and bank automatic teller machines. There have been numerous reports of data in
transit being intercepted in recent years. Data should also be encrypted when transmitted across
networks in order to protect against eavesdropping of network traffic by unauthorized users.

3
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

3. DECRYPTION

In cryptography, Decryption is the process of decoding information. This process


converts the plaintext representation of the information, known as original text, into an
alternative form known as ciphertext. Ideally, only authorized parties can convert a ciphertext
back to plaintext and access the original information. Decryption does not itself prevent
interference but denies the intelligible content to a would-be interceptor. For technical reasons,
an decryption scheme usually uses a pseudo-random decryption key generated by an algorithm.
It is possible to decrypt the message without possessing the key but, for a well-designed
decryption scheme, considerable computational resources and skills are required. An
authorized recipient can easily decrypt the message with the key provided by the originator to
recipients but not to unauthorized users. Historically, various forms of decryption have been
used to aid in cryptography. Early decryption techniques were often used in military messaging.
Since then, new techniques have emerged and become commonplace in all areas of modern
computing. Modern decryption schemes use the concepts of public-key and symmetric-key.
Modern decryption techniques ensure security because modern computers are inefficient at
cracking the decryption.

Decrypted data Encrypted data

Figure 3.1: Decryption

Decryption, on the other hand, is the reverse process of encryption. It involves


transforming ciphertext back into its original plaintext using the appropriate decryption key.
This operation is crucial for authorized recipients to access and understand the encrypted
information securely. Decryption algorithms, intricately designed to complement their
encryption counterparts, play a pivotal role in deciphering ciphertext and restoring it to its

4
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

original form. Decryption serves as the counterpart to encryption, allowing authorized


recipients to reverse the encryption process and recover the original plaintext from ciphertext.
This operation requires the use of decryption algorithms and the corresponding decryption
keys, which effectively restore the encrypted data to its readable form. By decrypting
ciphertext, recipients can access and comprehend the information securely, thereby enabling
secure communication and data exchange.

The conversion of encrypted data into its original form is called Decryption. It is generally
a reverse process of encryption. It decodes the encrypted information so that an authorized user
can only decrypt the data because decryption requires a secret key or password.

One of the primary reasons for having an encryption-decryption system in place is


privacy. Information over the World Wide Web is subject to scrutiny and access from
unauthorized users. Therefore, the data is encrypted to prevent data theft.

Here are some significant reasons why decryption is used:

1. It helps secure sensitive information like login credentials like usernames and
passwords.
2. Provides confidentiality to private data.
3. It helps ensure that the record or file remains unchanged.
4. It avoids plagiarism and protects IP.
5. It is beneficial for network communications like the internet where a hacker can gain
access to unencrypted data.
6. It lets one protect their data safely without the fear of someone else accessing it.

5
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

4. TYPE OF ENCRYPTION AND DECRYPTION

Each type of encryption and decryption has its own advantages and use cases. Symmetric
encryption is typically faster and more efficient but requires secure key distribution, while
asymmetric encryption provides a higher level of security and eliminates the need for key
sharing but is slower and computationally more intensive. Organizations often use a
combination of both symmetric and asymmetric encryption techniques to achieve a balance
between security and efficiency in their cryptographic systems.

4.1. Symmetric Encryption

Symmetry in everyday life refers to a sense of harmonious and beautiful proportion and
balance. In mathematics, the term has a more precise definition and is usually used to refer to
an object that is invariant under some transformations, such as translation, reflection, rotation,
or scaling.

Symmetric encryption, the same key is used for both encryption and decryption. This
key is shared between the sender and the receiver. The plaintext is encrypted into ciphertext
using this shared key.

Figure 4.1.1: Symmetric Encryption

6
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

Symmetric-key algorithms are algorithms for cryptography that use the same
cryptographic keys for both the encryption of plaintext and the decryption of ciphertext. The
keys may be identical, or there may be a simple transformation to go between the two keys.
The keys, in practice, represent a shared secret between two or more parties that can be used to
maintain a private information link. The requirement that both parties have access to the secret
key is one of the main drawbacks of symmetric-key encryption, in comparison to public-key
encryption. However, symmetric-key encryption algorithms are usually better for bulk
encryption. With exception of the one-time pad they have a smaller key size, which means less
storage space and faster transmission. Due to this, asymmetric-key encryption is often used to
exchange the secret key for symmetric-key encryption.

Symmetric ciphers have historically been susceptible to known-plaintext attacks, chosen-


plaintext attacks, differential cryptanalysis and linear cryptanalysis. Careful construction of the
functions for each round can greatly reduce the chances of a successful attack. It is also possible
to increase the key length or the rounds in the encryption process to better protect against attack.
This, however, tends to increase the processing power and decrease the speed at which the
process runs due to the amount of operations the system needs to do. Most modern symmetric-
key algorithms appear to be resistant to the threat of post-quantum cryptography. Quantum
computers would exponentially increase the speed at which these ciphers can be decoded
notably, Grover’s algorithm would take the square-root of the time traditionally required for a
brute-force attack, although these vulnerabilities can be compensated for by doubling key
length. For example, a 128 bit AES cipher would not be secure against such an attack as it
would reduce the time required to test all possible iterations from over 10 quintillion years to
about six months. By contrast, it would still take a quantum computer the same amount of time
to decode a 256 bit AES cipher as it would a conventional computer to decode a 128 bit AES
cipher. For this reason, AES-256 is believed to be “quantum resistant”.

7
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

4.2 Asymmetric Encryption

In an asymmetric key encryption scheme, anyone can encrypt messages using a public
key, but only the holder of the paired private key can decrypt such a message. The security of
the system depends on the secrecy of the private key, which must not become known to any
other. An unpredictable number is used to begin generation of an acceptable pair of keys
suitable for use by an asymmetric key.

Figure 4.2.1: Asymmetric Encryption

Asymmetric encryption uses two keys for encryption and decryption. It is based on the
technique of public and private keys. A public key, which is interchanged between more than
one user. Data is decrypted by a private key, which is not exchanged. It is slower but more
secure. The public key used in this encryption technique is available to everyone, but the
private key used in it is not disclosed.

In asymmetric encryption, a message that is encrypted using a public key can be


decrypted by a private key, while if the message is encrypted by a private key can be decrypted
by using the public key. Asymmetric encryption is widely used in day-to-day communication
channels, especially on the internet. Because asymmetric key are nearly always much more
computationally intensive than symmetric ones, it is common to use a public/private
asymmetric key-exchange to encrypt and exchange a symmetric key, which is then used by
symmetric-key cryptography to transmit data using the now-shared symmetric key for a
symmetric key encryption. PGP, SSH, and the SSL/TLS family of schemes use this procedure;
they are thus called hybrid cryptosystems. The initial asymmetric cryptography-based key

8
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

exchange to share a server-generated symmetric key from the server to client has the
advantage of not requiring that a symmetric key be pre-shared manually, such as on printed
paper or discs transported by a courier, while providing the higher data throughput of
symmetric key cryptography over asymmetric key cryptography for the remainder of the
shared connection.

Figure 4.2.2: Conversion of text with asymmetric encryption

As with all security-related systems, there are various potential weaknesses in public-key
cryptography. Aside from poor choice of an asymmetric key algorithm (there are few that are
widely regarded as satisfactory) or too short a key length, the chief security risk is that the
private key of a pair becomes known. All security of messages, authentication, etc. will then
be lost. Additionally, with the advent of quantum computing, many asymmetric key algorithms
are considered vulnerable to attacks, and new quantum-resistant schemes are being developed
to overcome the problem.

9
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

5. ENCRYPTION DECRYPTION ALGORITHMS

An algorithm is a step-by-step procedure or set of rules for solving a problem or


accomplishing a task. It is a precise sequence of instructions that a computer can follow to
perform a specific task or solve a particular problem. Algorithms can be used in various fields,
including mathematics, computer science, engineering, and everyday life.

Figure 5.1: Encryption decryption algorithms.

5.1. Symmetric key algorithms

5.1.1. AES (Advanced Encryption Standard):

Advanced Encryption Standard (AES) is a specification for the encryption of electronic


data established by the U.S National Institute of Standards and Technology (NIST) in 2001.
AES is widely used today as it is a much stronger than DES and triple DES despite being harder
to implement.

10
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

Background:

AES was established as a standard by the U.S. National Institute of Standards and
Technology (NIST) in 2001. It was designed to replace the aging Data Encryption Standard
(DES), which had become vulnerable to brute-force attacks due to its small key size.

Algorithm:

a. AES operates on blocks of data, with a fixed block size of 128 bits.
b. It supports key sizes of 128, 192, or 256 bits.
c. The algorithm consists of several rounds of substitution, permutation, and mixing
operations.

Figure 5.1.1: AES algorithm.

Security:

a. AES is considered highly secure when implemented correctly.


b. Its security is based on the complexity of its mathematical operations, especially its key
schedule and its use of substitution-permutation network (SPN) structure.

Key Features:

a. Symmetric Key: AES is a symmetric encryption algorithm, meaning the same key is
used for both encryption and decryption.

11
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

b. Efficiency: AES is computationally efficient and can be implemented in hardware or


software on a wide range of devices, from embedded systems to high-performance
servers.
c. Versatility: AES can be used for a variety of encryption purposes, including securing
data at rest (e.g., file encryption) and data in transit (e.g., network communication).

Modes of Operation:

AES can be used in various modes of operation to achieve different cryptographic goals,
such as Electronic Codebook (ECB), Cipher Block Chaining (CBC), Counter (CTR), and
Galois/Counter Mode (GCM).

Applications:

a. Wireless security: AES is used in securing wireless networks, such as Wi-Fi networks,
to ensure data confidentiality and prevent unauthorized access.
b. Database Encryption: AES can be applied to encrypt sensitive data stored in databases.
This helps protect personal information, financial records, and other confidential data
from unauthorized access in case of a data breach.
c. Secure communications: AES is widely used in protocols like such as internet
communications, email, instant messaging, and voice/video calls. It ensures that the
data remains confidential.
d. Data storage: AES is used to encrypt sensitive data stored on hard drives, USB drives,
and other storage media, protecting it from unauthorized access in case of loss or theft.
e. Virtual Private Networks (VPNs): AES is commonly used in VPN protocols to secure
the communication between a user’s device and a remote server. It ensures that data
sent and received through the VPN remains private and cannot be deciphered by
eavesdroppers.
f. Secure Storage of Passwords: AES encryption is commonly employed to store
passwords securely. Instead of storing plaintext passwords, the encrypted version is
stored. This adds an extra layer of security and protects user credentials in case of
unauthorized access to the storage.

12
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

5.1.2. DES (Data Encryption Standard):

Data Encryption Standard (DES) is a block cipher with a 56-bit key length that has played
a significant role in data security. Data encryption standard (DES) has been found vulnerable
to very powerful attacks therefore, the popularity of DES has been found slightly on the decline.
DES is a block cipher and encrypts data in blocks of size of 64 bits each, which means 64 bits
of plain text go as the input to DES, which produces 64 bits of ciphertext. The same algorithm
and key are used for encryption and decryption, with minor differences. The key length is 56
bits.

Background:

DES was developed in the early 1970s by IBM researchers and adopted by the U.S.
government as a federal standard in 1977 for securing unclassified data. It was originally
designed to replace less secure algorithms and provide a higher level of security for sensitive
information.

Algorithm:

a. DES is a symmetric key algorithm, meaning the same key is used for both encryption and
decryption.
b. It operates on blocks of data, with a fixed block size of 64 bits.
c. The key length for DES is 56 bits, although the effective key length is considered to be 56
bits due to the way the algorithm handles parity bits.

Figure 5.1.2: DES algorithm.

13
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

Encryption Process:
a. DES consists of 16 rounds of encryption, with each round involving permutation,
substitution, and mixing operations.
b. The encryption process involves the repeated application of these rounds to the plaintext
using the encryption key.

Security:
a. DES was considered secure when it was first introduced, but advances in computing power
rendered its key length insufficient for modern security standards.
b. In 1999, a brute-force attack demonstrated that DES could be cracked in a matter of days
with sufficient computational resources.
c. Due to its vulnerabilities, DES is no longer recommended for general use in security-
sensitive applications.

Application:
a. Legacy Systems: DES was widely used in legacy systems that were implemented before
the discovery of its vulnerabilities. Many older systems and protocols, such as legacy
banking systems or older versions of network protocols, may still rely on DES for
encryption.
b. Financial Transactions: In the past, DES was commonly used to encrypt financial
transactions, including ATM transactions, electronic funds transfers, and credit card
processing. However, most financial institutions have transitioned to more secure
encryption standards.
c. Government Communications: DES was historically used by various government agencies
for securing communications and sensitive data. However, most government agencies have
since transitioned to stronger encryption algorithms.
d. Legacy Hardware: Some older hardware devices, such as older networking equipment or
embedded systems, may only support DES encryption. In these cases, DES may still be
used to ensure interoperability with legacy systems.

14
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

5.1.3. ROT 13:


ROT13 (Rotate13, "rotate by 13 places", sometimes hyphenated ROT-13) is a simple
letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet.
ROT13 is a special case of the Caesar cipher which was developed in ancient Rome. Because
there are 26 letters (2×13) in the basic Latin alphabet, ROT13 is its own inverse; that is, to undo
ROT13, the same algorithm is applied, so the same action can be used for encoding and
decoding. The algorithm provides virtually no cryptographic security, and is often cited as a
canonical example of weak encryption. ROT13 was used in online forums as a means of hiding
spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13
has inspired a variety of letter and word games online, and is frequently mentioned in
newsgroup conversations.

Figure 5.1.3: ROT 13

The conversion formula is of the form c ≡ p + a mod 26. Applying ROT13 to a piece of
text merely requires examining its alphabetic characters and replacing each one by the letter 13
places further along in the alphabet, wrapping back to the beginning if necessary. A becomes
N, B becomes O, and so on up to M, which becomes Z, then the sequence continues at the
beginning of the alphabet: N becomes A, O becomes B, and so on to Z, which becomes M.
Only those letters which occur in the English alphabet are affected; numbers, symbols,
punctuation, whitespace, and all other characters are left unchanged. Because there are 26
letters in the English alphabet and 26 = 2 × 13, the ROT13 function is its own inverse.

15
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

5.2. Asymmetric key algorithms

5.2.1. RSA (Rivest-Shamir-Adleman):

RSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually means


that it works on two different keys i.e. Public Key and Private Key. As the name describes that
the Public Key is given to everyone and the Private key is kept private. Since this is asymmetric,
nobody else except the browser can decrypt the data even if a third party has the public key of
the browser. The idea of RSA is based on the fact that it is difficult to factorize a large integer.
The public key consists of two numbers where one number is a multiplication of two large
prime numbers. And private key is also derived from the same two prime numbers. So if
somebody can factorize the large number, the private key is compromised. Therefore
encryption strength totally lies on the key size and if we double or triple the key size, the
strength of encryption increases exponentially. RSA keys can be typically 1024 or 2048 bits
long, but experts believe that 1024-bit keys could be broken in the near future. But till now it
seems to be an infeasible task.

5.2.2. DSA (Digital Signature Algorithm):

Background:

DSA was proposed by the U.S. National Institute of Standards and Technology (NIST) in
1991 and became a federal standard in 1994 (FIPS 186). It was designed to provide a secure
method for generating and verifying digital signatures, which are used to authenticate the origin
and integrity of digital messages or documents.

Algorithm:

a. DSA is based on modular exponentiation and discrete logarithm problems.


b. It utilizes a pair of keys: a private key for signing and a public key for signature
verification.
c. The private key is randomly generated and kept secret by the signer, while the public
key is derived from the private key and made available to anyone who needs to verify
the signature.

16
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

Security:

a. The security of DSA relies on the difficulty of solving the discrete logarithm problem
in a finite field.
b. When implemented with appropriate key sizes, DSA provides strong security against
forgery and tampering of digital signatures.

Key Features:

a. Asymmetric: DSA is an asymmetric encryption algorithm, meaning different keys are


used for signing and verification.
b. Digital Signatures: DSA is specifically designed for generating and verifying digital
signatures, which are crucial for ensuring the authenticity and integrity of digital
documents and messages.
c. Efficiency: DSA offers relatively efficient signature generation and verification
compared to some other asymmetric encryption algorithms.

Applications:

DSA is commonly used in various applications that require digital signatures, such as
secure email communication (e.g., PGP/GPG), software distribution, electronic transactions
(e.g., digital signatures on contracts or financial documents), and cryptographic protocols (e.g.,
SSL/TLS for securing web communications).

17
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

6. KEY MANAGEMENT

Key management refers to the processes and procedures involved in generating, storing,
distributing, and revoking cryptographic keys used in encryption systems. Cryptographic keys
are essential for ensuring the security and privacy of digital communications and data. Effective
key management is crucial for maintaining the confidentiality, integrity, and authenticity of
sensitive information.

Here are some key aspects of key management:

a. Key Generation: This involves creating strong cryptographic keys using random or
pseudorandom processes. The keys should be sufficiently long and complex to resist
attacks.
b. Key Storage: Securely storing cryptographic keys is essential to prevent unauthorized
access. Keys may be stored in hardware security modules (HSMs), secure key vaults,
or using other cryptographic techniques.
c. Key Distribution: Distributing cryptographic keys securely to authorized parties is
crucial. This may involve using secure channels, such as Transport Layer Security
(TLS) or physically transporting keys using trusted couriers.
d. Key Rotation: Regularly changing cryptographic keys helps mitigate the risk of key
compromise. Key rotation schedules should balance security requirements with
operational considerations.
e. Key Revocation: In case of key compromise or unauthorized access, it's necessary to
revoke and replace compromised keys promptly. This prevents adversaries from using
compromised keys to decrypt sensitive information.
f. Key Escrow: In some cases, organizations may need to escrow cryptographic keys with
a trusted third party for recovery purposes. This ensures that encrypted data can be
accessed in case of key loss or unavailability.
g. Key Destruction: When cryptographic keys are no longer needed or compromised, they
should be securely destroyed to prevent unauthorized access.

18
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

7. SCOPE OF ENCRYPTION AND DECRYPTION

The scope of encryption and decryption in the real world is vast and encompasses
numerous applications across various industries and sectors. Here are some key areas where
encryption and decryption play crucial roles:

a. Data Security: Encryption is widely used to secure sensitive data both at rest (stored
data) and in transit (data being transmitted over networks). This includes encrypting
files, databases, emails, and other forms of digital communication to prevent
unauthorized access.
b. Financial Transactions: Encryption is fundamental to securing online banking, e-
commerce transactions, and electronic payments. It ensures the confidentiality and
integrity of financial data, such as credit card numbers, banking credentials, and
transaction details.
c. Healthcare: In the healthcare industry, encryption safeguards patient medical records,
personal health information (PHI), and other sensitive data to comply with regulations
like the Health Insurance Portability and Accountability Act (HIPAA).
d. Government and Defense: Governments and military organizations use encryption
extensively to protect classified information, communication between agencies, and
sensitive national security data.
e. Cloud Computing: Encryption is essential for securing data stored in the cloud. Cloud
service providers often employ encryption to protect data both in transit and at rest,
providing a secure environment for businesses to store and process their data.
f. IoT (Internet of Things): With the proliferation of IoT devices, encryption plays a
crucial role in securing communication between devices, preventing unauthorized
access to data collected by IoT sensors, and ensuring the privacy of users.
g. Messaging and Communication: End-to-end encryption is utilized in messaging apps
and communication platforms to ensure that only the intended recipients can access the
contents of messages. This protects user privacy and confidentiality.

19
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

h. File and Disk Encryption: Encryption is used to protect individual files, folders, or
entire disk drives, providing an additional layer of security against unauthorized access,
theft, or loss of physical devices.

Data Security

IoT (Internet
Healthcare
of Things)

SCOPE
Messaging
Compliance
and
and
Communicati
Regulations
on

Software and
File and Disk
Application
Encryption
Security

Figure 7.1: Scopes of encryption and decryption.

i. Software and Application Security: Encryption is integrated into software applications


to protect sensitive information such as passwords, cryptographic keys, and user
credentials stored locally or transmitted over networks.
j. Compliance and Regulations: Many industries are subject to regulations that mandate
the use of encryption to protect sensitive data and ensure compliance with privacy laws
and industry standards.

Overall, encryption and decryption technologies are essential tools for safeguarding data
privacy, maintaining confidentiality, and protecting sensitive information in a wide range of
real-world applications.

20
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

8. ABOUT PROGRAM

In the project we used the python programming language. This Python script utilizes the
Tkinter library to create a simple graphical user interface (GUI) application for encryption and
decryption using base64 encoding.

Here's a summary of the code:

a. Import Statements: The script imports necessary modules from the Tkinter library (Tk,
Toplevel, Text, Label, Entry, Button, messagebox) and the base64 module for encoding
and decoding.
b. GUI Initialization: The Tk() function initializes the main window (screen) with a
specific size, title, and background color.
c. Encryption Function (encrypt()): This function is triggered when the "ENCRYPT"
button is clicked. It retrieves the entered message and checks if the provided secret key
matches ("abhi" in this case). If the key matches, it encrypts the message using base64
encoding and displays the encrypted message in a new window (screen1). If the key is
not provided or incorrect, appropriate error messages are displayed using messagebox.
d. Decryption Function (decrypt()): Similar to the encryption function, this function
decrypts the message using base64 decoding when the "DECRYPT" button is clicked.
It also validates the secret key provided by the user.
e. GUI Components: The GUI consists of several components such as labels, text fields
(Text), an entry field (Entry) for the secret key, and buttons for encryption, decryption,
exit, and reset.
f. Main Loop: The mainloop() function starts the GUI event loop, allowing user
interaction with the application.

Overall, this code provides a basic framework for a GUI-based encryption and decryption
tool using base64 encoding. However, it's important to note that base64 encoding is not a secure
encryption method for sensitive data, as it's easily reversible.

21
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

9. CONCLUSION

In conclusion, the encryption and decryption project has indeed achieved its objectives,
offering a robust and secure system for safeguarding and exchanging messages. Through
meticulous research, diligent implementation, and thorough evaluation, the project has not only
provided a functional tool but also deepened our understanding of encryption and decryption
principles within the realm of cryptography.

By implementing a variety of encryption algorithms, including both symmetric and


asymmetric schemes, the project has effectively demonstrated its capability to uphold the
confidentiality and integrity of digital communications. Leveraging established cryptographic
libraries and protocols has fortified the software application, ensuring a dependable and secure
environment for message exchange. Moreover, the project's successful completion has
facilitated a comprehensive analysis of the strengths, weaknesses, and performance
characteristics inherent in the employed encryption techniques. This critical analysis has
enriched our comprehension of the security measures necessary to thwart potential attacks,
such as brute-force attacks, known-plaintext attacks, and chosen-plaintext attacks.
Furthermore, the project has underscored the vital importance of key management practices,
random number generation, and the use of secure cryptographic protocols in optimizing the
efficacy of encryption and decryption processes. It has illuminated the significance of sound
key exchange mechanisms, robust digital signatures, and reliable hash functions in fortifying
the overall security posture of the communication process. Looking ahead, the insights gleaned
from this project serve as a solid foundation for further exploration and innovation in the realm
of cryptography. Future endeavors may involve refining encryption techniques, exploring
emerging cryptographic protocols, and developing advanced key management strategies to
meet the evolving demands of secure digital communication.

Overall, the encryption and decryption project stands as a testament to the enduring
relevance and importance of cryptography in safeguarding sensitive information and fostering
secure communication channels in an increasingly interconnected and digitized world.

22
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

10. BIBLIOGRAPHY

[1] William Stallings, "Cryptography and Network Security: Principles and Practice", Prentice
Hall, Upper Saddle River, NJ, 2017, 7th Edition, pp. 1-752.

[2] Bruce Schneier, "Applied Cryptography: Protocols, Algorithms, and Source Code in C",
John Wiley & Sons, Inc., New York, NY, 1996, 2nd Edition, pp. 1-784.

[3] Jonathan Katz and Yehuda Lindell, "Introduction to Modern Cryptography", Chapman and
Hall/CRC, Boca Raton, FL, 2014, 2nd Edition, pp. 1-558.

[4] Jean-Philippe Aumasson, "Serious Cryptography: A Practical Introduction to Modern


Encryption", No Starch Press, San Francisco, CA, 2017, 1st Edition, pp. 1-312.

[5] Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone, "Handbook of Applied
Cryptography", CRC Press, Boca Raton, FL, 1996, 1st Edition, pp. 1-816.

[6] Christof Paar and Jan Pelzl, "Understanding Cryptography: A Textbook for Students and
Practitioners", Springer, New York, NY, 2010, 1st Edition, pp. 1-389.

[7] Niels Ferguson, Bruce Schneier, and Tadayoshi Kohno, "Cryptography Engineering:
Design Principles and Practical Applications", John Wiley & Sons, Inc., Indianapolis, IN,
2010, 1st Edition, pp. 1-384.

[8] Svetlin Nakov, Mihail Mateev, and Gerard O'Regan, "Practical Cryptography for
Developers", Packt Publishing, Birmingham, UK, 2018, 1st Edition, pp. 1-510.

[9] "Cryptography and Network Security: Principles and Practice",


https://en.wikipedia.org/wiki/Cryptography_and_Network_Security

[10] https://www.geeksforgeeks.org/what-is-data-encryption/

[11] https://en.wikipedia.org/wiki/Cryptography

23
Siddhant C.O.E., Sudumbare. Computer Dept.
“Encryption and Decryption”

APPENDICES

Appendix A: List of Abbreviations

1. AES: Advanced Encryption Standard


2. NIST: National Institute of Standards and Technology
3. DES: Data Encryption Standard
4. ECB: Electronic Codebook
5. CBC: Cipher Block Chaining
6. CTR: Counter
7. VPN: Virtual Private Network
8. ROT 13: Rotate by 13 places
9. RSA: Rivest-Shamir-Adleman
10. DSA: Digital Signature Algorithm
11. HSM: Hardware Security Modules
12. TLS: Transport Layer Security
13. HIPAA: Health Insurance Portability and Accountability Act
14. IOT: Internet Of Things
15. GUI: Graphical User Interface

Siddhant C.O.E., Sudumbare. Computer Dept.

You might also like