# Ensuring Improved Security in Medical Data Using ECC and Blockchain Technology with Edge Devices

Authors: Mary Subaja Christo; V. Elizabeth Jesi; Uma Priyadarsini; V. Anbarasu; Hridya Venugopal; Marimuthu Karuppiah
Journal: Security and Communication Networks
 (2021)

---

## Abstract

Hospital data management is one of the functional parts of operations to store and access healthcare data. Nowadays, protecting these from hacking is one of the most difficult tasks in the healthcare system. As the user’s data collected in the field of healthcare is very sensitive, adequate security measures have to be taken in this field to protect the networks. To maintain security, an effective encryption technology must be utilised. This paper focuses on implementing the elliptic curve cryptography (ECC) technique, a lightweight authentication approach to share the data effectively. Many researches are in place to share the data wirelessly, among which this work uses Electronic Medical Card (EMC) to store the healthcare data. The work discusses two important data security issues: data authentication and data confidentiality. To ensure data authentication, the proposed system employs a secure mechanism to encrypt and decrypt the data with a 512-bit key. Data confidentiality is ensured by using the Blockchain ledger technique which allows ethical users to access the data. Finally, the encrypted data is stored on the edge device. The edge computing technology is used to store the medical reports within the edge network to access the data in a very fast manner. An authenticated user can decrypt the data and process the data at optimum speed. After processing, the updated data is stored in the Blockchain and in the cloud server. This proposed method ensures secure maintenance and efficient retrieval of medical data and reports.


---

## Body

## 1. Introduction

In today’s world, the healthcare system has an enormous amount of data. These data are very critical and hence their security is a big concern. The critical data related to the patient’s health are stored in a file in a conventional method and only a few personal details are stored in the hospital management database. Hence situations that arise when the file is lost are very difficult. To overcome this scenario, a medical health card is used. This card stores all the details of the patient including their medical reports. Hence, the security of this data is very crucial. There are many encryption algorithms to ensure the security of the data and also network security. Choosing the best among them is very important. Hence, a lightweight cryptographic algorithm elliptic curve cryptographic algorithm is used. This algorithm ensures efficient and powerful security of the data with lesser key size compared to other asymmetric cryptographic algorithms. Hence, the memory space is also not wasted. This ensures the confidentiality of the data. Now, these encrypted data are stored on the Blockchain which is immutable. A Blockchain is as such encrypted by itself. This property provides validation of the data. A block in the Blockchain represents the present data. It has information about past and future data. Every time a block is completed, its transactions are permanent and are stored. The new transactions will be recorded in the current one. Storing of the encrypted data in the Blockchain ensures security and transparency. This enables the feature of authorization to be incorporated to protect the healthcare system. To ensure the fast access of the critical data, these data are stored in the edge server. Hence, this paper focuses on enabling any patient to access their health information from anywhere by card reader, in an efficient manner ensuring confidentiality, integrity, and availability of the critical data.Now, these encrypted data are stored on the Blockchain which is immutable. Blockchain is a digital ledger that acts as a decentralized database for all transactions. A Blockchain is made up of a series of transactions, each of which is divided into blocks and cryptography keys hold it all together through a hash function. These secret keys are kept in common ledgers and are linked together by a network of nodes. Every node has maintained duplicate data of the entire chain, which is constantly updated and synchronized. A Blockchain is as such encrypted by itself. This property provides validation of the data. A block in the Blockchain represents the present data. It has information about past and future data. Every time a block is completed, its transactions are permanent and stored. The new transactions will be recorded in the current one. Storing of the encrypted data in the Blockchain ensures security and transparency. This enables the feature of authorization to be incorporated in protecting the healthcare system. The following are some of the main concerns with healthcare Blockchain applications:(1)
The member’s identities verified and authenticated(2)
Authorization patterns for access to electronic medical records that are consistent(3)
Network infrastructure security at all levels.Some forms of assaults are possible using Blockchain technology, despite the fact that it has inbuilt protection from others. The code of the Blockchain makes it vulnerable to zero-day attacks and social engineering, as well as defects. As a result, information security must be given special consideration, especially when it is employed in healthcare. All user’s information must be kept to the chain. The Blockchain technology has been divided by Public and Private Blockchain. In Public Blockchain, all the data are transparent to all the members, but in Private Blockchain, all the data are transparent to the particular organization. In our research work, we have used Private Blockchain to store the hospital user’s data which is transparent to all the members in the hospital and they can view it by Electronic Medical Card.Our proposed work focuses on the confidentiality of the medical report. To ensure the same, we have kept the encrypted data to the Blockchain which is used for allowing the ethical user to access these data. In edge computing, we can store the medical reports within the edge network; hence, we can access the data in a very fast manner. An authenticated user can decrypt and process the data with optimum speed. After processing, the updated data is stored in the Blockchain and the cloud server. Our proposed method ensures secure maintenance and efficient retrieval of medical data and reports.The following sections of this paper are prepared as follows. Section2 describes advance review of EMC and the significance of data security in hospital management systems. The proposed approach to secured medical data using ECC with Blockchain and security measures is explained in Section 3. Security analysis is discussed in Section 4. The performance analysis of the proposed algorithm via simulation algorithm is described in Section 5. Finally, Section 6 describes the conclusion of our proposed work.


## 2. Literature Review

Recent advances in data sharing strategies in the edge computing environment, the importance of Electronic Medical Card in hospital management, the usage of Blockchain technologies in hospital management, and the significance of data security in hospital management systems are briefly covered in this section.Hema and Kesavan have discussed the importance of e-healthcare in today’s world. One of the most difficult challenges in the healthcare system is keeping medical data secure. Elliptical curve cryptography algorithm is used to ensure the main aspects of security, viz, confidentiality and integrity. This also improves the overhead time in various aspects and the insider threat [1]. Tsai et al. have analysed that the ECC requires a lesser key size compared to RSA. This paper discusses ECC-based electronic medical record system that also employs a cloud database. Incorporating an ECC integration unit, a smart card, and a portable device helps to ensure the data transmitted is secure and also the critical data quality is maintained [2]. Vijayakumar et al. have designed IoT-based wearable devices to collect patient medical data and securely pass SMS alerts in medical industry [3, 4].Poonguzhali et al. have proposed the Blockchain data structure where the data integrity is maintained by making the current data appended to the existing data. These transaction details are maintained by all the nodes that are a part of the network. In this paper, the process consists of two parts: first, the data is kept in the Blockchain and then it is encrypted using the ECC. This enhances the security of the critical data [5]. Jisha and Philip have identified the importance of using elliptical curve cryptography in RFID-based IoT in healthcare systems. The ECC being lightweight and having a lesser key size is much efficient than other asymmetric key algorithms [6]. Bera et al. have developed smart Blockchain Access Control which is used to efficiently detect the hackers in the network communication devices [7]. Karuppiah and Gurunathan have discussed the idea of e-health applications to process the trivial and nontrivial connections among different sensor signals. The data are stored in the cloud using the “Two Fish Encryption Algorithms” for improved security of the trivial and nontrivial connections among the diﬀerent sensor signals and big data, the better conception of diseases. Cloud computing provides many benefits, but it also poses significant security risks [8].Senthilkumar et al. have proposed how data integrity, confidentiality, and authentication is maintained using the Blockchain concept. Here, only authorized users can access the data that is stored in the block. This enables confidentiality and provides security to the critical data [9]. Li et al. proposed Blockchain-based mutual key which provides efficient security communication to vehicles ad-hoc networks [10]. Masood et al. have discussed the security issues of the distributed environment of secured cloud infrastructure [11]. Chaoyang et al. have presented the advantages of elliptical curve cryptography algorithm and also compared this algorithm with nonelliptical curve algorithm. Their work concluded that elliptical cryptography algorithm required small size of bits and provides efficient security to protect any type of data [12].Shi et al. have presented the review of the edge computing and explained how the processing times are increased with the help of edge devices [13]. Pan and McElhannon have discussed the challenging task of cloud environments. Usually the cloud storage devices required long processing time if the remote database is far and need more computational power. To overcome this challenge, they have suggested the new edge computing system to increase the processing speed of the network and store the computational power of the system [14]. Vijayakumar et al. have proposed secured anonymous and authentication-based intelligent wireless body area networking which provides efficient service to the medical industry [15, 16].Zhang et al. have integrated the features of edge computing and Blockchain which is used to assure data transfer reliability in the IoT domain and explained how Blockchain and edge computing may be used to create a distributed and trustworthy system with authentication [17]. Hussien et al. have emphasised the incentives for using blockchain machinery in the healthcare systems and addressed the potential challenge of the Blockchain technology [18]. Khatoon et al. have reviewed present Blockchain study in the medical industry and established an Ethereum-based medical management solution and several medical processes are generated for various medical management application domains [19]. Cao et al. have emphasised the need for the edge computing with the developments in the field of IoT. Here, the computations are done at the edge of the network. This increases the processing speed as it is closer to the data and user. The security, protection, and application of the edge networks are discussed [20]. Seo et al. have proposed a certificate less encryption key which is used for sharing the secured information to the cloud. The data holder encrypts the data using the cloud’s public key and then the user can upload this secured data to the cloud [21].Based on the conclusions drawn from the assessment of relevant works, we have proposed secured medical data using ECC and Blockchain technology with edge devices. The ECC algorithm provides excellent performance in all aspects with respect to the time required for file access that includes various steps like key generation, encrypting, and decrypting of the file. To ensure confidentiality and integrity of the critical data, the Blockchain ledger is used to store the encrypted data. To enhance the processing speed of the data, an edge server is added to the cloud-based E-hospital management system.


