# A Secure IoT-Based Authentication System in Cloud Computing Environment
## 2 Related Works
### Review of [PERSON] et al.'s Scheme
#### 2.1.2 Authentication Phase  
When user \(U_{i}\) wants to connect with a cloud server, the user will perform the following five steps with the cloud server (\(S_{j}\)) and the control server (\(CS\)).  
Step 1: User inputs his \(ID_{i}\) and \(PW_{i}\). A smart card will select a random number \(r_{u}\) and new pseudo-identity \(PID_{i}\)new; then, it calculates \(b_{i}=C_{3}\oplus h(ID_{i}||PW_{i})\), \(HP_{i}=h(PW_{i}||b_{i})\), \(C_{1}\)\({}^{*}=C_{1}\oplus HP_{i}\), and \(C_{2}\)\({}^{*}=C_{2}\oplus h(ID_{i}||HP_{i})\). The smart card then calculates \(D_{1}=C_{1}\)\({}^{*}\oplus r_{u}\), \(D_{2}=h(r_{u}||PID_{i}||ID_{cs})\oplus ID_{i}\), \(D_{3}=C_{2}\)\(\oplus h(ID_{i}||HP_{i})\oplus PID_{i}\)\({}^{new}\oplus h(r_{u}||ID_{i})\), and \(D_{4}=h(ID_{i}||PID_{i}||PID_{i}\)\({}^{new}||P_{u}||D_{3})\). \(U_{i}\) sends the message \(M_{1}=\{PID_{i},\)\(D_{1},\)\(D_{2},\)\(D_{3},\)\(D_{4}\}\) to \(S_{j}\).  
Step 2: When \(S_{j}\) receives \(M_{1}\), \(S_{j}\) selects a new pseudo-identity \(PSID_{j}\)new and a random number \(r_{s}\) to calculate \(D_{5}=B_{1}\oplus r_{s}\), \(D_{6}=h(r_{s}||PSID_{j}||ID_{cs})\oplus SID_{j}\), \(D_{7}=B_{2}\oplus PSID_{j}||new\oplus h(r_{s}||PSID_{j})\), and \(D_{8}=h(SID_{j}||PSID_{j}||PSID_{j},new||P_{s}||D_{7})\). \(S_{j}\) sends the message \(M_{2}=\{M_{1},\)\(PSID_{j},\)\(D_{5},\)\(D_{6},\)\(D_{7},\)\(D_{8}\}\) to \(CS\).  
Step 3: When \(CS\) receives \(M_{2}\), \(CS\) calculates \(r_{u}=D_{1}\oplus h(PID_{i}||ID_{cs}||x)\), \(ID_{1}=D_{2}\oplus h(r_{u}||PID_{i}||ID_{cs})\), and \(PID^{new}=D_{3}\oplus h(ID_{i}||x)\oplus h(r_{u}||ID_{i})\). \(CS\) checks whether \(ID_{i}\) in the database and \(D_{4}\)? \(=h(ID_{i}||PID_{i}||PID^{new}||P_{u}||D_{3})\). If \(ID_{i}\) is in the database and \(D_{4}=h(ID_{i}||PID_{i}||PID^{new}||P_{u}||D_{3})\), it means that \(CS\) confirms \(U_{i}\) is a legal user. Otherwise, the authentication process will be terminated. Then, \(CS\) calculates \(r_{s}=D_{5}\oplus h(PSID_{j}||ID_{cs}||x)\), \(SID_{j}=D_{6}\oplus h(r_{s}||PSID_{j}||ID_{cs})\), and \(PSID_{j}=D_{7}\oplus h(SID_{j}||x)\oplus h(r_{s}||SD_{j})\). \(CS\) checks whether \(SID_{j}\) is in database and \(D_{8}=h(SID_{j}||PSID_{j}||PSID_{j})\)\({}^{new}||P_{s}||D_{7})\). If \(SID_{j}\) is in the database and \(D_{8}=h(SID_{j}||PSID_{j}||PSID_{j})\)\({}^{new}||P_{s}||D_{7})\), it means that \(CS\) confirms the \(S_{j}\) is legal. Then, \(CS\) selects a random number \(r_{cs}\) to calculate the session key \(SK=h(r_{u}\oplus r_{s}\oplus r_{cs})\), \(D_{9}=h(PSID_{j})\)\({}^{new}||ID_{cs}||x)\oplus h(r_{s}||PSID_{j})\)\({}^{new})\), \(D_{10}=h(PSID_{j}\)\({}^{new}||P_{s}||PSID_{j})\oplus(r_{u}\oplus r_{cs})\), \(D_{11}=h(SK_{cs}||D_{9}||D_{10}||h(SID_{j}||x))\), \(D_{12}=h(PID_{j}\)\({}^{new}||D_{cs}||x)\oplus h(r_{u}||PID_{i})\), \(D_{13}=h(PID_{j}\)\({}^{new}||r_{u}||PID_{i})\oplus(r_{s}\oplus r_{cs})\), and \(D_{14}=h(SK_{cs}||D_{12}||D_{13}||h(ID_{i}||x))\). \(CS\) sends the message \(M_{3}=\{D_{9},\)\(D_{10},\)\(D_{11},\)\(D_{12},\)\(D_{13},\)\(D_{14}\}\) to \(S_{j}\).  
Step 4: When \(S_{j}\) receives \(M_{3}\), \(S_{j}\) calculates (\(r_{u}\oplus r_{cs}=D_{10}\oplus h(PSID_{j})\)\({}^{new}||r_{s}||PSID_{j})\). Hence, \(S_{j}\) can compute \(SK=h(r_{u}\oplus r_{s}\oplus r_{cs})\). Then, \(S_{j}\) checks \(D_{11}\)? \(=h(SK_{s}||D_{9}||D_{10}||B_{2})\) to confirm that \(CS\) is a legal control server or not. If \(CS\) is a legal control server, \(S_{j}\) calculates \(B_{1}\)\({}^{new}=D_{9}\oplus h(r_{s}||PSID_{j})\)\({}^{new}\), updates \(B_{1}\) and \(PSID_{j}\)\({}^{new}\) in memory. \(S_{j}\) sends message \(M_{4}=\{D_{12},\)\(D_{13},\)\(D_{14}\}\) to \(U_{i}\).  
When \(U_{i}\) receives \(M_{4}\), \(U_{i}\) calculates (\(r_{s}\oplus r_{cs}\)) = \(D_{13}\oplus h(PID_{i}\)\({}^{new}||r_{u}||PID_{i})\) and \(SK=h(r_{u}\oplus r_{s}\oplus r_{cs})\). Then, \(U_{i}\) checks \(D_{14}\)? \(=h(SK_{u}||D_{12}||D_{13}||C_{2}\)\({}^{*})\) to confirm that \(CS\) is a legal control server or not. \(U_{