Next Article in Journal
A Novel Autocorrelation Combined MM-CDR Time-Interleaved ADC Timing Calibration in 28 nm CMOS Technology
Next Article in Special Issue
Cloud-Based, Expandable—Reconfigurable Remote Laboratory for Electronic Engineering Experiments
Previous Article in Journal
A Rumor Detection Method Based on Multimodal Feature Fusion by a Joining Aggregation Structure
Previous Article in Special Issue
Leveraging Machine Learning for Fault-Tolerant Air Pollutants Monitoring for a Smart City Design
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Secure Personal Health Record Sharing System with Key Aggregate Dynamic Searchable Encryption

1
School of Electronic and Electrical Engineering, Kyungpook National University, Daegu 41566, Korea
2
School of Electronics Engineering, Kyungpook National University, Daegu 41566, Korea
3
Blockchain Research Section, Electronics and Telecommunications Research Institute, Daejeon 34129, Korea
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(19), 3199; https://doi.org/10.3390/electronics11193199
Submission received: 7 September 2022 / Revised: 29 September 2022 / Accepted: 30 September 2022 / Published: 6 October 2022
(This article belongs to the Special Issue Feature Papers in Computer Science & Engineering)

Abstract

:
Recently, as interest in individualized health has increased, the Personal Health Record (PHR) has attracted a lot of attention for prognosis predictions and accurate diagnoses. Cloud servers have been used to manage the PHR system, but privacy concerns are evident since cloud servers process the entire PHR, which contains the sensitive information of patients. In addition, cloud servers centrally manage the PHR system so patients lose direct control over their own PHR and cloud servers can be an attractive target for malicious users. Therefore, ensuring the integrity and privacy of the PHR and allocating authorization to users are important issues. In this paper, we propose a secure PHR sharing system using a blockchain, InterPlanetary File System (IPFS), and smart contract to ensure PHR integrity and secure verification. To guarantee the patient’s authority over the management of his/her own PHR, as well as provide convenient access, we suggest a key aggregate dynamic searchable encryption. We prove the security of the proposed scheme through informal and formal analyses including an Automated Verification of Internet Security Protocols and Applications (AVISPA) simulation, Burrows–Abadi–Needham (BAN) logic, and security-model-based games. Furthermore, we estimate the computational costs of the proposed scheme using a Multiprecision Integer and Rational Arithmetic Cryptographic Library (MIRACL) and compare the results with those of previous works.

1. Introduction

With the increasing interest in and efforts to manage one’s health and prevent disease, the Personal Health Record (PHR) has attracted a lot of attention from various parties such as academia, industries, and the government. According to the International Organization for Standardization (ISO), a PHR is the representation of information related to health, which can be standalone or an integration of health information from multiple sources. The ISO also indicates that individuals should be allowed to manage, control, and access their own PHRs [1]. This means that the PHR is a patient-oriented system [2] and patients may want to share their PHRs with users such as medical professionals for prognosis predictions, accurate diagnoses, and health consulting. Due to the storage requirements and maintenance costs, patients often outsource their PHRs to third-party cloud servers. There are some cloud-based healthcare applications such as MTBC PHR [3], CapzulePHR [4], and My Medical [5]
However, cloud servers can be an attractive target for malicious users since a PHR contains the sensitive information of a patient [6]. If malicious users abuse or modify a PHR, the patient’s life could be put in danger or compromised due to misdiagnosis. Patients must be able to decide which users can access their PHRs. Attribute-based searchable encryption (ABSE), which is the integration of attribute-based encryption (ABE) and searchable encryption (SE), has been utilized to satisfy these requirements. ABSE provides fine-grained search control by regulating how authorized users acquire trapdoors to search for encrypted PHRs [7]. However, ABSE does not ensure patient-oriented sharing since it requires a trusted third party (TTP) to set up the system and allocate keys to entities. In addition, the decryption key size in ABSE is non-constant, which means that as the amount of data to be decrypted increases, the size of the decryption key increases [8]. To solve this problem, key aggregate searchable encryption (KASE) has been proposed for the data owner (e.g. patient), which generates system parameters and allocates decryption keys to users [9]. In addition, in KASE, the decryption key is a single constant aggregate key that has compacted the decryption keys corresponding to the data. Therefore, KASE is suitable for a PHR sharing system since it ensures the patient’s authority over his/her PHR and solves the key management problem.
Although cryptosystems are used in cloud-based systems for the privacy of patients, there are still non-negligible drawbacks. Storing PHRs on cloud servers means that patients delegate the management rights to the cloud server so patients lose their self-determined control over their personal information [10]. In addition, cloud servers are organized centrally, where storage is typically owned and managed by a single entity. Since cloud servers are usually not credible, they can steal or reveal PHRs by dishonestly performing malicious operations and can provide forged search results to users [11]. So, the existence of a centralized cloud server leads to the single-point-of-failure problem.
Researchers have considered a blockchain as a prospective solution to handle the problems in cloud-based systems [12,13,14,15]. A blockchain is a peer-to-peer (P2P) decentralized network that provides transparency, provenance, auditability, and security features, which are advantageous in data-sharing applications [16]. A blockchain eliminates the need for a third party by making the system secure and completely decentralized. However, there are limitations for managing all PHRs on the network since storing large volumes of data is expensive for a blockchain [17,18]. In addition, it does not guarantee scalability, which is an important challenge in blockchains. In order to alleviate the storage problem of blockchains, an InterPlanetary File System (IPFS) has been introduced. An IPFS is a distributed content-addressable file system, where for each uploaded PHR, IPFS allocates a unique hash as an identifier. By storing this identifier on the blockchain and using it as a pointer, the IPFS can overcome the storage limitations inherent in blockchains.
In this paper, we propose a secure PHR sharing system by applying a blockchain and an IPFS. We use KASE to ensure that patients retain authority over their records. However, existing KASE schemes do not consider dynamic data search sharing tasks, which can incur considerable computational costs since users must make repeated data request trapdoors. Therefore, we suggest a key aggregate dynamic searchable encryption using a Linear Secret Sharing Scheme (LSSS). The proposed system can ensure patient-oriented sharing.

1.1. Motivation, Methodology, and Contributions

A PHR contains the sensitive information of patients so it is necessary to restrict access to users. ABSE has been utilized as a solution but it does not ensure that patients maintain authority over data management. In addition, ABSE suffers from key management problems since the number of keys linearly increases depending on the complexity of the corresponding access policy. Researchers have utilized KASE as a countermeasure but their proposed schemes did not consider dynamic searches, which cause severe computational costs for data requests. In addition, they still depend on cloud servers for data management, which eliminates patients’ self-determined control over their personal information. Guaranteeing patients’ rights and reducing unnecessary communication between users in PHR sharing systems are indeed challenges. Therefore, we propose a secure PHR sharing system model. We utilize a blockchain and an IPFS to share the PHRs in a decentralized manner and handle the problems in cloud-based systems. We combine the KASE and LSSS to provide convenient keyword searches for users to obtain data. The proposed scheme provides essential security requirements such as the right to manage personal data, data integrity, transparency, and mutual authentication so our scheme has novel aspects compared to other previous works. The main contributions are summarized as follows.
  • We propose a secure PHR sharing system that ensures patients’ authority over their personal records by suggesting a key aggregate dynamic searchable encryption. Thus, patients can manage and regulate access to their own PHRs.
  • We provide dynamic searches for allowing users to obtain specific PHRs with low computational costs. We support dynamic searches using LSSS. In the proposed scheme, users can generate a trapdoor with various keywords at the same time to acquire a PHR.
  • The proposed scheme utilizes a blockchain to provide data integrity and prevent the single point of failure. In addition, we utilize a smart contract to realize the secure and effective keyword searches and trapdoor verification.
  • We store PHRs using an IPFS, which is a decentralized data storage system. Since the IPFS is a content-addressable protocol generating unique hash values for stored PHRs, it ensures the security of PHRs and avoids duplications.

1.2. Organization

The rest of the paper is organized as follows. We briefly cover previous works in Section 2. Section 3 presents the system models and interprets the conceptual aspect to assist with understanding this paper. Section 4 proposes a secure PHR sharing scheme. We prove the security of the proposed scheme in Section 5 and Section 6, including the BAN logic, AVISPA simulation tool, INDistinguishability against the Chosen Plaintext Attack (IND-CPA), INDistinguishability against the Chosen Keyword Attack (IND-CKA), and INDistinguishability against the Keyword Guessing Attack (IND-KGA). We analyze and compare the performance of the proposed scheme and existing schemes in Section 7. Section 8 presents the conclusions of this paper.

2. Related Works

