# A Medical Data Privacy Protection Scheme Based on Blockchain and Cloud Computing

Authors: Liang Huang; Hyung-Hyo Lee
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

With the features of decentralization and trustlessness and through distributed data storage, point-to-point transmission, and encryption algorithms, blockchain has shed new light on the security and protection of medical data, and it can resolve the contradiction between data sharing and privacy protection with proper security strategies. In this paper, we integrate the strengths of both blockchain and cloud computing and build the privacy protection scheme for medical data based on blockchain and cloud computing. This scheme introduces cloud computing and provides services to blockchain nodes with cloud server computing; meanwhile, it collects, analyzes, processes, and maintains medical data in the identity authentication interface and solves the insufficient computing abilities of some nodes in blockchain so as to verify the authenticity and reliability of data. The simulation experiment proves that the proposed scheme is effective. It can achieve the secure protection and integrity verification of medical data and address the problems of high computing complexity, data sharing, and privacy protection.


---

## Body

## 1. Introduction

Intelligent hospitals are having increasing demands for information security, and it has become extremely urgent to protect personal private data of patients. Currently, these hospitals have been focusing on how to use convenient internet medical services to prevent the medical information system from being attacked and personal information from being stolen [1]. As blockchain and cloud computing come to maturity, related techniques have achieved rapid development in medical and health services, including medical informatization, mobile healthcare, medical e-commerce, wearable devices, and online medical services. The blockchain connects the participants in a peer-to-peer manner. The participants jointly maintain a system and express the cooperation rules through consensus mechanism and smart contract, so as to achieve a more flexible cooperation mode [2]. The concept of smart contract appeared in 1994 and laid the foundation for bitcoin. A smart contract is a set of commitments defined in digital form, including agreements on which contract participants can execute these commitments [3]. In a broad sense, blockchain technology must include four aspects: point-to-point network design, application of encryption technology, implementation of distributed algorithm, and use of data storage technology. Others may involve distributed storage, machine learning, VR, internet of things, big data, etc. In a narrow sense, blockchain only involves data storage technology, database or file operation, etc. [4]. Apart from conventional encryption methods, proxy reencryption and attribute-based encryption (ABE) can also be used in medical data sharing and patient privacy protection [5]. In traditional encryption methods, the client first downloads and decrypts locally encrypted text data. Then, before sending to the specified client, the client encrypts the data with the public key of the specified client, who can decrypt the data, but it requires plenty of network overhead and operating costs and it also occupies the client’s limited memory, multiplying the client’s costs [6]. Proxy reencryption is to convert the ciphertext encrypted by A’s public key into the ciphertext to be decrypted by B’s private key so as to realize password sharing. Proxy reencryption means that a client can decrypt the ciphertext of another associated client without leaking users’ private key and plaintext, which is mainly end-to-end [7]. In ABE, a data owner can set an access strategy authority in data encryption, and only those clients that satisfy this authority can decrypt the text in order to accomplish data sharing and personal privacy protection, which is one-to-many [8]. Based on attribute-based encryption (ABE), the problem of private data sharing can be solved by reasonable configuration and sharing strategy. According to the embedded objects, ABE can be divided into KP-ABE (Key-Policy ABE) and CP-ABE (Ciphertext-Policy ABE). With the popularization of intelligent healthcare, the medical institutions can have the data stored in the cloud to save equipment cost and lower costs. For the sake of data security and personal privacy protection of patients, some medical establishments need to encrypt the data in advance to form ciphertexts. Besides, they need other medical institutions to share certain ciphertexts frequently and prevent anyone (including cloud service providers) from cracking these data ciphertexts. In blockchain and cloud computing, the combination of decentralization and tamper-proofing of blockchain with the nodes of distributed cloud computing can help health institutions to carry out security and privacy protection of patient data at a lower cost and achieve data interaction among medical organizations. These will have a profound impact on the development of future healthcare industry.The special contributions of this paper include the following:(i)
Aiming at data sharing and patient privacy protection of intelligent hospitals, we explore in-depth conventional encryption methods, proxy reencryption, attributed-based encryption, and so forth. Additionally, we also investigate how to apply blockchain and cloud computing technology in intelligent medical scenarios(ii)
To overcome the highly complex computation brought by encryption, we adopt the proxy reencryption method and ABE method to provide a specific access control mechanism to users and design the data sharing and replacement and privacy protection rule participated by the cloud service side(iii)
We propose a distributed medical data privacy protection scheme, bring in a cloud computing pattern, and designed blockchain-based distributed data management architecture to strengthen the computing power of the user side. Meanwhile, we also use the private chain in blockchain to ensure the security of patient data information(iv)
The simulation experiment has verified the effectiveness of the method in this paper. With blockchain and cloud computing, not only healthcare data can be effectively shared among medical institutions, but also the privacy of patient information can be assuredThe remainder of this paper is organized as follows. Section2 discusses related works, and the use of proxy reencryption for authorization management and access control in cloud computing is outlined in Section 3. The medical data privacy protection scheme based on blockchain and cloud computing is presented in Section 4. Section 5 shows the experimental simulation results, and Section 6 concludes the paper with a summary and proposed direction for future research.


