You are on page 1of 47

P.E.S.

COLLEGE OF ENGINEERING,
MANDYA, 571401
(An Autonomous Institution under Visvesvaraya Technological
University, Belgaum)

A Project Report
On

Infant Care Assistant (Smart Cradle)

In partial fulfillment of the requirement


for the award of the Degree

In
COMPUTER SCIENCE AND ENGINEERING

Submitted by
NIRBHAY S URS [USN: 4PS18CS066]
KAVANA D [USN: 4PS18CS046]
SAHANA H [USN: 4PS18CS089]
HARSHITHA K [USN: 4PS18CS037]

Under the guidance of


Dr.Mahesh kaluti
Associate Professor, Dept of IS&E
P.E.S.C.E.,Mandya-571 401

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


P.E.S. College of Engineering, Mandya.
2021-2022
P.E.S COLLEGE OF ENGINEERING,
MANDYA
(An Autonomous Institute under Visvesvaraya Technological University, Belagavi)

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING

CERTIFICATE
This is to certify that the project entitled “Infant Care Assistant (Smart Cradle)” is carried out by
Nirbhay S Urs[4PS18CS066], Kavana D[4PS18CS046],Sahana H[4PS18CS89],Harshitha
K[4PS18CS037], bonafide student of P.E.S College of Engineering, Mandya, in partial fulfilment for the award
of the Degree of Bachelor of Engineering in Computer Science and Engineering of Visvesvaraya Technological
University, Belagavi during the year 2021-2022. It is certified that all corrections/suggestions indicated in internal
presentation have been incorporated in the final report. The project report has been approved as it satisfies the
academic requirements prescribed for the said degree.

Dr.Mahesh Kaluti Dr. Nagarathna


Associate Professor, Professor & Head,
Dept of CS&E Dept of CSE

Sl.No Examiner Date and Signature


1

2
DECLARATION

We, Nirbhay S Urs[4PS18CS066], Kavana D[4PS18CS046], Sahana H [4PS18CS089], Harshitha


K[4PS18CS028], students of final semester, Bachelor of Engineering, Computer Science and
Engineering, PES College of Engineering, Mandya. hereby declare that this project work entitled
“Infant Care Assistant (Smart Cradle)” has been independently carried out by us under the guidance
of Dr.Mahesh Kaluti Associate Professor, Department of CS&E, PESCE, Mandya and submitted in
partial fulfilment of the requirement for the award of the degree of Bachelor of Engineering in Computer
Science and Engineering during the academic year 2021-2022. We further declare that the matter
embodied in this dissertation has not been submitted for the award of any degree to any other university.

Nirbhay S Urs [4PS18CS066]

Kavana D [4PS18CS046]

Sahana H [4PS18CS089]

Harshitha K [4PS18CS037]
ACKNOWLEDGEMENT

The satisfaction that accompanies the successful completion of the project report which would be
complete only with the mention of the almighty God and the people who made it possible, whose report
rewarded the effort with success of project.

We are grateful to P. E. S. College of Engineering, Mandya for providing us an opportunity to enhance


our knowledge through the project.

We express our sincere thanks to Dr. R M Mahalinge Gowda, Principal, PESCE - Mandya for providing
us an opportunity and means to present the project.

We express our heart full thanks to Dr. Nagarathna, Professor and Head, Department of Computer
Science Engineering, PESCE - Mandya for encouragement in our project work, whose cooperation and
guidance helped in nurturing this project report.

We would like to express profound thanks to the project guide Dr.Mahesh Kaluti, Associate
Professor, Department of Computer Science and Engineering for the keen interest and encouragement in
our project.

Also, we would like to express my gratitude to all the teaching and non-teaching staff for their kind co-
operation and support during the course of my project work. Finally I would like to thank my parents and
all my friends for their constant support.

Nirbhay S Urs [4PS18CS066]

Kavana D [4PS18CS046]

Sahana H [4PS18CS089]

Harshitha K [4PS18CS037]
INDEX
CHAPTER 1: INTRODUCTION ...................................................................................1
1.1. PROBLEM DEFINITION....................................................................................2
1.2. MOTIVATION .....................................................................................................2
1.3. OBJECTIVES.......................................................................................................3
1.4. EXISTING SYSTEM ...........................................................................................3
1.5. DISADVANTAGES ............................................................................................3
1.6. PROPOSED SYSTEM …………………………………………………………3
1.7. ADVANTAGES OF PROPOSED SYSTEM…………………………………...4

CHAPTER 2: LITERATURE SURVEY .......................................................................5

CHAPTER 3: SOFTWARE REQUIREMENTS ..........................................................7


3.1. REQUIREMENTS ...............................................................................................7
3.2. HARDWARE AND SOFTWARE REQUIREMENT .........................................8

CHAPTER 4: SYSTEM DESIGN AND IMPLEMENTATION ...............................10


4.1. SYSTEM ARCHITECTURE .............................................................................10
4.2. SOFTWARE DETAILS……………………………………………………….23

CONCLUSION ...............................................................................................................38

FUTURE SCOPE…………………………………………………………………...…39

REFERENCES ...............................................................................................................40
ABSTRACT

In today’s industrialized countries, women’s participation in the workforce has dramatically increased.
This participation is one of the main reasons that affect baby care in many families from the birth of the
baby to a certain age. The most important factors that should be followed in infants are body temperature
and sleep patterns. In this project, an internet of things (IOT) based baby monitoring mechanism, namely a
smart cradle structure, which tracks the real-time temperature, wetness and sound of the baby is
proposed, and the data received from the IOT sensor network will be processed using Raspberry Pi and
transferred to a web platform and checked in real-time. In the case of crying, the cradle will swing
autonomously. The alarm will be activated if the crying does not stop. If an abnormal increase in the
measured room temperature, the fan will be turned on. The assistant also includes emotion recognition
unit. Furthermore, it stores data using phpMyAdmin and private cloud servers and includes a graphical
user interface. The results of proposed experiment indicate that this assistant could ease some workload of
parents and enable them to take utmost care of their infants.
Smart Cradle
1. IOT sensor network and Raspberry Pi
2. phpMyAdmin and private cloud servers
Graphical User Interface
Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CHAPTER 1

INTRODUCTION
OVERVIEW
Cloud computing is a broad and rapidly developing field. It may have different meanings for different
individuals, but the high availability of data at any time and in any location is a common feature that
connects individuals together. Cloud computing not only reduces the role of local computers but also
makes computing more integrated. The word 'Cloud' computing comes from two words, that is Cloud
which refers to the internet and 'Computing' which means technology based on computers. Here, Interneti
sstorage on warehouse where the virtualized resources are stored which are provided as services.

About Cloud Computing

Figure 1.1: Structure of Cloud Computing


