# A Secure Blockchain-Based Authentication and Key Agreement Scheme for 3 GPP 5G Networks
## 5 Security Evaluation
### Burrows-Abadi-Needham (BAN) Logic
#### 5.1.4 Protocol Verification
Using the message meaning rule with Equation (4) and Message 2, we have Equation (30):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]1  
Using the freshness rule with Equations (3) and (30), we have Equation (31):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]2  
Using the nonce verification rule with Equations (30) and (31), we have Equation (32):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]3  
Using the belief rule with Equation (32), we have Equation (33):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]4  
Using jurisdiction rule with Equations (9) and (33), we have Equation (34):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]5  
As a result, the UE also believes the received ECDH public key from the gNB. For the UE, since we know \(U\mid\equiv a\) in Equation (5) and \(U\mid\equiv b\cdot P\) in Equation (34), the common key \(U\stackrel{{ K_{\text{UC}}}}{{\leftrightarrow}}C\) can be derived in Equation (35):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]6  
For the CN, since we know \(C\mid\equiv b\) in Equation (7) and \(C\mid\equiv a\cdot P\) in Equation (29), the common key \(U\stackrel{{ K_{\text{UC}}}}{{\leftrightarrow}}C\) can be derived in Equation (36):  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]7  
Moreover, to finish the protocol, the CN has to believe Message 1 to continue the protocol and send Message 2. Hence, we can say that if the UE has received Message 2, the UE can be sure that the CN has believed Message 1, and therefore \(U\mid\equiv C\mid\equiv a\cdot P\). Combining this with Equation (11), we can conclude that:  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]8  
Similarly, the UE has to believe Message 2 to start the subsequent data transmission. Hence, we can say that if the CN receives the subsequent data correctly, CN can be sure that the UE has believed Message 2, and therefore \(C\mid\equiv U\mid\equiv b\cdot P\). Combining this with Equation (12), we can conclude that:  
\[\frac{C\mid\equiv U\stackrel{{ Y}}{{\leftrightarrow}}C,\ C\lhd \langle U\stackrel{{ K_{\textit{Iplace}}}}{{\leftrightarrow}}C,\ Y \rangle_{Y}}{C\mid\equiv U\mid\sim\ \left(U\stackrel{{ K_{\textit{Iplace}}}}{{ \leftrightarrow}}C,\ Y\right)} \tag{20}\]9  
Consequently, all the security goals are satisfied. Hence, the security of 5 GSBA is logically verified.