# FAIDM for Medical Privacy Protection in 5G Telemedicine Systems
## 3 Proposed Scheme
### Anonymous Identity Distribution Phase  
If the constrained node needs an anonymous identity for some remote server node services, the gateway node will generate an anonymous identity and the corresponding private key for constrained node according to the registration information. Note that anonymous identity will compute by adding constrained node's ID to ensure their connection. Figure 6. illustrates process of anonymous identity distribution phase. Detailed descriptions are stated as follows:  
Step 1: Gateway node \(GW_{t}\) generates a random number \(t_{t}\), uses session key \(sk_{GW_{t}\leftrightarrow CN_{\bar{i}}}\) to encrypt \(ID_{\bar{i}j}\) and \(t_{t}\), and generates and sends pseudonym \(aID_{\bar{i}j}\) to constrained node \(CN_{\bar{i}}\).  
\[aID_{\bar{i}}=E_{sk_{GW_{t}\leftrightarrow CN_{\bar{i}}}}(ID_{\bar{i}j}||t_{t}) \tag{22}\]  
Step 2: Upon receiving \(aID_{\bar{i}j}\), constrained node \(CN_{\bar{i}j}\) computes \(P_{aID_{\bar{i}j}}\) and \(Q_{aID_{\bar{i}}}\) and sends \(Q_{aID_{\bar{i}}}\) to gateway node \(GW_{t}\).  
\[P_{aID_{\bar{i}}}=H_{1}(ID_{t}||aID_{\bar{i}}) \tag{23}\]\[Q_{alD_{ij}}=E_{sk_{GW_{t}\leftrightarrow CS_{ij}}}(ID_{t}||P_{alD_{ij}}) \tag{24}\]  
\begin{tabular}{|c c|} \hline Constrained node \(CN_{y_{j}}\) & Gateway node \(GW_{t}\) \\ \hline \multicolumn{3}{|c|}{1.Generate a random number \(t_{t}\)} \\ \(2.aID_{ij}=E_{sk_{GW_{t}\leftrightarrow CS_{y}}}(ID_{y}||t_{t})\) \\ \(4.P_{alD_{ij}}=\frac{4}{H_{1}(ID_{t}||aID_{ij})}\) \\ \(5.Q_{alD_{ij}}=E_{sk_{GW_{t}\leftrightarrow CS_{y}}}(ID_{t}||P_{alD_{y}})\) \\ \(6.(Q_{alD_{y}})\) \\ \(7.(ID_{t}||P_{alD_{y}})=D_{sk_{GW_{t}\leftrightarrow CS_{y}}}(Q_{alD_{y}})\) \\ \(8.H_{1}(ID_{t}||aID_{ij})\)?= \(P_{alD_{y}}\) \\ \(9.aS_{ij}=S_{t}T_{u}(P_{t})\bmod p\) \\ \(10.C=E_{sk_{GW_{t}\leftrightarrow CS_{y}}}(aS_{ij})\) \\ \(11.MAC^{\prime}_{GW_{t}}=E_{sk_{GW_{t}\leftrightarrow CS_{y}}}(C,P_{t})\) \\ \(13.(C,P^{\prime}_{t})=D_{sk_{GW_{t}\leftrightarrow CS_{y}}}(MAC^{\prime}_{ GW_{t}})\) \\ \(14.H_{1}(ID_{t})\)?= \(P^{\prime}_{t}\) \\ \(15.aS_{ij}=D_{sk_{GW_{t}\leftrightarrow CS_{y}}}(C)\) \\ \hline \end{tabular}  
Step 3: After receiving \(Q_{alD_{ij}}\), gateway node \(GW_{t}\) decrypts \(Q_{alD_{ij}}\) with \(sk_{GW_{t}\leftrightarrow CN_{y}}\) and checks \(P_{alD_{ij}}\) using \(ID_{t}\) and \(aID_{ij}\). If it holds, gateway node \(GW_{t}\) computes \(aS_{ij}\) and encrypts \(aS_{ij}\) with \(sk_{GW_{t}\leftrightarrow CN_{y}}\). Then, gateway node \(GW_{t}\) encrypts \((C,\ P_{t})\) to \(MAC^{\prime}_{GW_{t}}\) and sends \(MAC^{\prime}_{GW_{t}}\) to constrained node \(CN_{ij}\).  
\[(ID_{t}||P_{alD_{ij}})=D_{sk_{GW_{t}\leftrightarrow CS_{y}}}(Q_{alD_{y}}) \tag{25}\]  
\[H_{1}(ID_{t}||aID_{ij})\?=P_{alD_{ij}} \tag{26}\]  
\[aS_{ij}=S_{t}T_{s_{t}}(P_{t})\bmod p \tag{27}\]  
\[C=E_{sk_{GW_{t}\leftrightarrow CS_{y}}}(aS_{ij}) \tag{28}\]  
\[MAC^{\prime}_{GW_{t}}=E_{sk_{GW_{t}\leftrightarrow CS_{y}}}(C,\ P_{t}) \tag{29}\]  
Step 4: Upon receiving \(MAC^{\prime}_{GW_{t}}\), gateway node \(GW_{t}\) verifies \(MAC_{CN_{ij}}\). If result of verification is true, gateway node \(GW_{t}\) obtain \(aS_{ij}\) by decrypting \(C\), and anonymous identity distribution phase is completed.  
\[(C,\ P^{\prime}_{t})=D_{sk_{GW_{t}\leftrightarrow CS_{y}}}(MAC^{\prime}_{ GW_{t}}) \tag{30}\]  
\[H_{1}(ID_{t})\?=P^{\prime}_{t} \tag{31}\]  
Figure 6: Anonymous identity distribution phase of proposed scheme.  
\[aS_{ij}=D_{sk_{GW_{t}+CN_{ij}}}(C) \tag{32}\]