# Implementation of Efficient 5G AKA Protocol for Light-Weight Environment
## 1 Introduction
### Background
#### 1.1.1 Vulnerability of the 5G AKA protocol
In such a situation, the UE sends a failure message to the SEAF, and the message indicates that there is an error in the authentication process. Figure 2 shows the sequence diagram for the operation of the 5G AKA protocol. The red box in the figure represents a vulnerable area to be addressed intensively in this study. 1. The UE sends the SUCI to the SEAF. The SUCI is the encrypted SUPI value. The UE encrypts/decrypts SUCI using pkHN. 2. The SEAF sends SUCI of the UE and SN name values to the AUSF. The SN name value consists of '5G' and 'SN id'. 3. The AUSF checks the SN list to authenticate the SN. After authentication, the AUSF sends the SUCI and SN names to the ARPF. 4. The ARPF authenticates the UE and verifies the authentication material and the AV. The UE is authenticated by checking the UE list. The SQN, MAC and XRES are calculated for use in authentication. The MAC, XRES, CK, IK and AK were calculated using f1-f5. XRES is one of the challenge-response values calculated in HN. The 5G HE AV is the AV sent to the AUSF. The 5G HE AV comprises the authentication material of the protocol. 5. ARPF sends the 5G HE AV to the AUSF. 6. The AUSF can calculate HXRES*, \(\mathrm{K_{AUSF}}\) and SUPI using 5G HE AV. The \(\mathrm{K_{AUSF}}\) is the key for calculating \(\mathrm{K_{SEAF}}\). The \(\mathrm{K_{SEAF}}\) is a very important key, so it should not be leaked outside the HN until authentication is completed. The HN does not expose the \(\mathrm{K_{SEAF}}\) directly, thus inducing the UE to compute the \(\mathrm{K_{SEAF}}\) with information that only the UE and HN know: KEY, and RAND. Therefore, the AUSF sends only the \(\mathrm{K_{AUSF}}\) to the SEAF. 7. The AUSF sends 5G SE AV to the SEAF. The SEAF calculates HXRES* and stores the value to authenticate the UE and HN. 8. The SEAF sends RAND and AUTN to the UE. 9. The UE calculates and compares the MAC to the XMAC and SQN. To calculate the XMAC, the UE calculates the key material using f1-f5. In this step, if the authentication fails, the UE sends failure message to the SN. Once the UE has successfully authenticated, it calculates RES* and \(\mathrm{K_{SEAF}}\) using materials. 10. The UE sends the RES* to the SEAE. 11. The SEAF authenticates the UE and HN by comparing the HRES* to HXRES*. HRES* and HXRES* are hashed values. 12. The SN sends the RES* value to the HN. 13. Finally, the AUSF authenticates the UE by comparing the RES* and XRES* values. If authentication is successful, the AUSF sends the authentication result to the SN and ARPF. 14. The AUSF sends the authentication result to the ARPF and SN, and the \(\mathrm{K_{SEAF}}\) to SN. The UE and SN communicate in a wireless environment, making it easy to eavesdrop messages using simple equipment [14]. The SUCI value is disclosed because the 5G AKA protocol proposed in the standard sends an authentication failure message in plaintext. This implies that if an attacker injects a packet or uses the Man-in-the-Middle attack (MitM) to cause an authentication failure, the UE sends a plaintext message containing the SUCI value to the SEAF. These types of attackers are called active attackers; they have fake SEAF and are familiar with the protocol, so they can use MitM attack. This attack can be established by the race condition, allowing an active attacker to generate a failure message for the target and a passive attacker, who only eavesdrop failure message using simple  
Figure 2: 5G AKA protocol sequence. equipment. These attackers compromise the security of the protocol. If an attacker who bears the target's USIM wishes to proceed with additional attacks using SUCI information, they can easily do so. There are two kinds of attacks: (1) unauthorized access to the network using the USIM of the target, and (2) intentionally making an authentication failure message to the target. In addition, attacker receive message can locate the target.