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

Data Encryption and Decryption

The document is a project proposal for developing a program to encrypt and decrypt data using the Vigenere cipher concept. It was submitted by three students - Bibek Khanal, Kapil Shrestha, and Sumit Shrestha - to fulfill the requirements of their computer programming course. The proposal describes encrypting data for secure transfer through the internet or other communication sources to prevent data theft.

Uploaded by

Kapil Shrestha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
625 views

Data Encryption and Decryption

The document is a project proposal for developing a program to encrypt and decrypt data using the Vigenere cipher concept. It was submitted by three students - Bibek Khanal, Kapil Shrestha, and Sumit Shrestha - to fulfill the requirements of their computer programming course. The proposal describes encrypting data for secure transfer through the internet or other communication sources to prevent data theft.

Uploaded by

Kapil Shrestha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

A PROJECT PROPOSAL

ON

DATA ENCRYPTION AND DECRYPTION USING CONCEPT OF


VIGENERE CIPHER

IN PARTIAL FULLFILLMENT OF THE REQUIREMENTS FOR THE


COURSE OF BCT 401 COMPUTER PROGRAMMING

BACHELOR OF COMPUTER ENGINEERING

SUBMITTED BY

BIBEK KHANAL THA075BCT016

KAPIL SHRESTHA THA075BCT022

SUMIT SHRESTHA THA075BCT044

SUBMITTED TO

DEPARTMENT OF ELECTRONICS AND COMPUTER


ENGINEERING

THAPATHALI CAMPUS

March 2019
DECLARATION

We hereby declare that the project work report entitled “Data Encryption And
Decryption Using Concept Of Vigenere Cipher submitted for the partial fulfillment of
the requirements for the course of CT 401 Computer Programming is our original
work and the Project Work Report has not formed the basis for the award of any
degree, diploma, or other similar titles.

Signature:

Name of Student : Bibek Khanal

Signature:

Name of Student : Kapil Shrestha

Signature:

Name of Student : Sumit Shrestha

i
ACKNOWLEDGEMENTS

ii
ABSTRACT

This project is focused on data security. This project converts given data into random
generated numeric and symbolic characters which is better fit for transfer through
internet. Conversion of information into random codes makes difficult for other
person to read your confidential information. Due to advancement of technology and
high internet usage data piracy has become a major concern. Focusing all these factors
we designed a program that helps to increase data security. This program is designed
to take a specific pin from the user and using the pin a random series of numeric and
symbolic characters are generated that makes it very hard for other people to crack the
code. Our program ensures secure data transfer through internet or any other
communication sources.

Key Words:

Data Encryption, Decryption, file encryption, file decryption

iii
TABLE OF CONTENTS
DECLARATION............................................................................................................i

ACKNOWLEDGEMENTS...........................................................................................ii

ABSTRACT..................................................................................................................iii

LIST OF FIGURES........................................................................................................v

CHAPTER 1: INTRODUCTION..................................................................................1

CHAPTER 2: LITERATURE REVIEW.......................................................................4

2.4 Prior Work....................................................................................................6


CHAPTER 3: DESIGN & METHODOLOGY..............................................................7

3.1 Design................................................................................................................7

3.1.1 Encrypt Function......................................................................................7


3.1.2 Decrypt Function.....................................................................................7
3.2 Methodology.....................................................................................................7

3.2.1 Working Method of Encrypt Function.....................................................8


3.2.2 Working Method of Decrypt Function.....................................................8
CHAPTER 4: IMPLEMENTATION AND RESULT.................................................15

4.1 Implementation Detail....................................................................................15

4.2 Result Analysis...............................................................................................15

REFERENCES.............................................................................................................17

APPENDICES..............................................................................................................18

iv
LIST OF FIGURES

FIGURE PAGE

Figure i: --------------------------------------------------------------------------15

Figure ii: --------------------------------------------------------------------------15

Figure iii: --------------------------------------------------------------------------15

Figure iv: -------------------------------------------------------------------------15

Figure 1.1: --------------------------------------------------------------------------16

Figure 1.2: --------------------------------------------------------------------------17

Figure 1.3: --------------------------------------------------------------------------18

v
CHAPTER 1: INTRODUCTION

1.1 Background

Data encryption is the focus of our project in which we convert given data into random
numbers and symbols using C. Not only in Nepal but all over the world data piracy is one
of the burning problems. Sensitive and confidential data are stolen from remote systems
using internet. This program helps to cover information using random generated codes
which even if stolen is very hard to decipher without a specific program.

We have encountered with various cases where data breach or data piracy during data
transfer has caused a loss of millions of dollars. To avoid these large losses business
organizations use encryption technique to secure their data. This type of encryption
system has multiple uses. It can be used for authentication, secure data storing and during
data transfer.

1.2 Problem Statement

The main purpose of this project is to secure the data so that it can be transferred through
the internet or any other communication sources. As we are in the peak age of
technological advancement internet usage has become inseparable part of our life.
Communication and data transfer has become a common habit of ours these days. But
with all these facilities there are risks too. People on internet now haw abilities to steal
data from our system or during data transfer through the internet. To solve this problem
we developed our program to generate a secret code using a user defined key to encrypt
the data so it is hard for other people to decipher the code.