## 2. Related Work

Medical data has precisely recorded people’s illnesses, and medical records and the secure storage and sharing of medical data and patient privacy protection have increasingly become a priority to build intelligent hospitals. Traditional data access control technology builds and implements a safety access strategy with a completely reliable server, making it difficult to get adapted to the distributed network environment in modern times. Featured by decentralization and trustlessness, blockchain has given people a brand-new idea through distributed data storage, reliable point-to-point transmission, a consensus mechanism, and encryption algorithms [9]. In the security demand under the cloud computing environment in recent years, ABE is an important technological means, and the ABE access control mechanism has been studied extensively in the computing environment. As an encryption mechanism that uses attribute as a public key, the mechanism, in essence, links users with ciphertexts through the attribute. Its flexibility of encryption and access control form has greatly ensured the security of cloud data storage [10]. In the meanwhile, it has also achieved fine-grained access and become the key technique for secure cloud storage access control. However, the traditional ABE mechanism fails to completely guarantee data confidentiality, effectively prevent collision attack, or satisfy the forward and backward security of attribute revocation and the huge computing costs caused by revocation. It will be a significant core of research to apply blockchain into cloud computing and use the security mechanism of blockchain to enhance the secure storage and performance of cloud computing. The integration of blockchain and cloud computing plus proper security strategy can solve the contradiction between data sharing and privacy [11].This paper has brought forth a distributed medical data privacy protection scheme based on blockchain and cloud computing technology with an aim at the open-ended question brought by data sharing of intelligent hospitals and personal privacy protection of patients. Concretely, on the one hand, the scheme has introduced a cloud computing pattern and designed blockchain-based distributed data management architecture for intelligent hospitals, in which it uses a consortium chain in the blockchain and ensures the security of user information in order to guarantee the operating efficiency of blockchain and reduce the computing burden of the user side. Besides, to handle the highly complex computing caused by encryption, it has used proxy reencryption technology and ABE technology to offer specific access control mechanisms to users. The access of every user is based on condition and attribute, which provides a secure exchange of patient information for every doctor. The response side encrypts all medical data. The cloud nodes process the medical data transmitted to get and return the final ciphertext to the request side. On the other hand, it has designed the data sharing and replacement as well as privacy protection rules with the participation of the cloud computing service side, and it can greatly solve the difficulties in secure storage and sharing of intelligent hospitals.The underlying communication of blockchain generally adopts P2P communication. P2P technology makes the communication on the network easy and direct and reduces the dependence on the intermediate server to the minimum. P2P technology has the characteristics of decentralization, scalability, robustness, high cost performance, and load balancing. Consensus mechanism is the core of blockchain, which maintains the normal operation of blockchain. Consensus mechanism is an algorithm to reach consensus on the order of things in a period of time. Common consensus mechanisms include proof of work (POW), proof of stake (POS), and practical Byzantine fault tolerance (PBFT). Consensus mechanism ensures that the uniqueness of information and data cannot be tampered with. Taking advantage of this, blockchain technology can be widely used in intelligent asset management, such as intellectual property protection and domain name management, to ensure that the contract is not tampered with. At present, relevant researchers all over the world have been studying medical data sharing and privacy protection. He et al. has proposed a medical data sharing model of cloud storage, which adopts the distributed sharing mechanism and which meets the interoperability requirements of CCR standard [12]; however, there is still a huge gap with the data security and privacy protection as required by intelligent hospitals. Seyedmostafa et al. has built a portable medical system architecture, which supports data security and privacy protection through the CIA/HIPAA protocol, but which does not meet the requirement of interoperability [13]. Liang et al. have used the CCR standard and designed a solution—HealthVault, which is a web medical and health record system and which adopts the client-server pattern. All medical data are stored in a third-party server, so security and reliability cannot be guaranteed [14]. The Healthticket model designed by Kyazze et al. enables doctors to access medical data of patients through the web app [15]. This model ensures the private information of patients with CP-ABE mechanism, but the access requires multiple licenses. The security, privacy, and interoperability of all these models are difficult to meet the requirements of intelligent healthcare. However, blockchain technology completes permission validation through a third party, which has solved the above problems satisfactorily, balanced medical data sharing and privacy protection, eliminated central nodes, and improved access efficiency.Proxy reencryption is a key conversion mechanism between ciphertexts and it was proposed by Cheng et al. Wang et al. has given its normative formal definition in the 2005 Network & Distributed System Security Symposium (NDSS) and the 2007 ACM Conference on Computer and Communications Security and constructed the one-way proxy reencryption algorithm [16, 17]. Based on the above two studies, Xu has constructed the first valid two-way proxy reencryption algorithm [18]. Afterward, Yang et al. have also constructed the secure one-way proxy reencryption scheme without bilinear pairing [19]. Ateniese et al. had configured the privacy proxy reencryption algorithm in line with CPA security. As for ABE, Fan et al. had constructed the KP-ABE algorithm to support monotonous access for the first time, and the ciphertext uses the attribute for encryption [20]. The key is tied to user access strategy and only when the access strategy of the key matches the attribute of the passphrase can the user correctly decrypt the passphrase. Willison et al. had raised a secure and unbounded ABE algorithm [21], the size of whose attribute set is not confirmed when initializing the public parameters. Moreover, the available attributes are infinite polynomial orders, and new attributes can be added in the specific implementation. Hakak et al. had improved the ABE algorithm, which had extended the decryption condition to the universal monotonous access control and adopted a fine-sorted access control key [22]. It has greatly expanded the coverage of the ABE algorithm [23]. Later, Hussein et al. had come up with an ABE algorithm approximate to actual access control, but loopholes still exist in the security [24]. Conti et al. had put forward an ABE algorithm for DBDH problems, but the access mode is merely a simple attribute operation without reaching universal access control [25]. Integrating blockchain and cloud computing in the research of secure storage of healthcare data has found a new direction for the relevant theoretical research of information security and promoted extended applications of blockchain in the fields, which involve sensitive data such as intelligent healthcare. In this sense, it has certain practical value [26].


