## 3 Proposed Methodology
### LightWeight Encryption Algorithm  
The lightweight encryption algorithm (LEA) is a 128-bit block cipher designed for high-speed environments such as big data and cloud computing, as well as lightweight environments such as IoT and mobile devices. It is ideal for devices with limited processing capabilities, embedded systems with memory constraints, and battery-powered devices such as sensors and IoT gadgets. It offers encryption and authentication capabilities, with a simple key schedule and operations that are computationally inexpensive. The key management mechanism involves a trusted third party (TTP) responsible for storing user credentials and generating unique secret keys for each mobile user upon registration. These keys are used for encryption and decryption during authentication with the AP. When a user registers with the network, the TTP generates a unique secret key for the user. This secret key is used to encrypt the user's data, including the MAC address, identity, and PUF information. The encrypted data is then transmitted to the AP, which uses the secret key to decrypt the data. If the decrypted data matches the expected values, the user is authenticated.  
The pseudocode of the lightweight encryption algorithm begins with gathering essential user data such as MAC address, identity, password, PUF information, and location data. This data is initialized and requested for authentication, followed by preprocessing. The user is then registered with a TTP, which generates a unique secret key '\(S_{k}\)'. This key is used to encrypt the user's data '\(E_{d}\)', which is securely transmitted to the 5G AP. The AP decrypts the data using the secret key, verifying its validity. If the data is valid, the user is authenticated, enabling secure communication. If the data is invalid, the authentication is rejected, ensuring robust security throughout the process. In Algorithm 1\(G_{sk}()\) represent a key generation procedure. The TTP plays a pivotal role in the authentication process using LEA [31] for securing communication between mobile users and 5G APs. TTP stores mobile user credentials and generates public and private keys for each user, which are used to encrypt sensitive data. The encrypted data is then transmitted securely to the 5G AP, which uses the secret key to decrypt and verify the data. The overall steps involved in the authentication process are described in Algorithm 1.  
```
Input: '\(\textbf{D}_{i}\)' (MAC address, identity, password, PUF information, location data) Begin Initialize '\(\textbf{D}_{i}\)' /* '\(\textbf{D}_{i}\)'represents the data inputs */ Request'\(\textbf{D}_{i}\)' for authentication define preprocess user data return define register with TTP \(S_{k}=G_{sk}\)/ * ''\(G_{sk}\)'' indicates secret key generation process */ return \(S_{k}\)/ * ''\(S_{k}\)'' denotes the secret key */ define encryption and authentication process \(E_{d}=E(\textbf{userdata},S_{k})\)/ * ''\(E_{d}\)'' specifies the encrypted key */ decrypt and verify if(valid) authentication success else rejected end if End Output: Authentication successful
```  
**Algorithm 1**LEA pseudocode for mobile user authentication