# A Secure Blockchain-Based Authentication and Key Agreement Scheme for 3 GPP 5G Networks
## 3 System and Security Model  
### System Model  
Our system model follows the 3 GPP 5G system architecture listed in TS 23.501 [29] and the security architecture listed in TS 33.501 [2]. We are adding some new features to the existing functional entities. Figure 1 shows the 3 GPP 5G core network (5 GC) consisting of many functional entities.  
In the existing 3 GPP 5 GC system model, the Next Generation Node B (gNB) is the base station that directly communicates with the UE. All gNBs in the 5G network are connected to the nearby Access and Mobility Function (AMF) servers. During conventional 5G-AKA authentication, when UE is under the coverage of 3 GPP access (i.e., under the signal coverage of gNBs), it should send an authentication request to gNBs. Then, the gNB forwards it to the AMF, and the AMF forwards it to the Authentication Server Function (AUSF) server. After that, AUSF fetches the device secret keys from the Unified Data Management (UDM) server to continue the subsequent authentication steps. Normally, one AUSF serves many AMFs across the 5G core network, and each AMF serves many gNBs nearby.  
In our proposal, we follow the same system model with a decentralization of the authentication entities as follows. All gNBs in the 5G core network become the members of a private blockchain that stores subscribers' information. AMF and AUSF should no longer need to forward authentication requests, but they can optionally be one of the members in the blockchain. UDM is the protected repository that stores private keys of the blockchain  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Method** & **Advantages** & **Drawbacks** \\ \hline \multirow{2}{*}{[20]} & Group & Prevention of DoS using timestamp & \multirow{2}{*}{Weak DDoS prevention for individual authentication} \\ \cline{3-3}  & Authentication & Efficient group-based authentication & \\ \hline \multirow{2}{*}{[22]} & Computation Pool & Fault-tolerant 5G-AKA authentication & 5G-AKA is inherently vulnerable to DoS attacks \\ \hline \multirow{2}{*}{[23]} & \multirow{2}{*}{Lightweight and formally verified handover authentication} & \multirow{2}{*}{Vulnerable to DDoS due to centralized design} \\ \cline{3-3}  & & & Backward compatibility with 5G-AKA \\ \hline \multirow{2}{*}{[28]} & \multirow{2}{*}{DDoS prevention using zero-knowledge proof} & \multirow{2}{*}{Centralized design, lack of formally verified protocol} \\ \cline{3-3}  & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Recent works of AKA schemes with DoS and DDoS prevention.  
and other important secrets. For each authentication request, UE uses the one-time hash secret stored in the Universal Subscriber Identity Module (USIM, or commonly known as a SIM card) to initiate an authentication request. Then, the gNB hashes the received secret and compares it with the entries in the blockchain. Since only legitimate UE would have the original secret, the gNB can immediately grant or deny the UE's authentication request without forwarding the request to AMF, AUSF, or UDM.  
Considering that 5G devices can connect to the 5 GC by many different approaches such as non-3 GPP access, 3 GPP access in the home network, and 3 GPP access in a visiting network, designing a universal authentication protocol could be very complicated. In this work, we focus on the most common scenarios to simplify the designed authentication protocol. It is assumed that all UE uses 3 GPP access to connect to the gNBs in the home network. These gNBs are connected to the 5 GC. Additionally, the connections between gNBs and 5 GC are secured by wired connections protected by IPSec tunnels. Thus, if a gNB can mutually authenticate with UE using the private key of the home network and information stored in the blockchain, it can be regarded that the UE has joined a legitimate 5 GC network.