{'fraction_non_alphanumeric': 0.030292905668782715, 'fraction_numerical': 0.010802984742176188, 'mean_word_length': 5.084010840108401, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Research on 4G And 5G Authentication Signaling

In recent years, the development and standardization of 5G networks have received extensive attention. 3GPP officially confirmed that Service-Based Architecture (SBA) is the unified infrastructure of the 5G core network (5GC). The Service-Based Interface (SBI) is an important part of the SBA for interaction between network function services within the 5GC. The fifth generation mobile network will support a range of use cases and requirements that are completely different from traditional 4G networks, such as providing a high level of authentication mechanisms. This paper is organized as follows: First, we compare the difference between 4G authentication and 5G authentication in three aspects including the 4G architecture, authentication process, and communication protocol stack, then implement the simulation environment, and finally evaluate the performance by comparing the delay.


Introduction
The rapid development of mobile Internet and IoT services has greatly promoted the advancement of mobile communication technology. 4G communication technology is gradually unable to meet people's growing demand for information transmission, and 5G technology is recognized by its reliability, timeliness, large bandwidth, and information transmission capability for large machines. 5G networks have greater advantages over 4G networks in terms of transmission rate, network performance, mobility, signal strength, and security. The 5G network has a higher density of connections, a faster experience, and lower air interface latency [1,2].
However, the diversified service scenarios of data transmission pose a serious challenge to 5G networks. Different business scenarios have different requirements for transmission security. Therefore, 5G designs should be compatible with a variety of security solutions. Closely related to security is the authentication in the network, so it is important to study the authentication process [3,4]. The main entity of 4G is shown in Figure 1. A number of modules with different functions are integrated into the 4G architecture to provide secure access and authentication. The modules related to authentication are as follows [5]:

4G System Architecture
The UE (User Equipment) consists of two parts, one is the UICC (Universal Integrated Circuit Card) and the other is the USIM (Universal Subscriber Identity Module), which is the basis of the USIM operation. The user's identity information and address information are stored in the USIM, such as the user's key. This information is shared with the AuC in the local area network, but the USIM copy cannot be saved in the AuC; the same is true for the IMSI (International Mobile Subscriber Identity). As the unique identifier of the user identity, IMSI can be divided into three main modules: MSIN (Mobile Subscription Information Number), MCC (Mobile Country Code), and MNC (Mobile Network Code).USIM plays an important role in the user authentication process.
E-UTRAN (Evolved Universal Radio Access Network) is a major component of the eNodeB (Evolved Node B). The eNodeB is an important bridge for the UE to connect to the network and is an essential component for connecting the core network.
The MME (Mobility Management Entity) is the primary control node of the network. The MME performs authentication, mainly responsible for the attach procedure, bearer processing (cooperating with the S-GW and P-GW), tracking the location of the UE and selecting a gateway (determining the routing of data packets).
Subscriber data and keys, including subscription profiles, are stored as the most important information for the user in the HSS (Home Subscriber Server). In short, the HSS is a database of user information.   Figure 2 shows the whole process of authentication.  Figure 3. S6a Protocol Stack Figure 3 shows the communication protocol stack between the MME and the HSS module. The interface used by the MME and HSS for communication is S6a, and the transmission protocol is Diameter. Diameter is one of the basic protocols, mainly used for authentication and accounting. The protocol must be used in conjunction with applications based on the protocol and provides a reliable transport mechanism, information processing and exception handling mechanisms similar to the TCP protocol [6]. The transport layer uses the SCTP (Stream Control Transmission Protocol) protocol. The Diameter message has a Diameter header and a series of AVPs (Attribute Value Pair).

5G System Architecture
There have been some changes in 5G authentication and 4G authentication. From the functional module, the HSS in 4G evolves into AUSF and UDM in 5G, and the MME of 4G evolves into AMF in 5G. The following is a detailed introduction of the functions of three network elements in 5G [7,8]： AMF (Core Access and Mobility Management) can implement many functions. For example, mobility management, registration management, verification of access identity and authorization mechanism implementation. UDM (Unified Data Management), which stores data that is equivalent to the HSS module in 4G, which is user data. Of course, UDM only stores a part of the data (user's subscription data), not all of the data. UDM also supports other features such as access authorization, user tag handling, authentication credential processing, and more. AUSF (Authentication Server Function): It mainly implements the authentication function in authentication, which is similar to the function implemented by the MME in 4G: generating a secret key, implementing two-way authentication for the UE, and supporting a consistent authentication model.  Figure 5 with Figure 2, the main changes are as follows: (1) The MME is divided into AMF AUSF, and the HSS becomes UDM; (2) Performing a hash calculation on RES and XRES; (3) Increased communication between AMF and AUSF (signaling 8-10). Figure 6. SBI Protocol Stack Due to fundamental changes in the core network architecture, the protocol stacks used in 4G core networks (such as Diameter / SCTP) are too heavy for flexible architectures. It may not meet the requirements of the 5GC. The SBA solution leverages the experience of web-based interaction design to provide flexible connectivity to services in distributed systems. Compared to a relatively fixed Web service, 5GC needs different architectures to support new services, which is more complex and more challenging. The SBA uses the SBI protocol stack as shown in Figure 6, the application layer uses the http2 protocol, and the message format is serialized in the json (JavaScript Object Notation) format [9,10].

Implementation
Two sets of source code were used in our study, one is openairinterface5g and the other is openair-cn. Openairinterface5g implements eNB and UE functions. Oaisim realizes system-level simulation, and oaisim includes simulation of LTE protocol stack as a whole. This code does not make any changes in 5G usage.
Openair-cn is an implementation of the 3GPP specifications concerning the Evolved Packet Core Networks which it contains the implementation of the following network elements: MME, HSS, S-GW, P-GW. For 5G, we made corresponding modifications on the basis of this code. It mainly involves the re-division of authentication network elements: AMF, AUSF, UDM. Three processes are re-opened in the source code, and the communication interface between the modules becomes SBI(http2+json).

Testing Cases
Firstly, some changes can be seen from Figure 2 and Figure 5 about the 4G and 5G authentication procedures, mainly because the change of NF leads to the change of the message flow. Secondly, it can be seen from Figure 3 and Figure 6 that 4G and 5G transport protocol stacks have changed (application layer, transport layer). These changes will bring about changes in performance, and an important index of performance is latency. Therefore, we have made certain measurements on the corresponding delays, including the following: (1) 4G REQ-RES: the time from the initiation of the request by the nas layer of the MME to the receipt of the response; (2) 5G REQ-RES: the time from the initiation of the AMF request to the receipt of the response.

Testing Environment
Table1 Hardware and software configurations The experimental system uses two multi-core servers, which are configured as shown in Table 1. One of them deployed openair-cn (core network) and the other deployed openairinterface5G (eNB and UE) to complete the deployment of 4G simulation system. We use the modified code to complete the deployment of the 5G simulation system.

Conclusion
Table2 Average latency As can be seen from Table 2, compared with 4G, the 5G authentication delay increased by 9273us, and the delay increased by approximately 6.46%. The SBA core network architecture introduced by 5G also brings a certain delay in the case of satisfying certain decoupling and meeting the requirements of the scenario, within the allowable range.