Over the past few years, many studies have been conducted on secure PHR sharing using access control cryptosystems. In 2013, Li et al. [19] proposed a cloud-computing-based PHR sharing system using ABE since PHRs should only be available to authorized users. In 2015, Liu et al. [20] proposed a PHR sharing system based on cloud computing that employed ciphertext-policy attribute-based signcryption scheme. They suggested a method where the data owner signs the PHR with his/her own private key to protect the unauthorized modification of the PHR. They claimed that this scheme provided confidentiality through indistinguishable against chosen ciphertext attacks. However, Rao [21] proved that Lie et al.’s claim was incorrect and ccould not offer confidentiality in indistinguishability of ciphertexts under a selective encryption predicate and adaptive chosen ciphertext attack (IND-sEP-CCA2) security model. To supplement this problem, Rao proposed a cloud-based PHR sharing system that provides confidentiality using the IND-sEP-CCA2 model. However, these schemes [19,20,21] did not consider dynamic keyword search processes to access PHRs, which can cause considerable computational costs to users.
To address this problem, Zhang et al. [22] proposed a cloud-based PHR sharing system that provided dynamic keyword searches. However, Peng et al. [23] mentioned that Zhang et al.’s scheme was inefficient for queries since the ciphertexts of different data owners were matched against the same query. By considering these problems, Peng et al. suggested an enhanced scheme based on [22]; however, Sun et al. [24] mentioned that Peng et al.’s scheme was vulnerable to keyword guessing and equivalence test attacks. Liu et al. [25] presented an ABSE-based signcryption scheme for PHR sharing using LSSS. Xu et al. [26] proposed a PHR sharing system that used two cloud servers. They mentioned that privacy issues can occur in single-server system since cloud servers can compromise stored data using secret keys. However, they still suffered from the single-server problem since the whole system regarding or relevant to the sensitive PHR information was stored on a cloud server. This means that cloud servers can collude to abuse the stored PHRs. In addition, these existing schemes [22,23,25,26] managed PHRs on centralized cloud servers, thus they can also suffer from the single-point-of-failure problem.
To overcome this problem, Wang et al. [27] presented a blockchain-based PHR sharing system. They stored the verification values on the blockchain to match the search results from the cloud server. Zhang et al. [28] proposed a blockchain-based hierarchical PHR sharing system. They considered search result auditing and verification through the blockchain by regarding the cloud server and auditor as malicious entities. They also allowed the users to delegate decryption keys hierarchically to their groups for alleviating the burden of the key distribution task of authority. However, in this system, users delegated decryption keys to their groups without mutual authentication, which could lead to PHR leak problems. Zhang et al. [29] proposed a distributed PHR sharing scheme based on ABE and a blockchain. They adopted both a blockchain and cloud servers to overcome the limited storage capacity of the blockchain. However, these schemes [27,28,29] still used cloud servers to manage the enormous volumes of PHRs, thus the single-point-of-failure problem remained due to the centralized nature of the cloud server.
To mitigate these issues, Madine et al. [30] proposed a blockchain-based PHR architecture with an IPFS. In addition, Wang et al. [31] proposed a PHR sharing system using a consortium blockchain and an IPFS. They also utilized a smart contract to realize personalized access control. Wu et al. [32] suggested a blockchain-enabled PHR sharing system with access control. They considered mutual evaluation for the individual-centric transaction network and access control decisions. Hussien et al. [33] suggested a blockchain-based access control scheme for PHR sharing. However, existing PHR sharing schemes [30,31,32,33] rely on TTP to share PHRs, which does not guarantee a patient-centered system.
In 2020, Niu et al. [34] proposed a blockchain-based medical data sharing system using KASE in the Internet of Things environment. However, their scheme was vulnerable to privileged-insider attacks and did not provide secure mutual authentication. In addition, they did not consider dynamic keywords, which incurred significant computational costs to users. Niu et al. also relied on cloud servers to store data, which led to the single-point-of-failure problem. Thus, we propose a fully decentralized secure PHR sharing scheme that ensures patients’ self-determined control over their personal information. In addition, the proposed scheme realizes convenient PHR searches using key aggregate dynamic searchable encryption.

3. Preliminaries

In this section, we present the system models and cover the conceptual aspect referred to in this paper.

3.1. System Models

We consider the following network, threat, and security models to design and analyze the proposed scheme.

3.1.1. Network Model

The proposed secure PHR sharing model is depicted in Figure 1. In this figure, we have four entities: data owner, data user, IPFS, and blockchain.
  • Data owner (DO): The D O manages his/her own PHR for self-directed health care. The D O generates the system parameters for his/her own PHR and controls the access rights of the D U using an aggregate key. The D O uploads the encrypted PHR to the IPFS and generates and uploads the smart contract to the blockchain for realizing the secure verification of the trapdoor.
  • Data user (DU): The D U is the person that wants to access the PHR of the D O . To obtain the read rights of the PHR, the D U requests the aggregate key from the D O . The D U can obtain the aggregate key by mutual authentication with the D O . The D U can request and receive the PHR by communicating with the blockchain and IPFS. For the PHR decrypted using the aggregate key, the D U can verify the integrity through the received verification value from the blockchain.
  • IPFS: IPFS is a P2P decentralized database. In the proposed system, the IPFS stores the encrypted PHR of the D O and returns a unique hash address for the stored PHR as an identifier. In addition, when the D U requests the PHR through the identifier, the IPFS returns the corresponding results to the D U .
  • Blockchain: The architecture of the blockchain is a public permissionless blockchain since all network parties can access the smart contract in the blockchain. The proposed system employs the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm for the validation of transactions and generation of blocks. The blockchain implements the stored smart contract when the D U sends the trapdoor. Then, the blockchain transmits the identifier and verification value as a result.
The overall communication flows of the network are summarized as follows.
1
The D O generates the system parameters for his/her own PHR and the D O and D U generate their own public and private key pairs with the system parameters. Then, the D O encrypts the PHR and uploads it to the IPFS.
2
The IPFS stores the received PHR. Then, the IPFS generates and sends an unique hash address as an identifier for the received PHR to the D O . The D O calculates the keyword ciphertexts corresponding to the PHR and verification values. Then, the D O generates the smart contract using the keyword, identifier, and verification value, and uploads the smart contract to the blockchain.
3
The D U requests the aggregate key for reading the D O ’s PHR by sending the D U ’s credentials.
4
The D O verifies the D U ’s credentials, and if the D U is valid, the D O generates and sends the aggregate key and secret value to the D U .
5
The D U generates the trapdoor using the keyword and received secret value. Then, the D U sends the trapdoor to the blockchain to obtain the identifier and verification value for the encrypted PHR.
6
The blockchain checks the validity of the D U , and if the D U is validated, the blockchain sends the corresponding PHR’s identifier and verification values to the D U as a result.
7
The D U sends a request for the PHR to the IPFS using the received identifier.
8
The IPFS sends the encrypted PHR to the D U by matching the identifier in the database. The D U decrypts the received PHR using the aggregate key. Then, the D U checks whether the PHR is the data of the D O using the verification value. If it is correct, the process is successfully completed.

3.1.2. Threat Model

We adopt the broadly accepted Dolev–Yao (DY) threat model [35] to evaluate the security of the proposed scheme. In the DY model, each network entity communicates and exchanges messages through an insecure channel. This model also recognizes that an adversary A can eavesdrop or intercept the transmitted messages between the network entities. With this message, A can modify, forge, and insert the malicious content into the messages and delete or replay them during communication. A can perform various attacks such as impersonation, replay, and man-in-the-middle (MITM) attacks [36,37].

3.1.3. Security Model

Under the threat model in Section 3.1.2, the scheme must satisfy the following security requirements:
  • Data privacy: The PHR contains the sensitive information of the D O . If the PHR is leaked, the D O ’s life life could be put in danger or compromised. The PHR ciphertext does not reveal any information about the plaintext to the adversary. Thus, data confidentiality and integrity must be ensured in the PHR sharing system. We prove data privacy using the IND-CPA model.
  • Ciphertext privacy: The keyword ciphertext does not expose any information about the corresponding keywords to the adversary who is the unauthorized user. We prove ciphertext privacy using the IND-CKA model.
  • Trapdoor privacy: For secure PHR sharing, only the authorized D U can access the PHR, i.e., the trapdoor with the received secret values can be generated. The trapdoor does not disclose any information about the corresponding keywords to the adversary who is not authorized by the D O . Using the IND-KGA model, we demonstrate that the proposed scheme ensures trapdoor privacy.
In our scheme, games using the IND-CPA, IND-CKA, and IND-KGA models are defined as follows.
Definition 1
(Data privacy). We denote the semantic security for data privacy using the following IND-CPA model. In this game, the advantage of the adversary is defined as A d v A I N D C P A = | P r [ δ = δ ] 1 2 | . This game is secure against IND-CPA if | P r [ δ = δ ] 1 2 | ε is satisfied for all attacks, where ε is a negligible probability.
  • Init.Adversary A selects a challenge set S * { 1 , , n } that A wants to attack.
  • Setup.Simulator X executes the setup phase and sends the public parameters to A .
  • Phase 1. A queries the aggregate key A K for set S S * to X . Then, X performs the aggregate key request phase and sends A K to A .
  • Challenge. A picks two plaintext P H R 0 and P H R 1 , where | P H R 0 | = | P H R 1 | , from a set of possible plaintexts belonging to class i * and submits them to X . X flips the coin δ { 0 , 1 } , encrypts P H R δ in the data upload phase and sends the ciphertext to A .
  • Phase 2. A repeatsPhase 1for S S * ¯ , that is, the aggregate sets that contain data classes apart from those in the target set S * .
  • Guess. A outputs a guess δ of δ to X . If δ = δ , A wins the game.
