## 7 Security Analysis
### Formal Security Analysis  
During the authentication phase, another session key is established between the device and the edge gateway. In this section, it will be proven that the established session key is secure under the ROR (Real-Or-Random) model. Definition 1 provides the security definition of session keys within the ROR model. In the proposed cross-domain authentication model, there are three types of entities: Device \(D_{i}^{X}\), Edge Gateway \(EG_{i}^{X}\), and Edge Gateway \(EG_{j}^{Y}\). Each type of entity contains multiple instances. Let \(\Pi^{t}\) denote the \(t\)-th instance of an entity. Then, \(\Pi^{t_{1}}_{D_{i}^{X}}\), \(\Pi^{t_{2}}_{EG_{i}^{X}}\), and \(\Pi^{t_{3}}_{EG_{j}^{Y}}\) represent instances of \(D_{i}^{X},EG_{i}^{X}\), and \(EG_{j}^{Y}\), respectively. All instances are treated as random oracles. Additionally, the adversary \(A\) is allowed to make the following queries:  
(1) \(EXECUTE(\Pi^{t_{1}}_{D_{i}^{X}},\Pi^{t_{2}}_{EG_{i}^{X}},\Pi^{t_{3}}_{EG_{j}^{Y}})\): The adversary \(A\) can perform this query to simulate an eavesdropping attack and obtain all the information exchanged between entities. (2) \(SEND(\Pi^{t},m)\): By performing this query, the adversary \(A\) can simulate an active attack by sending a message m to the entity \(\Pi^{t}\) and obtaining the response information from that entity. (3) \(REVEAL(\Pi^{t})\): The adversary A performs this query to obtain the session key of Entity \(\Pi^{t}\). If \(\Pi^{t}\) does not have a session key, the query returns an undefined symbol \(\bot\); otherwise, it returns the session key of \(\Pi^{t}\). (4) \(TEST(\Pi^{t})\): This query simulates the semantic security of the session key between entities. When the adversary A performs this query, if Entity \(\Pi^{t}\) does not have a defined session key, or if A has previously issued a REVEAL query to \(\Pi^{t}\) or any of its partners, the query returns an undefined symbol \(\bot\). Otherwise, \(\Pi^{t}\) randomly generates a bit \(c\), and the output is kept secret from the adversary \(A\). If \(c=1\), the real session key is returned; if \(c=0\), a random number of the same length as the session key is returned. Next, we will use these queries to prove the semantic security of the proposed method. In an authentication protocol, the semantic security proof plays a crucial role by providing formal guarantees of confidentiality and resistance to attacks in the presence of adversaries. **Theorem 1** (Semantic Security). : _Let \(ADV_{A}(tp)\) denote the semantic security advantage of adversary \(A\) in breaking the proposed protocol within polynomial time \(tp\), in order to obtain the session key \(SK_{im}=SK_{mi}\) between \(D_{i}^{X}\) and \(EG_{j}^{X}\) during the initial authentication phase and the session key \(SK_{it}=SK_{ti}\) between \(D_{i}^{X}\) and \(EG_{j}^{Y}\) during the handover authentication phase. Let \(q_{h\
u}|Hash|\), and \(ADV_{A}^{CMDLP}\) represent, respectively, the number of hash queries made, the output space of the one-way collision-resistant hash function \(H(*)\), and the adversary's advantage in solving the chaotic map-based discrete logarithm problem. Then,_  
\[ADV_{A}\leq\frac{q_{h}^{2}}{|Hash|}+2 ADV_{A}^{CMDLP}\]  
Proof. : The adversary \(A\) can engage in three independent games \(G_{i}\) (where \(i\in[0,2]\)) using the allowed queries. At the end of each game, if \(A\) can correctly guess whether the bit \(c\) in game \(G_{i}\) corresponds to the real session key or a random number, then \(A\) is considered to have won the game. Let \(Success^{A}_{G_{i}}\) denote the event that \(A\) wins game \(G_{i}\). Therefore, the advantage of \(A\) in winning game \(G_{i}\) is defined as  
\[ADV_{G_{i}}^{A}=Pr\Big{[}Success^{A}_{G_{i}}\Big{]}\]  
Here, \(Pr[E]\) denotes the probability of event \(E\). The games conducted by adversary \(A\) are as follows:  
\(G_{0}\): Game \(G_{0}\) simulates a real attack launched by adversary A against the protocol under the ROR model.