# Energy Efficient Dynamic Symmetric Key Based Protocol for Secure Traffic Exchanges in Smart Homes
## 4 Security Analysis
### Informal Security Analysis  
This sub-section presents the evaluation of the security posture of this protocol against the most common attack vectors in smart home networks. This is achieved through the formulation and proof of the following lemmas. **Lemma 1:**_Backward and forward key secrecy are preserved_. Proof. : The aim of upholding forward key secrecy is to prevent an attacker from using the current session key to accurately derive the session for the subsequent communication session. In our scheme, TA's current session secret value \(\mathbb{P}_{\mathrm{TA}}\) and \(ID_{\mathrm{U}}\)'s current session secret value \(\mathbb{Q}_{\mathrm{U}}\) are refreshed after every successful authentication. The computation of these session secrets incorporates random nonces and some timing information \(\mathrm{T}_{\mathrm{M}}\) that is updated after every successful authentication. Consequently, constructing any valid \(\mathbb{P}_{\mathrm{TA}}\) and \(\mathbb{Q}_{\mathrm{U}}\) parameters is computationally infeasible. **Lemma 2:**_Strong mutual Authentication is executed._  
Proof. : In our protocol, TA validates the authenticity of smart home users by computing security tokens \(\mathbb{Q}_{\mathrm{U}}\) and \(\mathrm{P}_{\mathrm{U}}\) such that the authentication process is terminated if these \begin{table}
\begin{tabular}{c c} \hline \hline
**SL** & **BLP** \\ \hline SG\({}_{1}\) & \(\mathrm{BLP}_{5}\) \\ \hline SG\({}_{2}\) & \(\mathrm{BLP}_{6}\) \\ \hline SG\({}_{3}\) & \(\mathrm{BLP}_{11}\) \\ \hline SG\({}_{4}\) & \(\mathrm{BLP}_{12}\) \\ \hline SG\({}_{5}\) & \(\mathrm{BLP}_{17}\) \\ \hline SG\({}_{6}\) & \(\mathrm{BLP}_{18}\) \\ \hline SG\({}_{7}\) & \(\mathrm{BLP}_{23}\) \\ \hline SG\({}_{8}\) & \(\mathrm{BLP}_{24}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Attainment of security goals. parameters are illegitimate. In addition, all smart home users authenticate TA through \(\mathbb{P}_{\text{TA}}\) and \(\mathbb{Q}_{\text{U}}\text{New}\). In this process, only TA and MD have knowledge of security parameter \(\psi\). To render this authentication dynamic, once \(\mathbb{N}_{1}\), \(\mathbb{N}_{4}\), and auto-incremented parameter \(\text{T}_{\text{M}}\) are deployed and refreshed after each successful authentication.\(\Box\)  
**Lemma 3:**_Packet replays attacks are prevented._  
Proof. : The success of this attack requires that security parameters \(\mathbb{Q}_{\text{U}}\) and \(\text{P}_{\text{U}}\) must be captured by an attacker. However, this is impossible since \(\mathbb{Q}_{\text{U}}\) is enciphered using secret key \(\psi\). After every successful authentication, parameters \(\mathbb{Q}_{\text{U}}\) and \(\mathbb{P}_{\text{TA}}\) are substituted by their refreshed counterparts \(\mathbb{Q}_{\text{U}}\text{New}\) and \(\mathbb{P}_{\text{TA}}\text{New}\), respectively. In addition, freshness checks using timestamps and random nonce renders packet replay attacks infeasible. \(\Box\)  
**Lemma 4:**_The proposed scheme provides device anonymity._  
Proof. : To successfully register the user, identity \(\text{ID}_{\text{U}}\) and mobile device identity \(\text{ID}_{\text{M}}\) are enciphered using shared secret parameter \(\psi\). This happens by forwarding these two values to the trusted authority. Similarly, the SHD's identity \(\text{ID}_{\text{S}}\) is encrypted using \(\Phi\) before its transmission over the communication channel. On the other hand, during the authentication phase, beacons such as \(\{\text{P}_{\text{U}}\text{,}\text{Q}_{\text{U}}\), \(\mathbb{R}_{\text{U}}\text{,}\text{T}_{1}\}\) and \(\{\text{P}_{\text{S}}\text{,}\text{T}_{3}\}\) are exchanged. Suppose that an attacker eavesdrops on the first message. However, since user identity \(\mathbb{R}_{\text{U}}\) is masked in other parameters, including the timestamp, it is impossible for an attacker to determine with high precision the smart home user's identity. In addition, \(ID_{\text{U}}\)'s current session secret value \(\mathbb{Q}_{\text{U}}\) is encrypted using shared secret key \(\psi\).