## 4 Identity Management and Access Control Based on Blockchain under Edge Computing for IIoT
### Lightweight Key Exchange Based on Self-Certified Public Key
Otherwise, set \(\text{sid}=\left(\hat{B},\hat{A},Y,X\right)\), then \(SK_{\text{sid}}=H_{2}(ECDH(Y\cdot B_{1},X\cdot A_{1})\), \(ECDH(Y\cdot B_{2},X\cdot A_{2})\), \(Z_{3},X,Y,\hat{A},\hat{B})\) Due to the ECDH problem in the parameters, \(S\) cannot directly answer to avoid the attacker to distinguish between the simulated environment and the real environment. \(S\) calculate \(\overline{Z_{1}}=\frac{Z_{1}}{(y(X\cdot A_{1})_{\alpha_{1}\hat{B}_{1}})}\), \(\overline{Z_{2}}=\frac{Z_{2}}{(y(X\cdot A_{2})_{\alpha_{2}\hat{B}_{2}})}\), by verifying if \(\overline{Z_{1}Z_{2}}=sX\), determine whether \(Z_{1},Z_{2}\) is generated correctly. If correctly generated, if and only if \(Z_{1},Z_{2}\), \(Z_{1}=(x+a_{1})(Y\cdot B_{1}),Z_{2}=(x+a_{2})(Y\cdot B_{2})\) is equivalent to \(\overline{Z_{1}}=xb_{1}P,\overline{Z_{2}}=xb_{2}P\). In addition, \(S\) check whether \(Z_{3}=yX\). If both pass, the value of the query \(\left(Z_{1},Z_{2},Z_{3},X,Y,\hat{A},\hat{B}\right)\) for \(H_{2}\) will be the return as \(SK_{\text{sid}}\). In other cases, a random value \(SK_{\text{sid}}\) is returned to \(M\)._  
_(f) \(H_{2}\)Query: \(S\) returns the value of \(H_{2}(\cdot)\) as follows:_  
_I. \(S\) check if the same query was made for \(H_{2}\) before. If yes, the previous \(H_{2}(. )\) value is used as the value of the query._  
_II. If the input is \(\left(Z_{1},Z_{2},Z_{3},X,Y,\hat{A},\hat{B}\right)\), \(S\) check if Session Key Reveal(.) has done a query with sid \(b\). If so, \(s\) calculates \(\overline{Z_{1}}=\frac{Z_{1}}{(y(X\cdot A_{1})_{\alpha_{1}\hat{B}_{1}})}=xb_{ 1}P\), \(\overline{Z_{2}}=\) and judges whether or not \(\overline{Z_{1}Z_{2}}=sX\). If the above formula is true, the return value of Session-Key Reveal(.) is used as the value of this \(H_{2}(\cdot)\) query._  
_III. In other cases, \(S\) select a random value to return._  
_The probability of a trapdoor test error is at most \(\frac{2s(\lambda)h_{2}(\lambda)}{q}\). If every trapdoor test is correct, then \(S\) perfectly simulates the \(M\) environment until \(M\) has done a Static-Key Reveal (\(\hat{B}\)) query. \(S\) sets \(\left(V,\frac{sP}{rP}\right)\) to the public key of \(\hat{B}\) with a probability of at least \(\frac{1}{n}(\lambda)\), where \(\hat{B}\) is an honest entity and \(M\) queries \(H_{1}(\ast,b_{1},b_{2})\) for it before doing Static-Key Reveal(\(\hat{B}\)). The probability of \(S\)success is the following:_  
\[Pr(S)\geq\frac{P_{1}(\lambda)}{n(\lambda)}-\frac{2s(\lambda)h_{2}(\lambda)}{q}\]  
_where \(P_{1}(\lambda)\) is the probability of occurrence of Case1. (1)._  
**Case 2. \(M\) _Randomly select two sessions sid and sid\({}^{\ast}\), assumed to be owned by \(\hat{A}\) and \(\hat{B}\), respectively. Suppose \(M\)_ chooses one for the test session and the other for the matching session. For sessions other than _sid_ and _sid\({}^{\ast}\), \(S\) is simulated normally. For these two sessions, \(S\) selects the short-term private key \(\overline{x},\overline{y}\in\left\{0,1\right\}^{\lambda}\), and sets the short-lived public key to \(U\) (instead of \(H_{1}(\overline{x},a_{1},a_{2})P\)) and \(V\) (instead of \(H_{1}(\overline{y},b_{1},b_{2})P\)). Set the same random key value \(SK\) for both sessions._  
_The attacker chooses one of sid and sid\({}^{\ast}\) as the test session with a probability of at least-\(\frac{2}{s(\lambda)^{2}}\), and the other is the matching session. If \(M\) win a forgery attack, it must query \(H_{2}\) for \(\left(\ast,\ast,ECDH(U,V),X,Y,\hat{A},\hat{B}\right)\), and \(S\) can solve the ECDH problem. What we need to consider is whether \(M\) can distinguish between real and simulated environments. If it can distinguish, it must do \(a(\overline{x},a_{1},a_{2})\) or \((\overline{y},b_{1},b_{2})\) query to \(H_{1}\). Since sid is a fresh session, \(M\) cannot simultaneously query the long-term and short-term private keys of \(\hat{A}\) (or \(\hat{B}\)). If \(M\) queries the short-term private key (or) via Ephemeral-Key Reveal(. ), will not be able to query (or) for, because in Case 1 we exclude this.