## 3. Use of Proxy Reencryption for Authorization Management and Access Control in Cloud Computing

When a cloud hospital needs to share the data authorization with another hospital, it needs to get the other’s public key. Thus, it needs to generate a corresponding switch key for every user and then sends it to the cloud. When a user requests access to these data resources, the cloud will return the encrypted text of data and the corresponding key ciphertext according to the user’s public key after verifying the identity authentication and authorization authentication, and the user decrypts these two ciphertext files to get the original plaintext resources of the corresponding data [27].The cloud needs to generate a reencrypted ciphertext for every authorized user, and those unauthorized users have no right to obtain the reencrypted ciphertext of other users [28]. Even if unauthorized users do get the reencrypted ciphertext, they cannot decrypt the corresponding plaintext data. When applying ABE in proxy reencryption, it can authorize more than one user with the same group of attributes at one time. The procedure of proxy reencryption is as follows:
(1)
Hospital A requests the cloud service provider to generate its pair of public and private keys and encrypts the plaintextM of medical data with its public key CPKa to get the ciphertext CPKa=EncPKA,M. Here, M is what Hospital A wants to give to Hospital B.(2)
The cloud service provider generates a pair of public and private keys and returns them to Hospital A. After sendingCPKa to the cloud service provider, Hospital A also calculates for the cloud service provider and generates the specific key RKA→B.(3)
The intermediate proxy uses the keyRKA→B generated by Hospital A to change the ciphertext CPKa into the encrypted text CPKb, which can also be decrypted, by the private key of Hospital B. Here, the proxy only provides conversion service, and it cannot get the original plaintext data resources.(4)
Later, the proxy will send the encrypted text dataCPKb to Hospital B.(5)
After receiving the ciphertext from the proxy, Hospital B decrypts and gets the plaintext dataM of medical data, secretly shared by Hospital A.The sketch of proxy reencryption is shown in Figure1.Figure 1
Sketch of proxy reencryption.The above proxy reencryption process has released the burden of Hospital A, which only needs to generate the key of the proxy while the transmission of specific medical data, the encrypted conversion of data, and the file storage are all completed by the cloud service provider. Proxy reencryption can achieve the sharing of ciphertext medical data in the cloud without leaking the decryption key of the data owner. The data can be stored once and shared many times, and only the shared key needs to be generated for the control of authority [29].