## 3. Proposed Methodology

In this section, we have enhanced the proposed approach of secured medical data using ECC and Blockchain with edge computing system explained.


### 3.1. System Architecture

As the healthcare system has highly sensitive information that is collected from the patients, it has to be encrypted to preserve security. As the data that are collected are transmitted frequently and is very small, a very lightweight scheme has to be used for encryption. Figure1 describes the overall architecture of secured hospital management data. The following phases are required to implement our proposed system:(1)
Store user’s data in Electronic Medical Card(2)
Encrypt the user’s data with elliptic curve cryptographic technique(3)
For encrypted data stored in edge server and Blockchain(3.1)
edge server allows authenticated management user to process the data(3.2)
Blockchain technique is used to ensure authentication(4)
Encrypted data is stored in cloud server and authenticated user can view their data from cloudFigure 1
Architecture of secured hospital management.In the first phase, collect the user’s data and store the data on Electronic Medical Card (EMC). The EMC has a microcontroller chip that is used to store user’s medical data. Read the data from EMC through the card reader. In the second phase, the elliptic curve cryptography technique has to be used to convert plain text of the medical reports to encrypted text. In the third phase, the encrypted data is stored in edge server and Blockchain which is used to protect our data from hackers or unethical users. The authenticated hospital management users such as doctors, nurses, and admin can decrypt the encrypted data to plain text for further processing with optimum speed. In the fourth phase, authenticated users can retrieve the medical report from the cloud server. Based on these phases, the hospital management can secure the patient’s data in smart techniques.


### 3.2. Electronic Medical Card

In hospitals, the patient’s health information is stored in their own database and the health records are given back to the patients in a file. In some situation, the manual healthcare reports are not maintained properly and hence the patients may lose the critical data. To avoid these issues, we can use Electronic Medical Card (EMC), which is used to store medical record in a smart manner. EMC contains an electronic chip which is used to store any kind of medical data to EMC cards. To accomplish this, the patient’s registration details are collected from the hospital management system and stored in the electronic chip for smart access. The health-related medical data are retrieved from the IoT sensors like smart watch from the in-patients and out-patients. This information is stored in an EMC card with the help of an electronic chip. This enables the patient medical data to be made available from anywhere at any time.An EMC is something other than an automated adaptation of a paper outline in a supplier’s office. A computerized record can give exhaustive wellbeing data about your patients. EMC frameworks are worked to report data to other medical care suppliers and associations. Figure2 describes the procedure of the Electronic Medical Card generation. Initially, the hospital management collects basic information from the customer like patients and doctors. The customer basic information and their medical data are stored in EMC. An authenticated user can access their card. So initially, the EMC card can be activated by the user’s DOB or their PAN card number. After login, they can reset their password credentials for further processing. EMC is also connected to the hospital local base station. So it helps the patient to check their medical status themselves. The medical data is updated to EMC by the healthcare sensor which is embedded in the patient’s body.Figure 2
EMC generation.


### 3.3. Encrypt the Medical Data with Elliptic Curve Cryptography Algorithm

Hospital management should secure their user-related data such as patient’s basic information, medical data, and medicine description. Today, securing the user data is the utmost challenge that hospital management faces. In this paper, we have proposed elliptical curve cryptography (ECC) algorithm for the encryption and decryption process. ECC is an asymmetric algorithm that uses two keys, that is, the private key and public key, for encryption and decryption. The difference between the ECC algorithm and non-ECC algorithm is that ECC provides equal security with smaller key size as compared to non-ECC algorithms such as RSA and DSA. As the name suggests, the ECC algorithm uses elliptic curves. Elliptic curves are defined by some mathematical functions which are cubic functions which is the equation of degree 3. The equation of the elliptic curve isY2 = X3 + (A ∗ X) + B, where the coordinates of the elliptic curve equation is ((X1, Y1), (X2, Y2)----) [8].


#### 3.3.1. ECC Algorithm

ECC the algorithm is used to encrypt the plain text to cypher text. To implement ECC key exchange, we need global public elements which have 2 parameters. The first element isEq (c, d) where E is an elliptic curve, E (c, d) is an elliptic curve with constants c and d, and q is the prime number or an integer of the form 2M [8]. The second element is G which is a point on the elliptic curve. In this key exchange algorithm, we have considered two users: user A1 and user B1. Next, we generate private key and public key for User A1 and User B1 after generating the private and public keys. We generate the secret key which is shared by both user A1 and user B1. Figure 3 describes the flowchart to generate the EMC card for smart hospital management.Figure 3
Flowchart to generate the EMC of hospital users.The following phases are used to implement this algorithm:(1)
ECC key exchange(2)
Key generation at userA1 and user B1(3)
Secret key generation at userA1 and user B1(4)
ECC encryption(5)
ECC decryptionTable1 describes the comparison of the ECC algorithm and non-ECC algorithm like RSA and DSA. ECC algorithm provides equal security as RSA and DSA with smaller key sizes. So this algorithm requires a minimum amount of memory and computational power than non-ECC algorithms [22].Table 1
Comparison of ECC and non-ECC algorithm.
Minimum size (bits) of public keyDSARSAECC102410241602048204822430723072256768076803841536015360512


#### 3.3.2. ECC Algorithm-Based Encrypted and Decrypted Hospital User’s Data

The following parameters are used to encrypt and decrypt hospital user’s data:E- > Eq (x, y) Let E, n, and q be elliptic curve, curve value limit, and random number, respectively.Let x and y be constant parameters.Let G and K be elliptic curve point and random positive number, respectively.Let HA and HU be hospital admin and hospital user, respectively.Let nHA,pHA, and kHA be the private, public, and secret key of hospital admin.Let nHU,pHU, and kHU be the private key, public key, and secret key of hospital user.Let PT, p, d, and CP be the plain text, patients’ data, doctors’ data, elliptic curve point, and cipher point.Let EPPT be encoding plain text to elliptic curve point.Compute Z < - MUL (X) coordinate with HU private key.


### 3.4. Blockchain Ledger with ECC Encrypted Data