As the above figure 1.1 shows, the cloud computing entrusts remote services with a user's data,
software and computation. Cloud computing consists of hardware and software resources made
available on the Internet as managed third-party services. These services typically provide access to
advanced software applications and high-end networks of server computers. From building through
initial concepts to the actual deployment, cloud computing has been expanding. By adapting to the
cloud computing techniques, the growth in business development will be more efficient and data more

Department of CS&E, PESCE, Mandya 2021-2022 1


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

secure. The old-style approach of storing documents was to write them in MS Word but that might be
substituted by Cloud Computing.

Working of Cloud Computing


The goal of cloud computing is to apply traditional supercomputing, or high-performance computing
power, normally used by military and research facilities, to perform tens of trillions of computations
per second, in consumer-oriented applications such as financial portfolios, to deliver personalized
information, to provide data storage or to power large, immersive computer games. The cloud
computing uses networks of large groups of servers typically running low-cost consumer PC
technology with specialized connections to spread data-processing chores across them. This shared IT
infrastructure contains large pools of systems that are linked together. Often, virtualization techniques
are used to maximize the power of cloud computing.

Service Models

Figure 1.2: Structure of Service models

Cloud Computing comprises three different service models as shown in the above figure 1.2, namely
Infrastructure-as-a-Service (laaS), Platform-as-a-Service (PaaS), and Software-as-a-Service (SaaS).
The three Service models or layer are completed by an end user layer that encapsulates the end user
perspective on cloud services. The model is shown in figure below. If a cloud user accesses services on
the infrastructure layer, for instance, she can nm her own applications on the resources of a cloud
infrastructure and remain responsible for the support, maintenance, and Security of these applications
Department of CS&E, PESCE, Mandya 2021-2022 2
Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

herself. If she accesses a service on the application layer, these tasks are normally taken care of by the
cloud service provider.

On the other hand, storing the data on cloud can make it more prone to threats and attacks. Thus, the
concern of security and privacy of data is of utmost importance.

Cloud computing is utilized in a variety of sectors, including industry, military, and higher education,
for a variety of services and storing of large amounts of data. This technology is also known as
serverless technology. Here the data can be anything like Image, Audio, video, documents, files, etc.
Without direct connection to the server computer, data stored in this cloud can be viewed or retrieved
at the user's request. The cloud storage is a storage space available to store data on remote servers
which is placed in the data centers that are located anywhere in the world and maintained by thethird
party. When the user wants to retrieve the information, they access the data server through a web-
based interface. In Cloud computing files and software are not fully contained on the user’s application
and Program are residing in provider premises. The cloud provider can solve this problem by encryption
the files by using encryption algorithm. However, security is the primary concern when it comes to data
storage on the cloud. This security issue can be addressed in a number of ways, the most common of
which are cryptography and steganography. This document presents a file security model to provide an
efficient solution for the basic problem of security in cloud environment. In this model, encryption is
done on files by file splitting and applying a set of algorithms on each segmented files to ensure security
of the file. A computer cloud is a target-rich environment for malicious individuals and criminal
organizations. It is thus no surprise that security is a major concern for existing users and for potential
new users of cloud computing services. There are multiple ways to look at the security risks for cloud
computing. A recent paper identifiestwo broad classes of risk: traditional security threats and threats
related to third-party data control.
1. Traditional threats are those experienced for some time by any system connected to the Internet,
butwith some cloud-specific twists.
2. Third-party control generates a spectrum of concerns caused by the lack of transparency and
limiteduser control. For example, a cloud provider may subcontract some resources from a third
party whose level of trust is questionable. There are examples when subcontractors failed to
maintain the customer data. There are also examples when the third party was not a
subcontractor but a hardware supplier and the loss of data was caused by poor-quality storage
devices
In a word, to protect cloud data from leakage at storage layer, this document presents Cloud Secure
Storage Mechanism, a Cloud Secure Storage Mechanism. Cloud Secure Storage Mechanism combines
data dispersion with data encryption, so that large-scale cloud data and keys would be stored in chunked
Department of CS&E, PESCE, Mandya 2021-2022 3
Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

cipher texts. On this basis, user password and secret sharing are introduced to further protect keys
security.
It majorly focuses on:
1. Hierarchical Key Management: To protect the key and prevent the attacker from using the key to
recover the data, this document introduces secret sharing and key hierarchy derivation algorithm
in combination with user password to enhance key security.
2. Experimental Evaluation and Analysis: The security analysis and experimental results show that
CloudSecure Storage Mechanism can effectively guarantee the security of data storage, and the
increased performance cost is acceptable to users.
Mobile devices, such as smart-phones and tablets, record static images, as well as movies and have
limited local storage capacity, so they transfer the data to cloud storage systems. Sensors, surveillance
cameras, and digital medical imaging devices generate data at a high rate and dump it onto storage
systems accessible via the Internet. Online digital libraries, eBooks, and digital media, along with
reference data, add to the demand for massive amounts of storage.
Benefits of Cloud Computing:
• Achieve economies of scale - increase volume output or productivity with fewer people. Your
cost per unit, project or product plummets.
• Reduce, spending on technology infrastructure - Maintain easy access to your information
with minimal upfront spending. Pay as you go (weekly, quarterly or yearly), based on demand.
• Globalize your workforce on the cheap - People worldwide can access the cloud, provided
they have an Internet connection. Streamline processes. Get more work done in less time with
less people. Reduce capital costs - There's no need to spend big money on hardware, software
or licensing fees.
• Improve accessibility - You have access anytime, anywhere, making your life so much easier!
• Monitor projects more effectively - Stay within budget and ahead of completion cycle times.

AIM
So far, there has been less secure system that protect the files stored on cloud. These systems are based
entirely on less efficient algorithm. Further, all versions of AES algorithm’s has not been implemented
in anywhere due to some possible reasons. Here the main motivation is to fragment the files of any
format into three fragments and to apply different AES encrypting and decrypting algorithms to make
the file more secure.

OBJECTIVE
• The main objective is to prevent the unauthorized access by unauthorized users from accessing

Department of CS&E, PESCE, Mandya 2021-2022 4


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

files that are present in cloud using multiple encryption and decryption algorithms.
• Here file encryption can be achieved that are stored in cloud using AES-128, AES-192,
AES-256 advanced algorithms.
• And to achieve decryption technique by applying same algorithm in reverse order.

EXISTING SYSTEM
Data Security Issues are the main issue in the existing system. Due to the multi-tenant characteristics
of the cloud, the previous security mechanisms are no longer suitable for data in the cloud. Data of the
cloud platform have no fixed infrastructure and security boundaries. Due to the openness of the cloud
and sharing virtualized resources by multitenant, user data may be accessed by other unauthorized
users.
Limitations:
• Without any security to the file unauthorized user can access the file.
• Usage of brute force attacks makes it very easy to access the files.
• Although a number of techniques have been projected previously but it’s far from thesecurity
concern.
• MD5 (Message Digest 5) hashing is used but it’s more vulnerable to security breach.
More work is required in the area of cloud computing and the gaps in data security which makes it
more vulnerable can be filled by making more effective techniques though a number of techniques
have been projected previously by researchers for data protection as well as to attain the maximum
level of data security in the cloud but more elaborated work on them as well as the upcoming
techniques are needed.