## 4. Medical Data Privacy Protection Scheme Based on Blockchain and Cloud Computing

### 4.1. Proxy Reencryption Based on Paillier and RSA

We adopt the proxy reencryption of Paillier homomorphism and the RSA algorithm to prevent shared medical data from leaking. If an encrypted function only satisfies the addition homomorphism, it can only be added and subtracted; if an encrypted function only satisfies multiplicative homomorphism, it can only perform multiplication and division. The Paillier algorithm is homomorphic to addition, and the RSA algorithm is homomorphic to multiplication. In an untrusted cloud storage, when the confidentiality of data cannot be guaranteed, the proxy reencryption part is used for reencryption, and the part is used for authorization. In the untrusted open environment of the third party, it can ensure the confidentiality of sensitive data in cloud storage. In homomorphic encryption, the private key encrypts medical data and only the client has the public key. In the keys generated by using proxy reencryption, even if a malicious attacker gets one of them, the attacker still needs another different key for decryption. If the attacker gets all these encrypted data, he cannot decrypt and get the original plaintext data between the client and the server. This also makes sure that even the processor cannot access the information of the data [30]. The algorithms begin with initialization and outputs from the central authentication center the pair of public and key keys, the master key of the center, the public key of the system, and the common parameters. Below are the specific implementation steps.Step 1.
Generate a pair of public and private keys.Hospital A and Hospital B request the cloud service provider to generate their public keys and private keys, respectively. After the provider generates a pair of a public key and private key for Hospital A and Hospital B separately, the cloud service provider will return to Hospital A and Hospital B.Step 2.
Randomly choose two relatively big and independent prime numbersp,q to make
(1)pq,p−1q−1=1.Step 3.
Calculate(2)n=pqφn=p−1q−1,emakesGcde,φn=1,(3)c=memodn,(4)λ=cmp−1,q−1,in which m is the information to be encrypted.Step 4.
Choose a random integerg to make g∈Zn∗.Step 5.
Use Equation (4) below and calculate the existence of modularized multiplicative inverse to determine n and separate the sequence of g.
(5)μ=Lcλmodn2−1modn,in which, function L is defined as the following equation:
(6)Lw=w−1n.Step 6.
The public key isn,g and the private key is λ,μ.Step 7.
Generate the encrypted file.Hospital A first uses RSA encryption to calculate and encrypt data to generate the encrypted file C1. Then, Hospital A encrypts according to the second layer, encrypts the key of RSA with its public key, and generates the encrypted file C2. Finally, Hospital A uploads two encrypted files: C1 and C2 into the server.(7)Encrypt⟶Encm,pk.(8)c=gm⋅nrmodn2.Step 8.
Makem the information to be encrypted and m∈Zn.Step 9.
Randomly selectr and make r∈Zn∗.Step 10.
Calculate the ciphertext:Step 11.
Construct the key of proxy reencryption.Hospital A requests the public key of Hospital A from the cloud service provider. The provider will return this public key to Hospital A. Hospital A uses the public key of Hospital B and its private key to generate the reencryption key, and then Hospital A uploads the newly generated reencryption key into the server.Step 12.
Calculate the public key and private keyRsk,Rpk.Step 13.
The Paillier algorithm generates the reencrypted ciphertext and the public keyRpk is sent to the cloud computing server.For a given public keyRpk and the second-layer ciphertext, this algorithm can use the reencryption key and generate the first-layer ciphertext of the public key Rpk. The server uses the reencryption key and the ciphertext uploaded by Hospital A to conduct proxy reencryption computing and generates new ciphertext.Step 14.
Hospital B requests data anddecrypts⟶Decc,sk.Hospital B requests the cloud server to decrypt the data and the corresponding ciphertext. The cloud server sends the reencrypted text to Hospital B. Hospital B decrypts the ciphertext, gets the key, and uses RSA for decryption to get the original plaintext data.Step 15.
Ciphertextc∈Zn∗.Step 16.
Compute the information.(9)m=Lcλmodn2Lgλmodn2modn.


