## Security Analysis
### Against Known Attacks  
#### 4.5.1 Man-in-the-Middle Attack  
In this attack, the attacker may try to pretend to be any accessing party in every phase. The attacker will try to intercept and tamper with the data. However, all messages that are created or updated from the main role from the client's house and security company can be effectively authenticated through signatures in our proposed method, so it is difficult to tamper with the data during communication. For example, in the authentication phase, the \(AP\) encrypts the message with the \(SCC\)'s public key in Equation (6), then generates the chipper message \(C_{AP_{1}}\). Next, the \(AP\) sends \(C_{AP_{1}}\) to the \(SCC\), and the receiver decrypts \(C_{AP_{1}}\) with the \(SCC\)'s private key in Equation (7). The related formula is as follows:  
(1) Authentication phase \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Phase**} & \multicolumn{2}{c}{**Party**} \\ \cline{2-4}  & **Issuer** & **Holder** & **Verification** \\ \hline \multirow{3}{*}{Authentication phase} & AP & SCC & \(h_{AP_{1}}\stackrel{{?}}{{=}}H(R_{AP_{1}}\
icefrac{{ Sig_{1}}}{{Sq_{A1}}}\cdot Pub_{AP}\
icefrac{{H(M_{Assum})+Sig_{2}}}{{||H(M_{Access}))}}\) \\  & SCC & AP & \(h_{SCC_{1}}\stackrel{{?}}{{=}}H(R_{SCC_{1}}\
icefrac{{ Sig_{1}}}{{Sq_{C1}}}\cdot Pub_{AP}\
icefrac{{H(DSC_{1}+Sig_{SCC_{2}})}}{{||H(M_{Event_{1}}))}}\) \\ \hline \multirow{2}{*}{Event-trigger phase} & IMC & SCC & \(h_{IMC_{1}}\stackrel{{?}}{{=}}H(R_{IMC_{1}}\
icefrac{{ Sig_{1}}}{{Sq_{C1}}}\cdot Pub_{IMC}\
icefrac{{H(M_{Event_{1}})+Sig_{SCC_{2}}}}{{||H(M_{Event_{1}}))}}\) \\ \hline \multirow{2}{*}{Task allocating phase} & SCC & SG & \(h_{SCC_{1}}\stackrel{{?}}{{=}}H(R_{SCC_{1}}\
icefrac{{ Sig_{1}}}{{Sq_{C1}}}\cdot Pub_{SCSC}\
icefrac{{H(M_{Event_{1}})+Sig_{SCC_{2}}}}{{||H(M_{Event_{1}}))}}\) \\  & SG & SCC & \(h_{SG_{1}}\stackrel{{?}}{{=}}H(R_{SG_{1}}\
icefrac{{ Sig_{1}}}{{Sq_{C1}}}\cdot Pub_{SG}\
icefrac{{H(M_{Event_{1}})+Sig_{SCC_{2}}}}{{||H(M_{Event_{1}}))}}\) \\ \hline \multirow{3}{*}{Task accomplished phase} & SG & SCC & \(h_{SG_{2}}\stackrel{{?}}{{=}}H(R_{SG_{2}}\
icefrac{{ Sig_{2}}}{{Sq_{C1}}}\cdot Pub_{SG}\
icefrac{{H(M_{Event_{1}})+Sig_{SCC_{2}}}}{{||H(M_{Event_{1}}))}}\) \\  & SCC & C & \(h_{SC_{2}}\stackrel{{?}}{{=}}H(R_{SCC_{2}}\
icefrac{{ Sig_{2}}}{{Sq_{C1}}}\cdot Pub_{SC}\
icefrac{{H(M_{Event_{1}})+Sig_{SCC_{2}}}}{{||H(M_{Event_{1}}))}}\) \\ \cline{1-1}  & C & SCC & \(h_{C_{1}}\stackrel{{?}}{{=}}H(R_{C_{1}}\
icefrac{{ Sig_{1}}}{{Sq_{C1}}}\cdot Pub_{K}\
icefrac{{H(M_{Event_{1}})+Sig_{SCC_{2}}}}{{||H(M_{Events}))}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Non-repudiation of the proposed scheme. \(AP\)-\(>\)\(SCC\) \[C_{AP_{1}}=E_{Puk_{SCC}}(T_{1}||R_{AP_{1}}||h_{AP_{1}}||Sig_{AP_{1}}||Sig_{AP_{2}}||M _{Access}||H(M_{Access}))\] (124) \[(T_{1}||R_{AP_{1}}||h_{AP_{1}}||Sig_{AP_{1}}||Sig_{AP_{2}}||M_{Access}||H(M_{ Access}))=D_{Prk_{SCC}}(C_{AP_{1}})\] (125) \(SCC\)-\(>\)\(AP\) \[C_{SCC_{1}}=E_{Puk_{AP}}(ID_{SCC}||R_{SCC_{1}}||h_{SCC_{1}}||Sig_{SCC_{1}}||Sig_{SCC_{1}}|| Token_{1}||T_{3}||Seq_{i+1})\] (126) \[(ID_{SCC}||R_{SCC_{1}}||h_{SCC_{1}}||Sig_{SCC_{1}}||Sig_{SCC_{1}}||Sig_{SCC_{ 2}}||Token_{1}||T_{3})=D_{Prk_{AP}}(C_{SCC_{1}})\] (127)
2.