## 2 Background and Related Work  
### Background  
Fog computing is an emerging paradigm that extends cloud computing capabilities to the network edge, closer to end-users and devices [14]. It leverages the concept of the three-tier architecture, which consists of three distinct layers: the cloud, the fog, and the edge [15; 16; 17]. The cloud represents centralized data centers with high computational and storage capabilities. The cloud tier constitutes a collection of robust servers housed within the physical infrastructure, designed to efficiently manage, store, and process vast volumes of data. This tier offers seamless integration with the edge tier. Nevertheless, a significant challenge arises due to its limitations in meeting the low-latency demands of certain applications. The cloud boasts substantial processing and caching capacities, enabling users and applications to access its resources from anywhere at any time. Fog computing is characterized as a dynamic environment where an extensive array of diverse wireless and occasionally self-governing devices collaboratively communicate with each other and the network. This collaboration enables them to independently execute storage and processing tasks without relying on external entities. The fog encompasses intermediary devices such as routers, gateways, and switches. Fog nodes possess computational power and storage capabilities, facilitating seamless interaction and resource-sharing. The edge layer comprises the devices at the network periphery, including sensors, smartphones, smart vehicles, and IoT devices. Edge nodes exhibit constrained compute, storage, and networking capabilities. In the edge tier of the Internet of Things (IoT) architecture, IoT devices play a vital role in sensing diverse events, executing constrained tasks, and relaying the unprocessed data they collect to the fog tier. While fog computing offers several advantages, it also introduces unique security challenges and vulnerabilities. Some common vulnerabilities in fog computing include unauthorized access, data breaches, denial-of-service (DoS) attacks, compromised intermediary devices, and insecure communication channels [18; 19]. The dynamic nature of fog computing environments and the heterogeneity and large-scale deployment of devices make them susceptible to various security threats, as follows:  
* Fog computing involves processing and storing data at the edge devices, which increases the risk of unauthorized access and data breaches. Since these devices may not have robust security mechanisms, sensitive data could be exposed to potential attackers [20]. * Fog computing has limited physical resources, including processing power and memory. This limitation makes it challenging to implement strong security measures, leaving resources more vulnerable to attacks [10]. * The heterogeneous nature of fog computing resources and the interoperability of resources can lead to cyber-attackers exploiting the resources, gaining unauthorized access, and disrupting services [14]. * Fog computing involves data processing and storage at the edge, which opens up opportunities for data tampering and integrity breaches. * Data integrity in a decentralized environment becomes a significant concern [21]. These vulnerabilities necessitate the development of robust authentication mechanisms to mitigate potential risks and safeguard sensitive data in fog computing environments. The 5G (fifth-generation) architecture is designed to provide higher data rates, lower latency, increased capacity, and improved user experience compared to its predecessor, 4G/LTE. It is based on a flexible and virtualized network infrastructure, enabling the efficient delivery of a wide range of services, including enhanced mobile broadband (eMBB), massive machine-type communications (mMTC), and ultra-reliable low-latency communications (URLLC) [22].