PROPOSED SYSTEM
A method for securely storing files in the cloud utilizing a hybrid cryptography algorithm is provided in
the suggested system. The user can safely save files in the cloud storage with this method since the files
are stored in encrypted form in the cloud and only the authorized user has access to their files.
The user must first register in order to use the services. During the registration process, you will be asked
to input information such as your name, username, password, email address, and phone number. The
key will be generated randomly, which will be used for encryption and decryption. This keys, however,
will not be saved in the database. Instead, it will be hidden in an image that will be used as the user's
profile picture, using the steganography technique.
As shown in the below figure 1.3, it gives the brief picture on how the encryption and decryption of
the files works. The cloud owner uploads the file which undergoes multiple encryptions before it is
sent to the cloud storage and this file which is present in the cloud can be accessed by the user by
Department of CS&E, PESCE, Mandya 2021-2022 5
Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

requesting key to the cloud owner. If the cloud owner grants the key to the user, then the file
undergoes multiple decryptions and the final original file is securely accessed by the cloud user.
In case, if an unauthorized user tries to access the files from cloud storage, he will not get the file, in the
worst case if he gets access to it without the proper key by hacking, the file will be in the encrypted
format.

Figure 1.3: Working of the Proposed System

Department of CS&E, PESCE, Mandya 2021-2022 6


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CHAPTER 2

LITERATURE SURVEY

According to the United States National Institute of Standards and Technology( NIST) Computing in
cloud has been defined as, “ A model for enabling ubiquitous, convenient, on-demand network access
to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications and
services) that can be rapidly provisioned and released with minimal management effort or service
provider interaction.”
Following are some papers been referred to:

1. Title- Secure file storage in cloud computing using a hybrid cryptography algorithm.
Author - Punam V. Maitri, Aruna Verma, Year – 2016
Description – The paper focuses on how files are securely stored on a cloud platform. Also, it
discusses the problem of using only a single algorithm to encrypt the file and how ineffective itwill be
on the cloud. This paper splits the file into blocks and each block is encrypted using AES,Blowfish, RC6
algorithm. The key information about which file uses which algorithm is sent to the receiver using
steganography modern approach to file system integrity checking. The security of the information on
cloud relies on classical principles of availability, integrity and confidentiality though, applied to
distributed virtualize and dynamic architecture says the author.
Limitation – Using Blowfish encryption-decryption efficiency is less [1]
2. Title-Secure cloud auditing over encrypted data.
Author-Shaikh, S., & Vora, D, Year- (2016)
Description – This is Multi Encryption & Decryption algorithm where authorized user can access the
data. No other intruder gets the data, he must have to decrypt the data at each level which is a very
difficult task without a valid key. The growing competition in this next generation platform is an
upcoming concern in the area of security. Such storage in a third party cloud implies increased
vulnerability for security and confidentiality. While practices like data masking, authentication,
encryption and integrity checking have already come up in the markets, yet end-to-end security still
remains an unanswered issue. As cloud computing is at a very early stage, Mr. Shaikh states that future
technologies and modern designs pave a way for further research.
Limitation – It is time-consuming as multiple encryption and decryption take place. Secure data
sharing using cryptography in a cloud environment [2]

3. Title-Secure File Storage Using Hybrid Cryptography


Author - This paper focuses on providing the facility to securely store and share the data in a group
using cloud technology for storage.
Department of CS&E, PESCE, Mandya 2021-2022 7
Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

This paper overcomes the security tradeoff and improves the performance of datatransmission and
increases security. But concerning some business-critical requests, the administrations, specifically
huge enterprises, still would not transfer files to cloud because of secrecy and data protection issues in
cloud.
Limitation - MD5 hashes are no longer a secure way for encryption. [3]

4. Title- Enhancing Distributed Data Storage Security for Cloud Computing AES Algorithm.
Author - Tulip Dutta, Amarjyoti Pathak, Year – 2016
Description – The proposed security mechanisms will prevent confidential data from being misused
making the system more reliable. High speed: The proposed method will make encryption and
decryption with proper keys much faster than usual. This paper discusses how a secret key can be
shared with other users to whom access needs to be given. The problem with using a single key to
encrypt all data and using different keys for different files. The solution to this is using key aggregation.
In key aggregation,different data files are encrypted with different keys and then for decryption, a single
aggregatedkey is used. Satisfying confidentiality, integrity, and authenticity. [7]
Limitation – Using AES Algorithm nowadays compromises the data stored on cloud and having a
single algorithm does not completely secure the data as it will be vulnerable, attackers can easily crack
the key. Hence when it comes to efficiency it is much lesser then our proposed paper.

5. Title- Secure algorithm for cloud computing and its


applications.Author- Bhandari, A., Gupta, A., & Das, D.-2016
Description – This paper describes an approach to the integrity of files and restoring the files if any
problem is arising in the future. This proposed course uses a pattern of each protected file to determine
its modification. Methods used for pattern generation are cryptographic hash functions. This system
uses a database that stores the names of all files that are to be protected and their hash codes. To check
the integrity of the file the hash code of the file is produced and checked with one in the database.
After the file is verified then only access is granted. [8]
Limitation- Databases can degrade if they go through a large number of collisions.

Department of CS&E, PESCE, Mandya 2021-2022 8


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CHAPTER 3

SOFTWARE REQUIREMENTS
REQUIREMENTS
A System Requirements Specification (SRS) (also known as a Software Requirements Specification) is
a document or set of documentation that describes the features and behavior of a system or software
application. It includes a variety of elements that attempts to define the intended functionality required
by the customer to satisfy their different users. In addition to specifying how the system should behave,
the specification also defines at a high-level the main business process that will be supported, what
simplifying assumptions have been made and what key performance parameters will need to be met by
the system. The SRS is often referred to as the "parent" document because all subsequent project
management documents, such as design specifications, statements of work, software architecture
specifications, testing and validation plans, and documentation plans, are related to it.
System requirement plays an important part in the analysis of the system. Only when the requirement
specification is properly given, it is possible to design the appropriate system, which will fit into a pre-
defined and required environment.
The requirement specification for any system can be broadly stated as given below:
• The system should be able to interface with existing system.
• The system should be better and accurate than existing system.
• The system should be interactive so that its user should easily understand the operation.
• The system should show the appropriate message when the user finishes the operations.
Also, when there is any error condition, suitable message should be displayed. The requirement
analysis phase is for understanding the existing system, which is usually a simple activity. Recognition
of Phony Reviews in E-commerce Platform Department of CS&E, PESCE, Mandya Page 13 The goal
of this activity is to understand the requirements of the good system to be the current mode of
operation are basic requirements available for the analysis. The process of obtaining answers to
questions that might arise in an analyst’s mind continues until the analyst feels that enough
information has been obtained. It is important to note that an SRS contains functional and non-
functional requirements only.
Functional Requirement
Functional requirements in an SRS document (software requirements specification) indicate what a
software system must do and how it must function; they are product features that focus on user
needs. These are the requirements that the user specifically demands as basic facilities that the system
should offer and this segment normally comprises a hierarchical arrangement of requirements, with the

