Good day!
The procedure for establishing a connection between a UE and an eNodeB is as follows:
1. Identification. The UE sends an attach_request message to the MME through the eNodeB. The message contains the identity information and security capabilities of the UE, such as the IMSI.
2. Authentication. To verify the authenticity of the UE, the MME sends an authentication_request message to the UE after receiving an authentication request from the HSS. Then, the UE uses the master key to answer the request and sends an authentication_response message to the UE. If the authentication is successful, the UE and MME enter the security algorithm negotiation.
3. Security algorithm negotiation. The MEE selects an algorithm pair supported by the UE from the security capabilities in the attach_request message. Then, the MEE sends a security_mode_command message for integrity protection to the UE. In the UE, the MME replays the security capability of the UE. In this way, the security capability in the security_mode_command message is the same as that in the attach_request message sent by the UE. After verifying the message authentication code MAC in the security_mode_command message, the MME sends an encrypted and integrity-protected security_mode_complete message. The UE and MME establish a shared security environment, including the shared key for protecting the integrity and confidentiality of message exchange.
4. Secure temporary ID exchange. The MEE sends an attach_accept message for encryption and integrity protection to the UE. The attach_accept message contains a temporary ID (GUTI) for the UE. To prevent d*** of sensitive IMSI/IMEI information, the GUTI is used for communication between all UEs and the eNodeB/MME. The attach procedure is complete after the UE sends an attach_complete message. The UE and eNodeB generate a shared key for secure communication as a secure environment.