An Efficient Authentication Scheme For Blockchain-Based Electronic Health Records
An Efficient Authentication Scheme For Blockchain-Based Electronic Health Records
INDEX TERMS Electronic health records, blockchain, identity-based signatures, multiple authorities.
lead to waste of medical information resources and increase This paper works on creating a new EHRs paradigm which
patients’ body and financial burdens. Secondly, in EHRs can help in dealing with the problems in cloud-based EHRs.
systems, only the authorities, such as hospitals, have data. Our solution is to make use of the emerging technology of
Hence, if there is a dispute between hospital and patient, then blockchain which is derived from Bitcoin [15]. Generally
the hospital will always win since it can tamper the medical speaking, blockchain can be seem as a decentralized and
records or even delete them. It is not fair for patients. distributed database. There is authority in traditional net-
work architectures or application systems, such as KGC,
cloud service provider, and so on. The decentralized fea-
ture of blockchain gets rid of such dependence on author-
ity. Therefore, many people considered the applications of
blockchain in different types of real-world scenarios, includ-
ing EHRs, we call it blockchain-based EHRs. For example,
the works of [3], [4], and [24] designed a broad frame-
work for blockchain-based EHRs. Zhang et al. [23] and
Omar et al. [27] made use of encryption technology to protect
the confidentiality of the medical records. Xu et al. [22] focus
on the privacy issue of EHRs and designed a new framework
based on blockchain and homomorphic encryption.
Authentication is very important for blockchain-based
FIGURE 1. Cloud-based EHRs.
EHRs. It is different from the case of cryptocurrency which
In order to solve the problem of information sharing in the is anonymous and thus there is no authentication mechanism
traditional EHRs, researchers introduced the notion of could- for users, the data in blockchain-based EHRs must be authen-
based EHRs [11]–[14], [16], [21], [25]. The cloud-based ticated, such as diagnosis from doctors. However, there are
EHRs can be seem as an application of the could computing few works about such issue. Sun et al. [26] designed a decen-
technology in EHRs. In cloud-based EHRs systems, there still tralized attribute-based signature scheme for blockchain-
needs a cloud service provider who plays the role of authority. based EHRs. In their scheme, each authority agency is in
As shown in Figure 1, all medical-related data, from doc- charge of one or more attributes. That is to say, the different
tor, pharmacy, diagnostic laboratory, insurance center, and attributes of the user are issued by one or more authority
so on, will be uploaded to the cloud server. Then, users agencies. Therefore, the scheme of [26] is vulnerable to the
can search and download useful information from the could collusion attack of authorities. Guo et al. [6] also constructed
server. If several organizations share a same cloud server, an attribute-based signature scheme with multiple authorities
then they can share the data with a convenient way. Next, for blockchain-based EHRs. Their scheme can resist col-
when patients transfer from a hospital to another one, the new lusion attack out of N from N − 1 corrupted authorities.
hospital can obtain patients’ medical-related data from the However, in their scheme, each patient has a blockchain of
cloud and thus they have no need to, once again, get medical healthcare alone which is incompatible with the property of
examinations. Therefore, cloud-based EHRs solve the prob- blockchain.
lem of information sharing in the traditional EHRs. In addi-
tion, in cloud-based EHRs, all data are only maintained by the A. OUR MOTIVATIONS AND CONTRIBUTIONS
authority, i.e., cloud service provider, and thus the hospitals There are few works considered the authentication issue
and other organizations could tamper the medical-related data for blockchain-based EHRs where the scheme of [26] suf-
only when they collude with the authority. fers from the problem of collusion attack and the model
Cloud-based EHRs solve the problem of information shar- of [6] is incompatible with blockchain. In addition, both
ing, and make hospitals and other organizations cannot of [26] and [6] have not thought about the roles of the orga-
tamper the data by themselves. However, there also has nizations, such as hospitals, medical insurance companies,
some problems in the cloud-based EHRs. Firstly, if there scientific research institutions, pharmaceutical companies,
has dispute between hospital and patient, then the hospi- and so on, which is inappropriate in real-world applica-
tal can collude with the cloud service provider to tamper tion. Furthermore, the signing and verification costs of
or even delete the data. Therefore, as in many other kinds both schemes [6], [26] are high. However, as said before,
of cloud-based systems, we need to put our trust on the the authentication issue is very important for blockchain-
cloud server. Whereas, if the cloud server is attacked or it based EHRs. Therefore, in this work, we further consider this
is malicious, then patients’ privacy is a big problem. Sec- problem for blockchain-based EHRs. The main contributions
ondly, in identity-based and attribute-based cryptosystems for of this work are as follows:
cloud-based EHRs, e.g., [12], [21], [25], there is a key gen- • Firstly, as the roles of organizations of EHRs have
eration center (KGC) who is responsible for key generation not been considered in the models of [6] and [26],
for all users. Actually, it is well known that KGC knows all we re-define the model of blockchain-based EHRs.
users’ secret keys. Our model is defined in the setting of consortium
G is generated by an element g, i.e, G =< g >. Groups G logarithm of g for h is unknown to everyone.
– Phase 2 (generation of master secret key): This – Phase 3 (generation of secret key): After receiving
phase contains the following steps. all partial secret keys. User idi computes his secret
1) Each authority IDi , for i = 1, . . . , N , randomly key as
chooses two (N − 1)-degree polynomials on Z∗p :
N
Y N
Y
Fi (x) = ai0 + ai1 x + · · · + ai(N −1) x N −1
, skidi = pskidi ,j = H (0||idi )aj0 = H (0||idi )s .
j=1 j=1
Fi0 (x) = bi0 + bi1 x + · · · + bi(N −1) x N −1 .
• User-Sign: To sign a message m ∈ {0, 1}∗ , user idi does
Then, it computes and broadcasts Bik =
the following three phases:
gaik hbik , for k = 0, 1, . . . , N − 1. In addition,
it also computes secret values sij = Fi (H1 (IDj )) – Phase 1: randomly choose an integer r ∈ Z∗p and
(mod p) and s0ij = Fi0 (H1 (IDj )) (mod p), for computes u = H (0||idi )r ∈ G.
j = 1, . . . , N . Finally, it sends sij and s0ij to IDj – Phase 2: compute t = H1 (m||u) ∈ Z∗p .
r+t
for j 6 = i. – Phase 3: compute v = skid i
∈ G.
2) Each authority IDi checks the equation gsji hsji =
0 ?
The signature on message m is σ = (u, v).
QN −1 k
H1 (IDi ) (mod p) holds or not. If it • User-Verify: One can verify the validity of a signature
k=0 (Bjk ) σ = (u, v) on a message m from signer idi .
holds, the secret sharing from IDj is valid; Oth-
erwise, IDi broadcasts a complaint against IDj . – Phase 1: compute t = H1 (m||u) ∈ Z∗p .
3) If authority IDj is complained, then it needs to – Phase 2: check the following equation holds or not
broadcast values (sij , s0ij ) that satisfy equation. ?
If the disclosed (sij , s0ij ) still does not match, IDj e(v, g) = e(u, y) · e(H (0||idi )t , y).
has to keep proving itself to be honest until the
If it holds, accept the signature; Else reject it.
equation is true.
4) Note that the master secret key that interactively • Authority-Sign: Before upload a block, denoted by M ,
established by N authorities is s =
PN to the chain, authority IDi needs to sign it as follows.
i=1 ai0 .
If there has less than N authorities are corrupted, – Compute δ = H (1||M )ai0 ∈ G.
then they cannot recover the value s. The master The signature on block data M is δ.
secret key of authority IDi is • Authority-Verify: Anyone can check the validity of a
signature δ on block data M from an authority IDi .
SKIDi = ai0 . – Check the following equation holds or not
– Phase 3 (generation of master public key): Accord- ?
e(δ, g) = e(H (1||M ), Ai0 ).
ing to the above two phases, each authority has
broadcasted values {Ai0 = gai0 }i∈[1,N ] which can be
If it holds, accept the signature; Else reject it.
verified publicly. Therefore, the master public key
can be computed as
C. CORRECTNESS
N N
Y Y PN 1) CORRECTNESS OF USERS’ SIGNATURES
y= Ai0 = gai0 = g i=1 ai0 = gs ∈ G. The correctness of the users’ signatures can be easily verified
i=1 i=1
by the following equation:
After the above three phases, each authority adds param-
eters y and {(IDi , Ai0 )}N
r+t
e(v, g) = e(skid , g)
i=1 to params. i
Theorem 1: The MA-IBS scheme for blockchain-based TABLE 1. Comparison of three authentication schemes for
blockchain-based EHRs.
EHRs is (t, qH , qH1 , qM , qK , qUS , qAS , )-unforgeable, for
the case of User-Sign signature forgery in the random oracle
model, assuming the CDH problem is hard.
The proof of this theorem is presented in Appendix.
B. PERFORMANCE EVALUATION
We denote Tpar as the time to perform paring operations,
Tmtp as the map-to-point hash operations, Tmul as the mul-
tiplication operations in group GT , and Texp as the expo-
nentiation operations in group G, respectively. Because
these operations dominate the costs of signing and ver-
ification algorithms, we only consider these four opera-
tions and neglect the other operations such as hash function
H1 : {0, 1}∗ → Z∗p . Java Pairing-Based Cryptography
Library (JPBC) is used to measure the run times of the
above operations. We obtain the results: Tpar is 5.796 ms,
Tmtp is 1.293 ms, Tmul is 0.031 ms and Texp is 5.786 ms
within hardware platform of an Intel i7-8550U processor with
2.0 GHz clock frequency, 8 gigabytes memory and executed
in Windows 10 operating system.
We compare our scheme to the only two exiting two
authentication schemes [6], [26] for blockchain-based EHRs
with respect to signing cost, verification cost, communication
FIGURE 4. Time comparison of three types of verification.
cost, and whether the scheme can resist collusion attack.
The results are listed in Table 1, where t is the number
of users attributes and N is the number of the authori- of singer privacy based on attribute-based signatures. How-
ties and we assume that t = N = 5 in both schemes ever, this property is not mandatory for blockchain-based
schemes [6] and [26]. In addition, since the sizes of elements EHRs because, at most time, we need to know who will
in the chosen groups G and GT are 40 and 128 bytes, respec- be responsible for the medical-related data. For example,
tively. As shown in Table 1, our proposed authentication apparently, patients need to know the identity who gives him
scheme for blockchain-based EHRs has lower computation the diagnosis.
and communication costs compared to the only two existing As described in Subsection IV-D, our scheme supports
authentication schemes for blockchain-based EHRs. batch verification which can reduce the verification cost.
In Table 1, the signing cost of our scheme is refer to the We divide the batch verification into two cases, verify n signa-
User-Sign algorithm. In addition, our scheme also defines tures from a same signer (denoted by (1, n)-to-1 verification)
that authorities sign the block data, i.e., Authority-Sign algo- and verify n signatures from n signers (denoted by (n, n)-to-1
rithm, which needs Tmtp + Texp ≈ 7.079 ms each time. verification). Table 2 shows the comparison of efficiency
Furthermore, schemes of [6] and [26] have the property between the three types of verification.
Combining with the run times of basic operations obtained PROOF OF LEMMA 3
above, we show the time cost of verification algorithm in In G2 , challenger plays the role of all authorities and thus it
Figure 4. According to the figure, we can easily observe that knows the value s. However, the challenger, in this game,
the batch verification can significantly reduce the verification sets the master public key as y := gas rather than gs that is
delay, especially verifying a large number of signatures. in the real world. Nevertheless, as proved in Lemma 2, this
cannot affect adversary’s advantage. We prove that if there
exists a PPT adversary A can break the security of our scheme
VI. CONCLUSION
with a non-negligible advantage (λ), then we can construct
In order to realize the authentication scheme of EHRs system
an efficient algorithm, i.e., challenger C, to solve the CDH
based on blockchain. We first formally define the EHRs
problem with a non-negligible probability 0 (λ).
system model in the setting of consortium blockchain. Then
Firstly, challenger C is given an instance (G, GT , p, g, e,
we design an identity-based signature scheme with multi-
ga , gb ) of CDH problem. The goal of C is to compute gab ∈ G.
ple authorities for the blockchain-based EHRs system. The
Then, C plays the following game with the adversary A.
scheme has efficient signing and verification algorithms.
• System Setup: Given a security parameter λ, C executes
the system setup algorithm on the behalf of the EHR
APPENDIX server as in the real world. The output of this phase is
PROOF OF LEMMA 1 the public parameters params. Then, C gives it to A.
The proof of lemma 1 is based on the security of the dis- • Authority Setup: C honestly runs the authority
tributed key generation technique [5] which requires that no setup algorithm on the behalf of all authorities
information on s can be learned by the adversary except for ID1 , . . . , IDN . The output of this phase is the master
that is implied by the group element y = gs ∈ G. The formal secret key SKID1 , . . . , SKIDN . A can obtain identities
definition is as follows which is a variant of the original ID1 , . . . , IDN . Note that, in such setting, C plays the
definition. roles of all authorities, and hence it knows the secret
Definition 2: For any PPT adversary A, there exists a PPT value s ∈ Z∗p . Then, C sets y := gas which means that
simulator S, such that on input a random element y ∈ G the implied master secret key is as. Note that this is
generated by g, produces an output distribution which is different from that in the real scheme, but according to
polynomially indistinguishable from A’s view of a run of the Lemma 2, it is indistinguishable to A. Finally, C adds
distributed key generation that ends with y as its public key parameters y and {Ai0 }i∈[1,N ] into params and gives
output, and even if A corrupts up to N − 1 authorities. params := {G, GT , p, g, y, e, H , H1 , {(IDi , Ai0 )}Ni=1 }
In G0 , master public key is y := gs produced by the securely to A, where H and H1 will be seem as the random oracles
distributed key generation. According to the above definition, in the following proof.
even if a PPT adversary A can corrupt N − 1 authorities • Queries: A makes the following queries to C:
which correspond to the participants in the distributed key – H random oracle: challenger C maintains a list L :=
generation, it also cannot distinguish between a real key and a {(i, idi , h0i ∈ G)} where
random value in the group G. Specifically, any PPT adversary (
cannot distinguish between y := gs ∈ G and y := gas ∈ G, 0 gb , if i = i∗
hi = k
where s is the real key produced by the distributed key g i , if i 6 = i∗
generation and a, which is independent of s, is the exponent
of ga from a CDH instance even we cannot recover the two and i∗ is randomly selected by C which denotes
exponents s and a. In other words, for any PPT adversary A, its guessing point that A will attack and ki is also
its advantages in G0 and G1 to break the MA-IBS scheme are randomly selected by C from Z∗p . If A’s query idi
G
identical, i.e., AdvA0 (λ) = AdvG 1 in the list L, then C gives h0i to A; Else, C randomly
A (λ).
selects an integer ki ∈ Z∗p , then gives h0i = gki ∈ G
to A and adds the item (i, idi , h0i ) into the list L.
PROOF OF LEMMA 2 – H1 random oracle: challenger C also maintains
The proof of this lemma is fairly straightforward. In both another list L1 := {(i, mi ||ui , h01i )} where h01i ∈ Z∗p
games G0 and G1 , the master public key is y := gas , where is randomly chosen by C. If A’s query mi ||ui in the
a is the exponent of the element ga from the CDH instance list L1 , then C gives h01i to A; Else, C randomly
and s is produced by the distributed key generation. Note selects an integer h01i ∈ Z∗p , then gives h01i to A and
that the two values a and s are independently and randomly adds the item (i, mi ||ui , h01i ) into the list L1 .
generated. Therefore, this thing that whether the challenger – Master secret key generation oracle: A issues a
knows s or not does not affect adversary’s view. That is to say, request for some corrupted authorities IDi∈QM ⊂
in two games, challenger knows s in G2 and does not know s {ID1 , . . . , IDN } for their master secret key, where
in G1 , adversary’s advantages to break our MA-IBS scheme QM denotes the index set of the identities of cor-
are identical, i.e., AdvG1 G2
A (λ) = AdvA (λ). rupted authorities. For such a request, C transmits
SKIDi∈QM to A. As described above, the master which is the desired solution of the given instance of CDH
secret keys were honestly generated by C alone, problem.
therefore it can answer such queries. According to the above proof, a successful simulation,
– Key generation oracle: A submits an identity idi to denoted by E, from C consists of three events:
C for its secret key skidi . If idi = idi∗ , then C cannot • E1 : in key generation oracle, A does not query idi∗ ’s
answer this query and thus has to abort the game. secret key.
Else, C returns back skidi = (ga )s·ki ∈ G, where ki • E2 : adversary A’s challenge identity is idi∗ .
is from the list L, to A. • E3 : challenger C successfully rewinds the random oracle
– User-Signing oracle: A submits a tuple (idi , mi ) to H1 for the forking lemma.
C for a signature σi . The request of A can be divided A successful simulation means that C can use A’s forgery to
into two cases: solve the CDH problem. In other words, the advantage of C
1) idi 6 = idi∗ : in such case, C firstly obtains a valid is AdvCDH
A = Pr[E] = Pr[E1 ] · Pr[E2 ] · Pr[E3 ] since the three
secret key skidi from the key generation oracle. events are mutually independent. Therefore, the advantage of
Then, it can compute the signature for the query C to solve the CDH problem is
(idi , mi ) as the real signer did in the real world. YqK qH − i 1 1 − e−1
2) idi = idi∗ : in such case, C cannot obtain a AdvCDHC = 0 > · · · .
i=1 qH qH qH1
valid secret key skidi∗ from the key genera-
tion oracle and thus it cannot directly compute PROOF OF THEOREM 1
the signature as above. However, C also can According to the three lemmas, we can see that the advan-
answer A’s request as follow: σi := (ui , vi ) = tages in three games G0 , G1 and G2 of a PPT adversary to break
0
(gei /(gb )h1i , (ga )ei ·s ) where h01i is from the H1 G
the scheme are identical, i.e., AdvA0 = AdvG 1 G2
A = AdvA .
random oracle and ei is randomly selected In addition, its advantage in G2 is negligible. Therefore,
from Z∗p . The correctness of the signature can G
its advantage in G0 , AdvA0 (λ), which corresponds to the
be verified as follows: real world of when using our MA-IBS scheme into the
e(ui , y) · e(H (idi )tj , y) blockchain-based EHRs system, is also negligible.
0 0 Let Texp be the time to perform exponentiation opera-
= e(gei /(gb )h1i , gas ) · e((gb )h1i , gas )
tions in group G. Assume that a (t, qH , qH1 , qM , qK , qS , )-
= e(gei , gas ) adversary successfully breaks this MA-IBS scheme.
= e(gei ·as , g) According to the proof of Lemma 3, then there exists efficient
= e(vi , g). algorithm C to solve the CDH problem with time t 0 ≈ t +
qH Texp + qK Texp + 2qS Texp + Tdkg , where Tdkg denotes the
• Forgery: A outputs a forgery (m∗ , σ ∗ = (u∗ , v∗ )) with time of C to simulate the distributed key generation algorithm.
identity id ∗ . We assume that A wins the game, that is to
say, the forgery satisfies all of the following conditions: PROOF OF THEOREM 2
1) QM 6 = [1, N ]; Challenger C is given an instance, (G, GT , p, g, e, ga , gb ),
2) Verify(id ∗ , m∗ , σ ∗ ) = Accept; of CDH problem and its target is to compute gab ∈ G. C plays
3) A does not make query for identity id ∗ in the key the following game with adversary A.
generation queries phase; • System Setup: C randomly chooses a security parame-
4) A does not make query for message m∗ and iden- ter λ and executes the system setup algorithm. Then it
tity id ∗ in the signing queries phase. outputs the public system parameters to A.
In addition, we assume that the advantage of A to win • Authority Setup: Next, C honestly executes the author-
the above game is . ity setup algorithm on the behalf of all authorities
After the end of the game, C checks that id ∗ =
? ID1 , . . . , IDN with the exception of SKIDi∗ := a even
idi∗ . If the equation does not holds, then C aborts the C does not know it, where i∗ is randomly chosen by
game and outputs ⊥. Otherwise, according to the forking C which denotes its guess of A’s challenge authority.
lemma [17], based on the valid signature (id ∗ , m∗ , u∗ , h∗1 ← Finally, C adds parameters y and {Ai0 }i∈[1,N ] , where
H1 (m∗ ||u∗ ), v∗ ), C also can obtain another valid signature Ai∗ 0 := ga , into params and gives it to A.
0 0 −1 • Queries: A makes the following queries to C:
(id ∗ , m∗ , u∗ , h∗1 ← H1 (m∗ ||u∗ ), v∗ ) with probability 1−e
qH ,
0
1 – H random oracle: challenger C maintains a list L :=
where h∗1 6 = h∗1 , by rewind the random oracle with the same {(i, Mi , h0i ∈ G)} where
input m∗ ||u∗ but different choices of H1 . ( 0
Finally, according to the assumption that C obtains two 0 gb , if i = i∗
hi = k 0
valid signatures from A, it can compute g i , if i 6 = i∗
v∗ s−1 ·(h∗ −h∗0 )−1 0
and i∗ is randomly selected by C which denotes
gab = ( 0)
1i 1i (mod p)
.
v∗ its guessing point that A will attack and ki is also
[21] H. Wang and Y. Song, ‘‘Secure cloud-based EHR system using attribute- SHUAI MA received the B.S. degree from the
based cryptosystem and blockchain,’’ J. Med. Syst., vol. 42, no. 8, p. 152, Hunan University of Technology, in 2016. He is
2018. currently pursuing the master’s degree with the
[22] W. Xu, L. Wu, and Y. Yan, ‘‘Privacy-preserving scheme of electronic health Chongqing University of Posts and Telecommu-
records based on blockchain and homomorphic encryption,’’ J. Comput. nications. His present research interest includes
Res. Develop., vol. 55, no. 10, pp. 2233–2243, 2018. blockchain technology and its applications.
[23] P. Zhang, J. White, D. C. Schmidt, G. Lenz, and S. T. Rosenboloom,
‘‘FHIRChain: Applying blockchain to securely and scalably share clinical
data,’’ Comput. Structural Biotechnol. J., vol. 16, pp. 267–278, 2018.
[24] A. Roehrs, C. A. da Costa, and R. da Rosa Righi, ‘‘OmniPHR:
A distributed architecture model to integrate personal health records,’’
J. Biomed. Inform., vol. 71, pp. 70–81, Jul. 2017. YONG XIANG (SM’12) received the Ph.D. degree
[25] K. Seol, Y.-G. Kim, E. Lee, Y.-D. Seo, and D.-K. Baik, ‘‘Privacy-
in electrical and electronic engineering from The
preserving attribute-based access control model for XML-based electronic
University of Melbourne, Australia. He is cur-
health record system,’’ IEEE Access, vol. 6, pp. 9114–9128, 2018.
[26] Y. Sun, R. Zhang, X. Wang, K. Gao, and L. Liu, ‘‘A decentralizing attribute- rently a Professor with the School of Informa-
based signature for healthcare blockchain,’’ in Proc. IEEE 27th Int. Conf. tion Technology, Deakin University, Australia. His
Comput. Commun. Netw. (ICCCN), Jul./Aug. 2018, pp. 1–9. research interests include information security and
[27] A. A. Omar, M. S. Rahman, A. Basu, and S. Kiyomoto, ‘‘MediBchain: privacy, signal and image processing, data ana-
A blockchain based privacy preserving platform for healthcare data,’’ lytics and machine intelligence, the Internet of
in Proc. Int. Conf. Secur., Privacy Anonymity Comput., Commun. Storage. Things, and blockchain. He has published four
Cham, Switzerland: Springer, 2017, pp. 534–543. monographs, over 110 refereed journal articles,
and numerous conference papers in these areas. He has served as the Pro-
gram Chair, TPC Chair, Symposium Chair, and Session Chair for a number
of international conferences. He is an Associate Editor of the IEEE SIGNAL
PROCESSING LETTERS and the IEEE ACCESS.