Department of CS&E, PESCE, Mandya 2021-2022 9


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

functional/business requirements at the uppermost level and the detailed system requirements are listed
as their child items. It also defines a function of a software system and how the system must behave
when presented with specific inputs or conditions. In software engineering and systems engineering, a
Functional Requirement can range from the high-level abstract statement of the sender’s necessity to
detailed mathematical functional requirement specifications. These may include calculations, data
manipulation and processing and other specific functionality. There are several methods to write
functional requirements, but the most common method is by constructing user stories.
Benefits of Functional Requirement are as follows:
• Helps us to check whether the application is providing all the functionalities that were mentioned
in the functional requirement of that application
• A functional requirement document helps you to define the functionality of a system or one of its
subsystems.
• Functional requirements along with requirement analysis help identify missing requirements.
They help clearly define the expected system service and behavior.
• Errors caught in the Functional requirement gathering stage are the cheapest to fix.
• Support user goals, tasks, or activities
Non-Functional Requirement
A non-functional requirement is a specification that describes the system’s operation capabilities and
constraints that enhance its functionality. These may be speed, security, reliability, etc., and also
defining the quality attribute of a software system, they specify the criteria that can be used to judge the
operation of a system rather than specific behaviors.
Benefits of Non Functional Requirement are as follows:
• The non-functional requirements ensure the software system follow legal and compliance rules.
• They ensure the reliability, availability, and performance of the software system
• They ensure good user experience and ease of operating the software.

HARDWARE AND SOFTWARE REQUIREMENT


The software requirement specification is produced at the culmination of the analysis task. The
function and performance allocated to software as part of system engineering are refined by
establishing a complete information description, a detailed function description, representation of
system behavior, an indication of performance requirement and design constraints appropriate
validation criteria, and other information pertinent to requirement. The introduction to software
requirements specification states the goals and objectives of the software, describing it in the context
of computer-based system. The Information Description provides a detailed description of the problem
that the software must solve. Information content, flow and structure are documented. A description of

Department of CS&E, PESCE, Mandya 2021-2022 10


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

each function required to solve the problem is presented in the Functional Description. Validation
Criteria is probably the most important and ironically the most often neglected section of the software
requirement specification. Software requirement specification can be used for different purpose.

Hardware Requirements
• Operating System: Windows, Linux, MacOS
• Memory (RAM): 4GB or more
• Disk Space: 100GB
Software Requirements
• NodeJS installed on your machine
• NodeJS is used for Server-Side development
• Cryptographic Algorithms can be imported to our project using Node Package -crypto
• XAMPP installed on your machine
• MySQL is used for our database purposes -
• Web Browser and Server

Department of CS&E, PESCE, Mandya 2021-2022 11


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CHAPTER 4

SYSTEM DESIGN

The purpose of the design phase is to plan a solution of the problem specified by the requirements
document. This phase is the first step in moving from the problem domain to the solution domain. In
other words, starting with what is needed, design takes us toward how to satisfy the needs. The design
of a system is perhaps the most critical factor affecting the quality of the software; it has a major
impact on later phases particularly testing and maintenance.

SYSTEM ARCHITECTURE

Figure 4.1: System Architecture

Department of CS&E, PESCE, Mandya 2021-2022 12


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

As above figure 4.1 shows that, first the file is going to be uploaded is converted to Base64 URL using
Base64 encoder and then fragmented into three parts which are encrypted using different AES
algorithms.
This is where we achieve three level of security. Whenever the file is being accessed, the fragmented
parts will be decrypted and reassembled to form Base64 URL. Later Base64 decoder converts this
Base64 URL to respective file format.
MODULES OF THE PROJECT

Figure 4.2: Workflow Diagram


As shown in the above figure 4.2, how the file is processed throughout is explained in as below:
Uploading a File on Cloud
• When the owner uploads a file on the cloud, the file will get encoded using base64 encoding.
• The base64 data URL (i.e., the string) will split into three parts depending upon the size of the
data URL.
• Once splited each parts will then be encrypted using three different versions of AES algorithm.
• Every part will use a different encryption algorithm namely AES-128, AES-192, AES-256.
• After the split encryption all three parts of the files are stored in AWS S3 Bucket.
Downloading a File from the Cloud
• When the user requests a file to download, first the fragmented file part is fetched from AWS
S3 Bucket.
• These 3 parts will be decrypted by the same set of algorithms using the keys sent by the
owner when requested.
• These parts will be reassembled to form a fully original base64 URL (i.e., string).
• Finally, the base64 URL will be decoded by base64 decoding and then decryption algorithms are
used.
• The decrypted file will be downloaded to the user’s device.

Department of CS&E, PESCE, Mandya 2021-2022 13


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

In software, a module is a part of program. Programs are composed of one or more independently
developed modules that are not combined until the program is linked. A single module can contain one
or several routines. Modules is a software design technique that increases the extent to which software
is composed of separate, interchangeable components called modules by breaking down program
functions into modules, each of that accomplishes one function and contains everything necessary to
accomplish. It is also called conceptually, modules enforce logical boundaries between components.
Modules are typically incorporated into the program through interfaces. The modules of the project are
as follows:
❖ User Module
❖ Server-Side Module

USER MODULE

Figure 4.3: Sender activity


The Above figure 4.3 depicts the control flow of sender. Once the sender logs in using the login
credential’s and checks for authorization, sender is allowed inside only after successful authentication.
After authorization, the user can upload files or view uploaded files. If a file access has been sent from
receiver, sender receives the file in the received files section. And sender can also view the file
contents shared by receiver, or else sender can also give file access to the receiver. The file uploaded
here will be encrypted by different AES algorithms. Once finished, the sender logs out, which marks
the end of the process.

Department of CS&E, PESCE, Mandya 2021-2022 14


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

Figure 4.4: Receiver activity


The Above figure 4.4 depicts the control flow of receiver. User logs in using the login credential’s and
checks for authorization. After authorization, the user can upload files or view uploaded files. If a file
access has been sent from Sender, receiver side receives the file in the received files section. And
receiver can view the file contents shared by sender, or else receiver can also give file access to the
sender. Once finished the receiver log’s out, which marks the end of the process.

SERVER-SIDE MODULE
ENCODING AND DECODING