### 4.2. Measurement of Ability of This Scheme against Malicious Attacks

Firstly, make the client set to implement the encryption taskρT. For the ith responder in ρT, its encrypted data is a m-dimensional vector, represented by si. So, si=si,j,j=1,⋯,m. After receiving the encrypted data, the cloud node ENT will request ρT the credibility of every client in the response side to the central authentication center.The reliability measurementsi is weighed through the difference between si and the final result sT. Here, we have defined the extent of difference between si and sT as the square of Euclidean distance between si and sT, which can be calculated through the following equation:
(10)di=∑j=1msi,j−sT,j2,in which, the smaller the value of di, the higher the credibility of si. The degree of difference is the extent of difference among the values of variables, and it is used to measure the safety risk.When the central authentication center receives thedi:i∈ρT from the cloud node ENT, it needs to find the median of difference d^. Introduce the adjustment parameter δ, and for the response side of the ith encryption task, if the difference of encrypted data is di≤d^+δ, the credibility of this user will increase. Besides, the smaller the di, the more the increase of the credibility. If di>d^+δ, then the credibility of this client decreases. In addition, the bigger the value of di−d^, the more the reduction of the credibility. After getting the credibility ri before implementing the current encryption task of the ith client in ρT, the central authentication center has the following equation to calculate the credibility of this client:
(11)ri+1=ri+signd^+δ−di+12⋅1−ri⋅exp−u⋅di−γ+signd^+δ−di−12⋅ri⋅1−exp−v⋅di−d^−η,in which, u,γ,v, and η are the parameters to confirm ri+1, and their values are all bigger than 0. signx is a sign function, and it is defined as follows: if x>0,signx=1; if x=0,signx=0; and if x<0,signx=−1. By selecting the proper value of δ, di<d^+δ always sustains when the user accesses normally, and it can eliminate malicious accesses and attacks from the client set with increased difference.After gettingdi′i∈ρT, first, find the median d^′ in the sequence of differences. It can be learned from Equation (11) that parameters γ and η have decided the rates at which the credibility converges to 0 and 1, respectively.For thei user in ρT, if di′<d^′, it is deemed as normal access. At this time, we introduce the adjustment parameter δ′, and its value is a positive integer. The credibility iteration formula has become the following from Equation (11):
(12)ri+1=ri+1−ri⋅exp−u′⋅di′−γ,ifdi′<d^′,ri,ifd^′≤di′≥d^′+δ′,ri⋅expv′⋅di′−d^′−η,ifdi′>d^′+δ′,in which, u′ and v′ are two new parameters. u′ is smaller than u, and a smaller u′ can avoid too much difference in the client’s credibility during the iteration of Equation (12). Likewise, v′ should also be smaller than v.


## 4.1. Proxy Reencryption Based on Paillier and RSA