1
1.3 Objectives

 To help safeguard private data

 To minimize data piracy

1.4 Application

Our project is applicable in business organizations or even during daily communication to


send or receive data without any risk of data piracy.

1.5 Project Features

 Secure data transfer

 Minimize data piracy

1.6 Feasibility Analysis


1.6.1 Economic Feasibility

It a cost less program developed by students of Thapathali campus. The program is


relatively simple and since it is a software based application the cost is not very high .

1.6.2 Technical Feasibility

It is a C program that takes input from user and encrypts the data using a user defined
key. For the program a group of people with knowledge in C are required. Since, the
project requires multiple databases we need people to be able to create such databases
using either c structures, arrays etc.

2
1.6.3 Operational Feasibility

We need a computer with code blocks or turbo C IDE to operate. A user requires basic
knowledge in computers in order to be able to use the program. He/she must be able to
give input to the computer and be able to understand what the text on the screen means.

1.7 System Requirement

1.7.1 Software Requirement

All we need is a computer with code blocks or turbo c for our project. We also need
GNICC complier to operate the program.

1.7.2 Hardware Requirement

We need computer system with a keyboard and a mouse to operate our program.

3
CHAPTER 2: LITERATURE REVIEW

2.1 Introduction

Cryptography is about constructing and analyzing protocols that prevent third parties or
the public from reading private messages. Various aspects of information security such as
data confidentiality, data integrity, authentication, and non-repudiation are central to
modern cryptography. There are various types of encryption technology. Most of them
are highly complicated, non user friendly and can not be used under normal
circumstances conveniently. Inspired by these encryption techniques we developed our
own encryption system that is much more user friendly and applicable for general users.

2.1.1 Caesar Cipher:

In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's
code or Caesar shift, is one of the simplest and most widely known encryption
techniques. It is a type of substitution cipher in which each letter in the plaintext is
replaced by a letter some fixed number of positions down the alphabet. For example, with
a left shift of 3, D would be replaced by A, E would become B, and so on. The method is
named after Julius Caesar, who used it in his private correspondence.

2.1.2 Vigenère cipher

The Vigenère cipher is a method to encrypt alphabetic text by using the position of the
letter of the input on the key.
The key is a word decided by the user and is kept secret.
The message cannot be decrypted without the key.

4
2.1.3 AES:
AES is based on a design principle known as a substitution–permutation network, and is
efficient in both software and hardware. Unlike its predecessor DES, AES does not use
a Feistel network. AES is a variant of Rijndael which has a fixed block size of 128 bits,
and a key size of 128, 192, or 256 bits. By contrast, Rijndael per se is specified with
block and key sizes that may be any multiple of 32 bits, with a minimum of 128 and a
maximum of 256 bits.

AES operates on a 4 × 4 column-major order array of bytes, termed the state. Most AES


calculations are done in a particular finite field.

For instance, if there are 16 bytes, these bytes are represented as this two-dimensional
array:

The key size used for an AES cipher specifies the number of transformation rounds that
convert the input, called the plaintext, into the final output, called the cipher text. The
number of rounds are as follows:

 10 rounds for 128-bit keys.

 12 rounds for 192-bit keys.

 14 rounds for 256-bit keys.

Each round consists of several processing steps, including one that depends on the
encryption key itself. A set of reverse rounds are applied to transform cipher text back
into the original plaintext using the same encryption key.

2.2 Benefit Analysis

 Helps to help safeguard private data

 Helps to minimize data piracy.

5
 Helps for safe data transfer.

 It helps in protecting sensitive data online.

 It is a simpler encryption method so it is easier for most people to use.

 It is more secure than other simpler encryption such as the Caesar Cipher.

2.3 Continuous optimization

Modern cryptography provides a robust set of techniques to ensure that the malevolent
intentions of the adversary are thwarted while ensuring the legitimate users get access to
information.

2.4 Prior Work

As per the introduction, the main motto of the encrypting software is to encrypt the user
given data and store it and also to decrypt the encrypted data.

To develop this system, we first create a user friendly interface where a user can interact
with our program without any effort and knowledge of computer system. Firstly, the
software asks the user either they want to encrypt or decrypt. Then encrypt file or encrypt
message or decrypt file or decrypt message option is seen as per selection

6
CHAPTER 3: DESIGN & METHODOLOGY

3.1 Design

The design of the software is simple. We have used two functions in the program. The
main function calls both the functions. The first function is for the encryption of the data
and the other is for the decryption of data.

3.1.1 Encrypt Function


The encrypt function is a simple function that displays the options for encryption of the
message or file , takes input of the message and key from user which then generates a
special encrypted text and displays the encrypted message.

3.1.2 Decrypt Function


This function also takes input from user of the encrypted data and key the in accordance
with it generates the original message that the user has encrypted.

3.2 Methodology
The methods are as follows: -