Definition 2
(Ciphertext privacy). Here, we demonstrate the game for ciphertext privacy using the IND-CKA model. The adversary’s advantage in this game is defined as A d v A I N D C K A = | P r [ δ = δ ] 1 2 | . If | P r [ δ = δ ] 1 2 | ε is met, this game is secure against the IND-CKA model.
  • Init.Adversary A chooses a challenge set S * { 1 , , n } that A wants to attack.
  • Setup.Simulator X executes the setup phase and returns the public parameters to A .
  • Phase 1.First, A sends an aggregate key request query to X . X implements the aggregate key request phase and returns A K to A . Then, A transmits the trapdoor query for the keyword w l . If S * S , X executes the data request phase and responds with the trapdoor.
  • Challenge. A chooses two keywords w 0 and w 1 , where | w 0 | = | w 1 | and of a challenge set S * , to X . X flips the coin δ { 0 , 1 } and responds with the ciphertext for w δ in the data upload phase to A .
  • Phase 2. A repeatsPhase 1with the restriction that neither w 0 nor w 1 are used.
  • Guess. A outputs a guess δ of δ to X . If δ = δ , A wins the game.
Definition 3
(Trapdoor privacy). Here, we demonstrate the game using the IND-KGA model to prove trapdoor security. In this game, A d v A I N D K G A = | P r [ δ = δ ] 1 2 | is the advantage of A . If A d v A I N D K G A ε , this game is secure against the IND-KGA model. This game for the proposed scheme is defined as follows.
  • Init.Adversary A gives to the simulator X a challenge set S * { 1 , , n } .
  • Setup. X executes the setup phase and returns the results to A .
  • Phase 1. A first sends an aggregate key request query to X . X executes the aggregate key request phase and sends A K to A . Then, A sends the ciphertext query for the keyword w l . If S * S , X executes the data upload phase and responds with the ciphertext.
  • Challenge. A submits two equal-length keywords w 0 and w 1 to X within S * . X flips the coin δ { 0 , 1 } and responds with the trapdoor for w δ in the data request phase to A .
  • Phase 2. A repeatsPhase 1with the restriction that neither w 0 nor w 1 are used.
  • Guess. A outputs a guess δ of δ to X . If δ = δ , A wins the game.

3.2. Bilinear Maps

A bilinear map is a pairing-based cryptosystem. Let G and G T be the multiplicative cyclic groups with a large prime order q. The bilinear map e : G × G G T satisfies the following properties.
  • Bilinearity: For a , b G and x , y Z q * , we have e ( a x , b y ) = e ( a , b ) x y .
  • Non-degeneracy: a , b G , e ( a , b ) 1 .
  • Computability: a , b G , e ( a , b ) can be computed in polynomial time.

3.3. Linear Secret-Sharing Scheme (LSSS)

A secret-sharing scheme Π [38] realizing access policies on a set of parties P is linear over Z q if the following conditions are satisfied:
  • For each party, the shares of a secret s Z q form a vector over Z q .
  • There is an l × ϕ matrix M called the share-generating matrix on Π and a function ρ that maps each row of M to a specific party in P . During the generation of the shares, we give consideration to the column vector v = ( s , r 2 , , r ϕ ) , where r 2 , , r ϕ Z q . Then, l shares a vector of s, which is equal to M · v . In addition, the share λ j = M j · v belongs to ρ ( j ) , where M j is the jth row of M .
We denote that A s is an authorized set of the access structure T , A s T , and I is defined as the set of rows where labels of I are in S, such as I = { i | i { 1 , , l } , ρ ( i ) S } . Then, there exists coefficients { b i } i I that recover secret s by i I b i λ i = i I b i ( M · v ) = i I ( b i M i ) · v = ( 1 , 0 , , 0 ) · ( s , r 2 , , r ϕ ) = s .

3.4. Computational Assumption

Let e : G × G G T be a bilinear map, g be a generator of G , and a , b , c , z Z q * be chosen randomly. With this establishment, the assumptions used in this paper are defined as follows.

3.4.1. Decisional Diffie–Hellman (DDH) Assumption

The DDH assumption is that it is difficult for a probabilistic polynomial time adversary A to distinguish ( g a , g b , g a b ) from ( g a , g b , g z ) . The advantage ε of A is defined as follows:
| P r [ A ( g a , g b , g a b ) = 1 ] P r [ A ( g a , g b , g z ) = 1 ] | ε
If there is no way that A can decide whether g z = g a b , that is, deciding whether z = a b or z Z q * with a non-negligible advantage, the DDH assumption holds.

3.4.2. Decisional Bilinear Diffie–Hellman (DBDH) Assumption

Under the DBDH assumption, an adversary A cannot distinguish ( g a , g b , g c , e ( g , g ) a b c ) from ( g a , g b , g c , e ( g , g ) z ) in probabilistic polynomial time. The advantage ε of A is defined as follows.
| P r [ A ( g a , g b , g c , e ( g , g ) a b c ) = 1 ] P r [ A ( g a , g b , g c , e ( g , g ) z ) = 1 ] | ε
If A cannot decide whether e ( g , g ) z = e ( g , g ) a b c , which is determining whether z = a b c or z Z q * with a non-negligible advantage, the DBDH assumption is valid.

3.5. Blockchain

A blockchain is a distributed ledger technology that maintains a list of growing records. These records called blocks are chronologically linked using the cryptographic hashes of the previous blocks along with the timestamps and lists of transactions. Due to its chained structure, any included data cannot be changed unconstitutionally without the modification of all subsequent frames. In addition, each node of the blockchain network holds a copy of the chain to prevent a single point of failure. These properties make it difficult to change the transaction history, and the blockchain provides traceability, accountability, transparency, and provenance. Depending on the requirements and goals to be met, the blockchain can be classified into public/private and permissionless/permissioned types [39,40].
  • Public permissionless blockchain: every node can participate in the consensus process, read and write the transactions, and maintain the ledgers.
  • Public permissioned blockchain: the nodes are permitted to read or convert the state of the ledger with approved performing consensus, that is, only authorized nodes in the network can write in the ledger.
  • Private permissionless blockchain: only authorized nodes are allowed to participate; the read and write abilities are owned by authorized nodes; all transactions can be conducted privately, and if necessary, the transaction can be opened for verification.
  • Private permissioned blockchain: only authorized nodes can access, perform operations over the distributed ledger, and participate in the consensus process.
A smart contract is a computerized transaction protocol that executes the terms of a contract [41]. If a specific pre-defined condition is met, the smart contract is automatically implemented on the blockchain, and the contact with the smart contract is documented on the blockchain as a transaction. The smart contract can realize interoperability and flexible control over the blockchain system. Therefore, the proposed system adopted a blockchain and a smart contract to ensure the integrity of PHRs and provide secure verification mechanisms. The proposed scheme employed a public permissionless blockchain since anyone could access the blockchain. In addition, we adopted the PBFT consensus algorithm to realize consistency and synchronization in terms of transaction validation, block generation, and the voting process in the distribution network.

3.6. InterPlanetary File Systems

An InterPlanetary File System (IPFS) [42] is a P2P distributed file system for storing and accessing files. When content is uploaded to the IPFS, the IPFS returns a unique hash of content, called a content identifier (CID). The CID indicates the content address in the IPFS, which is based on the content itself, rather than the location of the content. Thus, anyone who has the CID can access the corresponding content. Since the IPFS connects all computing devices to share and access files, there are no authorized nodes, which eliminates the no single-point-of-failure problem and the nodes do not need to trust each other. Content-based addressing in an IPFS is constructed using the SHA-256 cryptographic hash, and this hash function creates an identifier for a certain file in the InterPlanetary Name System (IPNS). With this unique feature, the IPFS can maintain the same path for updated files with identifiers.

4. Proposed Scheme

We propose a secure PHR sharing scheme with key aggregate dynamic searchable encryption. The proposed scheme comprises six phases: the setup, key-generation, data upload, aggregate key request, data retrieval, and data request phases. The notations used in this paper can be found in Table 1 and the six phases are described in the following subsections.

4.1. Setup Phase

The D O generates the bilinear parameters ( q , G , G T , e ) and sets the maximum number of PHRs and keywords as n and m, respectively. Then, the D O chooses a generator g G , a random number α Z q , and a hash function h : { 0 , 1 } * Z q . The D O computes g i = g α i G for i = { 1 , , n , n + 2 , , 2 n } . Finally, the D O publishes { q , G , G T , e , g , n , m , { g i } 1 i 2 n , i n + 1 , h } .

4.2. Key Generation Phase

In this phase, the D O and D U generate the private and public key pairs for secure PHR sharing. The D O and D U compute ( s k o , p k o ) = ( s k o , g s k o ) and ( s k u , p k u ) = ( s k u , g s k u ) , respectively.

4.3. Data Upload Phase

The D O uploads the PHR to the IPFS for health care. This phase is briefed in Figure 2 and the detailed steps are given below.
Step 1: 
The D O generates t Z q and computes c = g t , c m 1 = ( p k o · g i ) t , c m 2 = P H R i · e ( g 1 , g n ) t for the P H R i . Then, the D O sends { c , c m 1 , c m 2 } to the IPFS.
Step 2: 
The IPFS stores { c , c m 1 , c m 2 } in the database and computes the identifier C I D i . Then, the IPFS sends { C I D i } to the D O .
Step 3: 
The D O selects v = { t , z 2 , , z ϕ } , where z 2 , , z ϕ Z q , and l × ϕ matrix M . The D O computes ( λ 1 , , λ l ) T = M · v , and calculates c w 1 = g h ( w y ) · h ( s k o ) · t , c w 2 = g λ , V e r i f i = h ( P H R i ) for w y W ( y = 1 , , m ) , where m is the number of keywords about P H R i . Then, the D O generates the smart contract using { c , M , c w 1 , c w 2 , V e r i f i , C I D i } and uploads it to the blockchain.