We adopt the proxy reencryption of Paillier homomorphism and the RSA algorithm to prevent shared medical data from leaking. If an encrypted function only satisfies the addition homomorphism, it can only be added and subtracted; if an encrypted function only satisfies multiplicative homomorphism, it can only perform multiplication and division. The Paillier algorithm is homomorphic to addition, and the RSA algorithm is homomorphic to multiplication. In an untrusted cloud storage, when the confidentiality of data cannot be guaranteed, the proxy reencryption part is used for reencryption, and the part is used for authorization. In the untrusted open environment of the third party, it can ensure the confidentiality of sensitive data in cloud storage. In homomorphic encryption, the private key encrypts medical data and only the client has the public key. In the keys generated by using proxy reencryption, even if a malicious attacker gets one of them, the attacker still needs another different key for decryption. If the attacker gets all these encrypted data, he cannot decrypt and get the original plaintext data between the client and the server. This also makes sure that even the processor cannot access the information of the data [30]. The algorithms begin with initialization and outputs from the central authentication center the pair of public and key keys, the master key of the center, the public key of the system, and the common parameters. Below are the specific implementation steps.Step 1.
Generate a pair of public and private keys.Hospital A and Hospital B request the cloud service provider to generate their public keys and private keys, respectively. After the provider generates a pair of a public key and private key for Hospital A and Hospital B separately, the cloud service provider will return to Hospital A and Hospital B.Step 2.
Randomly choose two relatively big and independent prime numbersp,q to make
(1)pq,p−1q−1=1.Step 3.
Calculate(2)n=pqφn=p−1q−1,emakesGcde,φn=1,(3)c=memodn,(4)λ=cmp−1,q−1,in which m is the information to be encrypted.Step 4.
Choose a random integerg to make g∈Zn∗.Step 5.
Use Equation (4) below and calculate the existence of modularized multiplicative inverse to determine n and separate the sequence of g.
(5)μ=Lcλmodn2−1modn,in which, function L is defined as the following equation:
(6)Lw=w−1n.Step 6.
The public key isn,g and the private key is λ,μ.Step 7.
Generate the encrypted file.Hospital A first uses RSA encryption to calculate and encrypt data to generate the encrypted file C1. Then, Hospital A encrypts according to the second layer, encrypts the key of RSA with its public key, and generates the encrypted file C2. Finally, Hospital A uploads two encrypted files: C1 and C2 into the server.(7)Encrypt⟶Encm,pk.(8)c=gm⋅nrmodn2.Step 8.
Makem the information to be encrypted and m∈Zn.Step 9.
Randomly selectr and make r∈Zn∗.Step 10.
Calculate the ciphertext:Step 11.
Construct the key of proxy reencryption.Hospital A requests the public key of Hospital A from the cloud service provider. The provider will return this public key to Hospital A. Hospital A uses the public key of Hospital B and its private key to generate the reencryption key, and then Hospital A uploads the newly generated reencryption key into the server.Step 12.
Calculate the public key and private keyRsk,Rpk.Step 13.
The Paillier algorithm generates the reencrypted ciphertext and the public keyRpk is sent to the cloud computing server.For a given public keyRpk and the second-layer ciphertext, this algorithm can use the reencryption key and generate the first-layer ciphertext of the public key Rpk. The server uses the reencryption key and the ciphertext uploaded by Hospital A to conduct proxy reencryption computing and generates new ciphertext.Step 14.
Hospital B requests data anddecrypts⟶Decc,sk.Hospital B requests the cloud server to decrypt the data and the corresponding ciphertext. The cloud server sends the reencrypted text to Hospital B. Hospital B decrypts the ciphertext, gets the key, and uses RSA for decryption to get the original plaintext data.Step 15.
Ciphertextc∈Zn∗.Step 16.
Compute the information.(9)m=Lcλmodn2Lgλmodn2modn.


## 4.2. Measurement of Ability of This Scheme against Malicious Attacks

Firstly, make the client set to implement the encryption taskρT. For the ith responder in ρT, its encrypted data is a m-dimensional vector, represented by si. So, si=si,j,j=1,⋯,m. After receiving the encrypted data, the cloud node ENT will request ρT the credibility of every client in the response side to the central authentication center.The reliability measurementsi is weighed through the difference between si and the final result sT. Here, we have defined the extent of difference between si and sT as the square of Euclidean distance between si and sT, which can be calculated through the following equation:
(10)di=∑j=1msi,j−sT,j2,in which, the smaller the value of di, the higher the credibility of si. The degree of difference is the extent of difference among the values of variables, and it is used to measure the safety risk.When the central authentication center receives thedi:i∈ρT from the cloud node ENT, it needs to find the median of difference d^. Introduce the adjustment parameter δ, and for the response side of the ith encryption task, if the difference of encrypted data is di≤d^+δ, the credibility of this user will increase. Besides, the smaller the di, the more the increase of the credibility. If di>d^+δ, then the credibility of this client decreases. In addition, the bigger the value of di−d^, the more the reduction of the credibility. After getting the credibility ri before implementing the current encryption task of the ith client in ρT, the central authentication center has the following equation to calculate the credibility of this client:
(11)ri+1=ri+signd^+δ−di+12⋅1−ri⋅exp−u⋅di−γ+signd^+δ−di−12⋅ri⋅1−exp−v⋅di−d^−η,in which, u,γ,v, and η are the parameters to confirm ri+1, and their values are all bigger than 0. signx is a sign function, and it is defined as follows: if x>0,signx=1; if x=0,signx=0; and if x<0,signx=−1. By selecting the proper value of δ, di<d^+δ always sustains when the user accesses normally, and it can eliminate malicious accesses and attacks from the client set with increased difference.After gettingdi′i∈ρT, first, find the median d^′ in the sequence of differences. It can be learned from Equation (11) that parameters γ and η have decided the rates at which the credibility converges to 0 and 1, respectively.For thei user in ρT, if di′<d^′, it is deemed as normal access. At this time, we introduce the adjustment parameter δ′, and its value is a positive integer. The credibility iteration formula has become the following from Equation (11):
(12)ri+1=ri+1−ri⋅exp−u′⋅di′−γ,ifdi′<d^′,ri,ifd^′≤di′≥d^′+δ′,ri⋅expv′⋅di′−d^′−η,ifdi′>d^′+δ′,in which, u′ and v′ are two new parameters. u′ is smaller than u, and a smaller u′ can avoid too much difference in the client’s credibility during the iteration of Equation (12). Likewise, v′ should also be smaller than v.


