Attribute based re encryption
Attribute based re encryption
6138-6150
© Research India Publications. http://www.ripublication.com
6138
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
C. Public Key Cryptography patients’ PHR data. To reduce the key distribution complexity,
the system was divided into multiple security domains, where
Public key encryption [11] uses a pair of keys: a public key that
each domain manages only a subset of the users. In this way,
is sent along with the message and a private key which is always
each patient has full control over his/ her own privacy, and key
in the possession of the recipient. The private key is based on a
management complexity is reduced dramatically. For example,
derivative of the public key and only these two keys working
if owner of the data (patient) provides access to a Doctor,
together can decrypt the data. Because the private key is never
DeptAdultCardiology in a health centre, the access structure
sent across the network, it remains secure. The down side of
will be defined by the owner as shown in the Figure 1. Further if
public key encryption is that it tends to be very slow and
the patient allows surgeon to access record, the existing access
resource intensive. This makes it difficult to send large amounts
tree can be extended for surgeon too as shown in Figure 2.
of data using public key encryption. Public key cryptography is
more suitable only when there is one sender and one receiver.
6139
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
computing scenarios for PHR. CP-ABSC combines the merits The drawback of PRE is that each of the user is provided with
of digital signature and encryption to provide confidentiality, separate key which may cause burden to the user.
authenticity, Unforgeability, anonymity and collusion
resistance. The correctness, security and efficiency of this
scheme are also proven. It avoids collusion if attributes of two D. Time-Based Proxy Re-Encryption Scheme for Secure Data
different users are combined together to access data as shown in Sharing in a Cloud Environment
Figure 3. The problem with ABE scheme is the encryptor
A fundamental approach [4] for secure data sharing in a cloud is
cannot decide who can decrypt the encrypted data. It can only
to let the data owner encrypt data before out-sourcing. To
choose descriptive attributes for the data; it is not suitable in
simultaneously achieve fine-grained access control on
some application because a data owner has to trust the key
encrypted data and scalable user revocation, existing work
issuer.
combines Attribute Based Encryption (ABE) and Proxy
Re-Encryption (PRE) to delegate the Cloud Service Provider
(CSP) to execute re-encryption. However, the data owner
should be online in order to send the PRE keys to the CSP in a
timely fashion, to prevent the revoked user from accessing the
future data. The delay of issuing the PRE keys may cause
potential security risks. Time-based Proxy Re-Encryption
(TimePRE) scheme was proposed to allow a users’ access right
to expire automatically after a predetermined period of time. In
this case, the data owner can be offline in the process of user
revocations. The basic idea is to incorporate the concept of time
into the combination of ABE and PRE. Specifically, each data
is associated with an attribute-based access structure and an
access time, and each user is identified by a set of attributes and
a set of eligible time periods which denote the period of validity
of the user’s access right.
Figure 3. Fine Grained Access Control ABE structure The notations sa(y), sa(y, m) and sa(y, m, d) are represented to
denote PRE keys on attribute 'a' in time (y), (y, m), and (y, m, d),
which can be used to update attribute a’s initial public key PKa
C. A Platform for Secure Monitoring and Sharing of Generic to time-based public keys PKa(y), PKa(y, m) and PKa(y, m, d)
Health Data in the Cloud respectively. Since the PRE key is derived from a root secret
key 's' and the current access time 't' as represented in Figure 4.
Proxy Re-Encryption is based on the concept of a semi-trusted For each attribute 'a', the CSP can use the root secret key 's' and
proxy that uses a re-encryption key to translate a cipher-text the time tree to hierarchically calculate the time-based PRE
under the data owner’s public key into another cipher text that keys. Each user is granted with a set of Time-based User
can be decrypted by another user’s private key [3]. The data is Attribute Secret Keys (UAK). Each time-based UAK is
never decrypted before it is re-encrypted hence the proxy will associated with a user, an attribute, and an effective time period.
never be able to reveal the plaintext at any time. Many recent If user 'u' is eligible for attribute 'a' in day (y, m, d), the data
works have realised proxy re-encryption as a technique to owner first uses the root secret key 's' to obtain day-based
enable data sharing in the cloud. Although the proxy attribute public key PKa(y, m, d) from initial attribute public key
re-encryption was not explicitly used, the system mimics a PKa and then uses PKa(y, m, d) to generate a day-based UAK
proxy re-encryption (PRE) algorithm scheme from the point of SKu,a (y, m, d) for user 'u'. The same situation holds for the case
view of the data owner and user. Re-Encryption of original that user 'u' is eligible for attribute 'a' in a month (y, m) or a year
cipher text is done with the help of semi-trusted third party (y). The drawback of Time-based PRE is that same access time
(proxy server). Here, encrypted data which is already done by is provided for all the attributes associated with particular user.
the owner provided to the proxy server, proxy server will
re-encrypt that file without knowing the plain text and user can
decrypt without sharing his/ her secret key to the proxy server.
6140
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
E. Attribute Based Data Sharing with Attribute Revocation proposed a proxy re-encryption; where owner encrypts with
symmetric content key blocks of data before sending it to cloud
Cipher text-Policy Attribute Based Encryption (CP-ABE) is a
servers. Content keys were encrypted with the owner’s master
promising cryptographic primitive for fine-grained access
public key. Owner’s master private key and user’s public keys
control of shared data. In CP-ABE, each user is associated with
are then combined to generate proxy re-encryption keys which
a set of attributes and data are encrypted with access structures
are used to recover plain text intended to a specific user.
on attributes. A user is able to decrypt a cipher text if and only if
his/her attributes satisfy the cipher text access structure. They
achieve this by uniquely integrating the technique of proxy
G. Security of Key in Cloud using Cryptography
re-encryption with CP-ABE [5, 6], and enable the authority to
delegate most of laborious tasks to proxy servers. This To construct a secure cloud computing system, security at
technique can also be applicable to the Key-Policy Attribute infrastructure, service platforms and application software levels
Based Encryption (KP-ABE) counterpart. Data owner will have to be studied. Information encryption is one of the
generate the root secret key and the user secret key by the use of effective means to achieve cloud computing information
universal attributes along with security parameters. Then owner security. Traditionally, information encryption focuses on
encrypts his/her data with public key and access structure and specified stages and operations, such as data encryption. For
those encrypted data will fed to the CSP. Whenever there is a cloud computing, a system level design has to be implemented.
request for accessing particular data, CSP will re-encrypt those Crypto cloud computing is a new secure cloud computing
data with effective time period. Meanwhile UAKs for that architecture. It can provide protection of information security at
particular user will be generated with attributes and the access the system level, and allows users to access shared services
time. The user will use UAKs to decrypt the re-encrypted data. conveniently and accurately. Crypto cloud computing protects
The downside of this method is generating UAKs for every individuals connections with the outside world. It can protect
attribute may affect the Key Management System. Having the personal privacy without any delay of information
discussed about related research work in securing cloud exchange. Crypto cloud computing is based on the Quantum
environment, the motivation and objective is described below. Direct Key system (QDK). Quantum Direct Key is a set of
advanced asymmetric offline key mechanism [7]. All entities
get public and private key pair according to their ID. Each
F. Improved Proxy Re-Encryption schemes with Applications entity only holds its own private key, but has a public key
to Secure Distributed Storage generator to generate any public key. In this system, an entity
can produce the public key of any other entities offline, no
A malicious user or operator can identify and exploit the
third-party agency is necessary. Crypto cloud computing
vulnerabilities of the system. Numerous works are being done
architecture is based on QDK, it can avoid network traffic
in order to reinforce the cloud capacities in term of protecting
congestion, and other drawbacks using current encryption
data and managing access control using cryptography, data
system. In the crypto cloud computing system, each entity
fragmentation and access control policies [6]. A new approach
encrypts data using their own private key. All elements in the
was proposed by authors in which the cloud provider is
system such as cloud computing infrastructure units, platform,
excluded from any involvement in the access management with
virtualization tools and all involved entities have their own
the aim of minimizing the leaks. Authors developed and tested
keys. While fulfilling their own functions of information
programs based on a capability-list and using both symmetric
exchange and processing, all these elements will use the public
and asymmetric cryptography. Protecting and managing access
key and private key to perform authentication first. All events
control to outsourced data has been the main issue. The authors
6141
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
occurring in cloud environment are assigned with a unique key. of effective time periods that denotes how long the user is
Thus, crypto cloud system assures the security and credibility of eligible for these attributes, i.e., the period of validity of the
information exchange. Having discussed about related research users’ access right. The data accessed by the user is associated
work in securing cloud environment, the motivation and with an attribute-based access structure and an access time. The
objective is described below. access structure is specified by the data owner, but the access
time is updated by the CSP with the time of receiving an access
The motivation of this research work includes the following. In
request. The data can be recovered only by the user whose
order to provide data access to the health record stored in the
attribute’s satisfies the access structure and whose access right’s
cloud, Symmetric Key Cryptography (SKC) is not appropriate
are effective in the access time. To enable the CSP to update the
[7]. In SKC single secret key will be shared to group of users. If
access time automatically, we first express actual time as a time
the user leaves the group, secret key needs to be changed every
tree. The height of the time tree can be changed as required. For
time and encryption has to be done. In order to provide a
ease of presentation, time is accurate to the day, and the time
scalable user revocation scheme, Proxy Re-Encryption (PRE)
tree is classified into three layers in order: year, month, and day.
was used in literature. This PRE can be combined with Attribute
Notations used for particular day, month and year are (y, m, d),
Based Encryption (ABE) for secure data access. Time Based
(y, m) and (y) respectively. For example, (2017, 4, 5) denotes
Proxy Re-encryption was used to provide access to users on
April 5, 2017. The access time associated with data corresponds
time basis and also to resolve user revocation issue. In the
to a leaf node in the time tree and the effective time periods
existing Time based PRE scheme, User Attributes secret Keys
associated with a user correspond to a set of nodes in the time
(UAKs) were generated for each and every attribute in Access
tree as depicted in Figure 4. If there is a node corresponding to
Structure (Access Policy), where here number of UAKs
an effective time period that is an ancestor of (or the same as)
generated for a single user will be many in number. This creates
the node corresponding to the access time, then the users’
burden to the proxy server.
access right is effective in the access time.
6142
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
A. Key Generation the proxy, but this requires an unrealistic level of trust in the
proxy. The primary advantage of this schemes is that they are
The data owner takes a sufficiently large security parameter K
unidirectional (i.e., owner can delegate to users without users
as input to generate the system public key PK, the system master
having to delegate to owner) and do not require delegators to
key MK, and the root secret keys. The system public key will be
reveal all of their secret key to anyone or even interact with the
published, the system master key will be kept secret, and the
delegate in order to allow a proxy to re-encrypt their cipher
root secret key will be sent to the CSP.
texts. In this scheme, only a limited amount of trust is placed in
the proxy. For example, proxy could not decrypt the cipher text,
that is re-encrypted by proxy itself and this scheme is secure
B. UIK and UAK generation
even when the proxy publishes all the re-encryption information
Suppose that user ‘u’ with public key PKu is eligible for it knows. This enables number of applications that would not be
attribute ‘a’ and his/her access right is effective in time Tu. The practical if the proxy needed to be fully trusted.
data owner uses the system public key PK, the system master
key MK, the root secret key s, user public key PKu, attribute ‘a’,
and effective time period Tu to generates user identity secret key D. Encryption
(UIK) SKu and time-based user attribute secret key (UAK) SKu,
Cloud encryption is the transformation of a cloud service
aTu for user ‘u’.
customer’s data into cipher text. Cloud encryption is almost
identical to in-house encryption with one important difference
here is, the cloud customer must take time to learn about the
C. Proxy Setup
provider’s policies and procedures for encryption and
Proxy re-encryption [6] allows a proxy to transform a cipher encryption key management. The cloud encryption capabilities
text computed under owner’s public key into one that can be of the service provider need to match the level of sensitivity of
opened by users' secret key. There are many useful applications the data being hosted.
of this primitive. For instance, owner might wish to temporarily
forward encrypted email to his/her colleague, without giving
his/her secret key. In this case, owner as a delegator could Encryption by Owner.
designate a proxy to re-encrypt his/ her incoming mail into a
The data owner takes a Disjunctive Normal Form (DNF) access
format that users the delegate can decrypt using his/ her own
structure ‘A’, a data ‘F’, and system public key PK, e.g., initial
secret key. Clearly, owner could provide his/ her secret key to
6143
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
public keys of all attributes in the access structure PKa as inputs make sure their Nextcloud instance enforces these rules. File
to output a cipher text CA. Access Control can play a crucial role in enforcing company
policy on data sharing.
6144
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
For example, we can encrypt a cipher text such that in a 4. Emergency Doctors
company it can only be decrypted by a person with attributes
5. Immunologist
such as Senior and Human Resources or has the attribute
Executive. One interesting application of this tool is that we can 6. Infectious Disease Specialist
do Role-Based Access Control (RBAC) without requiring
7. Microbiologist
trusted data storage. The toolkit provides four command line
tools used to perform the various operations of the scheme. 8. Nurse
They are designed for straightforward invocation by larger
9. Surgeon
systems in addition to manual usage.
In this case study on Diabetic patient, patients can be
categorized as In-patient, Out-Patient and Emergency Patient as
cpabe-setup generates a public key and a master secret key. shown in the Figures 6 to 8. Each of them is provided with
different attributes and access structure as discussed in the
cpabe-keygen generates a private key with a given set of
following sections.
attributes.
cpabe-enc encrypts a file according to a policy, which is an
expression in terms of attributes. A. In-Patient
cpabe-dec decrypts a file using a private key. In-patient can be admitted for a long time, so the access time for
the attributes will slightly vary when compare to the others. In
Figure 6 Surgeon will do the surgery for patient along with the
CASE STUDY ON DIABETICS PATIENTS Anesthesiologist, so they are provided with same access time.
Access time for general physician is varying from surgeon,
There may be chance of having many numbers of persons
anesthesiologist and nurse, since they all have only a specific
involved in treating a patient. Each person is considered as an
time treating a patient with respect to the operation done for a
attribute. Consider a case study on treating Diabetic patients,
patient, rather than general check-up for a whole year as the
the possible list of persons (attributes) involved in treating a
access time for general physician. The access policy for an
patient are as listed below.
In-Patient is given below with respect to access structure in
1. General Physician Figure 6.
2. Endocrinologist
3. Anesthesiologist [(General Physician AND Endocrinologist)] OR [(Surgeon
AND Anathesian) OR (Immunologist OR Nurse)]
6145
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
B. Out-Patient
The access structure represented in Figure 7, the access time for C. Emergency-Patient
each of the attribute will be provided depending on the day
The attribute access time represented in the Figure 8, may not
when the patient is undergoing treatment. Day is the maximum
necessarily be static always. We can extend the access time for
access time limit for the accessing the record of the out-patient
any of the attribute depending on the seriousness of the disease.
in most of the cases.
The access policy for an Emergency-Patient is given below with
The access policy for an Out-Patient is given below with respect
respect to access structure in Figure 8.
to access structure in Figure 7.
[(General Physician AND Emergency Doctor)] OR [(Surgeon
[(General Physician OR Endocrinologist)] OR
AND Anathesian AND General Physician) OR (Infectious
[(Immunologist OR Nurse)]
Disease Specialist OR Microbiologist)]
6146
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
WORKING PRINCIPLE OF TIME-BASED PRE FOR acting as a backend database and it will be available along with
USER-REVOCATION LAMP itself. To work well with Mysql, it is necessary to
configure it with log and error log file. User interface with the
A. Key Generation using CP-ABE Toolkit
local server can be accessed via web browser by providing IP
Ubuntu is Debian-based Linux operating system that provides a address of the local machine (eg: https://xxx.xxx.xx.x).
platform environment to built cpabe. First it is necessary to
Server admin can login with authenticated username and the
download, untar, compile, and install the most recent tarball of
password. File can be uploaded and shared with the users. Local
libbswabe, the support library [12]. Each can be installed with
server can create the link for all the files and folders and it will
the standard GNU build system commands.
also allow users to access those shared link of file or folder.
Installation of Source File Data owner can add many number of users depending on the
complexity of access structure. Authentication is maintained by
To work with ABE, we need to install and configure four source
providing separate password for each user.
files cpabe, gmp, libbswabe and pbc. Create the make file and
include that to library. The below are commands to install the
source file.
B. Encryption Configuration
$ ./configure
Patient record will be submitted for encryption. File can be of
$ make any format (text / pdf / images file) and it should be placed in
source file location where data owner actually resides. The
$ make install
primary purpose of the Nextcloud server-side encryption is to
protect users’ files on remote storage, such as Dropbox and
Google Drive, and to do it easily and seamlessly with
Generating Keys
Nextcloud. Nextcloud encrypts owner’s local data and stores it
The method of generating the owner public key and master key in a remote server. Encryption and decryption are performed on
was done with the help of cpabe-setup. Master key will be kept the Nextcloud server. All files sent to remote storage, will be
secret and the public key will be distributed to all the users who encrypted by the Nextcloud server, and during retrieval,
are associated with the access structure. The following Nextcloud server decrypts the file and serves it to authorized
command is used to generate the keys for the owner. users and groups.
$ cpabe-setup Nextcloud encryption consists of two parts. The base
encryption system is enabled and disabled on Admin page. First
Whenever the command ’cpabe-setup’ is executed, the new
Admin must enable this, and then select an encryption module
master key and public key will be generated by overwriting the
to load. Currently the only available encryption module is the
existing keys.
Nextcloud Default Encryption Module. Data owner have to
enable encryption button, ’No encryption module loaded,
please load a encryption module in the app menu’ message will
Key Generation for Different attributes
be displayed. After which owner needs to redirect the admin’s
Based on the above discussed three differnt patient type Apps page to enable the Nextcloud Default Encryption Module.
scenarios, keys will be generated for each of the available Next cloud default encryption module will be added to the
attributes. cpabe-key function is utilized to generate the key module selector, and gets selected automatically once the data
based on the access structure. Each attribute will have a owner returns to the admin page. Now admin must log out and
separate private key, which will be used for decryption. Private then log in to initialize user’s encryption keys.
Key can be generated for each attribute using the following
commands by specifying a particular attribute as mentioned
below. C. Attributes in a Single Group
Each of the attributes associated with the access structure can be
added within a single group, where distribution of keys and
$ cpabe-keygen -o General-Physician pub-key master-key
cipher text will be made easier for the data owner. One user is
Att1 Att2
allowed to present in more than one group.
$ cpabe-keygen -o Surgeon pub-key master-key Att3
$ cpabe-keygen -o Endocrinologist pub-key master-key Att3
D. Encrypting File with Full Access Structure at Owner Side
Att4
Data owner encrypts medical report by specifying complete
$ cpabe-keygen -o Nurse pub-key master-key Att1 Att3
access structure in the cpabe-enc command as mentioned
below. This creates cipher text with the extension
<filename>.cpabe.
To work with NextCloud, LAMP software bundle has to be
installed and configured. While installing it is necessary to ]$ cpabe-enc pub_key Patient_Report.pdf (((gp or endo) and
create make file and include that into the library. Mysql will be (imm or neuro)) or surg)
6147
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
6148
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
Figure 10. Granting Time Privilege for Accessing the File in NextCloud
6149
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 8 (2018) pp. 6138-6150
© Research India Publications. http://www.ripublication.com
6150