4.4. Aggregate Key Request Phase

The D U requests the aggregate key to the D O for reading the PHR. Figure 3 indicates this phase and the details are as follows.
Step 1: 
The D U generates r u and T 1 . The D U computes P I D u = h ( I D u | | s k u ) , T I D u = h ( I D u ) r u , U 1 = g ( T I D u | | s k u ) , U 2 = p k o ( T I D u | | s k u ) , V I D u = P I D u h ( U 2 ) , S i g u = h ( P I D u | | U 2 | | p k u | | T 1 ) · s k u ( m o d q ) . Then, the D U sends { U 1 , V I D u , S i g u , T 1 , S } to the D O through a public channel.
Step 2: 
After receiving the message, the D O checks | T 1 T 1 * | T . Then, the D O computes U 2 * = U 1 s k o , P I D u * = V I D u h ( U 2 * ) , and checks g S i g u = ? p k u h ( P I D u * | | U 2 * | | p k u | | T 1 ) . If it is correct, the D O computes P I D o = h ( I D o | | s k o ) , T I D o = h ( I D o ) r o , O 1 = g ( T I D o | | s k o ) , O 2 = U 1 ( T I D o | | s k o ) , V I D o = P I D o h ( O 2 ) , S i g o = h ( P I D o | | P I D u * | | O 2 | | T 2 ) · s k o ( m o d q ) , V o u = h ( P I D o | | P I D u * | | O 2 | | T 2 ) , A K = j S g n + 1 j s k o , O 3 = ( A K | | h ( s k o ) ) h ( O 2 | | P I D o | | P I D u * ) . Then, the D O sends { O 1 , S i g o , V I D o , V o u , O 3 , T 2 } to the D U .
Step 3: 
Upon receiving the message, the D U checks | T 2 T 2 * | T . Then, the D U computes O 2 * = O 1 ( T I D u | | s k u ) , P I D o * = V I D o h ( O 2 * ) , V o u * = h ( P I D o * | | P I D u | | O 2 * | | T 2 ) , and checks whether g S i g o = ? p k o h ( P I D o * | | O 2 * | | p k o | | T 2 ) and V o u * = ? V o u . If it is valid, the D U obtains the secret values by computing ( A K | | h ( s k o ) ) = O 3 h ( O 2 * | | P I D o * | | P I D u ) .

4.5. Data Retrieval Phase

The D U requests the PHR’s location to the blockchain. The proposed scheme considers the dynamic search for the convenience of the PHR search so the D U sends the trapdoor to the blockchain only once. Figure 4 denotes this phase, and we interpret the detailed steps below.
Step 1: 
The D U generates R u Z q and T 3 , and computes T r y 1 = g h ( w y ) · R u · h ( s k o ) , T r y 2 = g R u for w y W ( y = 1 , , ϕ ) , where ϕ is the number of search keywords. Then, the D U sends { T r y 1 , T r y 2 , I , T 3 } to the blockchain, where I = y : w y W .
Step 2: 
With the received message, the blockchain checks | T 3 T 3 * | T and implements the smart contract. The blockchain computes b y Z q satisfying y I b y · M y = ( 1 , 0 , 0 ) and checks whether y I ( e ( T r y 1 , c w 2 ) ) b y = ? e ( T r y 2 , c w 1 ) . If it is correct, the blockchain sends all matched C I D i and V e r i f i to the D U .

4.6. Data Request Phase

The D U requests the PHR to the IPFS with the received identifier. Then, the D U decrypts the encrypted PHR using the aggregate key. We denote this phase in Figure 5, and describe the detailed steps below.
Step 1: 
The D U sends the identifier C I D i to the IPFS for the PHR that the D U wants.
Step 2: 
The IPFS finds the encrypted document, which is matched with C I D i . Then, the IPFS sends { c , c m 1 , c m 2 } to the D U .
Step 3: 
After receiving the message, the D U computes P H R i * = c m 2 · e ( A K · j S , j i g n + 1 j + i , c ) e ( j S g n + 1 j , c m 1 ) . Then, the D U checks whether h ( P H R i * ) = V e r i f i . If it is valid, the D U obtains the right PHR, and the process of the proposed PHR sharing system is successfully completed.

5. Informal Security Analysis

We indicate the security features of the proposed scheme, including impersonation, replay, MITM, and insider attacks. In addition, we prove that the proposed scheme ensures correctness, perfect forward secrecy, anonymity, and mutual authentication.

5.1. Impersonation Attack

An adversary A tries to masquerade as the D U to obtain P H R i . In this case, A needs C I D i and A K corresponding to P H R i . As mentioned in Section 3.1.2, A can utilize the transmitted message. A eavesdrops { U 1 , V I D u , S i g u , T 1 , S } and { T r y 1 , T r y 2 , I , T 3 } . Then, A attempts to send { U 1 , V I D u , S i g u , T 1 , S } and { T r y 1 , T r y 2 , I , T 3 } to obtain A K and C I D i , respectively. However, it is impossible for A since A did not have knowledge about the D U ’s real identity I D u and the secret key s k u . Thus, the proposed scheme is secure against the impersonation attacks.

5.2. Replay Attack

With the ability described in Section 3.1.2, A intercepts the transmitted messages. A interrupts { U 1 , V I D u , S i g u , T 1 , S } and { T r y 1 , T r y 2 , I , T 3 } and resends them to the D O and blockchain for obtaining the P H R i . However, the D O and blockchain check the transmission delay time and the freshness of the message, which is encrypted with random nonces { r u , R u } so A cannot obtain the P H R i . Therefore, our scheme has resistance against replay attacks.

5.3. Man-in-the-Middle (MITM) Attack

In this attack, A interrupts the transmitted messages { U 1 , V I D u , S i g u , T 1 , S } and { T r y 1 , T r y 2 , I , T 3 } and modifies them to { U 1 , V I D u , S i g u , T 1 , S } and { T r y 1 , T r y 2 , I , T 3 } . Unfortunately, it is computationally impossible for A since these messages are made up of the D U ’s identity I D u , secret key s k u , and aggregate key A K . Hence, the proposed scheme prevents the MITM attack.

5.4. Insider Attack

This attack supposes that A is an insider that receives the authorization from the D O . A attempts to impersonate another legitimate D U to know what kind of person the D U is by obtaining the P H R i . For this, A endeavors to generate the messages { U 1 , V I D u , S i g u , T 1 , S } and { T r y 1 , T r y 2 , I , T 3 } with the D U ’s I D u and s k u . However, A cannot compute them since the corresponding values of the D U are unknown. Thus, the proposed scheme is secure against the insider attacks.

5.5. Correctness

5.5.1. Dynamic Keyword

In Section 4.5, the blockchain checks whether the D U sends the correct trapdoor using the aggregate key. We prove it arithmetically as follows.
y I e ( T r y 1 , c w 2 ) b y = e ( g h ( w y ) · R u · h ( s k o ) , g λ ) b y = e ( g , g ) h ( w y ) · R u · h ( s k o ) · λ · b y = e ( g , g ) h ( w y ) · R u · h ( s k o ) · ( M · v ) · b y = e ( g , g ) h ( w y ) · R u · h ( s k o ) · ( y I b y · M y ) · v = e ( g , g ) h ( w y ) · R u · h ( s k o ) · ( 1 , 0 , , 0 ) · v = e ( g , g ) h ( w y ) · R u · h ( s k o ) · t = e ( g R u , g h ( w y ) · h ( s k o ) · t ) = e ( T r y 2 , c w 1 )

5.5.2. PHR

As described in Section 4.6, the D U can obtain the PHR of the D O by decrypting with the aggregate key A K . Then, the D U compares the obtained PHR with V e r i f i to determine whether it is the correct value. For correctness, the P H R i can be obtained as follows.
P H R i * = c m 2 · e ( A K · j S , j i g n + 1 j + i , c ) e ( j S g n + 1 j , c m 1 ) = c m 2 · e ( j S g n + 1 j s k o · j S , j i g n + 1 j + i , g t ) e ( j S g n + 1 j , ( p k o · g i ) t ) = c m 2 · e ( j S g n + 1 j + i , g t ) e ( j S g n + 1 j + i , g t ) · 1 e ( g n + 1 , g t ) = P H R i · e ( g 1 , g n ) t e ( g n + 1 , g t ) = P H R i

5.6. Perfect Forward Secrecy

In this attack, A can have the keys s k u of the D U . With this value, A tries to acquire the P H R i . For this, A needs the aggregate key A K so A makes effort to generate the message { U 1 , V I D u , S i g u , T 1 , S } . Nevertheless, A cannot calculate it since A did not have knowledge about the D U ’s real identity I D u and secret key s k u . For this reason, our scheme provides the perfect forward secrecy.

5.7. Anonymity

In the proposed scheme, each entity cannot trust each other so they hide the real identity { I D o , I D u } with { s k o , r o , s k u , r u } and perform the mutual authentication through the pseudo identity { P I D o , P I D u } . Although A tries to obtain the real identity from the pseudo identity, it is computationally impossible because of the collision-resistant property of the hash function. Therefore, the proposed scheme ensures the anonymity of each entity.

5.8. Mutual Authentication