7
3.2.1 Working Method of Encrypt Function
First It asks user either they want to encrypt or decrypt the file or message then after the
selection of encryption option the following options pop.

>Encrypt file

>Encrypt message

If we select the ‘encrypt message’ the program asks for the message that they want to
encrypt then it asks a key for encryption and also for decryption. Once it is provided by
the user it displays the original message and the encrypted message.

If we select ‘encrypt file’ the program asks for file path. After the path is provided the
program encrypts the text in the file itself.

3.2.2 Working Method of Decrypt Function


First it asks user either they want to encrypt or decrypt the file or message then after the
selection of decryption the following options pop.

>Decrypt file

>Decrypt message

This function asks for encrypted message that they want to decrypt then it asks for key
used for encryption earlier. Once the key is provided by the user it converts the
encrypted message into original message using the encryption key.

8
Similarly if the user selects the ‘decrypt file’ the program asks for file path. After the
path is provided the program decrypts the text in the file itself.

Vigenère cipher
The Vigenère cipher is a method to encrypt alphabetic text by using the position of the
letter of the input on the key. The key is a word decided by the user and is kept secret.
The message cannot be decrypted without the key.
Let's encrypt the word "bishal" with the key "web".
Word: bishal
Key: web
Encrypted message: xmtdem
The explanation is as follows:
webweb
b i s hal
w+b=x e+i=m b+s=t

w+h=d e+a=e b+l=m

9
Fig:
i

Fig:

10
Fig: iii

Fig:
iv

11
BLOCK DIAGRAM

START

ESC BUTTON
ESC BUTTON

CHOOSE
ENCRYPT
ENCRYPT
/DECRYP
DECRYPT
T
Esc

STOP

Fig 1.1

12
13
E
EN
E
N
CR
N
YP
TE
TE
RT
R
FIL
FI
E/
M
LE
ME
ES
P
SS
SA
AG
AT DECRYPT
GE
E ENTER FILE PATH ENTER MESSAGE
H FILE/MESSAGE
EN
PE
TE
DI
RF
R
SP
O
KE
LA
R
YY
M
EO ENTER KEY
RI
N
GI
CR
IS
YP
PR N
FIL
AL
TI
IN PERFORM DECRYPTION
ETOA
O N
“SN
RUD
NE
CC
ON
ES IS FILE DISPLAY DECRYPTED
TS”
CR PRINT “SUCCESS” OR AND ORIGINAL
?YP NOT ? MESSAGE
TE
Fig 1.2
D
M
ES
SA
Fig 1.3
G
E

14
CHAPTER 4: IMPLEMENTATION AND RESULT

4.1 Implementation Detail


The library files used in this program are ctype.h, conio.h, stdlib.h, windows.h, stdio.h.
there are five functions including main function. The functions are encrypt function
decrypt function, opten function, and optde function. First main function calls opten or
optde function as per user selection. Then the opten function calls encrypt function and
controls the output of the encrypt function. the optde function calls decrypt function and
controls the output of the decrypt function. After the completion of the task the control
returns to the main function. To terminate the program we need to press the esc key from
the main screen and returns to the main screen from the option screen.

Word: bishal
Key: web
Encrypted message: xmtdem
The explanation is as follows:
webweb
b i s hal
w+b=x e+i=m b+s=t
w+h=d e+a=e b+l=m

4.2 Result Analysis


After the completion of the project the users can encrypt their important data and also
encrypt their file.

15
CHAPTER 5: CONCLUSION AND FURTHER WORK

5.1 Conclusion

Hence, this cryptography method enables the conduct of business over the networks
using the computer systems in extremely efficient and effective manner. And moreover, it
ensures the safety of users critical data. And since it is a simple encryption method it is
easier to use than other complex encryption methods moreover, it is secure enough to
safeguard the sensitive data of the users in contrary to its simpler counterparts.

5.1 Further Works

We encrypt our data by converting the user input data into random alphabets. Our system
can be made much more secure by addition of symbols and numeric characters. The user
interface we created can also be refined. This program only encrypts .txt files. It can be
modified to encrypt other types of files. Our program is case insensitive. It can be
modified to work with upper and lower case characters.

16
REFERENCES

Websites :

1. https://stackoverflow.com/

2. https://www.quora.com/

17
APPENDICES

Increasing use of internet usage has made us vulnerable to data leaks. Due to
development of new and sophisticated computing techniques people can easily breach
into our private files and get access to our personal data. To minimize such risk, we
created a simple and user friendly encryption program that can help for small scale data
encryption and provide extra layer of protection to our private data. Our program is not
much refined like other encryption software but it does the job for encrypting small scale
private data. Using this program user can encrypt their file or encrypt their messages at
the very instant. In our program the data is secured with any key provided by the user.
The encrypted code thus obtained can only be decrypted using the key. We also added the
feature where the user can input the file path with a key and the program encrypts the file
as a whole and saves the encrypted code on the file itself. If the user wants to decrypt the
message the key used for encryption is provided to the program with the file path. The
program decrypts the code onto the same file.

18

You might also like