Report - FINAL CS
Report - FINAL CS
CRYPTOGRAPHY”
BACHELOR OF TECHNOLOGY
in
by
Kshitiz Pachaury
Ayush Kumar
This is to certify that the seminar report is goldeous opportunity on the topic of
Associate Professor
CSE Department
School of Engineering
HBTU Kanpur
ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the B.Tech project
undertaken during the B.Tech CSE Final year. I owe a special debt of gratitude to
The satisfaction that accompanies the successful completion of any task would be
possible, whose constant guidance and encouragement crown all efforts with
success.
We are grateful to our project guide Dr. Anita Yadav for the guidance, inspiration
We also thank our colleagues who have helped in successful completion of the
project.
CERTIFICATE ii
ACKNOWLEDGEMENT iii
ABSTRACT v
INTRODUCTION vi
RESULTS lxvi
CONCLUSION lxix
BIBLIOGRAPHY lxxi
CHAPTER 1
(ABSTRACT)
ABSTRACT
The Digital Revolution has brought with it an exponential growth in the usage of
digital computation and along with it, the start of the Information Era. Furthermore,
companies are expanding globally and opening offices at various locations across
the globe. This has brought the need to make access to data from any location
possible and feasible. This is where Cloud Computing and Storage comes into the
picture. But with cloud storage comes security risks and data leak possibilities.
Hence data security is a very important component of cloud storage. Hence even if
a security breach were to take place, the attacker would get access to encrypted
data, which would still ensure data confidentiality. In this system, the user uploads a
file to the portal, it gets encrypted and then uploaded onto the cloud. The user can
then download their files from the cloud through the portal, which results in the
decrypted (or original) file getting downloaded to their local computer. The system
also uses two different hybrid approaches for encryption and decryption, namely
Existing System
For cloud storage, people were using other vendor’s cloud storage systems such as
google drive, one drive and many more, but it was not possible for the people and
organization to encrypt all data before uploading it to the cloud server. It was not
able to provide a secure storage environment for people and organizations. It was
also not able to provide privacy to their users. Privacy is a fundamental human right.
In the present system the data is still physically stored. Companies that provide
cloud storage must also have servers dedicated to storing your data. The fact is you
may never know for certain. Even providers that are based in one country, such as
India, might have servers in China or Pakistan or Canada, or anywhere else in the
world. Thus, the present system stated is time taking, insecure and costly.
Proposed System
As the system will be installed at any server which will act as host and its client’s
means people or organization can access this system using IP address or by using
its registered domain name. Each user will use their id and password to login and
access their panel to perform activities such as upload file, download encrypted key
People will be able to upload and download files. As day by day hacking activities
storage. The proposed system “Secure File Storage System Using Hybrid
should cater to the needs of secure storage. Thus, the system caters to the
Cloud owner and cloud user are included into system architecture as show in
above figure Cloud owner upload the data on cloud server. File is split into octet.
Every part of file is encoded simultaneously using multithreading technique.
Encoded file is stored on cloud server. Keys used for encryption are stored into
cover image. Cloud computing is the multi user environment. In this more than
one user can access file from cloud server. Cloud user request for file. On
request of file user also get stego image using email which consist of key
information. Reverse process is used for decode the file.
Data Security Issues
Due to openness and multi-tenant characteristics of the cloud, the traditional
security mechanisms are no longer suitable for applications and data in cloud.
Some of the issues are as following:
● Due to dynamic scalability, service and location transparency features of
cloud computing model, all kinds of application and data of the cloud
platform have no fixed infrastructure and security boundaries. In the event
of security breach, it is difficult to isolate a particular resource that has a
threat or has been compromised.
● According to service delivery models of Cloud computing, resources and
cloud services may be owned by multiple providers. As there is a conflict of
interest, it is difficult to deploy a unified security measure.
● Due to the openness of cloud and sharing virtualized resources by
multitenant, user data may be accessed by other unauthorized users.
Blowfish
Blowfish is a symmetric block cipher which uses a Fiestal network, 16 rounds of
iterative encryption and decryption functional design. The block size used is of
64-bits and key size can vary from any length to 448.Blowfish cipher uses 18 sub
arrays each of 32-bit commonly known as P-boxes and four Substitution boxes
each of 32-bit, each having 256 entries. The algorithm design is shown in figure.
It consists of two phases: one is Key Expansion phase another is Data
Encryption phase. In Key expansion phase, key is converted into several
sub-keys and in Data Encryption phase, encryption occurs via 16-round
networks. Each round consists of a key dependent permutation and a key and
data dependent substitution.
SRNN
The SRNN algorithm is a public key cryptography algorithm similar to RSA with
some improvement. In this algorithm, extremely large number having two prime
factors (similar to RSA) is used. In addition to, this, two short range natural
number in pair of keys are used. This improvement increases the security of
cryptosystem. SRNN is used for secure communication between user and cloud
servers.
RELATED WORK
Hybrid cryptography algorithm present by author A. Shahade. AES and RSA
algorithms are used into hybrid algorithm. AES algorithm require a single key. In
hybrid algorithm three keys are used. For data upload on cloud mandatory keys
are AES secret key and RSA public key.
Private key of RSA and AES secret key are essential to download data from
cloud. Whenever use makes an effort to upload data on cloud first that file stored
onto directory for short time. In encryption process first AES algorithm is applied
on file after that RSA algorithm is applied on encrypted data. Reverse process is
followed for decryption. After applying keys that file covert into encoded form and
stored on cloud server. Advantages of hybrid algorithm are data integrity,
security, confidentiality and availability. Disadvantage of RSA algorithm is large
amount time essential for data encode and decode.
In security model symmetric algorithm uses chunk level encryption
and decryption of data in cloud computing. Key size is 256 bit. Key is rotated to
achieve high level security. For data integrity purpose hash value is generated.
Hash values are garneted after encryption and before decryption. If both hash
values matches than that data is in correct form. In this security model only valid
user can access data from cloud. Advantages of security model are integrity,
security and confidentiality.
Three algorithms are used for implementation of hybrid algorithm. User
authentication purpose digital signature is used. Blowfish algorithm is used to
produce high data confidentiality. It is symmetric algorithm. It uses single key
Blowfish algorithm need least amount of time for encode and decode. Sub key
array concept is used into blowfish algorithm. It is block level encryption
algorithm. The main aim of this hybrid algorithm is achieved high security to data
for upload and download from cloud. Hybrid algorithm solves the security,
confidentiality and authentication issues of cloud.
RESULT ANALYSIS
In this proposed system AES, RC6, Blowfish and BRA algorithms are used for
block wise security to data. Proposed system is hybridization of AES, RC6,
Blowfish and BRA. All algorithms are symmetric key cryptography. These
algorithms uses a single key for file encode and decode purpose. All algorithms
key size is 128 bit. To hide key information into cover image using LSB
technique. Implementation of proposed system is done using python language.
File encoding and decoding time is calculated with the help of python
programming. File encode and decode time is calculated for only text file with
comparison of existing AES and Blowfish algorithms. File size is given in MB for
AES algorithm. That is 1MB, 2MB, 4MB and 8MB.For Encode and decode time
calculation of blowfish algorithm given file size is 100KB,200KB,400KB and
800KB.Encoding and decoding time is calculated in sec.
As shown in figure proposed system need least amount of time for file encode.
Because in proposed system combination of symmetric key cryptography
algorithms are run simultaneously. In Hybrid algorithm need 17% to 20% less
time for text file as compare to Existing system. Use of single algorithm does not
provide high level security to data in cloud computing...
As shown in above figure existing system need 15% to 17% maximum time need
for file decryption purpose as compare to hybrid algorithm. AES algorithm is
accomplished least amount of time for decryption. But provides less security to
data. In AES if key size increases automatically number of rounds increases than
encode and decode time also increases.
Blowfish need least amount of time for file encode with compare to Advance
Encryption Standard algorithm. As shown in above figure proposed system 12%
to 15% less time need for file encode as compare to Blowfish. In proposed hybrid
algorithm uses a single key for data encode and decode.
In proposed sysystem for text file decryption need 10% to 12% minimum time as
compare to Blowfish as shown above figure In hybrid algorithm for file decryption
needed maximum time as
compare to encryption. But Blowfish algorithm need minimum time for text file
decode as compare to AES algorithm. For text file deceyption needed maximum
time in Blowfish algorithm as compare to encryption.
HYBRID CRYPTOSYSTEM PHASES
.
The hybrid cryptosystem used to maintain security of the files has two phases:
● Encryption Phase
● Decryption Phase
A. Encryption Phase
B. Decryption Phase
In the Registration Phase, the client registers himself in order to upload and view
his files to/from the cloud server. In the registration process, the client sends its
request to front node and in return, front node assigns the VM of the cluster
node, which has minimum load among other VM’s on the network to the client. At
the end of registration phase, the client is registered with IP address of
corresponding VM. Whenever he again issues his request, the request is
transferred to its corresponding VM. The encrypted files, encrypted blowfish
keys, public SRNN keys are stored at his registered VM.
B. Uploading Phase
● Step: 1: The client will send request to front node to authenticate himself.
● Step 2: On successful authentication, the front end which send the
corresponding IP address of the VM against which user was registered.
● Step 3: The files are uploaded by the client to the registered server (VM).
● Step 4: The encryption of uploaded files is done using the hybrid
cryptosystem.
● Step 5: The encrypted slices and Blowfish encrypted keys remain stored in
VM’s data store.
● Step 6: The SRNN private keys are send to user and finally they are
deleted form the server so that only the authenticated user is able to view
his uploaded file.
C. Downloading Phase
● Step 1: The client will send request to front node to authenticate himself.
● Step 2: On successful authentication, the front end which send the
corresponding IP address of the VM against which user was registered
● Step 3: The client will upload n SRNN private keys for the corresponding n
slices.
● Step 4: The SRNN private keys will decrypt the corresponding encrypted
Blowfish keys and the encrypted slices are decrypted by Blowfish keys.
● Step 5: The decrypted files are merged to generate original file.
● Step 6: The decrypted file is downloaded and viewed at client end.
For the purpose of simulating the proposed cloud security model, we used Open
Nebula open source toolkit. Here we created one front node and two cluster
nodes. At each of the Cluster node 2 VM’s are deployed. The allocation of VM at
the time of registration is implemented in python which is well known for its
platform independence. The hybrid cryptosystem is also implemented in python
and deployed at each of the VM. Various libraries have been used like python.
crypto. security to implement hybrid encryption scheme. The cloud security
model has been tested for various types of file: audio, image, text, word, pdf file.
BENEFITS OF PROPOSED MODEL
The proposed model is liable to meet the required security needs of data center
of cloud. Blowfish used for the encryption of file slices takes minimum time and
has maximum throughput for encryption and decryption from other symmetric
algorithms. Modified RSA(SRNN) has increased security than RSA. The idea of
splitting and merging adds on to meet the principle of data security. The hybrid
approach when deployed in cloud environment makes the remote server more
secure and thus, helps the cloud providers to fetch more trust of their users. For
data security and privacy protection issues, the fundamental challenge of
separation of sensitive data and access control is fulfilled. The various benefits
are as summarized:
1) - PROJECT PERSPECTIVE:
The product Secure File Storage system is an independent product and does
not depend on any other product or system. The product will automate
organizing the stored information and optimum performance, thus helping the
2) - PRODUCT FEATURE:
storage. Thus, the system caters to the spontaneous needs of the people. It
stores the users’ confidential files on the storage servers, and users have the
freedom of accessing their files from any location. All of a user’s devices such
gadgets can be used to store, and access files stored on the cloud.
Businesses can also benefit from cloud storage by being able to improve
productivity considerably with the help of cloud storage. Cloud storage thus
● User:
In User module we have four options:
1. Upload File.
2. Download Key.
3. Upload Key.
4. Download File.
● When the user selects the “Upload File” option, then the form will be
opened for uploading the file. Then, the file will upload on the server in
encrypted form.
● In the “Download Key” option, it will appear only when the file is
uploaded successfully.
● When the user selects the “Download” option, then the upload key form
will appear.
● Once the uploaded key is accepted, then you can download your
original file.
● Registration:
This module is responsible for capturing and submitting the details of all
users of the System so that they can get the facility of upload and download
files.
● Login:
In this module User enters the User id and password is checked and only
valid user id and password will get entry into Dashboard. This is a security
● Upload:
Users can upload their files and download the decryption key for that
particular file.
● Download:
Users can upload their file’s decryption key and download the original file.
● Logout:
The Admin and User can successfully logout and their session will be
destroyed.
4) - OPERATING ENVIRONMENT:
NON-FUNCTIONAL REQUIREMENT:
● SAFETY REQUIREMENT:
This software will ease the process upload and download file.
● SECURITY REQUIREMENTS:
This software will:
● When the user performs any action, authorize him/her to perform the
actions allowed for the user and displays an error message if found to be
unauthorized.
● PERFORMANCE REQUIREMENT:
This software should be able to handle the following tasks:
PROJECT DESCRIPTION
1)-PROJECT CATEGORY:
2) - MODULES:
● Registration
● Login
● New User
● Dashboard
● Upload
● Download
● Logout
2. Dashboard
3. Upload
4. Download
etc.
Upload:
Download:
It is an important feature of this system. With this feature, this system not only
PROJECT DESIGN
This chapter describes the design decisions made to meet the aims that are
specified in the specifications required. This chapter will also bring in some of
users is verified by the server and the valid users are allowed go to
dashboard.
● In dashboard they can upload their personal files. Thus, the job of upload
● The user can only download their files when decryption key of that file
● The user details are stored in the MYSQL Database which can retrieve
them as needed.
Data flow diagrams model the flow of data into, though, and out of an
information system:
The user screen flow shows what a user of the community will see. After
successfully logging on, the user will be given various links (such as search
users, search boards, view mail, etc.), and be able to select options from
system. It is capable of depicting incoming data flow, outgoing data flow and
stored data. The DFD does not mention anything about how data flows
depicts flow of control in program modules. DFDs depict flow of data in the
system at various levels. DFD does not contain any control or branch
elements.
Types of DFD
Data Flow Diagrams are either Logical or Physical.
● Physical DFD - This type of DFD shows how the data flow is
implemented in the system.
● DFD COMPONENTS:
DFD can represent Source, destination, storage and flow of data using the
● Data Storage - There are two variants of data storage - it can either be
represented as a rectangle with absence of both smaller sides or as an
● Levels of DFD:
underlying details. Level 0 DFDs are also known as context level DFDs.
● Level 1 - The Level 0 DFD is broken down into more specific, Level 1
DFD. Level 1 DFD depicts basic modules in the system and flow of data
among various modules. Level 1 DFD also mentions basic processes and
sources of information.
● Level 2 - At this level, DFD shows how data flows inside the modules
mentioned in Level 1.
Higher level DFDs can be transformed into more specific lower level DFDs
achieved.
LEVEL-0 DFD:
LEVEL -1 DFD:
LEVEL -2 DFD:
2) – E - R DIAGRAM:
Definition:
attributes.
database. In other words, we can say that ER diagrams help you to explain
the logical structure of databases. At first look, an ER diagram looks very
● Entities
● Attributes
● Relationships
3) – ACTIVITY DIAGRAM:
It is an activity diagram of the general user. First of all, the user encounters a
welcome page that prompts him to enter the valid user name (or valid user- id)
and the corresponding password. After a successful user login, he is allowed to
upload his files to server. He then can download the decryption key.
Apart from uploading files, he is also allowed to download his original file which is
stored on server in encrypted form. He then can logout from the dashboard after
the successful transactions. Once the user is logged out, he is only allowed
4) – STRUCTURE CHART:
the module's name. The tree structure visualizes the relationships between
modules.
representing the different modules in the system, and lines that connect
them. The lines represent the connection and or ownership between activities
design tool, they aid the programmer in dividing and conquering a large
software problem, that is, recursively breaking a problem down into parts that
blueprint to build a house. In the design stage, the chart is drawn and used
as a way for the client and the various software designers to communicate.
● number of readily identifiable functions and modules within each function and
manageable level. An accurate and complete structure chart is the key to the
the configuration system and the internal interfaces among its CIs. During the
configuration control process, the structure chart is used to identify CIs and
According to Wolber (2009), "a structure chart can be developed starting with
which forms the structure chart. The next step is to conceptualize the main
sub-tasks that must be performed by the program to solve the problem. Next,
the programmer focuses on each sub-task individually, and conceptualizes
how each can be broken down into even smaller tasks. Eventually, the
program is broken down to a point where the leaves of the tree represent
simple methods that can be coded with just a few program statements".
The structure chart of secure file storage system is given in next page.
STRUCTURE CHART
TESTING
Testing is the process of running a system with the intention of finding errors.
and errors in the system. Testing aims at detecting error-prone areas. This
helps in the prevention of errors in a system. Testing also adds value to the
The user tests the system and changes are made according to their needs.
The testing involves the testing of the developed system using various kinds
of data. While testing, errors are noted and correctness is the mode.
1. OBJECTIVES OF TESTING:
Unit Testing.
Integration Testing
System testing
● Unit Testing:
Unit testing focuses efforts on the smallest unit of software design. This is
● INTEGRATION TESTING:
Data can be lost across an interface. One module can have an adverse effect
constructing the program structure, while at the same time conducting test to
uncover errors associated within the interface. The objective is to take unit
tested modules and builds program structure. All the modules are combined
● SYSTEM TESTING:
System testing is the stage of implementation. This is to check whether the
Testing is vital to the success of the system. The candidate system is subject
to a variety of tests: on line response, volume, stress, recovery, security and
usability tests. A series of tests are performed for the proposed system is
constantly keeping in touch with the prospective system users at the time of
2. VALIDATION:
Validation testing can be defined in many ways, but a simple definition is that
expected by the customer. After validation test has been conducted, one of
accepted.
3. OUTPUT TESTING:
After performing the validation testing, the next step is output testing of the
proposed system, since no system could be useful if it does not produce the
required output in a specific format. The output format on the screen is found
to be correct; the format was designed in the system design time according to
the user needs. For the hard copy also; the output comes as per the specified
requirements by the user. Hence output testing did not result in any
4. TEST CHARACTERS:
2. A Black Box test for the internal logic structure of the software.
3. Black box testing was performed to find errors in the following categories: -
● Graphics error.
● File error.
● Pointer error.
● Variable error.
● Performance error
cases:
performances of the software over those norms. There are various standards
achieve viz. ISO 9002 SEI CMM Level5 etc. These s t a respective testing
norm predefined in them vide the various test cases and parameters using
mode as well after integrating all the modules in the system vide deferent
FLOW GRAPH
The following Flow Graph methodology was used while testing the software:
Here each circle represents one or more non-branching procedural language
simple loops, concatenated loops, nested and unstructured loops were tested
thoroughly.
● TEST CASES:
● LOGIN:
Use ul
r-ID
3 Passw Emp Please input Succ
ord ty data values essf
ul
Pas
swor
d
1. SYSTEM TESTING:
System testing is a critical element of quality assurance and represents the
ultimate review of analysis, design and coding. Test case design focuses on a
set of techniques for the creation of test because that meet overall testing
The main purpose of testing an information system is to find the errors and
correct them.
ensure that the test coverage meets the requirements and that testing is
existing or required condition and evaluate the features of the software items.
The thorough testing of the system before release of the software needs to
be done vide the various test cases and modes so that the software becomes
time to perform. The test cases were selected beforehand with expected
results defined and actual results recorded for comparison. The selection of
test cases is done by “White Box Testing” technique to check the internal
programming logic and efficiency and vide” Black Box Testing” technique to
number of errors with minimum effort and time. Although test cases are a
software code is not in its optional form, as all other possible alternative parts
in the software are not considered. At the integration level, the software will
be passing to the third-party tests which would further enhance the software
SERVER:
1- user table:
HOME PAGE:
LOGIN PAGE:
SIGNUP PAGE:
UPLOAD PAGE:
SUCCESS PAGE:
KEY DOWNLOAD PAGE:
DOWNLOAD PAGE:
KEY SUCCESS PAGE:
DOWNLOAD FILE:
CONCLUSION
INPUT OF PROJECT:
● Upload File
OUTPUT OF PROJECT:
● Home
5) - BENEFITS OF PROJECT:
FUTURE SCOPE
FUTURE SCOPE:
3. SQLITE3, https://www.sqlite.org/
5. http://ict.iitk.ac.in
7. https://www.adalabs.com/adalabs-chacha20poly1305.pdf
8. For CHACHA20-POLY1305,
https://blog.cloudflare.com/it-takes-two-to-chacha-poly/