In Section 4.4, it was shown that the D O and D U check the validity of each other before issuing the aggregate key A K . The D U generates the signature S i g u that can represent the D U and sends { U 1 , V I D u , S i g u , T 1 , S } to the D O . After checking the transmission delay time, the D O checks whether g S i g u = ? p k u h ( P I D u * | | U 2 * | | p k u | | T 1 ) . If it is correct, the D U ’s validity is verified from the D O . Then, the D O sends { O 1 , S i g o , V I D o , V o u , O 3 , T 2 } with the signature S i g o . With the received message, the D U checks whether g S i g o = ? p k o h ( P I D o * | | O 2 * | | p k o | | T 2 ) and V o u * = ? V o u . If this condition is approved, the validity of the D O is verified to the D U . Consequently, the D O and D U mutually authenticate so the proposed scheme provides mutual authentication.

6. Formal Security Analysis

In this section, we conduct a formal analysis to evaluate the security of the proposed scheme using the AVISPA simulation tool, BAN logic, IND-CPA, IND-CKA, and IND-KGA.

6.1. AVISPA Simulation Tool

AVISPA is a security analysis tool for protocols in security-sensitive wireless environments [43]. For confirming security, many authentication schemes have been widely used [44,45,46]. We simulated the proposed scheme with the AVISPA tool based on the DY threat model to identify the security issues against replay and MITM attacks. To analyze our scheme, we shaped the actions of each participant using High-Level Protocols Specification Language (HLPSL), a role-based language. The HLPSL2IF translator coverts HLPSL into Intermediate Format (IF) and inputs the IF into the back-end. Then, the back-ends outputs the Output Format (OF) as the security analysis results against four components including the On-the Fly-Model-Checker (OFMC), SAT-based Model-Checker (SATMC), CL-based Attack Searcher (CL-AtSe), and Tree-Automata-based Protocol Analyzer (TA4SP).
We simulated the proposed scheme on the OFMC and CL-AtSe back-ends since they provide bitwise exclusive-OR operations. The simulated results on the OFMC and CL-AtSe were identified as SAFE or UNSAFE by estimating the security issues against replay and MITM attacks. In Figure 6, the OF indicates that the proposed scheme is “SAFE” in both the OFMC and CL-AtSe back-ends. Therefore, our scheme completely attains the specific security goals and withstands the attacks in a wireless environment.

6.2. Formal Security Analysis using BAN Logic

BAN logic is a mathematical proof method for secure mutual authentication, which is widely used in authentication schemes [47,48,49]. We proved that the proposed scheme provides mutual authentication in Section 4.4. We describe the notations of BAN logic in Table 2, indicate the goals of this analysis, present all considered assumptions, and provide corresponding proof.

6.2.1. Rules

The rules of the BAN logic are as follows.
  • Message meaning rule ( M M R ):
    K | K s c k y Q , K { Y } s c k y K | Q | Y
  • Nonce verification rule ( N V R ):
    K | # ( Y ) , K | Q | Y K | Q | Y
  • Jurisdiction rule ( J R ):
    K | Q | Y , K | Q | Y K | Y
  • Freshness rule ( F R ):
    K | # ( Y ) K | # ( Y , S )
  • Belief rule ( B R ):
    K | ( Y , S ) K | Y

6.2.2. Goals

We establish the goals for proving mutual authentication as follows:
Goal 1: 
D O | D O A K D U
Goal 2: 
D U | D O A K D U
Goal 3: 
D O | D U | D O A K D U
Goal 4: 
D U | D O | D O A K D U

6.2.3. Idealized Forms

The idealized forms in the proposed scheme are as follows:
M 1 :
D U D O : { U 2 , T 1 } P I D u
M 2 :
D O D U : { A K , O 2 , T 2 } P I D o

6.2.4. Assumptions

The assumptions to achieve the BAN logic are as follows:
A 1 :
D O | ( D O P I D u D U )
A 2 :
D O | # ( T 1 )
A 3 :
D U | ( D O P I D o D U )
A 4 :
D U | # ( T 2 )
A 5 :
D O | D U ( D U A K D O )
A 6 :
D U | D O ( D U A K D O )

6.2.5. Proof

We prove the guarantee of mutual authentication by attaining the goals using notations, idealized forms, and assumptions. We execute the proof according to the following steps:
Step 1: 
S 1 can be obtained from M 1 .
S 1 : D O { U 2 , T 1 } P I D u
Step 2: 
S 2 can be obtained by applying the M M R with A 1 .
S 2 : D O | D U | { U 2 , T 1 } P I D u
Step 3: 
S 3 can be gained from the F R with S 2 and A 2 .
S 3 : D O | # ( U 2 , T 1 )
Step 4: 
S 4 can be acquired by applying the N V R with S 2 and S 3 .
S 4 : D O | D U | ( U 2 , T 1 )
Step 5: 
S 5 can be obtained from M 2 .
S 5 : D U { A K , O 2 , T 2 } P I D o
Step 6: 
S 6 can be gained from M M R with S 5 and A 3 .
S 6 : D U | D O | { A K , O 2 , T 2 } P I D o
Step 7: 
S 7 can be obtained by applying F R with S 6 and A 4 .
S 7 : D U | # ( A K , O 2 , T 2 )
Step 8: 
S 8 can be obtained from N V R with S 6 and S 7 .
S 8 : D U | D O | ( A K , O 2 , T 2 )
Step 9: 
S 9 and S 10 can be obtained from S 4 and S 8 since O 3 = ( A K | | h ( s k o ) ) h ( O 2 | | P I D o | | P I D u ) .
S 9 : D O | D U | ( D O A K D U ) (Goal 3)
S 10 : D U | D O | ( D O A K D U ) (Goal 4)
Step 10: 
S 11 and S 12 can be obtained by applying J R from S 9 , S 10 , A 5 , and A 6 .
S 11 : D O | ( D U A K D O ) (Goal 1)
S 12 : D U | ( D O A K D U ) (Goal 2)
Therefore, the D O and D U authenticate securely in the aggregate key request phase of the proposed scheme.

6.3. IND-CPA Security

Theorem 1.
When an adversary A can win the game with a non-negligible advantage ε in a probability polynomial time, A can solve the DBDH assumption’s difficult problem with ε / 2 .
Proof. 
We prove this security game according to Definition 1 and Section 3.4.2. Assume there is A that can break our scheme with advantage ε . Then, we build a simulator X to play the DBDH game with advantage ε / 2 . The simulation process is as follows. Challenger B randomly selects a random number a , b , c , z Z q and a generator g G . Then, B randomly tosses a coin to obtain a random value μ { 0 , 1 } . B sets if μ = 0 , then Z = e ( g , g ) a b c , which is ( g a , g b , g c , e ( g , g ) a b c ) ; otherwise Z = e ( g , g ) z , which means ( g a , g b , g c , e ( g , g ) z ) . Then, B sends the results to X that plays the DBDH game.
Init. The simulator X runs the adversary A to create a challenge set S * { 1 , , n } that A wants to attack. Then, A sends it to X .
Setup. X computes the public parameters { g i = g α i } 1 i 2 n , i n + 1 and sets the instance of the DBDH game as α 1 = a and α n = b . Then, X sends the public parameters to A .
Phase 1. A requests an aggregate key A K for S S * . X computes A K = j S g n + 1 j s k o . Then, X sends A K to A .
Challenge. A submits two equal-length plaintext P H R 0 and P H R 1 to X with S * . X randomly flips a coin to obtain δ { 0 , 1 } . We set if μ = 0 , then Z = e ( g , g ) a b c . In this case, we let t = c be the instance of the DBDH game, then e ( g , g ) a b c = e ( g , g ) a b · t = e ( g a , g b ) t = e ( g 1 , g n ) t and c m 2 = P H R δ · e ( g , g ) a b c . Otherwise, if μ = 1 , then Z = e ( g , g ) z and c m 2 = P H R δ · e ( g 1 , g n ) z . X computes c = g t , c m 1 = ( p k o · g i ) t and sends { c , c m 1 , c m 2 } to A .
Phase 2. A repeats Phase 1 to obtain the aggregate key, which is associated with the data sets S S * ¯ .
Guess. A guesses δ of δ . If δ = δ , we set X outputs 0, otherwise, it outputs 1. X outputs 0 means that Z = e ( g , g ) a b c and A can obtain the practical ciphertext. Then, the advantage is ε and we can obtain P r [ δ = δ | Z = e ( g , g ) a b c ] = 1 2 + ε . X outputs 1 means that Z = e ( g , g ) z and A obtains invalid ciphertext. So, there is no advantage in guessing the correct δ and A obtains P r [ δ δ | Z = e ( g , g ) z ] = 1 2 . Therefore, the probability P r of a successful game is
P r = 1 2 P r [ A ( g , g a , g b , g c , e ( g , g ) a b c ) = 1 ] + 1 2 P r [ A ( g , g a , g b , g c , e ( g , g ) z ) = 1 ] 1 2 = 1 2 P r [ δ = δ | Z = ( g , g ) a b c ] + 1 2 P r [ δ δ | Z = e ( g , g ) z ] 1 2 = 1 2 × ( 1 2 + ε ) + 1 2 × 1 2 1 2 = ε 2
Therefore, our scheme ensures IND-CPA security. □

6.4. IND-CKA Security