Base64 is a binary-to-text encoding scheme. It represents binary data in a printable ASCII string
format by translating it into a radix-64 representation.Base64 encoding is commonly used when there
is a need to transmit binary data over media that do not correctly handle binary data and is designed to
deal with textual data belonging to the 7-bit US-ASCII charset only.
Encoding Working
Base64 encoding works with a 65-character subset of the US-ASCII charset. The first 64 characters
out of the 65-character subset are mapped to an equivalent 6-bit binary sequence ( 26 = 64 ). The extra

65th character ( = ) is used for padding.

Each of the 6-bit binary sequences from 0 to 63 are assigned a Base64 alphabet. This mapping between
the 6-bit binary sequence and the corresponding Base64 alphabet is used during the encoding process.

Department of CS&E, PESCE, Mandya 2021-2022 15


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

The Base64 encoding algorithm receives an input stream of 8-bit bytes. It processes the input from left
to right and organizes the input into 24-bit groups by concatenating three 8-bit bytes. These 24-bit
groups are then treated as 4 concatenated 6-bit groups. Finally, each 6-bit group is converted to a
single character in the Base64 alphabet by consulting the above Base64 alphabet table.
When the input has fewer than 24 bits at the end, zero bits are added (on the right) to form an integral
number of 6-bit groups. Then, one or two pad (=) characters are output depending on the following
cases
➢ The last chunk of input contains exactly 8 bits: Four zero bits are added to form two 6-bit
groups. Each 6-bit group is converted to the resulting Base64 encoded character using the
Base64 index table. After that two pad (=) characters are appended to the output.
➢ The last chunk of input contains exactly 16 bits: Two zero bits are added to form three 6-bit
groups. Each of the three 6-bit groups is converted to the corresponding Base64 alphabet. Finally
a single pad (=) character is appended to the output.
Let’s see an example to understand the Base64 encoding process:
Input: ab@yz
Binary Representation (8-bit sequences):
01100001 01100010 01000000 01111001 01111010
Step 1: Organize the input into 24-bit groups (having four 6-bit groups each). Pad with zero bits at the
end to form an integral no of 6-bit groups.
011000 010110 001001 000000 011110 010111 101000 # (padded with two zeros at the end)
Step 2: Convert the 6-bit sequences to Base64 alphabets by indexing into the Base64 index table. Add
pad character if zero bits are added at the end of the input.
The above 6-bit groups equate to the following indexes:
24 22 9 0 30 23 40
Indexing into the Base64 alphabet table gives the following output:
YWJAeXo = (padded with `=` to account for extra bits added)
Decoding Working
To decode base64, you simply have to reverse the above operation:
• First, you remove any padding characters from the end of the encoded string.
• Then, you translate each base64 character back to their six-bit binary representation.
• Finally, you divide the bits into byte-sized (eight-bit) chunks and translate the data back to its
original format.

Department of CS&E, PESCE, Mandya 2021-2022 16


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES ALGORITHMS

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. AES is
a block cipher of three types as follows:
• AES-128 Encryption
• AES-192 Encryption
• AES-256 Encryption

Number of
Key Length Block Size
Algorithms Rounds
(Nk words) (Nb words)
(Nr)

AES-128 4 4 10

AES-192 6 4 12

AES-256 8 4 14

Figure 4.6: Information of different algorithms used

The above table 4.6 differentiates different AES algorithms. The key size can be 128/192/256 bits
which encrypts the data in blocks of 128 bits each. AES algorithms is based on a substitution-
permutation network, also known as an SP network. It consists of a series of linked operations,
including replacing inputs with specific outputs (substitutions) and others involving bit shuffling
(permutations). The key features of AES algorithms are as follows:
• SP Network: It works on an SP network structure rather than a Feistel cipher structure, as seen in
the case of the DES algorithm.
• Key Expansion: It takes a single key up during the first stage, which is later expanded to multiple
keys used in individual rounds.
• Byte Data: The AES encryption algorithm does operations on byte data instead of bit data. So it
treats the 128-bit block size as 16 bytes during the encryption procedure.
• Key Length: The number of rounds to be carried out depends on the length of the key being used
to encrypt data. The 128-bit key size has ten rounds, the 192-bit key size has 12 rounds, and the
256-bit key size has 14 rounds.

Department of CS&E, PESCE, Mandya 2021-2022 17


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES ENCRYPTION
AES-128 WORKING

• The encryption standard used in here is AES (Advanced Encryption Standard)-128.


• AES-128 is based on a design principle known as a substitution-permutation network.
• XOR transformation is done between the plaintext and cipher key at the pre-round
transformation
• Depending upon the number of bits, the number of cycles of repetition or round varies,
with 10 cycles for 128-bit keys.
• In each round, 4 transformations are done, namely, substitution, transposition, substitution and
XOR transformation.
• The output of AES is a 128-bit (depending upon the input plaintext) cipher text.

AES-128 ALGORITHM
Step 1: Derive the set of round keys from the cipher key.
Step 2: Initialize the state array with the block data (plaintext).
Step 3: Add the initial round key to the starting state array.
Step 4: Perform nine rounds of state manipulation, here each round comprises of 4 steps which are
SubBytes, ShiftRows, MixColumns, Add Round Key.
Step 5: Perform the tenth and final round of state manipulation, this round comprises of only 3 steps
except MixColumns.
Step 6: Copy the final state array out as the encrypted data (cipher text).

Department of CS&E, PESCE, Mandya 2021-2022 18


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES-192 WORKING

• The encryption standard used in here is AES (Advanced Encryption Standard)-192.


• AES-192 is based on a design principle known as a substitution-permutation network.
• XOR transformation is done between the plaintext and cipher key at the pre-round
transformation
• Depending upon the number of bits, the number of cycles of repetition or round varies,
with 12 cycles for 192-bit keys.
• In each round, 4 transformations are done, namely, substitution, transposition, substitution and
XOR transformation.
• The output of AES is a 192-bit (depending upon the input plaintext) cipher text.

AES-192 ALGORITHM
Step 1: Derive the set of round keys from the cipher key.
Step 2: Initialize the state array with the block data (plaintext).
Step 3: Add the initial round key to the starting state array.
Step 4: Perform eleven rounds of state manipulation, here each round comprises of 4 steps which are
SubBytes, ShiftRows, MixColumns, Add Round Key.
Step 5: Perform the twelve and final round of state manipulation, this round comprises of only 3 steps
except MixColumns.
Step 6: Copy the final state array out as the encrypted data (cipher text).

Department of CS&E, PESCE, Mandya 2021-2022 19


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES-256 WORKING

• The encryption standard used in here is AES (Advanced Encryption Standard)-256.


