Introduction
The online social networks (OSNs) provide a new way for people to communicate and interact with others, which can cross geographical boundaries. A typical architecture of OSNs is shown in Fig. 1. Users need to register an account with social service providers, then they can interact with people who also have accounts with the same provider. The profile contains the user's identity information, and is stored on the service provider's server. In some OSNs, users are able to set access rules while others send a new friend request or want to access their sharing posts, and they can also build some groups based on the same attributes.
The traditional OSNs are using centralized identity management model, users need to register an identity on every service provider (SP), and store their identity information on the provider's server, which causes tremendous cost to users and personal data leakage [1] and [2]. This situation promotes the development of distributed OSNs (DOSNs) [3], which remove dependency on a centralized provider, and are usually implemented by a peer-to-peer (P2P) network. Although effectively protecting users' data, DOSNs also have some limitations. A major problem is the difficulty of identity management (IDM). In DOSNs, it is difficult to validate users' identities while all the information is managed by the user, thereby a fake identity can be easily forged by a malicious user.
Recently, a kind of IDM model which is user-centric appeared, and is named Self-Sovereign identity (SSI) [4]. The SSI is also known as the decentralized identity (DID), in which the identity data is in control of the user, who also has the right to decide which data to be shown while accessing service [5]. So the SSI is an appropriate IDM solution to the OSNs. The World Wide Web Consortium (W3C) designs Decentralized Identifiers [6] and verifiable credentials (VC) [7] to implement SSI. The W3C identity model is the most widely discussed identity model in SSI. However, while showing credentials to others, the user will expose the mapping of his identifier to the attribute in most existing DID systems, which compromises the user's identity privacy.
To address the privacy issues, some people suggested using anonymous credential [8]. With the anonymous credential technology, a user can show credentials to prove collegiality to others without revealing real identity. As a result, several decentralized anonymous credential protocols have been proposed (e.g., [9], [10]), which can be applied in DID systems. Nevertheless, attribute values are either exposed or fully hidden in these protocols, which limits the use of scenarios that the user may need to prove the satisfaction of the attributes (e.g., prove the age is over 18).
Range proof[11] can prove that some values in the credential are in a certain interval, such as age and income. Therefore the range proof is an effective method to hide attributes, and has been used to provide attribute privacy in [8]. The problem is that most range proofs are not practical enough to be applied in DID systems. Because some protocols need a trusted setup phase [12] and the others include linearly increasing public key operations with circuit size [13]. Therefore, we construct a range proof protocol to solve this.
A. Our Contributions
In this paper, we construct a Pointcheval and Sander's (PS) signature [14] based range proof protocol without a trusted setup. The protocol uses the randomizability of PS signature, making it possible to reuse signatures on the range with little overhead. Moreover, we extend the W3C identity model by introducing an identity named Account Provider (AP) to revoke users, which also make sure every user has a unique identity in the OSNs. Then, we combine these with blockchain to build our proposed system. We also develop a prototype of our proposal on the Ethereum [15] for simulation. Our paper's main contributions are summarized as follows:
We propose a range proof protocol based on PS signature, and use it to build a identity management scheme for OSNs.
We perform a security analysis of our proposed scheme. The result shows that our scheme can satisfy the security and privacy requirements in IDM systems.
We implement our proposed system on the Ethereum and make the performance analysis on it. The results show that the gas cost and computation time for our system are acceptable.
B. Organization
The remaining of this article is structured as follows. In Section II, we review the related work of blockchain-based SSI identity management systems. In Section III, we introduce some preliminaries. The details of the proposed system model, as well as the design of the range proof protocol are presented in Section IV, and we analyze its security in Section V. Findings from the performance evaluation are shown in Section VI. Finally, Section VII concludes this paper.
Related Work
A. Traditional Identity Management in Social Networks
Most of the existing OSNs are based on centralized identity model, such as Facebook and Twitter. Users have an identity on each OSNs service providers, and need to handle a number of identities. The identity profile cannot be reused between different service providers. Federated identity model [16] appeared to solve this, which utilizes a OSNs service provider as an identity provider (IDP) to manage users' identity. The IDP can establish a trusted domain and provide a single sign-on service for users to access service from SPs in the trusted domain.
Security Assertion Markup Language (SAML) [17] is a protocol that can be used to build a federated IDM (FIDM) system. SAML protocol allows identity authentication between organizations where users are members of the IDP. Shibboleth [18] is a FIDM project based on SAML, which gives the IDP full control over the identity attribute. The SP can not access attributes without IDP's permission. The problem is that the SPs need to sign aggrements to join the federation and provide service, which limits the scope of user's identity.
OpenID Connect (OIDC) [19] is another way to achieve FIDM system, which is based on OAuth [20]. In OIDC, there is no need to build a trust relationship between the IDPs and the SPs. While accessing service from SP, users can select their preferred IDP and choose the attribute they want to disclose. Examples of this protocol are Facebook Connect and Google+ service. However, the protocol like OIDC only supports one IDP per authentication. In addition, as the user's authentication request will be redirected to the IDP, behavior privacy is exposed in the federated model.
B. SSI Using Blockchain
In industry, many SSI systems are built based on the blockchain technology. ShoCard [21] is one of them which digitizes user's paper-based credentials and publishes hash of credentials on Bitcoin [22]. So user's attributes hash is public and the ShoCard server has ability to track user's behavior.
Sovrin [23] choosed another way to implement SSI, which stores identity record on a permissioned blockchain named Hyperledger Indy1. Users can get credentials from trusted nodes called stewards and selectively disclose the attributes they owned through zero-knowledge proofs. UPort [24] is another SSI system built in Ethereum [15] to solve this drawback, which utilises its smart contract to automatically manage users' identity.
In academia, people tried to solve some problems and improve the weakness of privacy in the SSI system. Maram et al. [25] proposed CanDID, which provides a method to recover users' private keys with their online accounts, and has ability to resist Sybil attacks. CanDID solves the problem in SSI that users may lose their keys, but does not have enough privacy support.
Yang et al. [26] designed BPDIMS to avoid exposure of attributes ownership using zero-knowledge proof and smart contracts, which enhanced privacy of its identity management system. The problem is that it's using zk-SNARK zero-knowledge proof system, thereby requiring a secret trusted setup, and may lead to breaking of its protocol while this step is not properly handled.
Kassem et al. [27] also proposed an IDM system with smart contract, their protocol allows user to securly manage personal data. Hamer et al. [28] constructed a protocol based on W3C identity model, and support cancelable biometrics. Their work achieves unlinkability of the user's identity. Borse et al. [29] designed a zero-knowledge proof protocol with Pedersen commitment, which can be used to protect user's attribute privacy.
Yu et al. [30] proposed BASS to provide selective revocation without non-transferability in the credential protocol, as they failed to bind the credential and user's identity properly, so the credential can be simply transferred to others without sharing the owner's private key. Sucasas et al. [31] proposed a anonymous credential protocol, which is based on pseudonym, and provides unlinkability while showing credentials to SPs. The protocol also support attribute privacy.
Preliminaries
In this section, we briefly review the related preliminaries and basic security assumptions used in this paper.
A. PS Signature
Pointcheval and Sanders' signature [14] is a signature scheme with a short signature size, and it consists of the following four algorithms:
Setup: Given a security parameter
, this algorithm generates public parameters$\lambda$ , where$PP = (q, G_{1}, G_{2}, G_{T}, e, g_{1}, g_{2})$ are type 3 bilinear group,$(q, G_{1}, G_{2}, G_{T}, e)$ and$g_{1}$ are generators of$g_{2}$ and$G_{1}$ .$G_{2}$ Keygen: Given the public parameters
, this algorithm randomly chooses$PP$ to compute$x,y \in \mathbb {Z}_{q}$ . Then it outputs the keypair ($\widehat{X} = g_{2}^{x}, \widehat{Y} = g_{2}^{y}$ ), where$sk,pk$ and$sk = (x,y)$ .$pk = (g_{2}, \widehat{X}, \widehat{Y})$ Sign: Given the public parameters
, a private key$PP$ , and message$sk$ , this algorithm randomly chooses$m$ and computes$u \in \mathbb {Z}_{q}$ , then it returns$A = g_{1}^{u}, B = A^{x+ym}$ as the signature of$\sigma = (A,B)$ .$m$ Verify: Given the public parameters
, a public key$PP$ , a message$pk$ and signature$m$ , this algorithm returns 1 if$\sigma$ ; otherwise, returns 0.$e(A, \widehat{X}\widehat{Y}^{m}) = e(B, g_{2})$
Moreover, PS signature has the property of randomizability, a PS signature
B. Zero-knowledge proof
Zero-knowledge proof [33] is a kind of proof protocol that have the following three properties:
Completeness: If the statement is true, the verifier accepts the result of the proof.
Soundness: A cheating prover is not able to create a false proof to fool the verifier into accepting it with a false statement.
Zero-knowledge: The verifier does not learn any information about the witness from the prover other than what is in the proof.
The
C. Accumulators
Accumulators [36] are used to accumulate a set
Then for a set
The insertion and deletion of pairing-based dynamic accumulators need to update the witness. Here we use the method mentioned in [39] to delete a value
D. Identity Model
The identity model of our system is built by extending the W3C identity model with an additional entity named Account Provider (AP). The various components of our identity model are shown in Fig. 2.
There are four entities in our identity model, namely Account Provider, Identity Provider, Service Provider, and User. The details of these entities are described as follows:
Account provider (AP): The AP hold accounts of the system, it generates public key and publishes the public parameters to blockchain. The user needs to get an account from it to join the system. AP updates the public params on blockchain to revoke a user.
Identity provider (IDP): The IDP is an entity to issue and revoke credentials, it will check whether the user satisfies the attributes, and issue different type credentials depend on the privacy requirements.
Service provider (SP): The SP is an entity to provides service for users. It can be a OSNs service provider or a server owned by a user in DOSNs. The access policy of a SP may need some attributes, it will verify the credentials provided by the user to check the requirements.
User: The user has to register with the Account provider to get an account, using it to acquire credentials from the IDP, and access the service from SP by proving ownership of the required attributes.
The security goals of our identity model are defined as follows.
Attribute Privacy: When showing credentials, other entities can only get the attributes disclosed by the user, and can not learn anything about the hidden attributes.
Unforgeability: It's impossible for a user to publish a valid credential on the blockchain without the permission of IDP. Specifically, a user cannot forge a legal credential to be disguised as other users or prove the ownership of attributes he does not have.
Soundness: A malicious user should not be able to show a credential if he does not own it.
Unlinkability: While accessing service from SPs, it's hard to know what attributes the user actually have, which also means link two access service request is difficult.
Behavior Privacy: The service that the user requests for cannot be learned by other entities.
Our proposed protocols
In this section, we construct a set membership protocol based on the PS signature, which can be extended to construct range proofs. After that, we describe each phase of our identity management system, and explain how to apply the PS signature based range proof to the anonymous credentials used in the system.
A. PS-based Set Membership and Range Proofs
The starting point of this protocol is inspired by the construction in [40]. The main idea of it is that while generating the proof, the prover first requests a set of signatures from the verifier which are generated from every element in the set
However, the basic scheme with BBS signature is not suitable for anonymous credentials, for each attribute hidden in the range proof needs to compute a set of signatures and stored by the user. Thus we consider reusing the signatures already stored by users, for some credentials usually contain the same attributes user wants to hide (i.e., like the age). But the BBS signature in use may cause linkable of two credentials while showing these signatures to the verifier, the way to make BBS signature unlinkable is expensive [14], for a commitment is inevitable to make, and needs to be proved in a zero-knowledge way. As a result, we consider replacing it with PS signature, as shown in Section III-A, it can be easily randomized to achieve unlinkability, which perfectly satisfies our requirements. The details of our proposed set membership protocol (as shown in Fig. 3) are described as follows.
Setup: Given a security parameter
, this algorithm generates the public parameters$\lambda$ , where q is a large prime numbers of$PP = \lbrace q, G_{1},G_{2},G_{T},e, g_{1},g_{2}, g,h, \Phi \rbrace $ bits length,$\lambda$ are cyclic groups generated with order q. The$(G, G_{1},G_{2},G_{T})$ is a bilinear map.$e:G_{1}\times G_{2}\to G_{T}$ and$g_{1}$ are generators of$g_{2}$ and$G_{1}$ , and$G_{2}$ is a set.$\Phi$ Initialize: The verifier needs to generate signatures for all elements in set
. It randomly chooses$\Phi$ as its signing key and computes$x, y\in \mathbb {Z}_{q}$ as the corresponding public key. For any$\widehat{X} = g_{2}^{x},\widehat{Y} = g_{2}^{y}$ , the verifier randomly chooses$i \in \Phi$ , and computes$u\in \mathbb {Z}_{q}$ . Then it sends$A_{i} = g_{1}^{u}, B_{i} = A_{i}^{x+yi}$ to the prover.$\widehat{X}, \widehat{Y}, A_{i}, B_{i} \forall i \in \Phi$ Excute: This step is executed by the prover and verifier to prove the following zero knowledge proof
\begin{align*} ZKP \lbrace (\phi, r, s) :&\left.C = g^{\phi }h^{r}\right.\\ &\left.\wedge \frac{e(\widehat{B_{\phi }}, g_{2}) }{e(\widehat{A_{\phi }},\widehat{X}) }= e(\widehat{A_{\phi }},\widehat{Y})^{\phi }e(\widehat{A_{\phi }},g_{2})^{s}\rbrace \right. \end{align*} View Source\begin{align*} ZKP \lbrace (\phi, r, s) :&\left.C = g^{\phi }h^{r}\right.\\ &\left.\wedge \frac{e(\widehat{B_{\phi }}, g_{2}) }{e(\widehat{A_{\phi }},\widehat{X}) }= e(\widehat{A_{\phi }},\widehat{Y})^{\phi }e(\widehat{A_{\phi }},g_{2})^{s}\rbrace \right. \end{align*}
The prover randomly chooses
, and computes$r, \rho _{1},\rho _{2},\rho _{3} \in \mathbb {Z}_{q}$ , where$C = g^{\phi }h^{r}, D = g_{1}^{\rho _{1}}g_{2}^{\rho _{2}},E=e(\widehat{A_{\phi }},\widehat{Y})^{\rho _{1}}e(\widehat{A_{\phi }},g_{2})^{\rho _{3}}$ is the secret value that prover holds. It also randomly chooses$\phi \in \Phi$ , and computes$s,t\in \mathbb {Z}_{q}$ . Then it sends$\widehat{A_{\phi }} = A_{\phi }^{t},\widehat{B_{\phi }} = (B_{\phi }A_{\phi }^{s})^{t}$ to the verifier.$D,E,\widehat{A_{\phi }},\widehat{B_{\phi }}$ The verifier chooses a random value
as challenge and sends$c \in \mathbb {Z}_{q}$ to the prover.$c$ The prover computes
, and sends$s_{1} = \rho _{1}-c\phi, s_{2} = \rho _{2}-cr,s_{3} = \rho _{3}-cs$ to the verifier.$s_{1},s_{2},s_{3}$ The verifier checks if the equations:
hold or not.If yes, the verifier accepts the proof.$\begin{array}{l}D=g_{1}^{s_{1}} g_{2}^{s_{2}} C^{c}, \\ E=e(\widehat{A_{\phi }}, \hat{Y})^{s_{1}} e(\widehat{A_{\phi }}, g_{2})^{s_{3}}\left(\frac{e(\widehat{B_{\phi }}, g_{2})}{e(\widehat{A_{\phi }}, \hat{X})}\right)^{c} \end{array}$
Theorem 1:
If the adopted PS signature is existential unforgeability under chosen message attack (EUF-CMA), the proposed set membership for a set
Proof: The provement of our proposed set membership protocol is as follows.
Completeness: The completeness achieves by checking the equations
\begin{align*}
D &=g^{s_{1}} h^{s_{2}}C^{c}\\
&=g^{(\rho _{1}-c\phi)}h^{(\rho _{2}-cr)}(g^{\phi }h^{r})^{c}\\
&=g^{\rho _{1}}h^{\rho _{2}}=D\\
E &=e(\widehat{A_{\phi }}, \hat{Y})^{s_{1}} e(\widehat{A_{\phi }}, g_{2})^{s_{3}}\left(\frac{e(\widehat{B_{\phi }}, g_{2})}{e(\widehat{A_{\phi }}, \hat{X})}\right)^{c}\\
&=e(\widehat{A_{\phi }}, \hat{Y})^{\rho _{1}-c\phi } e(\widehat{A_{\phi }}, g_{2})^{\rho _{3}-cs}\left(\frac{e(\widehat{B_{\phi }}, g_{2})}{e(\widehat{A_{\phi }}, \hat{X})}\right)^{c}\\
&=e(A_{\phi }^{t}, \hat{Y})^{\rho _{1}-c\phi } e(A_{\phi }^{t}, g_{2})^{\rho _{3}-cs}\left(\frac{e(B_{\phi }^{t}A_{\phi }^{st}, g_{2})}{e(A_{\phi }^{t}, \hat{X})}\right)^{c}\\
&=e(A_{\phi }^{t}, \hat{Y})^{\rho _{1}-c\phi } e(A_{\phi }^{t}, g_{2})^{\rho _{3}-cs}\\
&\frac{e(A_{\phi }^{cst}, g_{2})e(B_{\phi }^{ct},g_{2})}{e(A_{\phi }^{ct}, \hat{X})}\\
&=e(A_{\phi }^{t}, \hat{Y})^{\rho _{1}-c\phi } e(A_{\phi }^{t}, g_{2})^{\rho _{3}-cs}e(A_{\phi }^{cst}, g_{2})\\
&e(A_{\phi }^{ct},\hat{X}\hat{Y}^{\phi })e(A_{\phi }^{-ct}, \hat{X})\\
&=e(\widehat{A_{\phi }},\widehat{Y})^{\rho _{1}}e(\widehat{A_{\phi }},g_{2})^{\rho _{3}}=E
\end{align*}
Soundness: The soundness can be proved with the extraction property of the proof of knowledge. It means that if any prover
When
Honest-verifier zero-knowledge: To prove this property, we need to construct a simulator
Since the protocol has random
Range Proofs: It is obvious that our set membership protocol can be directly extended to build range proofs by signing each element in the range, but it's not efficient and costs large amounts of signatures. As a result, we choose to use the method introduced in [40]. More detaily, For a range
B. Our constructed DID protocol
With the above proposed range proofs, we can design a DID protocol on a blockchain system (e.g., Ethereum). The identity model of our DID protocol is described in Section III-D. The system architecture of our proposed DID protocol is shown in Fig. 4. In our construction, four smart contract are developed to build the system, including Entity Register Contract (ERC), Credential Manage Contract (CMC), Account Manage Contract (AMC), and Attribute Set Contract (ASC).
Our proposed scheme consists of ten phases: Setup, Keygen, RegisterAccount, RequestCred, IssueCred, Show, Verify, RevokeCred, RecoverCred, RevokeUser.
Setup: Given a security parameter
, this algorithm generates the public parameters$\lambda$ , where q is a large prime numbers of$PP = \lbrace q, G_{1},G_{2},G_{T},e, g_{1},g_{2}, g,h, \lbrace h_{1},..., h_{k}\rbrace \rbrace $ bits length,$\lambda$ are cyclic groups generated with order q. The$(G, G_{1},G_{2},G_{T})$ is a bilinear map.$e:G_{1}\times G_{2}\to G_{T}$ and$g_{1}$ are generators of$g_{2}$ and$G_{1}$ ,$G_{2}$ are generators of$\lbrace g, h, h_{1},..., h_{k}\rbrace$ , where k denotes the number of attributes.$G$ Keygen:
AP Keygen: Given the public prarmeters
, this algorithm randomly chooses$PP$ and$\tilde{g} \in G_{1}$ to compute$d, w_{1},w_{2},...,w_{n} \in \mathbb {Z}_{q}$ and the accumulator$Y_{AP} = g_{2}^{d}$ , where n denotes the number of users. The$\Delta =\tilde{g} ^{(d + w_{1})\cdot \cdot \cdot (d + w_{n})}$ . An empty User revocation list$sk_{AP} = d, pk_{AP} = Y_{AP}$ is also generated to set AP parameters$URL=\emptyset$ and the AP calls AMC.paramsInit($param_{AP} = \lbrace \tilde{g}, Y_{AP},\Delta, URL \rbrace $ ) to put$param_{AP}$ on blockchain.$param_{AP}$ IDP Keygen: Given the public prarmeters
, this algorithm randomly chooses$PP$ , computes$x, y\in \mathbb {Z}_{q}$ . Then the IDP get$\widehat{X} = g_{2}^{x},\widehat{Y} = g_{2}^{y}$ , and calls ERC.entityRegister($sk_{IDP}= (x, y), pk_{IDP}= (\widehat{X},\widehat{Y})$ ) to put the public key on blockchain.$pk_{IDP}$
RegisterAccount: The user who wants to join the system need to first register an account from the AP. For a new user
, the AP selects an unused value$u$ from$w_{u}$ , and computes the witness$\lbrace w_{1},...,w_{n}\rbrace $ . Then the AP sends$W_{u} = \triangle ^{(\frac{1}{d+w_{u}})}$ to the user$(W_{u}, w_{u})$ .$u$ RequestCred: The user who wants to get an valid credential make a request to the IDP. With the the attributes list
, this algorithm randomly chooses$AttrL = \lbrace a_{1},...,a_{m}\rbrace$ and computes$t \in \mathbb {Z}_{q}$ .Then it gets the credential$T = g^{t}, \tau = T^{w_{u}} {\textstyle \prod _{i=1}^{m}}h_{i}^{a_{i}}$ and generates$C =(T, \tau)$ prove to IDP that the user has a valid account\begin{align*} ZKP_{1} \lbrace (w_{u}, W_{u}) :&\left.\tau = T^{w_{u}}{\textstyle \prod _{i=1}^{m}}h_{i}^{a_{i}}\right.\\ &\left.\wedge e(\Delta, g_{2}) =e (W_{u},Y_{AP}g_{2}^{w_{u}}) \rbrace \right. \end{align*} View Source\begin{align*} ZKP_{1} \lbrace (w_{u}, W_{u}) :&\left.\tau = T^{w_{u}}{\textstyle \prod _{i=1}^{m}}h_{i}^{a_{i}}\right.\\ &\left.\wedge e(\Delta, g_{2}) =e (W_{u},Y_{AP}g_{2}^{w_{u}}) \rbrace \right. \end{align*}
and the credential is generated by the same account. In addition, for privacy requirements, the user can select privacy attributes from$w_{u}$ and mark the indices of the privacy attributes as$AttrL$ , where$PrivInd = [I_{1},...,I_{l}]$ denotes the number of privacy attributes. Then the user prepares attributes sets$l$ containing his privacy attributes (e.g.,$AttrSets = (\Phi _{1},...,\Phi _{l})$ ). Finally, it gets the credential request$a_{I_{1}} \in \Phi _{1},..., a_{I_{l}} \in \Phi _{l}$ , and send$CredQst=(C, ZKP_{1}, AttrL, PrivInd, AttrSets)$ to the IDP via a secure channel.$CredQst$ IssueCred: Receiving the credential request
from user$CredQst$ , the IDP first verifies the$u$ and checks whther the user indeed satisfies the request attributes$ZKP_{1}$ . If the verification result is success, the IDP calls ASC.setStore($AttrL$ ) and gets the returned$AttrSets$ , which can be used to query the$SetsId$ , then it calls CMC.credentialIssue($AttrSets$ ) and gets the returned$C, SetsId, CredType$ ; otherwise, the IDP rejects this request.$CredId$ indicates the type of issued credential, like Bachelor's degree certificate. The details of credentialIssue() are described in Algorithm 1. In addition, as the credential has been issued, if it has privacy requirements, the IdP generates signatures of each privacy attribute and output the signature sets$CredType$ , where$ AttrSigns = (\lbrace (\sigma _{\Phi _{I_{1}1}},...,\sigma _{\Phi _{I_{1}f_{1}}}),...,(\sigma _{\Phi _{I_{l}1}},...,\sigma _{\Phi _{I_{l}f_{l}}}) \rbrace)$ = Sign$ \sigma _{\Phi _{ij}}$ are signatures of all the elements in set$(sk_{IDP}, \sigma _{\Phi _{I_{i}j}})(i = \lbrace 1,...,l\rbrace, j = f_{i})$ (of length$\Phi _{I_{i}}$ ). Finally, IDP sends the values$f_{i}$ to the user. As we mentioned in Section IV-A, an optimisation can be made here by reusing the$(CredId, AttrSigns)$ for different type of credentials while the credentials contain the same$AttrSigns$ . The$Attrsets$ above will change to$CredQst$ relatively.$(C, ZKP_{1}, AttrL, PrivInd, SetsId)$ Show: The user who wants to access service from the SP needs to provide a valid credential to prove the satisfaction of required attributes. Given the account
, the credential$(W_{u}, w_{u})$ , and signature sets$C$ , the user$AttrSigns$ first chooses an identity for authentication, here we use a blockchain address$u$ as example, and it can be used to run the challenge-response protocol designed in [6]. Then for the privacy attributes in$Addr_{u}$ the user wants to hide, computes a proof$PrivInd$ showing to SP the ownership of the attributes. Finally, the user\begin{align*} ZKP_{2}&\left. \lbrace (a_{I_{1}},...,a_{I_{l}}, w_{u}, W_{u}):\right.\\ &\left.\tau = T^{w_{u}}{\textstyle \prod _{i=1}^{m}}h_{i}^{a_{i}} \right.\\ &\left.\wedge e(\Delta, g_{2}) =e (W_{u},Y_{AP}g_{2}^{w_{u}})\right.\\ &\left.\wedge (a_{I_{1}} \in \Phi _{I_{1}}) \wedge... \wedge (a_{I_{l}} \in \Phi _{I_{l}})\rbrace \right. \end{align*} View Source\begin{align*} ZKP_{2}&\left. \lbrace (a_{I_{1}},...,a_{I_{l}}, w_{u}, W_{u}):\right.\\ &\left.\tau = T^{w_{u}}{\textstyle \prod _{i=1}^{m}}h_{i}^{a_{i}} \right.\\ &\left.\wedge e(\Delta, g_{2}) =e (W_{u},Y_{AP}g_{2}^{w_{u}})\right.\\ &\left.\wedge (a_{I_{1}} \in \Phi _{I_{1}}) \wedge... \wedge (a_{I_{l}} \in \Phi _{I_{l}})\rbrace \right. \end{align*}
gets the$u$ , where$ServiceQst = (Addr_{u}, ZKP_{2}, CredId, AttrL_{pub})$ is selected from$AttrL_{pub}$ with attributes that needs to be public, and sends$AttrL$ to the SP via a secure channel.$ServiceQst$ Verify: Receiving the service request
from user$ServiceQst$ , there are several steps to verify the request, and the SP excutes as follows:$u$
Calls CMC.credentialQuery
to get the status of the credential, the content of credential$(CredId)$ , the issuer of the credential and the$C$ , if the status is$SetsId$ , then continue; othervise, rejects the request. The details of credentialQuery() are shown in Algorithm 2$True$ Checks the issuer of the credential to see if it is a valid IDP, gets the
from ERC if the result is OK; otherwise, rejects the request.$pk_{IDP}$ Calls ASC.setQuery(
) to get the$SetsId$ , check if the attributes$AttrSets$ combine with the$AttrSets$ satisfies the requirements. If the result is OK, continue; otherwise, rejects the request.$AttrL_{pub}$ Verifies the
, if the result is success, the SP performs an authorization operation to grant the service access request. In addition, the SP can store the$ZKP_{2}$ for the future authenticate.$Addr_{u}$
RevokeCred: To revoke a credential
with its id$C$ , IDP calls CMC.credentialRevoke($CredId$ ). Algorithm 3 shows the details of credentialRevoke(). The ’status' of$CredId$ will be set to$CredId$ in this function.$False$ RecoverCred: To recover a credential
with its id$C$ , IDP calls CMC.credentialRecover($CredId$ ). The details of credentialRecover() are almost the same with Algorithm 3, except that it will set the ’status' of$CredId$ to$CredId$ .$True$ RevokeUser: To revoke user
, AP updates$u$ with$URL$ , where$w_{u}$ , and computes a new accumulator$URL = URL \cup \lbrace w_{u}\rbrace$ . Then the AP calls AMC.accountRevoke() to update the$\Delta _{new} = \Delta ^{\frac{1}{d+w_{u}} }$ and$URL$ stored on blockchain. Each user$\bigtriangleup$ needs to update the witness$i(i\ne u)$ with$W_{i}$ .$W_{i_{new}} = \frac{W_{i}}{\Delta _{new}}^{(\frac{1}{w_{u}-w_{i}}) }$
Algorithm 1: CMC.credentialIssue().
Algorithm 2: CMC.credentialQuery().
Input:
Output:
return (
Algorithm 3: CMC.credentialRevoke().
Input:
Output: Void
Require CMC.issuerQuery(
Algorithm 4 AMC.accountRevoke()
Input:
Output: Void
Require
Append
Security Analysis
In this section, we will discuss the security properties of our proposed protocol, and proof that it achieves the security goals of our identity model, which include attribute privacy, unforgeability, soundness, unlinkability, and behavior privacy.
Lemma 1:
Our DID protocol achieves attribute privacy if the proof
Proof:
During the generation of the
In summary, after obtaining
Lemma 2:
Our DID protocol achieves Unforgeability if the blockchain private keys in the protocol are all properly kept and not leaked.
Proof:
During the proceeding of a credential, only the credential formed by IDPs can be stored in CMC, which requires the blockchain private key of a valid IDP. In addition, as the credential is issued with the user's account involved, the account
Lemma 3:
Our DID protocol achieves soundness if
Proof:
In show phase, the user
Lemma 4:
Our DID protocol achieves unlinkability if
Proof:
In show phase, the user
Lemma 5:
Our DID protocol achieves behavior privacy if the SPs are not colluded with other entities.
Proof:
While user
Table 1 shows the comparisions of some mentioned identity systems build on blockchain. The comparisions mainly focus on the security property and privacy protection, from the results, our proposed protocol has robust security and enhanced privacy protection.
Experimental Evaluation
We simulate the application scenario of our proposal by developing a prototype that includes a simple client for users and a server for AP, IDP and SP. The framework of the client and server is MIRACL + Node.js + Web3.js + Vue.js, and the code of core algorithms (such as the zero-knowledge proof) is using the MIRACL library, then we call these functions in Node.js with native addon. The operating environment of our prototype is a macOS desktop computer with Intel(R) Core(TM) i5-1038NG7 16.00GB RAM. Additionally, we implement the smart contract functions in our scheme with solidity and deploy it to Ethereum. The client can generate zero-knowledge proof and query the status of credentials from blockchain, and the server can act as AP, IDP and SP to verify the proof provided by the client and call functions in smart contracts through transactions. The code of our proposal is published on Github2.
We evaluate the performance of our proposed DID protocol; first, we give a complexity analysis of each algorithm and then we make a benchmark of these algorithms to show the execution times. Furthermore, we count the communication costs of our proposed PS-based range proof protocols, and compare it with other range proof protocols. Finally we evaluate the smart contract functions to measure the gas consumption and transaction throughput in Ethereum.
A. Use Case
In this section, we will show an example of our proposed protocol use case. Assuming that a user named Alice has registered an account from the AP already, and she wants to request a credential from an IDP (e.g., the company). As shown in Fig. 6, the credential includes some attributes that the IDP support to hide, like the value of income or the year of the birth date. If Alice wants to hide the attribute value, she could click the option and select the range that the value is hidden in. In our protocol, the larger range means a higher cost to the IDP, so Alice will choose the range based on the demand.
While receiving the credential, Alice can query the information of it through the
Then Alice wants to join a online group whihc has a threshold that requires applicants to be over 18 years old and have an annual income over $50000. Fig. 8 shows that Alice's client could generate proof of
B. Complexity Analysis
We make a complexity analysis of our proposal and compare it to BASS[30] and Sucasas et al. [31], the result is shown in Table 2, where
From the result, we can find that in some phases like “RevokeCred”, “RecoverCred” and “RevokeUser”, our proposed scheme behaves much better than BASS [30] and Sucasas et al. [31], this is because the revocation status is updated on blockchain in our protocol, thereby avoid recomputing new credential. Specifically, the
C. Timing Benchmark
Table 3 shows the execution time of each procedure described in Section IV-B with both single privacy attribute and multi privacy attributes (two attributes in the table), note that we execute each entry for 10000 times and computes the average value.
The comparision between single privacy attribute and multi privacy attributes is shown in Fig. 9. The cost of multi privacy attributes is surely higher, due to the extra pairing and exponentiation operation in
D. Communication Analysis
Our proposed range proof scheme and the scheme designed in [40] both require the transmission of signatures during the initialization phase. Therefore, the communication cost of the initialization phase is included in the overall communication cost analysis. In contrast, the scheme proposed in [41] does not include this phase. Table 5 presents a comparison of the communication costs of these three schemes.
Since the initialization phase is only executed once during the proof process, we mainly focus the execution phase cost here. In this phase, our scheme has a slightly higher communication cost compared to Camenisch et al.’s scheme [40], with an additional size of
E. Blockchain Implementation
1) Gas Consumption
The blockchain platform of our work is Ethereum with the version of London. While performing operations in Ethereum, it needs to consume a certain quantity of gas. The gas price is set by the transaction sender and reflects the quality of ethers that the sender is willing to pay. The fee cost for the whole transaction is calculated as
2) Transaction Throughput
While our proposal is deployed in Ethereum, the long time takes to wait for the transaction confirmation and the low TPS (Transactions Per Second) of public blockchain may become a limitation. In our proposed system, the functions like “RegisterAccount” and “IssueCred” need to send transactions to call smart contract functions, thereby the throughput of these phases depend on the transaction throughput. The TPS in the Ethereum can be calculated as
During the evaluation, the
Conclusion
Most of the online social networks are using centralized identity management systems, which lack of privacy protection. DID can be a solution to this, but existing protocols do not provide a full set of desired properties, especially the user's attributes privacy and behavior privacy. In this paper, we first propose a range proof protocol based on PS signature, which is suitable for our application scene. Then we change the W3C identity model and introduce a new entity named AP to guarantee the uniqueness of identity and provide user revocation with dynamic accumulators. Finally, we design a DID protocol using our proposed range proof. The proposed protocol is based on blockchain and achieves attribute privacy, unlinkability, and behavior privacy. It can be shown from the experimental evaluation and findings that the extra overheads of our protocol are tolerable compared to BASS, for our scheme enhanced the privacy of users.
ACKNOWLEDGMENT
We greatly appreciate the invaluable suggestions provided by the anonymous reviewers and the associate editor.