# 5G-Compliant Authentication Protocol for RFID
## 2 Security Architecture and Procedures for 5G and Threat Model
### 5G Architecture  
Two different sides can be identified in 5G: the subscriber or user equipment (UE) side and the network side. The UE contains the mobile equipment (ME) of the subscriber, typically a smartphone or an IoT device, that is equipped with a universal subscriber identity module (USIM), which keeps the security data and computes the cryptographic results required to complete the 5G-AKA. Plastic SIM cards have traditionally been used, but their cost, that includes a SIM card reader, and the difficulty associated with their substitution, make them unsuitable for IoT devices. In such cases, embedded SIMs (eSIMs), implemented on chips, where the credentials are provisioned remotely, are preferred. On the network side, we can further distinguish the service network (SN) and the home network (HN). The HN belongs to the subscriber's operator (that contains the subscriber's credentials in a database) and grants access to the different services within the core network, while the SN has base stations in the subscriber's vicinity and provides physical access to the network. The SN and the HN may both belong to the subscriber's operator (or PLMN--public land mobile network) or not, as happens, for example, when roaming. Figure 1 illustrates the 5G architecture with the most relevant components, from a security point of view. We note that these components do not always correspond to hardware modules, but could be just software functions, since 5G uses NFV (network function virtualization) and SDN (software define networks) as implementation concepts. The subscription credentials shared by the USIM and HN consist of, at least, the _SUPI_ (subscription permanent identifier) and a long-term key \(K\), used to uniquely identify the subscriber and mutually authenticate the UE and the 5G core network. However, to implement 5G authentication, it is also required that USIM stores the public key \(pk_{HN}\) of HN, used to encrypt the \(SUPI\) (with an asymmetric key cryptosystem based on elliptic curves) and obtain the \(SUCI\) (subscription concealed identifier), and a sequence number \(SQ_{UE}\), used to prevent replay attacks. The associated HN, on its side, stores the corresponding private key \(sk_{HN}\), and another sequence number \(SQ_{HN}\), loosely synchronized with \(SQ_{UE}\). Although, as explained, USIM carries out the authentication, based on the home operator's decision as indicated by the USIM, some operations can be performed by the ME, such as the public key encryption of its identity (to obtain \(SUCI\)). Once authentication is granted, ME is given information to compute an anchor key, \(K_{SEAF}\). \(K_{SEAF}\) is used for the derivation of security keys for the secure communication between UE and SN. The same \(K_{SEAF}\) can be used in subsequent procedures, preventing the need of new authentication runs: for example, when keys for more security context are required. The SN provides physical access via its base stations or gNBs (next generation Node B), which consist of distributed and central units (DUs and CUs). DUs have the antennas and do not implement security functions as they may be deployed in unsupervised sites, while CUs control one or more DUs and perform confidentiality and security functions, using keys derived from the anchor key \(K_{SEAF}\), provided by HN and stored in the security anchor function (SEAF). Finally, the SN also contains or implements the AMF (access and mobility management function), which offers functionalities such as registration, reachability, mobility and connection management services (equivalent to MME in 4G).