Theorem 2.
If an adversary A can win the game with a non-negligible advantage ε in a probability polynomial time, A can solve the DDH assumption’s difficult problem with ε / 2 .
Proof. 
Let an adversary A break our scheme with advantage ε . Then, we construct a simulator X to play the DDH game with advantage ε / 2 . The simulation process is described as follows. Challenger B randomly selects a , b , z Z q and a generator g G . Then, B randomly tosses a coin to obtain a random value μ { 0 , 1 } . If μ = 0 , then Z = g a b , which is ( g a , g b , g a b ) ; otherwise Z = g z , which means ( g a , g b , g z ) . Then, B sends the results to X that plays the DDH game.
Init. The simulator X executes the adversary A to create a challenge set S * { 1 , , n } . Then, A sends it to X .
Setup. X generates the public parameters { g i } 1 i 2 n , i n + 1 . Then, X returns them to A .
Phase 1. A requests the aggregate key A K for S S * . X computes A K = j S g n + 1 j s k o . Then, X sends A K to A . In addition, A sends the trapdoor query for the keyword w l . If S * S , X executes the data request phase and sends { T r y 1 , T r y 2 } to A .
Challenge. A submits two keywords w 0 and w 1 , where | w 0 | = | w 1 | and of a challenge set S * to X . X randomly tosses a coin to obtain δ { 0 , 1 } . If μ = 0 , then Z = g a b . In this case, we let t = a b , then g a b = g t and c = g t = g a b , c w 1 = g h ( w y ) · h ( s k o ) · t = g h ( w y ) · h ( s k o ) · a b . Otherwise, if μ = 1 , then Z = g z and c = g t = g z , c w 1 = g h ( w y ) · h ( s k o ) · t = g h ( w y ) · h ( s k o ) · z . Then, X computes c w 2 = g v and sends { c , c w 1 , c w 2 } to A .
Phase 2. A repeats Phase 1 to obtain the aggregate key and trapdoor under the restriction that neither w 0 nor w 1 are used.
Guess. A guesses δ of δ . If δ = δ , X outputs 0, otherwise, it outputs 1. In addition, X outputs 0 is the representation of Z = g a b and A can obtain the practical ciphertext. Then, the advantage is ε so we can obtain P r [ δ = δ | Z = g a b ] = 1 2 + ε . X outputs 1 is the indication that Z = g z and A obtains invalid ciphertext. So, there is no advantage in guessing the correct δ and P r [ δ δ | Z = g z ] = 1 2 can be obtained. So, the probability P r of a successful game is
P r = 1 2 P r [ A ( g , g a , g b , g a b ) = 1 ] + 1 2 P r [ A ( g , g a , g b , g z ) = 1 ] 1 2 = 1 2 P r [ δ = δ | Z = g a b ] + 1 2 P r [ δ δ | Z = g z ] 1 2 = 1 2 × ( 1 2 + ε ) + 1 2 × 1 2 1 2 = ε 2
Therefore, our scheme ensures IND-CKA security. □

6.5. IND-KGA Security

Theorem 3.
The difficult problem of the DDH assumption can be solved when an adversary A can win the game with ε in a probability polynomial time. Then, a non-negligible advantage is ε / 2 .
Proof. 
Suppose that an adversary A can break our scheme with advantage ε . Then, we form a simulator X to play the DDH game with advantage ε / 2 . The simulation process is described as follows. Challenger B randomly selects a , b , z Z q and g G . Then, B randomly tosses a coin to obtain a random value μ { 0 , 1 } . If μ = 0 , then Z = g a b , which is ( g a , g b , g a b ) ; otherwise Z = g z which means ( g a , g b , g z ) . Then B sends the results to X that plays the DDH game.
Init. The simulator X executes the adversary A to create a challenge set S * { 1 , , n } . Then, A sends it to X .
Setup. X generates the public system parameters { g i } 1 i 2 n , i n + 1 . Then, X returns them to A .
Phase 1. A requests aggregate key A K for S S * . X computes A K = j S g n + 1 j s k o . Then, X sends A K to A . In addition, A sends the ciphertext query for the keyword w l . If S * S , X executes Data upload phase and sends { c , c w 1 , c w 2 } to A .
Challenge. A submits two equal-length keywords w 0 and w 1 to X within S * . X randomly tosses a coin to obtain δ { 0 , 1 } . If μ = 0 , then Z = g a b . In this case, we let R u = a b , then g a b = g R u and T r y 1 = g a b · h ( w δ ) · h ( s k o ) , T r y 2 = g a b . Otherwise, if μ = 1 , then Z = g z and T r y 1 = g z · h ( w δ ) · h ( s k o ) , T r y 2 = g z . Then, X sends { T r y 1 , T r y 2 } to A .
Phase 2. A repeats Phase 1 to obtain the aggregate key under the restriction that neither w 0 nor w 1 .
Guess. A guesses δ of δ . If δ = δ , X outputs 0, otherwise, it outputs 1. In addition, X outputs 0 is the representation of Z = g a b , and A can obtain the practical trapdoor. Then, the advantage is ε , so we can get P r [ δ = δ | Z = g a b ] = 1 2 + ε . X outputs 1 is the indication that Z = g z , and A obtains invalid trapdoor. So, there is no advantage in guessing the correct δ , and it can be obtained P r [ δ δ | Z = g z ] = 1 2 . So, the probability P r of a successful game is
P r = 1 2 P r [ A ( g , g a , g b , g a b ) = 1 ] + 1 2 P r [ A ( g , g a , g b , g z ) = 1 ] 1 2 = 1 2 P r [ δ = δ | Z = g a b ] + 1 2 P r [ δ δ | Z = g z ] 1 2 = 1 2 × ( 1 2 + ε ) + 1 2 × 1 2 1 2 = ε 2
Therefore, our scheme ensures IND-KGA security. □

7. Security and Performance Analysis

In this section, we compare the security and performance of the proposed scheme to the related schemes [25,28,31] in terms of security features, computational costs, and communication costs.

7.1. Security Features

We present the security properties of the proposed scheme and existing schemes [25,28,31]. As shown in Table 3, the related schemes suffer from security vulnerability problems, including perfect forward secrecy and mutual authentication. In contrast, our scheme is secure against various attacks in DY threat model, and ensures perfect forward secrecy, anonymity, mutual authentication, correctness, access control, dynamic search, data verification, and the D O ’s authority over his/her own PHR. Therefore, our scheme provides more security features compared to the related schemes.

7.2. Computational Costs

We conducted a testbed experiment on cryptographic computation using MIRACL [50] on a personal computer (PC). The detailed performance of the PC was “Ubuntu 18.04.4 LTS with memory 8GiB, processor: Intel Core i7-4790 @ 3.60GHz × 4, CPU Architecture: 64-bit”. We measured the average run time of 100 runs for a hash operation T h 0.003 ms, a bilinear pairing operation T b 6.575 ms, a scalar point multiplication operation T s m 2.373 ms, an exponentiation operation T e 0.819 ms, an addition operation T a 0.013 ms, and a symmetric key encryption/decryption T s 0.001 ms. Table 4 shows the measurement results. α is the number of search keywords and β is the size of the PHR dataset. The compared schemes provide a dynamic keyword search, and some schemes [28,31] do not consider data verification. Thus, to verify the performance of the dynamic keyword search, Figure 7 denotes the results obtained for different numbers of returned PHRs: β = 1 , β = 10 , β = 30 , and β = 50 . As shown in Figure 7, the existing schemes [25,28,31] exhibited higher computational costs than the proposed scheme. Furthermore, they did not satisfy some security features, such as mutual authentication and perfect forward secrecy. In contrast, the proposed scheme has lower computational costs and provides many security features that are not provided by the existing schemes.

7.3. Communication Costs

The communication costs of the proposed scheme are compared with [25,28,31]. We set the bit size of the hash function, identity, timestamp, random number, index, an elliptic curve point, G , G T , symmetric encryption/decryption, and attribute set to 160 bits, 128 bits, 32 bits, 160 bits, 32 bits, 320 bits, 512 bits, 1024 bits, 256 bits, and 32 T bits, respectively. Table 5 indicates the comparison results of the communication costs. In the data retrieval and request phases, the exchanged messages { T r y 1 , T r y 2 , I , T 3 } , { C I D i , V e r i f i } , { C I D i } , and { c , c m 1 , c m 2 } needed 1088 bits, 320 bits, 160 bits, and 2048 bits, respectively. The existing schemes [25,28,31] had higher costs than the proposed scheme. Therefore, we have lower costs and ensure more security requirements than the existing schemes [25,28,31].

8. Conclusions

We proposed a secure PHR sharing system by applying a blockchain and an IPFS to ensure integrity and solve the single-point-of-failure problem. We suggested key aggregate dynamic searchable encryption using LSSS to provide the authority of data owners and reduce the unnecessary computation for users. In addition, we considered mutual authentication and data verification to realize securing sharing between network entities. With the proposed scheme, the data owner can encrypt and upload his/her own PHR with unique system parameters and assign the read rights to data users with an aggregate key through mutual authentication. The data user can obtain the encrypted PHR by communicating with the blockchain and IPFS, and the data user can verify the integrity of the decrypted PHR ciphertext with the aggregate key. We proved the security of the proposed scheme through information and formal analyses including BAN logic, the AVISPA tool and the IND-CPA, IND-CKA, and IND-KGA models. In addition, we performed a comparison of previous works using MIRACL. We demonstrated that our scheme provides more efficient and secure sharing compared to existing schemes. As a result, the proposed scheme provides essential security requirements such as rights related to personal data, data integrity, transparency, mutual authentication, and convenience of search so our scheme has novelty compared to other previous works. Therefore, the proposed scheme can be applied in a practical PHR sharing system and will ensure secure and efficient sharing by providing the authority of the patient and ensuring the confidence of the data user. Since the scope of the proposed scheme is how data owners share their PHR without TTP, we focused on the method of secure PHR sharing through mutual authentication. So, we have an issue to overcome in terms of verifying the identity before mutual authentication between the data owner and user. In the future, we will cover the identity verification for more systematic patient-oriented systems. In addition, we plan to test the proposed scheme on the blockchain and IPFS implementations. Then, we will evaluate the feasibility of the proposed scheme in a practical PHR sharing system.

