# Secure and Efficient Authentication Scheme in IoT Environments
## 3 Proposed ECC-Based Lightweight Authentication Scheme
### Registration Phase  
In the beginning, to make a user legal, before selling a product to the owner, the company of device \(ED_{i}\) must register itself with the trusted third party through a secure channel. Figure 1 shows the details of the registration phase. \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline \(P_{SWi}\) & Secret password of the embedded device \\ \(P_{ke}\) & Public key of the embedded device \\ \(P_{bs}\) & Public key of the server \\ \(l_{i}\) & Hashed embedded device ID \\ \(CID_{i}\) & Server-generated embedded device ID \\ \(CK\) & Session cookie \\ \(s\) & Server private key \\ \(E_{bs}\) & Server database table encryption key \\ \(X_{i}\), \(Y_{i}\), \(X_{j}\), \(Y_{j}\), \(C\) & Challenges \\ \(x_{il}\), \(x_{jl}\) & Ephemeral secrets \\ \(E_{t}\) & Expiration time of the cookie \\ \(A\), \(T\) & Equations \\ \(\text{S}_{k}\) & Session key \\ \(ID_{TS}\) & Unique secret identity of server TS \\ \(E_{ke}\) & Tamper-proof device storage table encryption key \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notation guide. * Step 1. Initially, the device \((ED_{i})\) registers an authenticated identity \((ID_{i})\) with a trusted server (\(TS\)); to that end, the device chooses a password \((Psw_{i})\) for computing hashed identity \((I_{i}=\ h(ID_{i}\ ||Psw_{i}\ ))\) that will protect the device from a user or device anonymity attack. * Step 2. Then, \(ED_{i}\) sends the registration request \(<I_{i},\ P_{ke}>\) to \(TS\) through a trusted channel, where \(P_{ke}=Psw_{i}\).G is a public key of \(ED_{i}\), which ensures the security of \(Psw_{i}\) by using the concept of ECDLP. * Step 3. \(TS\) checks whether \(I_{i}\) has been registered. If \(I_{i}\) has not been registered, \(TS\) selects a random number \(R\) and computes a server-generated unique identity \((CID_{i}=h(R\ ||\ I_{i}\ ||\ s)\oplus\ s)\) for uniquely identifying \(ED_{i}\). The security of \(CID_{i}\) is well protected in \(TS\) by using ECDLP \((CID_{i}^{\prime}=CID_{i}\).G). Then, \(TS\) computes a unique session cookie \((CK=h(R||S||E_{i}||CID))\) for \(ED_{i}\). The security of \(CK\) is protected in \(TS\) by using ECDLP \((CK^{\prime}=CK.G)\). Then, \(TS\) computes challenge \(T=R\oplus h(R\ ||\ I_{i}\ ||\ s)\), hides it inside another challenge \((A=T\oplus I_{i}\oplus\ CK^{\prime})\) using \(I_{i}\) and \(CK^{\prime}\). Finally, to protect the security of challenges \(T\) and \(A\), \(TS\) hides them inside \(t^{\prime}=T\oplus\ CID_{i}\oplus\ sID_{TS}\), \(a^{\prime}=A\oplus\ CID_{i}\oplus s\oplus ID_{TS}\), _and_ it also hides expiration time \((E_{t})\) of the cookie inside \(e^{\prime}_{t}=\ E_{t}\oplus CID_{i}\oplus\ sID_{TS}\). Subsequently, TS stores parameters \(<t^{\prime},a^{\prime},\ e^{\prime}_{t}>\) on the server database, sets the working bit as \(W_{bit-i}=0\), and sends \(<CID_{i}\), \(CK^{\prime}>\) to \(ED_{i}\) through a secure, trusted channel. Whenever the device \((ED_{i})\) communicates with \(TS\), the working bit \(W_{bit}\) is set to one for the corresponding connected communication; otherwise, and after the termination of the communication, it is set to zero. The servers encrypt the table using their personal secret key \(E_{\text{ks}}=s.ID_{TS}.G\). The security of key \((E_{\text{ks}})\) is well protected by the concept of ECDLP and CDHP. The device security \((ED_{i})\) is well protected by its tamper-proof nature. Note that before handing over devices to their owners during the registration process, the company performs the registration process through a secure channel (e.g., wolfSSL [42]). Once the device is successfully registered to \(TS\), the company hands over the registered  
Figure 1: Proposed elliptic-curve cryptography (ECC)-based registration scheme. tamper-proof product to the owner.