A Blockchain is as such encrypted by itself. This property provides validation of the data. A block in the Blockchain represents the present data. It has information about past and future data. Every time a block is completed, its transactions are permanent and stored. The new transactions will be recorded in the current one. Storing of the encrypted data in the Blockchain ensures security and transparency. This enables the feature of authorization to be incorporated in protecting the healthcare system. Distributed Ledger Technology is a decentralized database that is administered by various people (DLT). This means that if a single block in a chain is modified, it will be immediately clear that the chain has been tampered with. Hackers would have to change every Block in the chain, across all distributed versions of the chain, if they intended to destroy a Blockchain system.The Blockchain is one of the stored devices in which a new record is added to the previously stored record and is transparent to all the members in the network. The healthcare industry is currently concentrating on the efficient Blockchain design to keep the hospital user’s data more safe, confident, reliable, and distributed, as they are in the existing file system incapable to maintain the confidentiality and reliability of the information. The goal of the proposed effort is to use Blockchain to store the encrypted hospital user data which is read from the EMC. Our proposed framework helps to increase the confidentiality of all the hospital users like patients, doctors, etc. The following are the major aspects of Blockchain technology:(1)
Immutable: once updated, we cannot alter the records(2)
Distributed: duplicate data are kept in all the devices in the same network so any member can view their data(3)
Consensus: every block is validated by a member of the network’s miner(4)
Transparent: all network members have access to the data and may observe the data


#### 3.4.1. Blockchain Ledger

Each node in the Blockchain system is going to uphold a record for all the communications and these transactions are going to maintain the state of the data that is being stored on the Blockchain network and the ledger often consists of two types of data structures. The first data structure is Blockchain itself so this is an append-only log of all transactions that have happened; it is similar to a linked list of blocks and a block is a group of transactions that have been put together. As we know, the linked lists are blocked and they are linked with each other with a hash value that is computed on each block. A part of the next block is known as a hash chain. So in every block of transactions, there is a cache of it that is computed and that hash is added on to the next block that is about the hash chain. This Blockchain gives some certain properties of immutability. If you modified or tampered with a previous block, then the hash on the next block will not match. So it will be very hard for someone to tamper with the previous block and also these blocks are maintained in a decentralized fashion, which means that we will take down or manipulate a large net number of nodes in the network, and a large fraction of nodes in the network will be possible to tamper with, so it gives a lot of immutability properties. This is known as the Blockchain aspect of the ledger. So this is the sequence of transactions that each node in the system is going to uphold the data. It stores the most recent state of smart contracts that are the outputs of each transaction and the data elements can be added, modified, deleted, and all recorded as transactions on Blockchain. In our proposed work, we have used the first type of ledger that is the Blockchain ledger data structure.The proposed Blockchain architecture with EMC data processing of the system is described in Figure4. The design covers how to initiate a connection and how to add or create a new block to the existing block. To begin the connection, the member, who could be any of the EMC system’s stakeholders, sends a new message stating that a block or record has been formed. This recently produced block or record may comprise a doctor’s investigation, a lab technician’s test report, a nurse’s pressure reading, a pharmacist’s medication, and so on, which is distributed to all devices connected in the network via the Blockchain. The transaction is kept within the block and published to all network nodes.Figure 4
EMC data processing in Blockchain.After the Blockchain is complete, all nodes in the network have a similar copy of data, allowing members to collaborate during the verification process. They authenticate that the block containing the transactions is unchanged as soon as it is broadcast to all members of the network. Once the verification process is completed, the new node is appended to the previous block. Each block on the Blockchain is made up of three components: data, the current block’s hash value, and the previous block’s hash value. The information regarding the patient’s health is stored in the suggested system’s data. Our proposed Blockchain ledger with ECC algorithm is used to ensure the confidentiality of the hospital user data.


### 3.5. Processing of Data Storage in Edge Device

In edge computing, we can store the medical reports within the edge network; hence, we can access the data in a very fast manner. An authenticated user can decrypt and process the data with optimum speed; after processing, the updated data has been stored to the Blockchain and the cloud server. Figure5 shows the encrypted data are kept in the Blockchain ledger to improve confidentiality. Next, these encrypted data are stored in the edge server to continue further data processing. If the doctor wants to check his patient’s data, he should log in with an Electronic Medical Card with his credentials after validating his request, and he can decrypt the patient data with his private key which is described in the ECC algorithm module. Once processing has completed, the doctor again keeps the data to the Blockchain in a separate block with the previous hash value of the patient.Figure 5
Optimum data processing in edge server.Edge computing was established to allow cloud resources and services to be deployed at the network’s edge. However, it presently faces issues in terms of management and security due to its decentralized nature. Edge computing offers the ability to address issues such as reaction speed, battery life, and bandwidth cost savings, as well as data security and privacy. In the last several years, the volume of data generated by sensors, actuators, and other devices on the Internet of Things (IoT) has skyrocketed. Data from IoT devices are currently handled via the cloud, primarily using computing resources in remote data centres. Figure5 shows the optimum speed of data processing of hospital user data. As we know, edge computing is used to store the data in edge devices so we can process our data at high speed, low bandwidth, and quick response.To optimise computation and storage resources, edge computing nodes are used. In the hospital, if the doctor wants any emergency data of the patient, he can access the data within a fraction of a second. After processing in edge devices, the data are stored into the cloud server. Now all the required hospital data are stored in the cloud and at any time the user can access their data by himself and the doctors can efficiently track the patient’s details. Hence our proposed work helps to protect hospital data, provides the optimum speed of processing the data, provides the users with the ability to check their data by themselves, and increases the computational power and storage capacity.


### 3.6. The Proposed Algorithm: Edge Server and Blockchain-Based Secured Hospital User Data with ECC Algorithm

(1)
START(2)
For each user get User name and Password(2.1)
IF User is authenticated(2.1.1)
Do Access to Use EMC card(2.1.2)
Go to the Step3(2.2)
Else Invalid User(2.2.1)
Invalid User(2.2.2)
Exit(3)
Store Data to EMC card(4)
Read Plain text (Data)(5)
Start ECC Encryption Process in Edge Server(5.1)
Generate the Public Key and Private Key by Algorithm 1(5.2)
Do Encryption Process by Algorithm 2(6)
Request for Decryption Process in Edge Server(6.1)
If Authenticated User(6.2)
Do Decryption Process by Algorithm 3(7)
Data Stored in Blockchain and Cloud Server(8)
Every Authenticated User View their Own Data(9)
STOPAlgorithm 1: Key generation: HU & HA.
Input: Hospital User (HU) data; Key size: 516 bitsOutput: public, private and secret key of HU & HA(1)
createE(2)
generate G(3)
for-each Hospital User (HU) do;(4)
create private key and public key of HA(4.1)
create private key (nHA) of HA; where nHA < n(4.2)
compute public key (pHA) of HA; where pHA = nHA(G)(5)
create private key and Public key of HU(5.1)
create private key (nHU) of HU; where nHU < n(5.2)
compute public key (pHU) of HU; where pHU = nHU∗ G(6)
create secret key of HA; kHA = nHA ∗pHU(7)
create secret key of HU; kHU = nHU∗pHA(8)
end for-each;Algorithm 2:HA - ECC encryption process.
Input: plain text (PT)Output: cipher text (CPPT)(1)
readPT(2)
encodePT - > EP => EPPT(3)
computeCP(3.1)
computeCPPT; CPPT = {K∗G, EPPT + K∗pHU}(3.2)
compute X-coordinate = K∗G; Y-coordinate = EPPT + K∗pHUAlgorithm 3:HU - ECC decryption process.
Input: Cypher textOutput: Plain text(1)
get cipher point (CPPT) at receiver end(2)
computeZ = KG ∗ nHU(3)
subtractZ from Y coordinates and compute the following:(3.1)
HU < - EPPT + K∗pHU– (Z)(3.2)
HU < - EPPT + K∗pHU– (KG ∗ nHU)(3.3)
HU < - EPPT + K∗ pHU- K ∗ pHUwhere pHU = nHU∗ G(3.4)
HU < - EPPTThe proposed algorithm is used to secure the EMC by securing the data using the lightweight ECC technique in edge server database and the block chain concept ensures the data is more secured.