Author Contributions

Conceptualization, J.O., J.L., and K.P.; software, J.L. and M.K.; validation, Y.P.; formal analysis, J.O. and M.K.; investigation, J.L. and M.K.; writing—original draft preparation, J.O.; writing—review and editing, Y.P., K.P., and S.N.; supervision, Y.P.; funding acquisition, K.P. and S.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported in part by the National Research Foundation of Korea (NRF) and funded by the Ministry of Education under grant 2020R1I1A3058605, and in part by the Korean Government through the Electronics and Telecommunications Research Institute—ETRI (Core Technology Research on Trust Data Connectome) under Grant 22ZR1330.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. ISO. Health Informatics—Capacity-Based eHealth Architecture Roadmap—Part 2: Architectural Components and Maturity Model; Technical Report (ISO/TRTR14639-2); ISO: Geneva, Switzerland, 2014; Available online: https://www.iso.org/standard/54903.html (accessed on 13 April 2022).
  2. Deng, F.; Wang, Y.; Peng, L.; Xiong, H.; Geng, J.; Qin, Z. Ciphertext-policy attribute-based signcryption with verifiable outsourced designcryption for sharing personal health records. IEEE Access 2018, 6, 39473–39486. [Google Scholar] [CrossRef]
  3. MTBC PHR: Personal Health Records for Patients. Available online: https://phr.mtbc.com/phrdefault.aspx (accessed on 13 April 2022).
  4. Capzule PHR: Your Family Health Data in One App. (Personal Medical/Health Records). Available online: https://www.capzule.com/ (accessed on 13 April 2022).
  5. My Medical—The Personal Medical Record for You, The Patient. Available online: http://mymedicalapp.com/ (accessed on 13 April 2022).
  6. Garg, N.; Wazid, M.; Das, A.K.; Singh, D.P.; Rodrigues, J.J.P.C.; Park, Y. BAKMP-IoMT: Design of blockchain enabled authenticated key management protocol for internet of medical things deployment. IEEE Access 2020, 8, 95956–95977. [Google Scholar] [CrossRef]
  7. Morales-Sandoval, M.; Cabello, M.H.; Marin-Castro, H.M.; Compean, J.L.G. Attribute-based encryption approach for storage, sharing and retrieval of encrypted data in the cloud. IEEE Access 2020, 8, 170101–170116. [Google Scholar] [CrossRef]
  8. Banerjee, S.; Roy, S.; Odelu, V.; Das, A.K.; Chattopadhyay, S.; Rodrigues, J.J.P.C.; Park, Y. Multi-authority CP-ABE-based user access control scheme with constant-size key and ciphertext for IoT deployment. J. Inf. Secur. Appl. 2020, 53, 102503. [Google Scholar] [CrossRef]
  9. Cui, B.; Liu, Z.; Wang, L. Key-aggregate searchable encryption (KASE) for group data sharing via cloud storage. IEEE Trans. Comput. 2016, 65, 2374–2385. [Google Scholar] [CrossRef]
  10. Kim, M.; Lee, J.; Oh, J.; Park, K.; Park, Y.; Park, K. Blockchain based energy trading scheme for vehicle-to-vehicle using decentralized identifiers. Appl. Energy 2022, 322, 119445. [Google Scholar] [CrossRef]
  11. Chen, CM.; Tie, Z.; Wang, E.K.; Khan, M.K.; Kumar, S.; Kumari, S. Verifiable dynamic ranked search with forward privacy over encrypted cloud data. Peer-to-Peer Netw. Appl. 2021, 14, 2977–2991. [Google Scholar] [CrossRef]
  12. Yu, S.; Park, Y. A robust authentication protocol for wireless medical sensor networks using blockchain and physically unclonable functions. IEEE Internet Things J. 2022, 9, 20214–20228. [Google Scholar] [CrossRef]
  13. Chattaraj, D.; Bera, B.; Das, A.K.; Rodrigues, J.J.P.C.; Park, Y. Designing fine-grained access control for software-defined networks using private blockchain. IEEE Internet Things J. 2022, 9, 1542–1559. [Google Scholar] [CrossRef]
  14. Chen, CM.; Deng, X.; Kumar, S.; Kumari, S.; Islam, S.K. Blockchain-based medical data sharing schedule guaranteeing security of individual entities. J. Ambient Intell. Humaniz. Comput. 2021. [Google Scholar] [CrossRef]
  15. Park, K.; Lee, J.; Das, A.K.; Park, Y. BPPS: Blockchain-enabled privacy-preserving scheme for demand-response management in smart grid environments. IEEE Trans. Dependable Secur. Comput. 2022; Early access. [Google Scholar]
  16. Son, S.; Lee, J.; Park, Y.; Park, Y.; Das, A.K. Design of blockchain-based lightweight V2I handover authentication protocol for VANET. IEEE Trans. Netw. Sci. Eng. 2022, 9, 1346–1358. [Google Scholar] [CrossRef]
  17. Kumar, P.; Kumar, R.; Srivastava, G.; Gupta, G.P.; Tripathi, R.; Gadekallu, T.R.; Xiong, N.N. PPSF: A privacy-preserving and secure framework using blockchain-based machine-learning for IoT-driven smart cities. IEEE Trans. Netw. Sci. Eng. 2021, 8, 2326–2341. [Google Scholar] [CrossRef]
  18. Kim, M.; Yu, S.; Lee, J.; Park, Y.; Park, Y. Design of Secure Protocol for Cloud-Assisted Electronic Health Record System Using Blockchain. Sensors 2020, 20, 2913. [Google Scholar] [CrossRef] [PubMed]
  19. Li, M.; Yu, S.; Zheng, Y.; Ren, K.; Lou, W. Scalable and secure sharing of personal health records in cloud computing using attribute-based encryption. IEEE Trans. Parallel Distrib. Syst. 2013, 24, 131–143. [Google Scholar] [CrossRef] [Green Version]
  20. Liu, J.; Huang, X.; Liu, J.K. Secure sharing of personal health records in cloud computing: Ciphertext-policy attribute-based signcryption. Future Gener. Comp. Syst. 2015, 52, 67–76. [Google Scholar] [CrossRef]
  21. Rao, Y. A secure and efficient ciphertext-policy attribute-based signcryption for personal health records sharing in cloud computing. Future Gener. Comp. Syst. 2017, 67, 133–151. [Google Scholar] [CrossRef]
  22. Zhang, W.; Lin, Y.; Xiao, S.; Wu, J.; Zhou, S. Privacy preserving ranked multi-keyword search for multiple data owners in cloud computing. IEEE Trans. Comput. 2016, 65, 1566–1577. [Google Scholar] [CrossRef]
  23. Peng, T.; Lin, Y.; Yao, X.; Zhang, W. An efficient ranked multi-keyword search for multiple data owners over encrypted cloud data. IEEE Access 2018, 6, 21924–21933. [Google Scholar] [CrossRef]
  24. Sun, J.; Hu, S.; Nie, X.; Walker, J. Efficient ranked multi-keyword retrieval with privacy protection for multiple data owners in cloud computing. IEEE Syst. J. 2020, 14, 1728–1739. [Google Scholar] [CrossRef]
  25. Liu, Z.; Liu, Y.; Fan, Y. Searchable attribute-based signcryption scheme for electronic personal health record. IEEE Access 2018, 6, 76381–76394. [Google Scholar] [CrossRef]
  26. Xu, C.; Wang, N.; Zhu, L.; Sharif, K.; Zhang, C. Achieving searchable and privacy-preserving data sharing for cloud-assisted e-healthcare system. IEEE Internet Things J. 2019, 6, 8345–8356. [Google Scholar] [CrossRef]
  27. Wang, S.; Zhang, D.; Zhang, Y. Blockchain-based personal health records sharing scheme with data integrity verifiable. IEEE Access 2019, 7, 102887–102901. [Google Scholar] [CrossRef]
  28. Zhang, J.; Yang, Y.; Liu, X.; Ma, J. An efficient blockchain-based hierarchical data sharing for Healthcare Internet of Things. IEEE Trans. Ind. Inform. 2022, 18, 7139–7150. [Google Scholar] [CrossRef]
  29. Zhang, L.; Zhang, T.; Wu, Q.; Mu, Y.; Rezaeibagha, F. Secure decentralized attribute-based sharing of personal health records with blockchain. IEEE Internet Things J. 2022, 9, 12482–12496. [Google Scholar] [CrossRef]
  30. Madine, M.M.; Salah, K.; Jayaraman, R.; Yaqoob, I.; Al-Hammadi, Y.; Ellahham, S.; Calyam, P. Fully decentralized multi-party consent management for secure sharing of patient health records. IEEE Access 2020, 8, 225777–225791. [Google Scholar] [CrossRef]
  31. Wang, Y.; Zhang, A.; Zhang, P.; Qu, Y.; Yu, S. Security-aware and privacy-preserving personal health record sharing using consortium blockchain. IEEE Internet Things J. 2022, 9, 12014–12028. [Google Scholar] [CrossRef]
  32. Wu, G.; Wang, S.; Ning, Z.; Li, J. Blockchain-enabled privacy-preserving access control for data publishing and sharing in the internet of medical things. IEEE Internet Things J. 2022, 9, 8091–8104. [Google Scholar] [CrossRef]
  33. Hussien, H.M.; Yasin, S.M.; Udzir, N.I.; Ninggal, M.I.H. Blockchain-based access control scheme for secure shared personal health records over decentralised storage. Sensors 2021, 21, 2462. [Google Scholar] [CrossRef] [PubMed]
  34. Niu, J.; Li, X.; Gao, J.; Han, Y. Blockchain-based anti-key-leakage key aggregation searchable encryption for IoT. IEEE Internet Things J. 2020, 7, 1502–1518. [Google Scholar] [CrossRef]
  35. Dolev, D.; Yao, A. On the security of public key protocols. IEEE Trans. Inf. Theory 1983, 29, 198–208. [Google Scholar] [CrossRef]
  36. Wazid, M.; Das, A.K.; Choo, K.-K.R.; Park, Y. SCS-WoT: Secure communication scheme for web of things deployment. IEEE Internet Things J. 2022, 9, 10411–10423. [Google Scholar] [CrossRef]
  37. Oh, J.; Lee, J.; Kim, M.; Park, Y.; Park, K.; Noh, S. A secure data sharing based on key aggregate searchable encryption in fog-enabled IoT environment. IEEE Trans. Netw. Sci. Eng. 2022; Early access. [Google Scholar]
  38. Beimel, A. Secure Schemes for Secret Sharing and Key Distribution; Technion-Israel Institute of Technology, Faculty of Computer Science: Haifa, Israel, 1996. [Google Scholar]
  39. Hunhevicz, J.J.; Hall, D.M. Do you need a blockchain in construction? Use case categories and decision framework for DLT design options. Adv. Eng. Inform. 2020, 45, 101094. [Google Scholar] [CrossRef] [Green Version]
  40. Tan, W.K.A.; Sundarakani, B. Assessing blockchain technology application for freight booking business: A case study from technology acceptance model perspective. J. Glob. Oper. Strateg. Sourc. 2021, 14, 202–223. [Google Scholar] [CrossRef]
  41. Szabo, N. Formalizing and securing relationships on public networks. First Monday 1997, 2. Available online: https://firstmonday.org/ojs/index.php/fm/article/view/548 (accessed on 13 April 2022). [CrossRef]
  42. IPFS is the Distributed Web. Available online: https://ipfs.io/ (accessed on 13 April 2022).
  43. Viganò, L. Automated security protocol analysis with the AVISPA tool. Electron. Notes Theor. Comput. Sci. 2006, 155, 61–86. [Google Scholar] [CrossRef] [Green Version]
  44. Lee, J.; Yu, S.; Park, K.; Park, Y.; Park, Y. Secure three-factor authentication protocol for multi-gateway IoT environments. Sensors 2019, 19, 2358. [Google Scholar] [CrossRef] [Green Version]
  45. Liu, X.; Guo, Z.; Ma, J.; Song, Y. A secure authentication scheme for wireless sensor networks based on DAC and Intel SGX. IEEE Internet Things J. 2022, 9, 3533–3547. [Google Scholar] [CrossRef]
  46. Kwon, D.; Park, Y.; Park, Y. Provably secure three-factor-based mutual authentication scheme with PUF for wireless medical sensor networks. Sensors 2021, 21, 6039. [Google Scholar] [CrossRef] [PubMed]
  47. Shashidhara, R.; Nayak, S.K.; Das, A.K.; Park, Y. On the design of lightweight and secure mutual authentication system for global roaming in resource-limited mobility networks. IEEE Access 2021, 9, 12879–12895. [Google Scholar] [CrossRef]
  48. Chen, CM.; Deng, X.; Gan, W.; Chen, J.; Islam, S.K. A secure blockchain-based group key agreement protocol for IoT. J. Supercomput. 2021, 77, 9046–9068. [Google Scholar] [CrossRef]
  49. Lee, J.; Kim, G.; Das, A.K.; Park, Y. Secure and efficient honey list-based authentication protocol for vehicular ad hoc networks. IEEE Trans. Netw. Sci. Eng. 2021, 8, 2412–2425. [Google Scholar] [CrossRef]
  50. MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library. Available online: https://github.com/miracl/MIRACL (accessed on 13 April 2022).
