## 2 Overviews of Both the 5G AKA Protocol and the 5G-IPAKA Protocol  
### The 5G AKA Protocol  
According to [2; 3; 4], the steps of the latest version of the 5G AKA protocol in the 3 GPP standard version v17.4.0 of TS 33.501 are illustrated in Figure 1.  
In Figure 1, the universal subscriber identity module (USIM) and the mobile equipment (ME) are located in the user equipment (UE), and the security anchor function (SEAF) is located in the SN. The authentication server function (AUSF), the unified data management (UDM), the authentication credential repository and processing function (ARPE), and the subscriber identity de-concealing function (SIDF) are located in the home network (HN). The messages between the SN and the HN are usually protected. The detailed steps of the latest version of the 5G AKA protocol are as follows:  
Figure 1: The steps of the latest version of the 5G AKA protocol. When the SEAF initiates authentication with the UE, the UE sends \(SUCI\) to the SEAF, where the UE includes the ME and the USIM. \(SUCI\) denotes a SUCI of the UE and \(SUCI=x\cdot G||\{SUPI\}_{EK}||MAC_{UE}\), where \(SUPI\) denotes the subscription permanent identifier (SUPI) of the UE, \(x\cdot G\) and \(x\) are an ephemeral public-private key pair of the UE for Diffie-Hellman exchange, \(y\cdot G\) and \(y\) are the ephemeral public-private key pair of the HN for Diffie-Hellman exchange, \(EK||ICB||MK=KDF(x\cdot y\cdot G)\) and \(MAC_{UE}=HMAC(MK,\left\{SUPI\right\}_{EK})\), \(EK\) is an encryption key, \(ICB\) is an initial counter block (ICB), \(MK\) is a message authentication code (MAC) key, \(MAC_{UE}\) is a MAC of the UE, \(KDF()\) is a key derivation function, \(HMAC()\) is a hash function for computing MAC, and \(||\) denotes a concatenation. 2. Upon receiving \(SUCI\), the SEAF sends \(SUCI\) and \(SNN\) to the AUSF. \(SNN\) denotes the serving network name (SNN) of the SN. 3. If the SEAF is entitled to use \(SNN\), then the AUSF stores the received \(SNN\) and sends \(SUCI\) and \(SNN\) to the UDM. 4. The UDM invokes the SIDF when \(SUCI\) is received. Then, the SIDF de-conceals \(SUCI\) to gain \(SUPI\) before the UDM can process the request. Based on \(SUPI\), the UDM/ARPF chooses one authentication method. 5. When 5G AKA is selected, the UDM/ARPF generates \(RAND\), calculates \(AUTN\) and \(XRES^{*}\), and derives \(K_{AUSF}\), and then creates a 5G home environment authentication vector (5G HE AV) from \(RAND\), \(AUTN\), \(XRES^{*}\), and \(K_{AUSF}\). \(RAND\) is an unpredictable challenge of the HN. \(AUTN\) is an authentication token of the HN and \(AUTN=SQN\oplus AK||AMF||MAC\), where \(SQN\) is a fresh sequence number generated by the HN, \(AK\) is an anonymous key and \(AK=f_{5}(K,RAND)\), \(AMF\) is the authentication management field (AMF) and the separation bit of the AMF is set to 1, \(MAC\) is a MAC of the HN and \(MAC=f_{1}(K,SQN||RAND||AMF)\), \(K\) is a long-term key between the UE and the HN, \(f_{1}()\) is a message authentication function, and \(f_{5}()\) is a key-generating function. Here, \(XRES^{*}=KDF(CK||IK,SNN\,||RAND||XRES)\), where \(CK\) is a cipher key and \(CK=f_{3}(K,RAND)\), \(IK\) is an integrity key and \(IK=f_{4}(K,RAND)\), \(XRES\) is an expected response and \(XRES=f_{2}(K,RAND)\), \(f_{2}()\) is a message authentication function, and \(f_{3}()\) and \(f_{4}()\) are two key-generating functions. \(K_{AUSF}\) is a key derived from \(CK\) and \(IK\), and \(K_{AUSF}=KDF(CK||IK,SNN||SQN\oplus AK)\). 6. The UDM sends the 5G HE AV to the AUSF together with \(SUPI\). When an authentication and key management for applications (AKMA) subscription is used, the UDM also sends \(AKMA\) to the AUSF. \(AKMA\) denotes the AKMA indication and routing indicator. 7. The AUSF stores the received \(XRES^{*}\) temporarily together with the received \(SUPI\). 8.