## 3.1. System Architecture

As the healthcare system has highly sensitive information that is collected from the patients, it has to be encrypted to preserve security. As the data that are collected are transmitted frequently and is very small, a very lightweight scheme has to be used for encryption. Figure1 describes the overall architecture of secured hospital management data. The following phases are required to implement our proposed system:(1)
Store user’s data in Electronic Medical Card(2)
Encrypt the user’s data with elliptic curve cryptographic technique(3)
For encrypted data stored in edge server and Blockchain(3.1)
edge server allows authenticated management user to process the data(3.2)
Blockchain technique is used to ensure authentication(4)
Encrypted data is stored in cloud server and authenticated user can view their data from cloudFigure 1
Architecture of secured hospital management.In the first phase, collect the user’s data and store the data on Electronic Medical Card (EMC). The EMC has a microcontroller chip that is used to store user’s medical data. Read the data from EMC through the card reader. In the second phase, the elliptic curve cryptography technique has to be used to convert plain text of the medical reports to encrypted text. In the third phase, the encrypted data is stored in edge server and Blockchain which is used to protect our data from hackers or unethical users. The authenticated hospital management users such as doctors, nurses, and admin can decrypt the encrypted data to plain text for further processing with optimum speed. In the fourth phase, authenticated users can retrieve the medical report from the cloud server. Based on these phases, the hospital management can secure the patient’s data in smart techniques.


## 3.2. Electronic Medical Card

In hospitals, the patient’s health information is stored in their own database and the health records are given back to the patients in a file. In some situation, the manual healthcare reports are not maintained properly and hence the patients may lose the critical data. To avoid these issues, we can use Electronic Medical Card (EMC), which is used to store medical record in a smart manner. EMC contains an electronic chip which is used to store any kind of medical data to EMC cards. To accomplish this, the patient’s registration details are collected from the hospital management system and stored in the electronic chip for smart access. The health-related medical data are retrieved from the IoT sensors like smart watch from the in-patients and out-patients. This information is stored in an EMC card with the help of an electronic chip. This enables the patient medical data to be made available from anywhere at any time.An EMC is something other than an automated adaptation of a paper outline in a supplier’s office. A computerized record can give exhaustive wellbeing data about your patients. EMC frameworks are worked to report data to other medical care suppliers and associations. Figure2 describes the procedure of the Electronic Medical Card generation. Initially, the hospital management collects basic information from the customer like patients and doctors. The customer basic information and their medical data are stored in EMC. An authenticated user can access their card. So initially, the EMC card can be activated by the user’s DOB or their PAN card number. After login, they can reset their password credentials for further processing. EMC is also connected to the hospital local base station. So it helps the patient to check their medical status themselves. The medical data is updated to EMC by the healthcare sensor which is embedded in the patient’s body.Figure 2
EMC generation.


## 3.3. Encrypt the Medical Data with Elliptic Curve Cryptography Algorithm

Hospital management should secure their user-related data such as patient’s basic information, medical data, and medicine description. Today, securing the user data is the utmost challenge that hospital management faces. In this paper, we have proposed elliptical curve cryptography (ECC) algorithm for the encryption and decryption process. ECC is an asymmetric algorithm that uses two keys, that is, the private key and public key, for encryption and decryption. The difference between the ECC algorithm and non-ECC algorithm is that ECC provides equal security with smaller key size as compared to non-ECC algorithms such as RSA and DSA. As the name suggests, the ECC algorithm uses elliptic curves. Elliptic curves are defined by some mathematical functions which are cubic functions which is the equation of degree 3. The equation of the elliptic curve isY2 = X3 + (A ∗ X) + B, where the coordinates of the elliptic curve equation is ((X1, Y1), (X2, Y2)----) [8].


### 3.3.1. ECC Algorithm

ECC the algorithm is used to encrypt the plain text to cypher text. To implement ECC key exchange, we need global public elements which have 2 parameters. The first element isEq (c, d) where E is an elliptic curve, E (c, d) is an elliptic curve with constants c and d, and q is the prime number or an integer of the form 2M [8]. The second element is G which is a point on the elliptic curve. In this key exchange algorithm, we have considered two users: user A1 and user B1. Next, we generate private key and public key for User A1 and User B1 after generating the private and public keys. We generate the secret key which is shared by both user A1 and user B1. Figure 3 describes the flowchart to generate the EMC card for smart hospital management.Figure 3
Flowchart to generate the EMC of hospital users.The following phases are used to implement this algorithm:(1)
ECC key exchange(2)
Key generation at userA1 and user B1(3)
Secret key generation at userA1 and user B1(4)
ECC encryption(5)
ECC decryptionTable1 describes the comparison of the ECC algorithm and non-ECC algorithm like RSA and DSA. ECC algorithm provides equal security as RSA and DSA with smaller key sizes. So this algorithm requires a minimum amount of memory and computational power than non-ECC algorithms [22].Table 1
Comparison of ECC and non-ECC algorithm.
Minimum size (bits) of public keyDSARSAECC102410241602048204822430723072256768076803841536015360512


### 3.3.2. ECC Algorithm-Based Encrypted and Decrypted Hospital User’s Data

The following parameters are used to encrypt and decrypt hospital user’s data:E- > Eq (x, y) Let E, n, and q be elliptic curve, curve value limit, and random number, respectively.Let x and y be constant parameters.Let G and K be elliptic curve point and random positive number, respectively.Let HA and HU be hospital admin and hospital user, respectively.Let nHA,pHA, and kHA be the private, public, and secret key of hospital admin.Let nHU,pHU, and kHU be the private key, public key, and secret key of hospital user.Let PT, p, d, and CP be the plain text, patients’ data, doctors’ data, elliptic curve point, and cipher point.Let EPPT be encoding plain text to elliptic curve point.Compute Z < - MUL (X) coordinate with HU private key.


## 3.3.1. ECC Algorithm

ECC the algorithm is used to encrypt the plain text to cypher text. To implement ECC key exchange, we need global public elements which have 2 parameters. The first element isEq (c, d) where E is an elliptic curve, E (c, d) is an elliptic curve with constants c and d, and q is the prime number or an integer of the form 2M [8]. The second element is G which is a point on the elliptic curve. In this key exchange algorithm, we have considered two users: user A1 and user B1. Next, we generate private key and public key for User A1 and User B1 after generating the private and public keys. We generate the secret key which is shared by both user A1 and user B1. Figure 3 describes the flowchart to generate the EMC card for smart hospital management.Figure 3
Flowchart to generate the EMC of hospital users.The following phases are used to implement this algorithm:(1)
ECC key exchange(2)
Key generation at userA1 and user B1(3)
Secret key generation at userA1 and user B1(4)
ECC encryption(5)
ECC decryptionTable1 describes the comparison of the ECC algorithm and non-ECC algorithm like RSA and DSA. ECC algorithm provides equal security as RSA and DSA with smaller key sizes. So this algorithm requires a minimum amount of memory and computational power than non-ECC algorithms [22].Table 1
Comparison of ECC and non-ECC algorithm.
Minimum size (bits) of public keyDSARSAECC102410241602048204822430723072256768076803841536015360512


## 3.3.2. ECC Algorithm-Based Encrypted and Decrypted Hospital User’s Data

The following parameters are used to encrypt and decrypt hospital user’s data:E- > Eq (x, y) Let E, n, and q be elliptic curve, curve value limit, and random number, respectively.Let x and y be constant parameters.Let G and K be elliptic curve point and random positive number, respectively.Let HA and HU be hospital admin and hospital user, respectively.Let nHA,pHA, and kHA be the private, public, and secret key of hospital admin.Let nHU,pHU, and kHU be the private key, public key, and secret key of hospital user.Let PT, p, d, and CP be the plain text, patients’ data, doctors’ data, elliptic curve point, and cipher point.Let EPPT be encoding plain text to elliptic curve point.Compute Z < - MUL (X) coordinate with HU private key.