Figure 1. Network model of the proposed scheme.
Figure 1. Network model of the proposed scheme.
Electronics 11 03199 g001
Figure 2. Data upload phase.
Figure 2. Data upload phase.
Electronics 11 03199 g002
Figure 3. Aggregate key request phase.
Figure 3. Aggregate key request phase.
Electronics 11 03199 g003
Figure 4. Data retrieval phase.
Figure 4. Data retrieval phase.
Electronics 11 03199 g004
Figure 5. Data request phase.
Figure 5. Data request phase.
Electronics 11 03199 g005
Figure 6. AVISPA evaluation results.
Figure 6. AVISPA evaluation results.
Electronics 11 03199 g006
Figure 7. Computation costs comparison as the number of search keywords increases [25,28,31].
Figure 7. Computation costs comparison as the number of search keywords increases [25,28,31].
Electronics 11 03199 g007
Table 1. Notation.
Table 1. Notation.
NotationDescription
D O , D U Data owner/data user
( s k o , p k o ) Data owner’s private key and public key
( s k u , p k u ) Data user’s private key and public key
nMaximum number of PHRs
mMaximum number of keywords
WKeyword set for document
W Search keyword set
IIndex of search keyword set
P H R i i-th PHR
wKeyword
α , t , r o , r u , R u Random number
T 1 , T 2 , T 3 Timestamp
T Maximum transmission delay
A K Aggregate key
T r y 1 , T r y 2 Trapdoor
eBilinear map e : G × G G T
hOne-way hash function { 0 , 1 } * Z q
| | Concatenation operator
Bitwise exclusive-or operator
Table 2. BAN Logic Notation.
Table 2. BAN Logic Notation.
NotationDescription
s c k y Secret key
K | Y Kbelieves statement Y
# Y Statement Y is fresh
K Y Kreceives statement Y
K | Y K once said Y
K Y Kcontrols statement Y
< Y > S Statement Y is combined with secret statement S
{ Y } s c k y Statement Y is masked by s c k y
K s c k y Q K and Q share  s c k y to communicate with each other
Table 3. Security Features.
Table 3. Security Features.
Security FeaturesLiu et al. [25]Zhang et al. [28]Wang et al. [31]Ours
S F 1
S F 2
S F 3
S F 4
S F 5 ×××
S F 6
S F 7 ×××
S F 8
S F 9
S F 10
S F 11 ×××
S F 12 ×××
∘: Secure; ×: Insecure; −: Not considered; SF1: Impersonation attack; SF2: Replay attack; SF3: MITM attack; SF4: Insider attack; SF5: Perfect forward secrecy; SF6: Anonymity; SF7: Mutual authentication; SF8: Correctness; SF9: Access control; SF10: Dynamic search; SF11: Data verification; SF12: DO’s authority over his/her own PHR.
Table 4. Computational Costs Comparison.
Table 4. Computational Costs Comparison.
SchemeTotal Execution Time (ms)
[25] α ( 4 T h + 10 T b + 10 T e + 13 T s m ) + β ( T h + 2 T b + 4 T e + 4 T s m ) 104.801 α + 25.921 β
[28] α ( 4 T h + 13 T b + 22 T e + 17 T s m + T a ) + β ( T h + T e + T s + 2 T s m ) 143.859 α + 5.569 β
[31] α ( T h + 13 T b + 19 T s m + 5 T e + 2 T a ) + β T s 134.686 α + 0.001 β
Ours α ( T h + 4 T b + 8 T e + 4 T s m ) + β ( 2 T b + 3 T s m ) 22.732 α + 21.343 β
Table 5. Communication Costs Comparison.
Table 5. Communication Costs Comparison.
SchemeCommunication CostsNumber of Messages
[25]2 T + 5792 bits2
[28] T + 7552 bits5
[31] T + 4576 bits5
Ours3616 bits4
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Oh, J.; Lee, J.; Kim, M.; Park, Y.; Park, K.; Noh, S. A Secure Personal Health Record Sharing System with Key Aggregate Dynamic Searchable Encryption. Electronics 2022, 11, 3199. https://doi.org/10.3390/electronics11193199

AMA Style

Oh J, Lee J, Kim M, Park Y, Park K, Noh S. A Secure Personal Health Record Sharing System with Key Aggregate Dynamic Searchable Encryption. Electronics. 2022; 11(19):3199. https://doi.org/10.3390/electronics11193199

Chicago/Turabian Style

Oh, Jihyeon, JoonYoung Lee, MyeongHyun Kim, Youngho Park, KiSung Park, and SungKee Noh. 2022. "A Secure Personal Health Record Sharing System with Key Aggregate Dynamic Searchable Encryption" Electronics 11, no. 19: 3199. https://doi.org/10.3390/electronics11193199

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop