0% found this document useful (0 votes)
38 views

Encryption and Decryption - 1

The document discusses encryption and decryption in C programming language. It provides an overview of encryption, explaining how it encodes information so that only authorized parties can access it. It discusses the importance of encryption for providing confidentiality, authentication, integrity and non-repudiation. It also describes how encryption is commonly used to protect data in transit and at rest. Finally, it provides a brief overview of symmetric and asymmetric encryption ciphers.

Uploaded by

HARESH.S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Encryption and Decryption - 1

The document discusses encryption and decryption in C programming language. It provides an overview of encryption, explaining how it encodes information so that only authorized parties can access it. It discusses the importance of encryption for providing confidentiality, authentication, integrity and non-repudiation. It also describes how encryption is commonly used to protect data in transit and at rest. Finally, it provides a brief overview of symmetric and asymmetric encryption ciphers.

Uploaded by

HARESH.S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

DEEP LEARNING

ENCRYPTION AND DECRYPTION IN C

PROJECT REPORT
Submitted by

S.HARESH
Register No: 21105084
D.DANIEL GABRIEL
Register No: 21105076
D.S.KAARMUGILAN
Register No:21105089
in partial fulfillment for the award of the degree
of
BACHELOR OF COMPUTER APPLICATIONS
in
DEPARTMENT OF COMPUTER APPLICATIONS

SRI RAMAKRISHNA COLLEGE OF ARTS AND


SCIENCE
(AUTONOMOUS)
COIMBATORE – 641 006
JUNE - 2022

1
SRI RAMAKRISHNA COLLEGE OF ARTS AND SCIENCE

COIMBATORE 641006

BONAFIDE CERTIFICATE

Certified that this Project Report titled “DEEP LEARNING – ENCRYPTION


AND DECRYPTION IN C"is the bonafide work of S.Haresh(Reg. No.
21105084) , D.Daniel Gabriel(Reg. No. 21105076) & D.S.Kaarmugilan
(Reg.No.21105089)who carried out the work under my supervision.

--------------------------- --------------------------
SIGNATURE OF THE GUIDE SIGNATURE OF THE
HOD

Submitted for the Project viva voce examination held on ____________

---------------------- ---------------------
INTERNAL EXAMINER EXTERNAL
EXAMINER

2
DECLARATION

We affirm that the project work titled DEEP LEARNING – ENCRYPTION AND
DECRYPTION IN C being submitted in partial fulfilment for the award of the degree of
BCA is the original work carried out by us. It has not formed the part of any other project
work submitted for award of any degree or diploma, either in this or any other University.

-----------------------------------
(Signature of the Candidate)
S.Haresh
21105084

-----------------------------------
(Signature of the Candidate)
D.Daniel Gabriel
21105076

-----------------------------------
(Signature of the Candidate)
D.S.Kaarmugilan
21105089

I certify that the declaration made above by the candidates is true.

3
------------------------------
(Signature of the Guide)
Dr. S. Gomathi @ Rohini
Associate Professor

ACKNOWLEDGEMENT

We express our heartfelt thanks to Sri D. Lakshminarayanasamy, Managing Trustee


and Sri R. Sundar, Joint Managing Trustee of SNR Sons Charitable Trust for having
provided us ample facilities to undertake this project.

We express our gratitude to Dr. B.L. Shivakumar, Principal, Sri Ramakrishna


College
of Arts and Science for his continuous encouragement to complete the project
successfully.

We are grateful to Dr. D. Hari Prasad, HOD and Dr. S. Gomathi @ Rohini, Project
Coordinator of Department of Computer Applications for their unlisted guidance and
encouragement to accomplish this project.

We also express our thanks to other staff for their help and constant support to
complete the project.

We have great pleasure in thanking our parents and friends for their inspiration and
encouragement. We express our gratitude to various authors, whose works we referred
to carry out this project.

4
LIST OF CONTENTS

ABSTRACT 6

OVERVIEW OF ENCRYPTION AND DECRYPTION 7

IMPORTANCE OF ENCRYPTION 8

HOW IT USED 8

SYMMETRIC AND ASYMMETRIC CIPHER. 9

ENCRYPTION KEY MANAGEMENT AND WRAPPING 10

FLOW CHART 11

SOURCE CODE 12

5
OUTPUT 13

ABSTRACT

In cryptography, encryption is the process of encoding a message or information in such a


way that only authorized parties can access it and those who are not authorized cannot.
Encryption does not itself prevent interference, but denies the intelligible content to a
would-be interceptor. In an encryption scheme, the intended information or message, referred
to as plaintext, is encrypted using an encryption algorithm-a cipher-generating ciphertext that
can be read only if decrypted. For technical reasons, an encryption scheme usually uses a
pseudo-random encryption key generated by an algorithm. It is in principle 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 .

6
ENCRYPTION AND DECRYPTION IN C

Overview
Encryption is the method by which information is converted into secret code that hides the
information's true meaning. The science of encrypting and decrypting information is called
cryptography. In computing, unencrypted data is also known as plaintext, and encrypted data
is called ciphertext. The formulas used to encode and decode messages are called encryption
algorithms, or ciphers. To be effective, a cipher includes a variable as part of the algorithm.
The variable, which is called a key, is what makes a cipher's output unique. When an
encrypted message is intercepted by an unauthorized entity, the intruder has to guess which
cipher the sender used to encrypt the message, as well as what keys were used as variables.
The time and difficulty of guessing this information is what makes encryption such a valuable
security tool. Encryption has been a longstanding way for sensitive information to be
protected. Historically, it was used by militaries and governments. In modern times,
encryption is used to protect data stored on computers and storage devices, as well as data in
transit over networks.

7
IMPORTANCE OF ENCRYPTION

Encryption plays an important role in securing many different types of information


technology (IT) assets. It provides the following:
● Confidentiality encodes the message's content.
Authentication verifies the origin of a message.
● Integrity proves the contents of a message have not been changed since it was sent.
● Nonrepudiation prevents senders from denying they sent the encrypted message.

8
HOW ENCRYPTION USED

Encryption is commonly used to protect data in transit and data at rest. Every time
someone uses an ATM or buys something online with a smartphone, encryption is used to
protect the information being relayed.
Businesses are increasingly relying on encryption to protect applications and sensitive
information from reputational damage when there is a data breach.
There are three major components to any encryption system: the data, the encryption
engine and the key management. In laptop encryption, all three components are running or
stored in the same place: on the
laptop. In application architectures, however, the three components usually run or are stored
in separate places to reduce the chance that compromise of any single component could result
in compromise of the entire system.

9
SYMMETRIC AND ASYMMETRIC CIPHER

Symmetric ciphers, also referred to as secret key encryption, use a single key. The key is
sometimes referred to as a shared secret because the sender or computing system doing the
encryption must share the secret key with all entities authorized to decrypt the message.
Symmetric key encryption is usually much faster than asymmetric encryption. The most
widely used symmetric key cipher is the Advanced Encryption Standard (AES), which was
designed to protect government-classified information. Asymmetric ciphers, also known as
public key encryption, use two different -- but logically linked -- keys. This type of
cryptography often uses prime numbers to create keys since it is computationally difficult to
factor large prime numbers and reverse-engineer the encryption. The Rivest-Shamir-Adleman
(RSA) encryption algorithm is currently the most widely used public key algorithm. With
RSA, the public or the private key can be used to encrypt a message; whichever key is not
used for encryption becomes the decryption key. Today, many cryptographic processes use a
symmetric algorithm to encrypt data and an asymmetric algorithm to securely exchange the
secret key

10
ENCRYPTION KEY MANAGEMENT AND WRAPPING

Encryption is an effective way to secure data, but the cryptographic keys must be carefully
managed to ensure data remains protected, yet accessible when needed. Access to encryption
keys should be monitored and limited to those individuals who absolutely need to use them.
Strategies for managing encryption keys throughout their lifecycle and protecting them from
theft, loss or misuse should begin with an audit to establish a benchmark for how the
organization configures, controls, monitors and manages access to its keys. Key management
software can help centralize key management, as well as protect keys from unauthorized
access, substitution or modification.
Key wrapping is a type of security feature found in some key management software suites
that essentially encrypts an organization's encryption keys, either individually or in bulk. The
process of decrypting keys that have been wrapped is called unwrapping. Key wrapping and
unwrapping activities are usually carried out with symmetric encryption.

11
FLOW CHART

12
SOURCE CODE

#include <stdio.h>
int main()
{
int i, x;
char str[100];
printf("\nPlease enter a string:\t");
gets(str);
printf("\nPlease choose following options:\n");
printf("1 = Encrypt the string.\n");
printf("2 = Decrypt the string.\n");
scanf("%d", &x);
switch(x)
{

case 1:
for(i = 0; (i < 100 && str[i] != '\0'); i++)
str[i] = str[i] + 3;
printf("\nEncrypted string: %s\n", str);
break;
case 2:
for(i = 0; (i < 100 && str[i] != '\0'); i++)
str[i] = str[i] - 3;
printf("\nDecrypted string: %s\n", str);
break;
default:
printf("\nError\n");
}
return 0;
}

13
OUTPUT

14

You might also like