## 3.4. Blockchain Ledger with ECC Encrypted Data

A Blockchain is as such encrypted by itself. This property provides validation of the data. A block in the Blockchain represents the present data. It has information about past and future data. Every time a block is completed, its transactions are permanent and stored. The new transactions will be recorded in the current one. Storing of the encrypted data in the Blockchain ensures security and transparency. This enables the feature of authorization to be incorporated in protecting the healthcare system. Distributed Ledger Technology is a decentralized database that is administered by various people (DLT). This means that if a single block in a chain is modified, it will be immediately clear that the chain has been tampered with. Hackers would have to change every Block in the chain, across all distributed versions of the chain, if they intended to destroy a Blockchain system.The Blockchain is one of the stored devices in which a new record is added to the previously stored record and is transparent to all the members in the network. The healthcare industry is currently concentrating on the efficient Blockchain design to keep the hospital user’s data more safe, confident, reliable, and distributed, as they are in the existing file system incapable to maintain the confidentiality and reliability of the information. The goal of the proposed effort is to use Blockchain to store the encrypted hospital user data which is read from the EMC. Our proposed framework helps to increase the confidentiality of all the hospital users like patients, doctors, etc. The following are the major aspects of Blockchain technology:(1)
Immutable: once updated, we cannot alter the records(2)
Distributed: duplicate data are kept in all the devices in the same network so any member can view their data(3)
Consensus: every block is validated by a member of the network’s miner(4)
Transparent: all network members have access to the data and may observe the data


### 3.4.1. Blockchain Ledger

Each node in the Blockchain system is going to uphold a record for all the communications and these transactions are going to maintain the state of the data that is being stored on the Blockchain network and the ledger often consists of two types of data structures. The first data structure is Blockchain itself so this is an append-only log of all transactions that have happened; it is similar to a linked list of blocks and a block is a group of transactions that have been put together. As we know, the linked lists are blocked and they are linked with each other with a hash value that is computed on each block. A part of the next block is known as a hash chain. So in every block of transactions, there is a cache of it that is computed and that hash is added on to the next block that is about the hash chain. This Blockchain gives some certain properties of immutability. If you modified or tampered with a previous block, then the hash on the next block will not match. So it will be very hard for someone to tamper with the previous block and also these blocks are maintained in a decentralized fashion, which means that we will take down or manipulate a large net number of nodes in the network, and a large fraction of nodes in the network will be possible to tamper with, so it gives a lot of immutability properties. This is known as the Blockchain aspect of the ledger. So this is the sequence of transactions that each node in the system is going to uphold the data. It stores the most recent state of smart contracts that are the outputs of each transaction and the data elements can be added, modified, deleted, and all recorded as transactions on Blockchain. In our proposed work, we have used the first type of ledger that is the Blockchain ledger data structure.The proposed Blockchain architecture with EMC data processing of the system is described in Figure4. The design covers how to initiate a connection and how to add or create a new block to the existing block. To begin the connection, the member, who could be any of the EMC system’s stakeholders, sends a new message stating that a block or record has been formed. This recently produced block or record may comprise a doctor’s investigation, a lab technician’s test report, a nurse’s pressure reading, a pharmacist’s medication, and so on, which is distributed to all devices connected in the network via the Blockchain. The transaction is kept within the block and published to all network nodes.Figure 4
EMC data processing in Blockchain.After the Blockchain is complete, all nodes in the network have a similar copy of data, allowing members to collaborate during the verification process. They authenticate that the block containing the transactions is unchanged as soon as it is broadcast to all members of the network. Once the verification process is completed, the new node is appended to the previous block. Each block on the Blockchain is made up of three components: data, the current block’s hash value, and the previous block’s hash value. The information regarding the patient’s health is stored in the suggested system’s data. Our proposed Blockchain ledger with ECC algorithm is used to ensure the confidentiality of the hospital user data.


## 3.4.1. Blockchain Ledger

Each node in the Blockchain system is going to uphold a record for all the communications and these transactions are going to maintain the state of the data that is being stored on the Blockchain network and the ledger often consists of two types of data structures. The first data structure is Blockchain itself so this is an append-only log of all transactions that have happened; it is similar to a linked list of blocks and a block is a group of transactions that have been put together. As we know, the linked lists are blocked and they are linked with each other with a hash value that is computed on each block. A part of the next block is known as a hash chain. So in every block of transactions, there is a cache of it that is computed and that hash is added on to the next block that is about the hash chain. This Blockchain gives some certain properties of immutability. If you modified or tampered with a previous block, then the hash on the next block will not match. So it will be very hard for someone to tamper with the previous block and also these blocks are maintained in a decentralized fashion, which means that we will take down or manipulate a large net number of nodes in the network, and a large fraction of nodes in the network will be possible to tamper with, so it gives a lot of immutability properties. This is known as the Blockchain aspect of the ledger. So this is the sequence of transactions that each node in the system is going to uphold the data. It stores the most recent state of smart contracts that are the outputs of each transaction and the data elements can be added, modified, deleted, and all recorded as transactions on Blockchain. In our proposed work, we have used the first type of ledger that is the Blockchain ledger data structure.The proposed Blockchain architecture with EMC data processing of the system is described in Figure4. The design covers how to initiate a connection and how to add or create a new block to the existing block. To begin the connection, the member, who could be any of the EMC system’s stakeholders, sends a new message stating that a block or record has been formed. This recently produced block or record may comprise a doctor’s investigation, a lab technician’s test report, a nurse’s pressure reading, a pharmacist’s medication, and so on, which is distributed to all devices connected in the network via the Blockchain. The transaction is kept within the block and published to all network nodes.Figure 4
EMC data processing in Blockchain.After the Blockchain is complete, all nodes in the network have a similar copy of data, allowing members to collaborate during the verification process. They authenticate that the block containing the transactions is unchanged as soon as it is broadcast to all members of the network. Once the verification process is completed, the new node is appended to the previous block. Each block on the Blockchain is made up of three components: data, the current block’s hash value, and the previous block’s hash value. The information regarding the patient’s health is stored in the suggested system’s data. Our proposed Blockchain ledger with ECC algorithm is used to ensure the confidentiality of the hospital user data.


## 3.5. Processing of Data Storage in Edge Device

In edge computing, we can store the medical reports within the edge network; hence, we can access the data in a very fast manner. An authenticated user can decrypt and process the data with optimum speed; after processing, the updated data has been stored to the Blockchain and the cloud server. Figure5 shows the encrypted data are kept in the Blockchain ledger to improve confidentiality. Next, these encrypted data are stored in the edge server to continue further data processing. If the doctor wants to check his patient’s data, he should log in with an Electronic Medical Card with his credentials after validating his request, and he can decrypt the patient data with his private key which is described in the ECC algorithm module. Once processing has completed, the doctor again keeps the data to the Blockchain in a separate block with the previous hash value of the patient.Figure 5
Optimum data processing in edge server.Edge computing was established to allow cloud resources and services to be deployed at the network’s edge. However, it presently faces issues in terms of management and security due to its decentralized nature. Edge computing offers the ability to address issues such as reaction speed, battery life, and bandwidth cost savings, as well as data security and privacy. In the last several years, the volume of data generated by sensors, actuators, and other devices on the Internet of Things (IoT) has skyrocketed. Data from IoT devices are currently handled via the cloud, primarily using computing resources in remote data centres. Figure5 shows the optimum speed of data processing of hospital user data. As we know, edge computing is used to store the data in edge devices so we can process our data at high speed, low bandwidth, and quick response.To optimise computation and storage resources, edge computing nodes are used. In the hospital, if the doctor wants any emergency data of the patient, he can access the data within a fraction of a second. After processing in edge devices, the data are stored into the cloud server. Now all the required hospital data are stored in the cloud and at any time the user can access their data by himself and the doctors can efficiently track the patient’s details. Hence our proposed work helps to protect hospital data, provides the optimum speed of processing the data, provides the users with the ability to check their data by themselves, and increases the computational power and storage capacity.