• AES-256 is based on a design principle known as a substitution-permutation network.
• XOR transformation is done between the plaintext and cipher key at the pre-round
transformation
• Depending upon the number of bits, the number of cycles of repetition or round varies,
with 14 cycles for 256-bit keys.
• In each round, 4 transformations are done, namely, substitution, transposition, substitution and
XOR transformation.
• The output of AES is a 256-bit (depending upon the input plaintext) cipher text.

AES-256 ALGORITHM
Step 1: Derive the set of round keys from the cipher key.
Step 2: Initialize the state array with the block data (plaintext).
Step 3: Add the initial round key to the starting state array.
Step 4: Perform thirteen rounds of state manipulation, here each round comprises of 4 steps which are
SubBytes, ShiftRows, MixColumns, Add Round Key.
Step 5: Perform the fourteen and final round of state manipulation, this round comprises of only 3
steps except MixColumns.
Step 6: Copy the final state array out as the encrypted data (cipher text).

Department of CS&E, PESCE, Mandya 2021-2022 20


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

DECRYPTING ALGORITHMS
The stages in the encryption rounds can be easily undone as these decryption stages have an opposite
to it which when performed reverts the changes. Each 128 blocks goes through the 10,12 or 14 rounds
depending on the key size. The AES decrypting algorithms are as follows:
• AES-128 Decryption
• AES-192 Decryption
• AES-256 Decryption
AES-128 DECRYPTION

• The decryption standard used in here is AES (Advanced Encryption Standard)-128.


• AES-128 is based on a design principle known as a substitution-permutation network.
• XOR transformation is done between the cipher-text and cipher key at the pre-round
transformation
• Depending upon the number of bits, the number of cycles of repetition or round varies,
with 10 cycles for 128-bit keys.
• In each round, 4 transformations are done, namely, substitution, transposition, substitution and
XOR transformation.
• The output of AES Decryption is a 128-bit plain text.

Department of CS&E, PESCE, Mandya 2021-2022 21


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES-128 ALGORITHM
Step 1: Derive the set of round keys from the cipher key.
Step 2: Initialize the state array with the block data (cipher-text).
Step 3: Add the initial round key to the starting state array.
Step 4: Perform nine rounds of state manipulation, here each round comprises of 4 steps which are
Inverse SubBytes, ShiftRows, Inverse MixColumns, Add Round Key.
Step 5: Perform the tenth and final round of state manipulation.
Step 6: Copy the final state array out as the decrypted data (plain text).

AES-192 DECRYPTION

• The decryption standard used in here is AES (Advanced Encryption Standard)-192.


• AES-192 is based on a design principle known as a substitution-permutation network.
• XOR transformation is done between the cipher-text and cipher key at the pre-round
transformation
• Depending upon the number of bits, the number of cycles of repetition or round varies,
with 12 cycles for 192-bit keys.
• In each round, 4 transformations are done, namely, substitution, transposition, substitution and
XOR transformation.
• The output of AES Decryption is a 128-bit plain text.

Department of CS&E, PESCE, Mandya 2021-2022 22


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES-192 ALGORITHM
Step 1: Derive the set of round keys from the cipher key.
Step 2: Initialize the state array with the block data (cipher-text).
Step 3: Add the initial round key to the starting state array.
Step 4: Perform eleven rounds of state manipulation, here each round comprises of 4 steps which are
Inverse SubBytes, ShiftRows, Inverse MixColumns, Add Round Key.
Step 5: Perform the twelve and final round of state manipulation.
Step 6: Copy the final state array out as the decrypted data (plain text).

AES-256 DECRYPTION

• The decryption standard used in here is AES (Advanced Encryption Standard)-256.


• AES-256 is based on a design principle known as a substitution-permutation network.
• XOR transformation is done between the cipher-text and cipher key at the pre-round
transformation
• Depending upon the number of bits, the number of cycles of repetition or round varies, with 14
cycles for 256-bit keys.
• In each round, 4 transformations are done, namely, substitution, transposition, substitution and
XOR transformation.
• The output of AES Decryption is a 128-bit plain text.

Department of CS&E, PESCE, Mandya 2021-2022 23


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

AES-256 ALGORITHM
Step 1: Derive the set of round keys from the cipher key.
Step 2: Initialize the state array with the block data (cipher-text).
Step 3: Add the initial round key to the starting state array.
Step 4: Perform thirteen rounds of state manipulation, here each round comprises of 4 steps which are
Inverse SubBytes, ShiftRows, Inverse MixColumns, Add Round Key.
Step 5: Perform the fourteen and final round of state manipulation.
Step 6: Copy the final state array out as the decrypted data (plain text).

Department of CS&E, PESCE, Mandya 2021-2022 24


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CHAPTER 5

IMPLEMENTATION

USER MODULES
Use Case Diagram:

A use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram defined
by and created from a Use-case analysis. Its purpose is to present a graphical overview of the
functionality provided by a system in terms of actors, their goals (represented as use cases), and any
dependencies between those use cases.
The main purpose of a use case diagram is to show what system functions are performed for which
actor.
Use cases:
A use case describes a sequence of actions that provide something of measurable value to an actor and
is drawn as a horizontal ellipse.
Actors:
An actor is a person, organization, or external system that plays a role in one or more interactions with
the system.
System boundary boxes:
A rectangle is drawn around the use cases, called the system boundary box, to indicate the scope of
system. Anything within the box represents functionality that is in scope and anything outside the box
is not.

Figure 5.1: Usecase Diagram


Department of CS&E, PESCE, Mandya 2021-2022 25
Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

As per the above figure 5.1 Use-case diagram, the user is considered as an actor, who enjoys the
benefit of different Use Cases mentioned in the horizonatal ellipse. Such as he has the authority to
upload the file document of any format and share it with the respective user. Here the file which was
uploaded is encrypted using different versions of AES algorithms. If a receiver wishes to access the
file, the file will get decrypted and downloaded.
Class Diagram:
In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static
structure diagram that describes the structure of a system by showing the system's classes, their
attributes, operations (or methods), and the relationships among the classes. It explains which class
contains information.

Figure 5.2: Class Diagram of User


As shown in the above class diagram of figure 5.2, the User itself will be a class diagram here and
makes use of the benefits mentioned as functions. The function uploadFile() functions depicts the user
uploading a file, encrypt() and decrypt() functions depicts encrypting and decrypting the files,
shareFile() and ReceiveFile() depicts the sender and receiver side users granting and accessing the file
document.
Sequence Diagram:
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that shows
how processes operate with one another and in what order. It is a construct of a Message Sequence
Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and timing diagrams.
A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live
simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in
which they occur. This allows the specification of simple runtime scenarios in a graphical manner.
In general they are interaction diagrams that detail how operations are carried out. In which they
capture the interaction between objects in the context of a collaboration. It is of high-level interactions
between user of the system and the system, between the system and other systems, or between
subsystems

Department of CS&E, PESCE, Mandya 2021-2022 26


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

Figure 5.3: Sequence Diagram of User

