# 5G-IPAKA: An Improved Primary Authentication and Key Agreement Protocol for 5G Networks
## 6 Discussion
### Security of the 5G-IPAKA Protocol
Additionally, the protocol from [26] removes the synchronization failure procedure and the \(MAC\) failure procedure, preventing the location privacy of the \(UE\) from being compromised and defending against attacks based on \(MAC\) failure. Similarly, \(MAC_{ARPF}\) is also included in \(AUTH_{SEAF}\) from the second received message of the \(UE\), but it does not contain \(SEAF_{ID}\), where \(MAC_{ARPF}\) is a \(MAC\) of the ARPF and \(SEAF_{ID}\) is the identity of the \(SEAF\) (i.e., \(SNN\) mentioned above). This means that the \(UE\) cannot authenticate the \(SN\) being authenticated by the \(HN\), meaning that mutual authentication between the \(UE\) and the \(SN\) cannot be established and \(K_{SEAF}\) cannot reach an agreement. In addition, \(RAND_{SEAF}\) is included in the \(RAND^{\prime}_{UE}\) of the second received message of the \(SEAF\), \(HXRES*\) of the third received message of the \(SEAF\), and \(RES*\) of the fourth received message of the \(SEAF\), although the \(SEAF\) does not verify these fields, so DoS attacks against the \(SN\) can be formed, where \(RAND^{\prime}_{UE}\) is calculated based on \(RAND_{UE}\) and \(RAND_{SEAF}\) \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Shortcomings** & **5G AKA** & [23] & [24] & [26] & [27] & **5G-IPAKA** \\ \hline \(SUCI\) can be replayed without being found & Yes & No & Yes & No & No \\ Mutual authentication between the \(UE\) and the \(SN\) cannot be established & Yes & Yes & Yes & Yes & No \\ \(K_{SEAF}\) cannot reach an agreement & Yes & Yes & Yes & Yes & No \\ The location privacy of the \(UE\) can be compromised & Yes & No & No & No & No \\ DoS attacks against the \(SN\) can be formed & Yes & Yes & Yes & Yes & No \\ Attacks based on \(MAC\) failure can be performed & Yes & Yes & No & No & No \\ Perfect forward secrecy cannot be provided & Yes & Yes & Yes & Yes & No \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparative analysis between the 5G-IPAKA protocol and the recently improved 5G AKA protocols [23; 24; 26; 27] regarding the shortcomings of the latest version of the 5G AKA protocol. (i.e., the challenges of the \(UE\) and the \(SEAF\), respectively). Because \(K_{AUSF}\) and \(K_{SEAF}\) can be calculated when \(K\) is leaked, PFS cannot be provided. In [27], the time synchronization among the \(UE\), the \(SN\), and the \(HN\) is maintained. \(T_{UE}\) is included in \(SUC1\), so \(SUC1\) cannot be a replayed message, where \(T_{UE}\) is a timestamp of the \(UE\). Additionally, the protocol of [27] also removes the synchronization failure procedure and the \(MAC\) failure procedure, preventing the location privacy of the \(UE\) from being compromised and defending against attacks based on \(MAC\) failure. \(MAC_{SN}\) is included in the first received message of the \(UE\), but it does not contain \(SNN\). This means that the \(UE\) cannot authenticate the \(SN\) being authenticated by the \(HN\), meaning that mutual authentication between the \(UE\) and the \(SN\) cannot be established and \(K_{SEAF}\) cannot reach an agreement. For the received messages, the \(SN\) does not verify \(T_{UE}\) and \(T_{HN}\) (i.e., a timestamp of the \(HN\)), but only verifies whether \(RES\) is equal to \(XRES\) in phase 1 of the protocol from [27], meaning that DoS attacks against the \(SN\) can be formed. Similar to [26], PFS cannot be provided. Therefore, our proposed 5G-IPAKA protocol is better than these recently improved 5G AKA protocols in overcoming the shortcomings of the latest version of the 5G AKA protocol.