## 3.6. The Proposed Algorithm: Edge Server and Blockchain-Based Secured Hospital User Data with ECC Algorithm

(1)
START(2)
For each user get User name and Password(2.1)
IF User is authenticated(2.1.1)
Do Access to Use EMC card(2.1.2)
Go to the Step3(2.2)
Else Invalid User(2.2.1)
Invalid User(2.2.2)
Exit(3)
Store Data to EMC card(4)
Read Plain text (Data)(5)
Start ECC Encryption Process in Edge Server(5.1)
Generate the Public Key and Private Key by Algorithm 1(5.2)
Do Encryption Process by Algorithm 2(6)
Request for Decryption Process in Edge Server(6.1)
If Authenticated User(6.2)
Do Decryption Process by Algorithm 3(7)
Data Stored in Blockchain and Cloud Server(8)
Every Authenticated User View their Own Data(9)
STOPAlgorithm 1: Key generation: HU & HA.
Input: Hospital User (HU) data; Key size: 516 bitsOutput: public, private and secret key of HU & HA(1)
createE(2)
generate G(3)
for-each Hospital User (HU) do;(4)
create private key and public key of HA(4.1)
create private key (nHA) of HA; where nHA < n(4.2)
compute public key (pHA) of HA; where pHA = nHA(G)(5)
create private key and Public key of HU(5.1)
create private key (nHU) of HU; where nHU < n(5.2)
compute public key (pHU) of HU; where pHU = nHU∗ G(6)
create secret key of HA; kHA = nHA ∗pHU(7)
create secret key of HU; kHU = nHU∗pHA(8)
end for-each;Algorithm 2:HA - ECC encryption process.
Input: plain text (PT)Output: cipher text (CPPT)(1)
readPT(2)
encodePT - > EP => EPPT(3)
computeCP(3.1)
computeCPPT; CPPT = {K∗G, EPPT + K∗pHU}(3.2)
compute X-coordinate = K∗G; Y-coordinate = EPPT + K∗pHUAlgorithm 3:HU - ECC decryption process.
Input: Cypher textOutput: Plain text(1)
get cipher point (CPPT) at receiver end(2)
computeZ = KG ∗ nHU(3)
subtractZ from Y coordinates and compute the following:(3.1)
HU < - EPPT + K∗pHU– (Z)(3.2)
HU < - EPPT + K∗pHU– (KG ∗ nHU)(3.3)
HU < - EPPT + K∗ pHU- K ∗ pHUwhere pHU = nHU∗ G(3.4)
HU < - EPPTThe proposed algorithm is used to secure the EMC by securing the data using the lightweight ECC technique in edge server database and the block chain concept ensures the data is more secured.


## 4. Security Analysis

Every user’sHA and HU are authenticated by 2-layer protection. To change the password initially, the user is asked to enter the PAN card number to validate the user along with the user name. Once the user is validated, an autogenerated message is sent to the user’s registered phone number. Clicking on the message which consists of hyperlink validates the user. Hence the user is double authenticated to change the password. The security features provided in the proposed system are essentially sustained by cryptography algorithms and hash functions. The following subsection discusses threats, security issues, challenges, and solutions for different kinds of attacks in the proposed system.


### 4.1. Password Guessing Attack

Password guessing attack is also known as brute force attack. An attacker can easily guess the password with certain combinations of user credentials. Therefore, passwords should be set strongly to avoid this attack. Every registeredHA and HU should create their password by adhering to the following rules: password should contain a minimum of 10 characters to strengthen the security. Password should contain at least two uppercase alphabets, 2 numbers, and 2 special characters. This constraint is validated against the password while setting the password.


### 4.2. Man-in-the-Middle Attack

In this approach, the hacker may be able to deceive both shared entities while retaining none of their sensitive information. The proposed system uses an ECC algorithm that encrypts theHU and HA user’s data. PT is encrypted as CPPT = {K∗G, EPPT + K∗pHU}. The encrypted data is stored in Blockchain with the hash key values. The user is encrypted twice using the encryption key and hash key. Therefore, the proposed algorithm achieves dual encryption. If any attacker who is in between the hospital and user attempts to alter a hospital user’s message, the key does not match with the decrypted message which is given as HU < - EPPT + K∗ pHU - K ∗ pHU.


### 4.3. Message Modification Attack

The integrity of the suggested approach is protected from harmful usage. To maintain integrity, Blockchain maintains a chain connection by linking the previous block value with the current block value. If an attacker attempts to change a block value, the same will be cross verified with the entire block. Therefore, the distributed Blockchain data identifies the attacker and alerts the HA and HU. Hence our proposed Blockchain-based method does not allow message modification attacks.


### 4.4. Reply Attack

In this proposed approach, the attacker can delay the message sent between theHA and the HU. However, if the communication is overdue, the attached timestamp will be unacceptable. Then the communication will be unauthenticated. If the timestamp is not correct, the hospital administrator just discards the notification without taking any further action. A legitimate session key can be disrupted by an opponent (K = HU, T1, F (HU, T1)) and again sent to the user. The hospital admin checks the timestamp value and if the timestamp value is not equal to T1, the message is rejected by the hospital admin. Even if the attacker generates a fresh timestamp, the hash value cannot be manipulated by the attacker. Finally, the message will be rejected by the hospital user. Hence, the replay attack is invalid in our proposed system.


## 4.1. Password Guessing Attack

Password guessing attack is also known as brute force attack. An attacker can easily guess the password with certain combinations of user credentials. Therefore, passwords should be set strongly to avoid this attack. Every registeredHA and HU should create their password by adhering to the following rules: password should contain a minimum of 10 characters to strengthen the security. Password should contain at least two uppercase alphabets, 2 numbers, and 2 special characters. This constraint is validated against the password while setting the password.


## 4.2. Man-in-the-Middle Attack

In this approach, the hacker may be able to deceive both shared entities while retaining none of their sensitive information. The proposed system uses an ECC algorithm that encrypts theHU and HA user’s data. PT is encrypted as CPPT = {K∗G, EPPT + K∗pHU}. The encrypted data is stored in Blockchain with the hash key values. The user is encrypted twice using the encryption key and hash key. Therefore, the proposed algorithm achieves dual encryption. If any attacker who is in between the hospital and user attempts to alter a hospital user’s message, the key does not match with the decrypted message which is given as HU < - EPPT + K∗ pHU - K ∗ pHU.


## 4.3. Message Modification Attack

The integrity of the suggested approach is protected from harmful usage. To maintain integrity, Blockchain maintains a chain connection by linking the previous block value with the current block value. If an attacker attempts to change a block value, the same will be cross verified with the entire block. Therefore, the distributed Blockchain data identifies the attacker and alerts the HA and HU. Hence our proposed Blockchain-based method does not allow message modification attacks.


## 4.4. Reply Attack

In this proposed approach, the attacker can delay the message sent between theHA and the HU. However, if the communication is overdue, the attached timestamp will be unacceptable. Then the communication will be unauthenticated. If the timestamp is not correct, the hospital administrator just discards the notification without taking any further action. A legitimate session key can be disrupted by an opponent (K = HU, T1, F (HU, T1)) and again sent to the user. The hospital admin checks the timestamp value and if the timestamp value is not equal to T1, the message is rejected by the hospital admin. Even if the attacker generates a fresh timestamp, the hash value cannot be manipulated by the attacker. Finally, the message will be rejected by the hospital user. Hence, the replay attack is invalid in our proposed system.


## 5. Performance Evaluation

### 5.1. Setup for Experiments