The schema 5.3 diagram shown above in the figure gives in depth details of our project. Once the user
logs in, he/she starts his activity by uploading the file which user wishes to store it for his/her activity
in the future. During the uploading process the file which was selected by the user to upload in order to
store it on the cloud is fragmented in to equal sized parts which will get encrypted by different versions
of AES algorithms accordingly. Here each algorithm of AES will bring in a unique kind of security to
the parts of file which will ensure highest form security. Whatsoever be the format of the file, which
are Audio, video, text document etc.
After the user uploads the file document, the sender wishes to send the encrypted file to whomsoever
by giving the access to the receiver. Now in the same way the sender initially logged in, the receiver
needs to log in. And after authentication, the receiver will be able to get the access to his profile where
he can download the file which was sent by the sender. If the receiver wishes to download the file
document, the file which was encrypted will be decrypted back to the original file format.
Activity Diagram:
Activity diagram is another important diagram in UML to describe the dynamic aspects of the system.
It is basically a flowchart to represent the flow from one activity to another activity. The activity can
be described as an operation of the system. Generally they are graphical representations of workflows
of stepwise activities and actions with support for choice, iteration and concurrency. In the Unified
Modeling Language, activity diagrams can be used to describe the business and operational step-by-
step workflows of components in a system. An activity diagram shows the overall flow of control. A
small filled circle followed by an arrow represents the initial action state or the start point for any
activity diagram. Action flows, also called edges and paths, illustrate the transitions from one action
state to another. They are usually drawn with an arrowed line.

Department of CS&E, PESCE, Mandya 2021-2022 27


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

Figure 5.4: Activity Diagram of User

The activity diagram shown above in the figure 5.4, depicts the entire work-flow of the user accessing
and granting the file document, starting from uploading and giving access to whomever the sender is
interested to share the file by giving the file access to the recipient. Whenever the sender uploads the
file, the file will get encrypted. If the receiver wishes to download the file which is shared by the
sender, the file which was encrypted when uploading will now be decrypted. Now the receiver will
download the file document. Here the file document can be of any format, which can be comma-
separated values (.csv), ascii text (.txt), Microsoft Excel (.xlsx), JPEG (.jpg), Audio-Video, PNG
(.png), JPG (.jpg) etc.

Department of CS&E, PESCE, Mandya 2021-2022 28


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

SCHEMA DIAGRAM
The design of the database is called a schema. This tells us about the structural view of the database.
It gives us an overall description of the database. A database schema defines how the data is
organized using the schema diagram. A schema diagram is a diagram which contains entities and the
attributes that will define that schema. A schema diagram only shows us the database design. It does
not show the actual data of the database. Schema can be a single table or it can have more than one
table which is related. The schema represents the relationship between these tables.

Figure 5.5: Schema Diagram of mydb database


Schema diagram of mydb database is as shown above in the figure 5.5. The three entities which are
involved here are Users, Share, and Information. Here the Users entity has ID as a primary key which
is used for identifying the tuple uniquely. Similarly Share entity and information entity has their ID for
identification purposes. Where Share entity referencing the ID of Users and Information as foreign
keys. Users entity has one-to-many relationship with both Share and Information, where Information
entity has many-to-many relationaship with the Share entity.

Department of CS&E, PESCE, Mandya 2021-2022 29


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

STORAGE STRUCTURE

Table 1 – Users - this table is used to store Users details.

Table 2 – Share - this table is used to store user’s access to file details.

Table 3 – Information - this table is used to store shared file details.

Department of CS&E, PESCE, Mandya 2021-2022 30


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

SERVER-SIDE MODULE
ENCODING INTO BASE64
const file = document.getElementById('myfile').files[0];
var reader = new FileReader();
var result = '' '';
let resultBase64 = '' '';
let substrings;
reader.readAsDataURL(file);
Using the pre-defined function FileReader(), the file (any format) is first loaded and using
readAsDataURL() function the file is encoded into Base64 URL .

FRAGMENTING THE BASE64 URL (3 EQUAL FRAGMENTS)


var data1 = base64.slice(0,base64.length/3);
var data2 = base64.slice(base64.length/3,2*base64.length/3);
var data3 = base64.slice(2*base64.length/3,base64.length)
The encoded base64 URL is now divided into three equal fragments, considering the original length of
the same.

ENCRYPTING THE BASE64 URL


AES-128 Encryption
const encryptAES2 = (buffer) => {
const algorithmAES2 = 'aes-128-cbc';
let iv = crypto.randomBytes(16);
let keyAES2 = crypto.randomBytes(16)
const cipher = crypto.createCipheriv(algorithmAES2,keyAES2,iv);
const result = Buffer.concat([iv, cipher.update(buffer),cipher.final()])
return result;
}

AES-192 Encryption
const encryptAES3 = (buffer) => {
let iv = crypto.randomBytes(16);
let keyAES3 = crypto.randomBytes(24)
const algorithmAES3 = 'aes-192-cbc';
const cipher = crypto.createCipheriv(algorithmAES3,keyAES3,iv);
const result = Buffer.concat([iv, cipher.update(buffer),cipher.final()])

Department of CS&E, PESCE, Mandya 2021-2022 31


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

return result; }

AES-256 Encryption
const encryptAES = (buffer) => {
const algorithmAES = 'aes-256-cbc';
let iv = crypto.randomBytes(16);
let keyAES = crypto.randomBytes(32)
const cipher = crypto.createCipheriv(algorithmAES,keyAES,iv);
const result = Buffer.concat([iv, cipher.update(buffer), cipher.final()])
return result;
}

In the above step, the base64 URL is divided into three fragments. Each fragments are encrypted using
different encryption techniques. The first fragment undergoes AES-128 encryption, the second
fragment undergoes AES-192 encryption, and the third fragments undergoes AES-256 encryption.
The encryption techniques are different, but the method followed are similar in all three techniques.
Firstly the fragment is stored into the buffer, iv is used to ensure additional security and it is of 16
bytes in length.
Now the fragment which is stored in the buffer is encrypted using creatCipheriv() function
considering algorithmAES(1,2,3 respectively), keyAES, iv as a parameters.
Then the ciphertext is concatenated with iv and further it is used in decryption process.

DECRYPTING THE BASE64 URL


AES-128 Decryption
const decryptAES2 = (encrypted,key) => {
let iv = encrypted.slice(0,16)
encrypted = encrypted.slice(16)
const decipher = crypto.createDecipheriv(algorithmAES2,key,iv);
const result = Buffer.concat([decipher.update(encrypted),decipher.final()])
return result;
}