## 5. Simulation Experiment and Analysis

When conducting a simulation experiment, we use the data of the patient’s routine medical checks. The data is a 25-dimensional vector, and the numerical value of every dimension can be seen in Table1. In order to complete every encryption task τ, the processor of the encryption task ρT will firstly receive a 25-dimensional medical data vector. Then, it encrypts every element in the vector and sends the encrypted result to the cloud node ENT where it is located. As this scheme uses the frameworks of Hadoop and Spark in the side of cloud computing, it has higher storage and computing abilities. It can respond in a timely manner to the requests of users and complete the uploading, computing, and downloading operations of users, so it can achieve the purpose of dynamic sharing and patient privacy protection.Table 1
Attributes of different dimensions of encrypted medical data.
No.Item nameUnitRefNo.Item nameUnitRef1White blood cell109/L4–1016Monocyte number109/L0–0.82Red blood cell1012/L3.5–5.517Eosinophil number109/L0.05–0.53Hemoglobing/L110–16018Basophil number109/L0–0.14Hematocrit%36–5019Red cell distribution width-coefficient variation109/L10.9–15.35Mean corpuscular volumefL82–10020Red cell distribution width-standard deviation%37–546Mean corpuscular hemoglobinpg26–3221Platelet distribution widthfL9–177Mean corpuscular hemoglobin concentrationg/L320–36022Mean platelet volumefL9–138Platelets109/L100–30023Plateletcrit%0.17–0.39Lymphocyte percentage%20–4024Platelet-larger cell ratio%13–4310Neutrophil percentage%50–7025Erythrocyte sedimentation rate0–1511Monocyte percentage%3–812Eosinophil percentage%0.5–513Basophil percentage%0–114Lymphocyte number109/L0.8–415Neutrophil numberFor every client, its credibility is initialized as 0.5 and according to Equations (11) and (12), the client’s credibility increases when providing the accurate data and the credibility decreases when providing wrong data.The impact of different values of the parameterγ on credibility can be reflected from the changes in the client’s credibility when n increases. Make n represent the number of encryption tasks to be implemented by the client. As shown in Figure 2, if the client can constantly provide correct data, thenγdecides the speed at which its credibility is converged to 1. Besides, the bigger the value of γ, the faster its credibility is converged to 1. However, when the value γ is too big, it can be easily attacked internally and externally. Therefore, γ should not be too big, and normally, it is set γ∈2,3.Figure 2
Impact ofγ on credibility.The value ofηchanges from the initial value of 0.03 to 0.28 at a step-length of 0.05. As indicated in Figure 3, η determines the speed at which that client’s credibility is converged to 0. Besides, the value of η cannot be too big; otherwise, the credibility will drop too fast when the client generates wrong data due to various accidental factors, which should be avoided. Moreover, the value of η cannot be too little, either; otherwise, it will give too little punishment to the credibility of dishonest clients and lead to further attacks. The values of γ and η shall meet the requirement of exp−γ<1−exp−η. In this paper, it is set as follows: η=0.13.Figure 3
Impact ofη on credibility.In order to analyze the impact of parametersu,v,u′, and v′ on updated credibility, this paper has set the scenario, which includes 100 encryption tasks. These 100 client sides need to handle 100 encryption tasks. In the initial stage, the initial credibility of every client handling the encryption task is 0.5. In all encryption processing, we assume that there exist 10 dishonest clients and set δ=0.15.When analyzing the impact of parameteru on credibility update, we randomly select a normal client and observe the change of credibility over the number of tasks n. Here, the values of u include 5, 20, 50, 80, and 100. For every value of u, we experiment 100 times and summarize the changes of the mean value of that client’s credibility when n increases from 1 to 100. As can be seen from Figure 4, the smaller the value of u, the faster the client’s credibility is converged to 1. When updating the credibility through Equation (12), the smaller the value of u, the bigger the value of exp−u⋅di−γ and the more the increase in the client’s credibility after giving one correct data. When u is 0, the increase of credibility is completely decided by γ and it cannot filter different clients. Therefore, the value u cannot be too small; otherwise, the client can easily get higher credibility and cause potential security risks. Generally, it is set u∈50,100.Figure 4
Impact of different values ofu on credibility.Likewise, the impact ofv credibility update is analyzed. The values of v are 0.001, 0.005, 0.01, 0.05, and 0.1. In particular, the value of v is much smaller than that of u because the difference in data of normal clients is usually very close and approximates to 0. As indicated in Figure 5, the bigger the value of v, the faster the credibility of dishonest clients is converged to 0. According to Equation (12), when v approximates 0, the decrease of credibility is determined by parameter η. In order to avoid the client’s credibility falling too much due to the occasional provision of few wrong data, the value of v cannot be too small, and generally, it is set as v∈0.005,0.01.Figure 5
Impact of value ofv on credibility.When analyzing the impact ofu′ on credibility, its values are set as 0.001, 0.005, 0.01, 0.05, and 0.1, and meanwhile, make δ′=35. Generally, the value u′ is smaller. Figure 6 has shown the changes of credibility when u′ takes different values. It can be seen that the impact of u′ is similar to that of u; in other words, the smaller the u′, the faster the credibility is converged to 1. Considering the difficulty to set credibility, the value u′ cannot be too small, and normally, it is as follows: u′∈0.01,0.05.Figure 6
Impact ofu′ value on credibility.Figure7 shows the changes of credibility when v′ is given the values of 0.001, 0.005, 0.01, 0.05, and 0.1. The bigger the value of v′, the faster the credibility is converged to 0. After all medical data are normalized, within the range of 0,1, the credibility is arranged according to the order of difference of encrypted data. With the changing trend of credibility, the value of v′ is smaller than that of v. Besides, to prevent credibility from falling too quickly, the value of v′ cannot be too big. Generally, we have set v′=0.05.Figure 7
Impact ofv′ value on credibility.With the help of the powerful storage ability of the cloud platform, the client will store the ciphertext in the cloud after the client uses the RSA method to encrypt the data, by encrypting the public key of the client-side, uploading, and storing the ciphertext to the cloud. When the client wants to share the data with another person, the client generates a reencryption key according to its decryption key and the encryption key of the other person and sends it to the cloud. The cloud server uses its strong computing power, integrates the reencryption key, proceeds with the reencryption, and stores the ciphertext in the cloud. Then, the other person downloads from the cloud server, decrypts with his private key, and gets the original plaintext with RSA decryption. In this way, the ciphertext is shared and the private key of the client is not leaked in this entire process. The medical data privacy protection scheme based on blockchain and cloud computing designed in this paper solves the problems of medical data storage and point-to-point data transaction, meets the needs of users for data management, and provides a new idea for solving the problem of data privacy security. Compared with the traditional technology, this scheme does not need an additional trusted third party nor does it need to rely on the “challenge response” mechanism, that is, the cloud does not need to provide special interface support, and the blockchain does not need to construct special transactions for the technical solution.


## 6. Conclusion

Blockchain is a brand-new decentralized distributed database, and it is a series of data blocks by using cryptographic methods. In this paper, we combined two encryption methods: proxy reencryption and attribute-based encryption and built key technical solutions for cloud computing based on blockchain to be applied in security and privacy protection of distributed medical data. It can not only achieve integrity testing of cloud data but also achieve broader security encryption computing. Intelligent hospitals only need to give the proxy key to the cloud server, which can convert medical data into the encrypted text in the designated format. The fixed client can access these shared data resources with their private key at any time. Even if the cloud server has the proxy key, it cannot get these data resources and the client does not need to download these resources. The proposed scheme can help solve such problems in that healthcare data are easy to be monopolized and tampered with and difficult to share and that the third party is not trustworthy to achieve the purpose of secure sharing and storage of distributed, decentralized, traceable, and unalterable healthcare data. In the future, we will consider improving the consensus mechanism, studying how to achieve fine-grained control of cloud data and how to reduce the storage overhead of redundant data, so that the performance of the blockchain can meet more needs of intelligent hospitals.



---

*Source: 8859961-2020-09-26.xml*