In this paper, we have proposed to improve the security level of the hospital user’s data. Our proposed system has four major entities, as explained in the system model that stores the user’s data to EMC: use ECC encryption algorithm to secure the data, use Blockchain to store the encrypted data to ensure the confidentiality and integrity of the data, and use the edge server to process the secured data which is used to increase the transmission rate, reduce the computational power, increase the computational memory, etc. Finally the encrypted data are stored in the cloud. We have done our experiments in MAT LABR 2008a on Intel(R) Core(TM) i5-1035G1 CPU @ 1.00 GHz 1.19 GHz with 8.00 GB (7.79 GB usable) under Ms-Windows platform. The following characteristics are used to assess the system’s performance: time for key generation, time for data encryption, time for data decryption, time for data upload, time for data download, file processing speed, and cost of security.


### 5.2. Results of Experiments

#### 5.2.1. Time Required for Key Generation

Key generation time is the amount of time it takes to generate keys in cryptography. The created key is used for the encryption process and decryption process. In this system, the key generation time is estimated for a set of hospital users ranging from 10 to 100 users at a time interval of 10 units. Figure6 shows how much amount of time is required for key generation based on ECC and non ECC algorithms. As expected, the key generation time increases as the number of hospital users increases. The time spent on key creation is not proportionate to the growth of hospital users, according to the data. The time usage for key generation barely differs by 0.005 seconds as the number of hospital users increases from 10 to 100. The amount of time it takes to generate a key varies only by 0.005 seconds.Figure 6
Comparison of key generation ECC with non-ECC algorithms.Table2 shows a detailed comparison of key generating methods with ECC and non-ECC an algorithm like a Certificate Less Proxy Reencryption (CL-PRE) scheme [23], Unidirectional Proxy Reencryption (UD-PRE) schemes [24], and Proxy Reencryption (PRE) [25]. The ECC is more substantial than other non-ECC compare methods, according to this observation.Table 2
Key generation value of ECC and non-ECC algorithms.
Key generation time (S)No of usersECC (proposed)CL-PREUD-PREPRE100.002220.01050.0050.00621200.002450.0130.005250.00735300.002960.01960.005760.007592400.003060.02650.0060.00802500.003380.03050.006120.008935600.003890.02750.00650.00892700.004020.03450.00610.00927800.004290.03550.006520.00963900.004730.037580.007640.009991000.004980.04550.00790.010810


#### 5.2.2. Processing Time of ECC with Blockchain

The file encryption time is defined as the time it takes the hospital administrator to encrypt a file. To calculate the computational cost of processing a file, how much time is required to convert plain text to cypher text which means file encryption time and how much time is required for convert cypher text to plain text which means file decryption time and secret key generation time are taken into account. The time it takes to encrypt files of various algorithms like ECC and non-ECC is depicted in Figure7.Figure 7
Time consumption with various input file size.The statistic for encryption time demonstrates when computation time of ECC algorithm is compared with non-ECC algorithms. ECC required minimum amount of time to encrypt and decrypt the file as key size is 516 bits.The decryption result has a similar tendency to that of encryption. It also demonstrates that key computation time has no effect on file size, which remains constant even with minor alterations.In ECC, the entire time spent computing encryption key varies between 0.020 and 0.0195 seconds. Table3 shows detailed computation time values of encryption time, encryption key generation time, decryption time, and decryption key generation time with various cryptographic algorithms. The file decryption time in this ECC with a Blockchain-based system is defined as the time it takes the hospital user to decrypt a file based on his request from the Electronic Medical Card.Table 3
Encryption and decryption time with various algorithms.
Cryptography algorithmsEncryption time in (S)Encryption key generation time (S)Decryption time in (S)Decryption key generation time (S)ECC (proposed)0.25330.0210.29000.0256CL-PRE0.28330.0290.35660.0314UD-PRE0.34220.0430.39950.0455PRE0.35990.0500.55330.0589


### 5.3. Processing the Data in Edge Server

In edge computing, we can store the medical reports within the edge network; hence, we can access the data in a very fast manner. An authenticated user can decrypt the data and process the data with optimum speed. After processing, the updated data has been stored to the Blockchain and the cloud server.The entire time it takes to upload a file to edge server as well as download a file from the edge, the server is also used to evaluate the suggested methodology’s performance. The following components make up the total time: (i) secret key generation time, (ii) time taken converting plain text to cypher text or decryption, (iii) time taken to upload the file to edge server or download a file from edge server, and (iv) total time required for all communications like get request time from hospital user through Electronic Medical Card and response time for uploading or downloading the file. Figure8 shows the file upload time process performance as a function of file size.Figure 8
Downloading speed with respective edge server and cloud server.As the size of a file grows larger, the time it takes to upload it to the health edge server and cloud grows longer. The file downloading procedure is the inverse of the uploading process, in which the hospital administrator obtains the original data file. The download time varies depending on the input size and bandwidth of the network. The download time increases gradually as the input size of the file increases from 10 to 250 MB.Table4 shows how much amount of time is required to upload file to edge server and cloud server and how much amount of time is required to download the file from edge server and cloud. The result also shows that the upload and download speed are nearly consistent, with only 1 Mbps difference over the calculated range of 10 to 250 MB.Table 4
Downloading speed with edger server vs cloud server.
File sizeUploading speed in cloudDownloading speed in cloudUploading speed in edge serverDownloading speed in edge server1013.9316.680.5130.7595014.56718.9560.65670.86710015.34520.8930.7570.95815015.34525.5670.8571.34320015.34526.7890.8571.34325015.34526.9990.8571.343


### 5.4. Security Level of the System

Based on our analysis, the proposed system provides more security to hospital user’s data. There may be a delay in the system if the hospital management uses only the cloud to upload and download the file. We have proposed edge-based system to upload and download the file so the hospital users can process the data at an optimum speed based on the size of the input files, which provides a high-security level to our system as we used ECC-based encryption algorithm and the encrypted user’s data are stored in the Blockchain to increase the confidentiality and integrity of the system.


## 5.1. Setup for Experiments

In this paper, we have proposed to improve the security level of the hospital user’s data. Our proposed system has four major entities, as explained in the system model that stores the user’s data to EMC: use ECC encryption algorithm to secure the data, use Blockchain to store the encrypted data to ensure the confidentiality and integrity of the data, and use the edge server to process the secured data which is used to increase the transmission rate, reduce the computational power, increase the computational memory, etc. Finally the encrypted data are stored in the cloud. We have done our experiments in MAT LABR 2008a on Intel(R) Core(TM) i5-1035G1 CPU @ 1.00 GHz 1.19 GHz with 8.00 GB (7.79 GB usable) under Ms-Windows platform. The following characteristics are used to assess the system’s performance: time for key generation, time for data encryption, time for data decryption, time for data upload, time for data download, file processing speed, and cost of security.


## 5.2. Results of Experiments

### 5.2.1. Time Required for Key Generation

Key generation time is the amount of time it takes to generate keys in cryptography. The created key is used for the encryption process and decryption process. In this system, the key generation time is estimated for a set of hospital users ranging from 10 to 100 users at a time interval of 10 units. Figure6 shows how much amount of time is required for key generation based on ECC and non ECC algorithms. As expected, the key generation time increases as the number of hospital users increases. The time spent on key creation is not proportionate to the growth of hospital users, according to the data. The time usage for key generation barely differs by 0.005 seconds as the number of hospital users increases from 10 to 100. The amount of time it takes to generate a key varies only by 0.005 seconds.Figure 6
Comparison of key generation ECC with non-ECC algorithms.Table2 shows a detailed comparison of key generating methods with ECC and non-ECC an algorithm like a Certificate Less Proxy Reencryption (CL-PRE) scheme [23], Unidirectional Proxy Reencryption (UD-PRE) schemes [24], and Proxy Reencryption (PRE) [25]. The ECC is more substantial than other non-ECC compare methods, according to this observation.Table 2
Key generation value of ECC and non-ECC algorithms.
Key generation time (S)No of usersECC (proposed)CL-PREUD-PREPRE100.002220.01050.0050.00621200.002450.0130.005250.00735300.002960.01960.005760.007592400.003060.02650.0060.00802500.003380.03050.006120.008935600.003890.02750.00650.00892700.004020.03450.00610.00927800.004290.03550.006520.00963900.004730.037580.007640.009991000.004980.04550.00790.010810


