# Energy Efficient Dynamic Symmetric Key Based Protocol for Secure Traffic Exchanges in Smart Homes
## 4 Security Analysis
### Informal Security Analysis
Consequently; an attacker is incapable of accurately discerning the true identity of the smart home users and their mobile devices.\(\Box\)  
**Lemma 5:**_This protocol prevents impersonation attacks._  
Proof. : For an adversary to effectively impersonate the remote smart home owner, user identity \(\text{ID}_{\text{U}}\) and mobile device identity \(\text{ID}_{\text{M}}\) must be captured. However, these parameters are enciphered in \(d\)=\(E_{\psi}\) (\(ID_{\text{U}}\)) and \(\epsilon\) =\(E_{\psi}\) (\(ID_{\text{M}}\)) using shared secret keys \(\psi\) before being sent over the channel to the TA during the registration phase. During the initial phases of the AKA procedures, \(\mathbb{R}_{\text{U}}\) is computed using nonce \(\mathbb{N}_{4}\) through exclusive OR operation with \(\text{ID}_{\text{M}}\). As such, these two identities cannot directly eavesdrop from the communication channel and impersonation of the SHO and MD flops. \(\Box\)  
**Lemma 6:**_This protocol is robust against eavesdropping attacks._  
Proof. : In this scheme, the current secret value \(\mathbb{Q}_{\text{U}}\) = \(\text{E}_{\psi}\) (\(ID_{\text{U}}\), \(ID_{\text{M}}\), \(\mathbb{P}_{\text{TA}}\), S)is enciphered using shared secret \(\psi\). It is then utilized during the authentication phase to accompany the MD's authentication request \(MAuth_{Req}\). Additionally, all the packets and parameters exchanged during AKA procedures are transient. Consequently, they cannot yield meaningful information that may facilitate the computation of next-session authentication parameters.\(\Box\)  
**Lemma 7:**_Man-in-the-middle attacks are thwarted._  
Proof. : The assumption made in this attack is that an adversary has captured current session secret value \(\mathbb{Q}_{\text{U}}\) = \(\text{E}_{\psi}\)(\(ID_{\text{U}}\), \(ID_{\text{M}}\), \(\mathbb{P}_{\text{TA}}\), S) and MD's authentication verification beacon \(\text{P}_{\text{U}}\) = \(\text{h}(\mathbb{Q}_{\text{U}}\|\mathbb{R}_{\text{U}}\|)\|\|\text{T}_{1}\| \|\mathbb{N}_{4}\|\|\text{T}_{\text{M}})\). The aim is then to modify the contents of these parameters before forwarding them to the unsuspecting trusted authority TA. However, all the contents of \(\mathbb{Q}_{\text{U}}\) are enciphered using secret key \(\psi\). Since this key cannot be obtained by the adversary, this attack flops. Additionally, security parameters in \(\text{P}_{\text{U}}\) are concatenated before being hashed. As such, a MitM attack using \(\text{P}_{\text{U}}\) is infeasible due to the difficulty of reversing the one-way hash function. \(\Box\)  
**Lemma 8**: _Denial of service and session hijacking attacks are prevented._  
**Proof:** The goal of the attacker is to knock off the smart home device SHD by hijacking its session during the AKA procedures. To achieve this, the attacker derives a fake verification beacon \(\mathrm{P_{T}^{F}}=\mathrm{h}(\mathbb{Z}_{\mathrm{S}}^{F}\|\mathrm{T_{5}}^{F}\| \mathrm{ID_{TA}}^{F})\), which is then sent to the TA. On getting this security parameter, the TA has to re-compute it through \(\mathrm{P_{T}^{*}}=\mathrm{h}\left(\mathbb{Z}_{\mathrm{S}}\|\mathrm{T_{5}}\| \mathrm{ID_{TA}}\right)\), as shown in Figure 3. Afterward, it is compared with the value received from the SHD in \(\mathrm{Tauth_{Res}}\). Here, if \(\mathrm{P_{T}^{*}}\
eq\mathrm{P_{T}}\), the session is aborted and hence session hijacking using bogus \(\mathrm{P_{T}^{F}}\) leads to session termination for this particular attacker and not for the legitimate SHD.