AES-192 Decryption
const decryptAES3 = (encrypted,key) => {
let iv = encrypted.slice(0,16)
encrypted = encrypted.slice(16)
const decipher = crypto.createDecipheriv(algorithmAES3,key,iv);

Department of CS&E, PESCE, Mandya 2021-2022 32


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

const result = Buffer.concat([decipher.update(encrypted),decipher.final()])


return result;
}
AES-256 Decryption
const decryptAES = (encrypted,key) => {
let iv = encrypted.slice(0,16)
encrypted = encrypted.slice(16)
const decipher = crypto.createDecipheriv(algorithmAES,key,iv);
const result = Buffer.concat([decipher.update(encrypted), decipher.final()])
return result;
}
The cipher text which was present in the earlier step is now ready for decryption if and only if user
wants to download the shared file.
In the present step, the encrypted text and the key are sent to decryptAES function from the database,
the iv which was concatenated in the encryption stage is now sliced using the function slice which will
be of 16 bytes of length and hence the original string can be obtained by using the function
createDecipheriv() by considering algorithmAES(1,2,3 respectively),key, and iv.
The benefit of concatenating the iv in encryption stage can be clearly understood in this step. The iv
which was concatenated(16 bytes length) is sliced(16 bytes length) and the same is used in the
decryption process.

Concatenating and Decoding the decrypted fragments


base64Url = beforeBase64 + ',' + decryptedAES + decryptedAES2 + decryptedAES3;
filename = name;
The decrypted fragments are to be concatenated in this step to obtain the original base64 URL.
Here we also concatenate the MIME type to know the file format.

Department of CS&E, PESCE, Mandya 2021-2022 33


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CHAPTER 6

TESTING

TYPES OF TESTING
In software testing we follow three steps for testing namely unit testing, integration testing and
validation testing.

UNIT TESTING
In this testing we test each module individually. Unit testing focuses on the verification of the
smallest units of the software design in module. In computer programming, unit testing is a method by
which individual units of source code, sets of one or more computer program modules together with
associated control data, usage procedures, and operating procedures, are tested to determine if they are
fit for use.

INTEGRATION TESTING
Integration testing is a systematic technique of constructing the program structure. Integration
testing is the phase in software testing in which individual software modules are combined and tested
as a group. It occurs after unit testing and before validation testing. Integration testing takes as its input
modules that have been unit tested, groups them in larger aggregates, applies tests defined in an
integration test plan to those aggregates, and delivers as its output the integrated system ready for
system testing.

VALIDATION TESTING
Verification and Validation testing are two important tests, that are carried out on software. It
is to ensure that the software is working as per the requirements and no error is produced, it is the final
step in the process of testing.

TEST CASE SUMMARY


The below table 6.1 shows the test run execution progress at real time. It provide a test run summary
for individual test suite with test case result.
Test cases have a few integral parts that should always be present in fields. However, every test case
case can be broken down into 5 basic steps.
1. Test Case ID
2. Description
3. Expected Result
4. Actual Result
5. Status

Department of CS&E, PESCE, Mandya 2021-2022 34


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

Test Description Expected Result Actual Status


Case ID Result

1. Home page Proceeds to the Same as the PASS


login page expected
result

2. Entering a username but not Alert the user of Same as the PASS
password empty field expected
output

3. Entering a wrong password Alert the user of Same as the PASS


empty field expected
output

4. Entering the right username but A prompt to alert user Same as the PASS
wrong password that wrong password expected
output
has
been entered

5. Entering the wrong username but A prompt to alert user Same as the PASS
right password that wrong username expected
output
has
been entered

6. Login button Proceeds to the Same as the PASS


Menu page Expected
output

Figure 6.1: Test Case Summary

Department of CS&E, PESCE, Mandya 2021-2022 35


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

CONCLUSION

Since the introduction of a technology like cloud computing and the fast pace developments happening
somewhat regularly, storing data using cloud storage has become more prone to data theft,
unauthorized access, DoS attacks etc. As most of the organizations are using cloud computing as a data
storage medium which can easily be accessed by cyber criminals as the existing cryptographic
algorithms have single level encryption. But, here in the proposed model, an efficient framework for
fragmentation and security is proposed it provides three-level encryption which isn’t easy to crack as
an unauthorized user would need the encryption keys in order to view or obtain data which would
automatically become a difficult task to accomplish without a valid key.
As it provides three levels of security to the information being uploaded. The intruders cannot easily
break the system. Even if they realize the existence of a data they cannot easily recognize the data,
since data is encrypted in three ways. This system overcomes the demerits of using single level of
encryption.
In terms of algorithms, the abbreviation of AES is Advanced Encryption Standard, as the abbreviation
itself says it is one of the advanced encryption in use. Using a single AES algorithm itself takes many
years to decrypt. As our proposed system uses three encryption algorithms it will put our security
mechanism to a level higher which can never be decrypted in the near future.

Department of CS&E, PESCE, Mandya 2021-2022 36


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

REFERENCES

[1] Maitri, P. V., & Verma, A. (2016). Secure file storage in cloud computing using a hybrid
cryptography algorithm. 2016 International Conference on Wireless Communications, Signal
Processing and Networking.

[2] Shaikh, S., & Vora, D. (2016). Secure cloud auditing over encrypted data. International Conference
on Communication and Electronics Systems (ICCES).

[3] Ronak Karani, TejasChoudhari, Anindita Bhajan, Madhu Nashipudimath (2020). Secure File
Storage Using Hybrid Cryptography, International Journal of Innovative Research in Technology.

[4] Heqing Song, Jifei Li, Haoteng Li (2021). A Cloud Secure Storage Mechanism Based on Data
Dispersion and Encryption, IEEE Access Vol 9.

[5] Peterson, Dawn Song. 2011. Remote data checking using provable data possession. ACM
Transactionson Information and System Security (TISSEC) 14, 1, 12.

[6] Jasleen K., S.Garg ,“Security in Cloud Computing using Hybrid of Algorithms ”, IJERJS, Vol 3,
Issue 5, ISSN 2091-2730, September-October, 2015.

[7] Shimbre, N., & Deshpande, P. (2015). Enhancing Distributed Data Storage Security for Cloud
Computing Using TPA and AES Algorithm. 2015 International Conference on Computing
Communication Control and Automation.

[8] Bhandari, A., Gupta, A., & Das, D. (2016). Secure algorithm for cloud computing and its
applications. 2016 6th International Conference - Cloud System and Big Data Engineering
(Confluence)

Department of CS&E, PESCE, Mandya 2021-2022 37


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

APPENDIX A – SNAPSHOTS

Snapshot 1: Login Page

Snapshot 2: Registration Page

Department of CS&E, PESCE, Mandya 2021-2022 38


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

Snapshot 3: Upload Files

Snapshot 4: Received Files

Department of CS&E, PESCE, Mandya 2021-2022 39


Fragmentation and Encryption of Files to Avoid Data Breaching in Cloud

Snapshot 5: Uploaded Files

Snapshot 6: User View

Department of CS&E, PESCE, Mandya 2021-2022 40

You might also like