### 5.2.2. Processing Time of ECC with Blockchain

The file encryption time is defined as the time it takes the hospital administrator to encrypt a file. To calculate the computational cost of processing a file, how much time is required to convert plain text to cypher text which means file encryption time and how much time is required for convert cypher text to plain text which means file decryption time and secret key generation time are taken into account. The time it takes to encrypt files of various algorithms like ECC and non-ECC is depicted in Figure7.Figure 7
Time consumption with various input file size.The statistic for encryption time demonstrates when computation time of ECC algorithm is compared with non-ECC algorithms. ECC required minimum amount of time to encrypt and decrypt the file as key size is 516 bits.The decryption result has a similar tendency to that of encryption. It also demonstrates that key computation time has no effect on file size, which remains constant even with minor alterations.In ECC, the entire time spent computing encryption key varies between 0.020 and 0.0195 seconds. Table3 shows detailed computation time values of encryption time, encryption key generation time, decryption time, and decryption key generation time with various cryptographic algorithms. The file decryption time in this ECC with a Blockchain-based system is defined as the time it takes the hospital user to decrypt a file based on his request from the Electronic Medical Card.Table 3
Encryption and decryption time with various algorithms.
Cryptography algorithmsEncryption time in (S)Encryption key generation time (S)Decryption time in (S)Decryption key generation time (S)ECC (proposed)0.25330.0210.29000.0256CL-PRE0.28330.0290.35660.0314UD-PRE0.34220.0430.39950.0455PRE0.35990.0500.55330.0589


## 5.2.1. Time Required for Key Generation

Key generation time is the amount of time it takes to generate keys in cryptography. The created key is used for the encryption process and decryption process. In this system, the key generation time is estimated for a set of hospital users ranging from 10 to 100 users at a time interval of 10 units. Figure6 shows how much amount of time is required for key generation based on ECC and non ECC algorithms. As expected, the key generation time increases as the number of hospital users increases. The time spent on key creation is not proportionate to the growth of hospital users, according to the data. The time usage for key generation barely differs by 0.005 seconds as the number of hospital users increases from 10 to 100. The amount of time it takes to generate a key varies only by 0.005 seconds.Figure 6
Comparison of key generation ECC with non-ECC algorithms.Table2 shows a detailed comparison of key generating methods with ECC and non-ECC an algorithm like a Certificate Less Proxy Reencryption (CL-PRE) scheme [23], Unidirectional Proxy Reencryption (UD-PRE) schemes [24], and Proxy Reencryption (PRE) [25]. The ECC is more substantial than other non-ECC compare methods, according to this observation.Table 2
Key generation value of ECC and non-ECC algorithms.
Key generation time (S)No of usersECC (proposed)CL-PREUD-PREPRE100.002220.01050.0050.00621200.002450.0130.005250.00735300.002960.01960.005760.007592400.003060.02650.0060.00802500.003380.03050.006120.008935600.003890.02750.00650.00892700.004020.03450.00610.00927800.004290.03550.006520.00963900.004730.037580.007640.009991000.004980.04550.00790.010810


## 5.2.2. Processing Time of ECC with Blockchain

The file encryption time is defined as the time it takes the hospital administrator to encrypt a file. To calculate the computational cost of processing a file, how much time is required to convert plain text to cypher text which means file encryption time and how much time is required for convert cypher text to plain text which means file decryption time and secret key generation time are taken into account. The time it takes to encrypt files of various algorithms like ECC and non-ECC is depicted in Figure7.Figure 7
Time consumption with various input file size.The statistic for encryption time demonstrates when computation time of ECC algorithm is compared with non-ECC algorithms. ECC required minimum amount of time to encrypt and decrypt the file as key size is 516 bits.The decryption result has a similar tendency to that of encryption. It also demonstrates that key computation time has no effect on file size, which remains constant even with minor alterations.In ECC, the entire time spent computing encryption key varies between 0.020 and 0.0195 seconds. Table3 shows detailed computation time values of encryption time, encryption key generation time, decryption time, and decryption key generation time with various cryptographic algorithms. The file decryption time in this ECC with a Blockchain-based system is defined as the time it takes the hospital user to decrypt a file based on his request from the Electronic Medical Card.Table 3
Encryption and decryption time with various algorithms.
Cryptography algorithmsEncryption time in (S)Encryption key generation time (S)Decryption time in (S)Decryption key generation time (S)ECC (proposed)0.25330.0210.29000.0256CL-PRE0.28330.0290.35660.0314UD-PRE0.34220.0430.39950.0455PRE0.35990.0500.55330.0589


## 5.3. Processing the Data in Edge Server

In edge computing, we can store the medical reports within the edge network; hence, we can access the data in a very fast manner. An authenticated user can decrypt the data and process the data with optimum speed. After processing, the updated data has been stored to the Blockchain and the cloud server.The entire time it takes to upload a file to edge server as well as download a file from the edge, the server is also used to evaluate the suggested methodology’s performance. The following components make up the total time: (i) secret key generation time, (ii) time taken converting plain text to cypher text or decryption, (iii) time taken to upload the file to edge server or download a file from edge server, and (iv) total time required for all communications like get request time from hospital user through Electronic Medical Card and response time for uploading or downloading the file. Figure8 shows the file upload time process performance as a function of file size.Figure 8
Downloading speed with respective edge server and cloud server.As the size of a file grows larger, the time it takes to upload it to the health edge server and cloud grows longer. The file downloading procedure is the inverse of the uploading process, in which the hospital administrator obtains the original data file. The download time varies depending on the input size and bandwidth of the network. The download time increases gradually as the input size of the file increases from 10 to 250 MB.Table4 shows how much amount of time is required to upload file to edge server and cloud server and how much amount of time is required to download the file from edge server and cloud. The result also shows that the upload and download speed are nearly consistent, with only 1 Mbps difference over the calculated range of 10 to 250 MB.Table 4
Downloading speed with edger server vs cloud server.
File sizeUploading speed in cloudDownloading speed in cloudUploading speed in edge serverDownloading speed in edge server1013.9316.680.5130.7595014.56718.9560.65670.86710015.34520.8930.7570.95815015.34525.5670.8571.34320015.34526.7890.8571.34325015.34526.9990.8571.343


## 5.4. Security Level of the System

Based on our analysis, the proposed system provides more security to hospital user’s data. There may be a delay in the system if the hospital management uses only the cloud to upload and download the file. We have proposed edge-based system to upload and download the file so the hospital users can process the data at an optimum speed based on the size of the input files, which provides a high-security level to our system as we used ECC-based encryption algorithm and the encrypted user’s data are stored in the Blockchain to increase the confidentiality and integrity of the system.


## 6. Conclusion

Maintaining, securing, and sharing medical data of patients in hospitals are a considerable challenging situation for hospital management. Invasion of patient privacy data should be strictly limited to authorized users. There are various privacy concerns that may hinder the data in which patient privacy could be abused. To handle these privacy concerns, the proposed framework uses an enhanced security methodology for sharing patient’s and doctor’s medical information with health management in a secured way. The proposed methodology uses a framework that stores the data in EMC. This card stores information like patient personal information, medical record, and consultation details. The information stored in the card is secured using the ECC algorithm. The algorithm uses the key to encrypt and decrypt the data. The data of the end-users are stored efficiently in cloud infrastructure. This mechanism provides more flexibility in viewing the medical data at any period of time. The experimental results reveal that the time taken to generate the key, encryption, and decryption is improved compared to other existing algorithms. The proposed framework also offers edge servers at the ground to process the data effectively and store the data in cloud servers. This research ensures not only data security but also data confidentiality and authenticity by processing and storing the data in the Blockchain ledger.



---

*Source: 6966206-2021-10-16.xml*