Next Article in Journal
PSL-IoD: PUF-Based Secure Last-Mile Drone Delivery in Supply Chain Management
Previous Article in Journal
Risk Measurement of TAVR Surgical Complications Based on Unbalanced Multilabel Classification Approaches
Previous Article in Special Issue
Improved Connected-Mode Discontinuous Reception (C-DRX) Power Saving and Delay Reduction Using Ensemble-Based Traffic Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Blockchain-Based Secure Authentication Protocol for Fog-Enabled IoT Environments

1
School of Electronic and Electrical Engineering, Kyungpook National University, Daegu 41566, Republic of Korea
2
School of Computer Engineering, Keimyung University, Daegu 42601, Republic of Korea
*
Authors to whom correspondence should be addressed.
Mathematics 2025, 13(13), 2142; https://doi.org/10.3390/math13132142
Submission received: 7 May 2025 / Revised: 12 June 2025 / Accepted: 29 June 2025 / Published: 30 June 2025
(This article belongs to the Special Issue Advances in Mobile Network and Intelligent Communication)

Abstract

Fog computing technology grants computing and storage resources to nearby IoT devices, enabling a fast response and ensuring data locality. Thus, fog-enabled IoT environments provide real-time and convenient services to users in healthcare, agriculture, and road traffic monitoring. However, messages are exchanged on public channels, which can be targeted to various security attacks. Hence, secure authentication protocols are critical for reliable fog-enabled IoT services. In 2024, Harbi et al. proposed a remote user authentication protocol for fog-enabled IoT environments. They claimed that their protocol can resist various security attacks and ensure session key secrecy. Unfortunately, we have identified several vulnerabilities in their protocol, including to insider, denial of service (DoS), and stolen verifier attacks. We also prove that their protocol does not ensure user untraceability and that it has an authentication problem. To address the security problems of their protocol, we propose a security-enhanced blockchain-based secure authentication protocol for fog-enabled IoT environments. We demonstrate the security robustness of the proposed protocol via informal and formal analyses, including Burrows–Abadi–Needham (BAN) logic, the Real-or-Random (RoR) model, and Automated Verification of Internet Security Protocols and Applications (AVISPA) simulation. Moreover, we compare the proposed protocol with related protocols to demonstrate the excellence of the proposed protocol in terms of efficiency and security. Finally, we conduct simulations using NS-3 to verify its real-world applicability.

1. Introduction

With the rapid development of Internet of Things (IoT) technology, use of IoT devices is expanding to diverse fields such as smart agriculture [1], the Industrial IoT [2], and healthcare services [3]. In addition, IoT devices are arranged to collect information from their surroundings. Large amounts of data are generated as the number of IoT devices increases. Thus, cloud computing can be employed because it can provide ample storage and high computing resources for the generated data [4]. Cloud computing can also offer interoperability for heterogeneous IoT devices [5]. However, cloud servers face several challenges in real-time IoT applications. Cloud servers are typically located in remote areas far from IoT devices, causing high latency [6]. The centralized architecture of the cloud server can cause problems, including network congestion and single points of failure [7]. Considering these limitations, studies have been searching for better solutions for IoT environments.
Fog computing is a technology that extends cloud computing to the edge of the network [8]. In fog computing, fog nodes provide sufficient computing power, storage space, and networking services to nearby IoT devices, helping to share the loads of the cloud server. Fog computing is suitable for IoT environments because the local data collected by IoT devices can be processed and stored in fog nodes instead of transmitting them to cloud servers [9]. The network participation of fog nodes allows services to be distributed among nodes, resulting in low latency and real-time availability [10]. For example, drivers can access real-time data stored in fog nodes to choose the quickest path using a road traffic monitoring service [11]. In addition, doctors can access fog nodes to read real-time sensor data for diagnoses [12]. With fog computing technology, IoT systems provide instantaneous and localized services to users.
Nevertheless, security problems in fog-enabled IoT environments remain. Fog-enabled IoT environments generally comprise three entities: users, fog nodes, and a cloud server. Communication between users, nodes, and the cloud server is realized through a public channel; therefore, malicious attackers can conduct various security attacks, potentially putting the system at risk. For instance, attackers can collect and employ exchanged messages to impersonate a legitimate user and extract secret information. Attackers can also capture transmitted messages to reveal the user’s identity, compromising user untraceability. In addition, attackers can steal a legitimate user’s smart device and obtain stored parameters via power analysis [13]. Moreover, attackers can send an excessive number of requests to take down the system, preventing users from accessing IoT services [14]. However, blockchain can be used to improve security for fog-enabled IoT environments [15]. Blockchain is a distributed ledger managed by a peer-to-peer network which features privacy, decentralization, and immutability. Blockchain technology can be applied to fog-enabled IoT environments, as fog nodes are distributed on the network. As a peer node in the blockchain network, fog nodes share encrypted private user information for user validation during the authentication process [16]. By implementing blockchain, various security challenges that arise from centralized architecture of cloud computing can be mitigated. Consequently, to protect data privacy and ensure the reliability of services, a secure authentication protocol is critical for fog-enabled IoT environments.
In 2024, Harbi et al. [17] proposed a remote user authentication protocol for fog computing. Harbi et al. claimed that their protocol offers an efficient user authentication process and is secure against many security attacks, including impersonation, offline guessing, privileged insider, and man-in-the-middle (MitM) attacks. Moreover, they argued that their protocol can verify users using blockchain. However, we found that Harbi et al.’s protocol is not secure against insider, stolen verifier, or DoS attacks. Moreover, we discovered that their protocol cannot ensure untraceability of users and that it fails to validate the fog node, leading to unsuccessful authentication and session key agreement. To address these security vulnerabilities, we propose a security-enhanced authentication protocol using blockchain for fog-enabled IoT environments. The proposed protocol applies a fuzzy extractor to use biometric information, adding protection against offline guessing attacks. We also use lightweight cryptographic operations to reduce the load on our system, including exclusive-OR operations and hash functions. The main contributions of this paper are summarized as follows:
  • We review the protocol by Harbi et al. and demonstrate its vulnerabilities to insider, DoS, and stolen verifier attacks. Moreover, we reveal that their protocol does not ensure untraceability and has an authentication problem.
  • We propose a blockchain-based secure authentication protocol for IoT environments that resolves the security problems in the protocol. We use exclusive-OR operations and hash functions to retain low computational cost. In addition, we use a fuzzy extractor to implement users’ biometric information for resistance against offline guessing attacks [18].
  • We employ the Burrows–Abadi–Needham (BAN) logic [19], the Real-or-Random (ROR) model [20], and the Automated Verification of Internet Security Protocols and Applications (AVISPA) simulation tool [21,22] to demonstrate that the proposed protocol ensures mutual authentication and security of the session key and resists replay and MitM attacks. We also prove that the proposed protocol is secure against known security attacks, including desynchronization, session-specific random number leakage, insider attacks, and impersonation attacks, and that it ensures mutual authentication and user anonymity via informal analysis.
  • We evaluate the security properties and computation and communication costs of the proposed protocol with relevant protocols. Moreover, we simulate the proposed protocol using Network Simulator 3 (NS-3) [23] to verify its capability in real-world environments.

Article Organization

Section 2 introduces the research background of authentication protocols in fog-enabled IoT environments. Section 3 describes core technologies addressed in this paper along with the adversary model and system model. Section 4 provides a summary of the protocol by Harbi et al., while Section 5 confirms the security vulnerabilities of their protocol. Section 6 presents the protocol proposed in this paper to overcome the security vulnerabilities of the previous protocol. Section 7 demonstrates the security of our proposed protocol using formal and informal analyses, while Section 8 presents performance analyses and NS-3 simulation results. Finally, Section 9 concludes and summarizes this work.

2. Research Background and Related Works

2.1. Research Background

In 2012, Cisco [24] introduced the concept of fog computing, which is an extension of cloud computing that enables computing closer to IoT and end-user devices. Fog computing provides virtualized computation and storage resources between end devices and cloud servers; hence, it is considered a good option for IoT applications [6]. Subsequently, much research on integration of fog computing with IoT has been conducted. Peter [10] showed that fog computing has sufficient resources to handle the data produced by IoT devices and is able to provide real-time services. Hazra et al. [25] summarized several past studies on fog computing, presented a use case scenario in IoT–fog–cloud environments, and highlighted the requirement of security and privacy for fog computing. Burhan et al. [26] explained that fog-based IoT networks lead to security challenges around secure data sharing and protection of sensitive data. In below, we list general security requirements which are crucial to fog-enabled IoT services:
  • A u t h e n t i c a t i o n : Users, fog nodes, and the cloud server should be mutually authenticated before allowing access to databases or sharing important information.
  • A v a i l a b i l i t y : Fog-enabled IoT services should be available to every legitimate user even under DoS attacks.
  • C o n f i d e n t i a l i t y : Adversaries or non-registered users should not be able to extract any useful information from messages.
  • F r e s h n e s s : Every transmitted message should be unique, i.e., not be identical with old messages.
  • I n t e g r i t y : Messages should not be modified during transmission.

2.2. Related Works

In 2018, Jia et al. [27] designed an authenticated key agreement protocol for IoT healthcare systems. In their protocol, fog nodes filter raw data sent by IoT healthcare devices and transmit the collected data to the cloud server for more operations, thereby enabling real-time response for healthcare services. In 2019, Ma et al. [28] suggested an authentication protocol for VANET using Elliptic Curve Cryptography (ECC). Fog nodes connect with vehicle users and the cloud to provide authentication messages and establish a session key. However, Eftekhari et al. [29] discovered that their protocol is vulnerable to insider, stolen smart card, and “honest-but-curious” fog server attacks. To address these security vulnerabilities, Eftekhari et al. proposed a security-enhanced protocol using fog servers. In 2021, Smet et al. [30] designed an authentication protocol using Physical Unclonable Functions (PUFs). In their protocol, the fog nodes forward users’ requests to the cloud server and verify the users. In 2023, Saleem et al. [31] proposed a physically secure Authentication and Key Agreement (AKA) protocol using fuzzy extractors. In their scheme, Road-Side Units (RSU) communicate with a Trusted Party Agent (TPA) over a wired channel. The location area identifier L I D r of the RSU is utilized for secure authentication between the entities. Tahir et al. [32] proposed a multi-factor authentication protocol using biometric information for VANET. Their protocol uses RSUs to relay authentication messages between vehicles and the TPA. Qiao et al. [33] designed an AKA protocol for HIoT using the Chebyshev polynomial. Users have healthcare IoT devices connected to fog nodes, which offer real-time responses for time-sensitive tasks. Some data are sent to the cloud server for additional analyses. In 2024, Irshad et al. [34] proposed an authentication protocol for HIoT. In their protocol, fog nodes assist in the processing of patients’ diagnostic medical reports in real time.
Various authentication protocols for fog-enabled IoT environments using blockchain have been proposed to establish secure communication channels. In 2021, Tomar et al. [35] suggested an AKA protocol for the smart grid. In this protocol, fog nodes act as nodes in a blockchain and provide services using data from smart meters. Fog nodes are also responsible for providing authentication messages between smart meters and the cloud server. In 2023, Subramani et al. [36] proposed an anonymous authentication protocol for VANETs. Vehicles and fog nodes register with the Trusted Authority (TA), and the vehicle and fog node authenticate each other in the authentication phase. They claimed that this protocol can prevent physical attacks and ensure anonymity of users. Moreover, Zhang et al. [11] designed a privacy-preserving traffic route management protocol for VANETs. Their protocol utilized fog nodes for vehicle verification, aggregation of routes of vehicles, and real-time traffic warnings. However, Zhang et al.’s protocol can have a centralization problem because the TA supervises the entire network [37]. Wei et al. [38] suggested an AKA protocol with a multi-TA model for VANETs. They asserted that some intelligent transport system applications are enabled by fog nodes, such as intelligent traffic lights and real-time traffic warnings. In 2024, Tomar et al. [39] designed authentication protocol for VANET using the Chebyshev polynomial. In their protocol, fog servers provide data processing, verify vehicles, and participate in the key agreement process for secure data transfer. Subramani et al. [40] suggested an anonymous authentication protocol for the smart grid. In their protocol, fog nodes communicate with smart meters to verify the accuracy of electricity usage data and send the data along with a signature to the cloud blockchain server. Alsaeed et al. [41] proposed a group authentication protocol for IoMT. Their protocol utilizes a global blockchain for decentralized identification and registration. In addition, local blockchains managed by fog servers execute group authentication of medical devices. Fog nodes in the same area provide computing and storage resources to a group of medical devices.
In 2024, Harbi et al. [17] proposed a remote user authentication protocol for IoT based on blockchain. They claimed that their protocol is secure against DoS, impersonation, and privileged insider attacks and that it ensures mutual authentication, session key secrecy, and user anonymity. However, their protocol lacks protection against insider, DoS, and stolen verifier attacks, and allows users to be tracked. Therefore, we propose a blockchain-based secure authentication protocol that prevents security attacks, including privileged insider, ephemeral secret leakage, and DoS attacks, while also guaranteeing user anonymity and perfect forward secrecy.

3. Preliminaries

In this section, we provide a brief summary of fuzzy extractors and blockchains. The system model and threat model for fog-enabled IoT environments are introduced afterwards.

3.1. Fuzzy Extractors

Fuzzy extraction is an extensively employed method that outputs a fixed value from an input with noise using a helper string [18]. Accordingly, this technique is adopted to generate security parameters from noisy inputs. The biometric information of users, such as face, fingerprints. and irises is a good example of noisy input, as they are not consistent. For successful reproduction, the Hamming distance between the noisy input and registered biometrics should be under a threshold. A fuzzy extractor consists of two algorithms:
  • G e n ( B i o ) = < σ , τ > : This probabilistic algorithm is used to generate the biometric secret key σ and helper string τ when biometric data B i o are inserted.
  • R e p ( B i o , τ ) = σ : This deterministic algorithm is used to regenerate the original secret key σ when B i o and τ are provided as input. To ensure successful reproduction, the noise mixed in with B i o should be less than the predefined threshold.
Fuzzy extractors can regenerate identical secrets key even when the input value changes by some number of bits, which increases accuracy compared to storing B i o in memory. Fuzzy extractors also require both B i o and τ in key regeneration, which is more secure than storing B i o in memory.

3.2. Blockchain

Blockchain [42,43] is a distributed ledger technology that allows transactions to be stored in blocks linked together to form a chain. Each block contains information from a previous block along with a timestamp and transaction records. Because each block of the chain contains information from the previous block, blocks cannot be changed once they are added. In addition, all nodes share a copy of the ledger through consensus, which prevents centralization and maintains data quality. Through consensus, blockchains can ensure immutability, as all nodes agree that they are in possession an identical ledger. Consensus algorithms such as Proof-of-Work (PoW) and Proof-of-Stake (PoS) are used to ensure that all network participants agree on a single truth. Widely known blockchains such as Bitcoin [44] and Ethereum [45] use PoW and PoS, respectively. In the proposed protocol, we employ blockchain to enable verification of users in a decentralized method, which can overcome the problems of centralized servers. Moreover, using blockchain can guarantee immutability of uploaded user information, ensuring secure authentication. Among the three types of blockchain (public, private, and consortium), we utilize a public blockchain. This guarantees decentralization, scalability, and transparency, as every node can participate in the consensus process. User credentials are uploaded to the blockchain for secure user verification; fog nodes retrieve three private user credentials from the blockchain, while the cloud server retrieves the secret user identity.

3.3. Threat Model

In the proposed protocol, we adopt three adversary models: the Dolev–Yao (DY) model [46], Canetti–Krawczyk (CK) model [47], and extended CK (eCK) model [48]. In the DY model, an adversary A can intercept, insert, eavesdrop, and remove messages transmitted over public channels [49]. In the CK model, A can also obtain ephemeral parameters or the private key of the cloud server.
In the eCK model, A can reveal the long-term secret key in order to impersonate a legitimate user. We also assume that A can steal a user’s smart device and perform power analysis [13] to extract stored parameters. Using the assumptions of the above three models, A can perform the following attacks:
  • An adversary can be disguised as a user, allowing them to be authenticated by other entities. This enables various security attacks using the long-term secret key.
  • An adversary can query the blockchain to obtain the user’s registration information.
  • An adversary can legitimately register and try to acquire the session key of other legitimate users using the collected messages.
  • An adversary can perform several types of security attacks, including stolen verifier, MitM, and privileged insider attacks.

3.4. System Model

The proposed system model consists of three layers: the user layer, fog layer, and cloud layer. The details are shown below, and Figure 1 illustrates the proposed system model.
(1)
User layer U i : In this layer, users with resource-constrained smart devices authenticate with the fog layer and the cloud layer to access data produced by IoT devices. Users must register themselves to blockchain-based fog nodes before authentication.
(2)
Fog layer F N j : Fog nodes deployed in various areas are connected to the public blockchain in this layer. When users register, their encrypted identifications are uploaded to the blockchain network maintained by fog nodes after consensus process. Verifying users is only available by querying the blockchain in the AKA phase. Fog nodes authenticate users using the blockchain instead of relaying the user’s login request message to the cloud server. Unlike cloud or edge nodes, we adopt fog nodes to overcome problems such as network congestion, single points of failure, and insufficient computing and storage resources.
(3)
Cloud layer C S : In this layer, the cloud server is a fully trusted entity which stores and processes data collected by IoT devices. The cloud server can query the blockchain for user identification. After authentication, the cloud server provides IoT-based services to users. The server is assumed to have unlimited storage space and computing power.

4. Overview of Harbi et al.’s Protocol

In 2024, Harbi et al. [17] proposed a remote user authentication protocol based on blockchain for fog-enabled IoT environments. Their protocol consists of the initialization, user registration, and user login and authentication phases. Table 1 states the notation and descriptions.

4.1. Initialization Phase

This phase is performed by the system administrator ( S A ).
Step 1: 
S A selects X and Y, chooses a unique identity I D j , and computes C F j = h ( h ( I D j ) X ) for each fog node.
Step 2: 
S A stores ( I D j , C F j , Y ) in each fog node and ( h ( I D j ) , C F j , Y ) on the cloud server.

4.2. User Registration Phase

All users must register with the blockchain-based fog nodes to access the cloud server for IoT-associated services. The registered user information is uploaded to the blockchain.
Step 1: 
The user U i inputs an identity I D i , password P W i , and random number r i .
Step 2: 
U i calculates M I D i = h ( I D j P W i ) and M P W i = h ( P W i r i ) . Then, U i sends ( M I D i , M P W i ) to a fog node F N j through a secure channel.
Step 3: 
F N j checks the freshness of the received message by querying the blockchain. If it is fresh, F N j computes A i = h ( M I D i Y ) , B i = h ( M P W i Y ) and the user trust token T T i = h ( A i B i ) . Its mapping is then created and uploaded to the blockchain. Afterward, ( T T i , Y ) are sent back to U i via a secure channel.
Step 4: 
U i inputs biometric information B I O i and computes G e n ( B I O i ) = ( σ i , τ i ) , C i = Y h ( P W i r i ) , D i = h ( T T i σ i ) , and E i = r i h ( I D i P W i ) . Finally, U i stores ( T T i , C i , D i , E i , τ i ) .

4.3. User Login and Authentication Phase

In this phase, the user, a fog node, and the cloud server carry out the login and authentication phase. Figure 2 depicts the login and authentication phase of Harbi et al.’s protocol. The detailed steps are provided below.
Step 1: 
U i inputs I D i , P W i , B I O i on a smart device. The user’s smart device computes σ i = R e p ( B I O i , τ i ) , D i * = h ( T T i σ i ) and verifies D i * = ? D i . If it is correct, U i computes r i = E i h ( I D i P W i ) , M I D i = h ( I D i P W i ) , and M P W i = h ( P W i r i ) . Then, U i computes M 1 = ( M I D i M P W i ) , generates a timestamp T 1 , and computes M 2 = h ( M 1 T 1 ) and M 3 = h ( M 2 ) T T i . Finally, U i sends { M 1 , M 2 , M 3 , T 1 } to F N j .
Step 2: 
The F N j receives { M 1 , M 2 , M 3 , T 1 } and verifies the freshness of T 1 . If it is fresh, the F N j computes M 2 * = h ( M 1 T 1 ) and checks M 2 * = ? M 2 . If it is equal, F N j computes T T i * = M 3 h ( M 2 ) and extracts M I D i and M P W i from M 1 to verify them in the blockchain by comparing T T i * = ? T T i from the mapping ( M I D i , M P W i , T T i ) . If U i is verified, U i is authenticated. The F N j then selects r j , computes M 4 = h ( M I D i M P W i r j ) T T i , generates a timestamp T 2 , and computes M 5 = h ( h ( I D j ) C F j T 2 ) r j . Finally, the F N j sends { M 1 , h ( I D j ) , M 4 , M 5 , T 2 } to the cloud server C S .
Step 3: 
When the C S receives { M 1 , h ( I D j ) , M 4 , M 5 , T 2 } from F N j , the C S first verifies the freshness of T 2 . Then, the C S computes r j * = M 5 h ( h ( I D j ) C F j T 2 ) , T T i * = M 4 h ( M 1 r j * ) , and M 4 * = h ( M 1 r j * T T i * ) and checks M 4 * = ? M 4 . If it is equal, the C S authenticates F N j , then selects r C S , computes the session key S K i = h ( M 1 r C S T T i * Y ) , generates a timestamp T 3 , and computes M 6 = h ( M 1 Y T 3 ) r C S and M 7 = h ( S K i M 6 ) . Finally, the C S sends { M 6 , M 7 , T 3 } back to the F N j .
Step 4: 
The F N j checks the freshness of T 3 after receiving { M 6 , M 7 , T 3 } from the C S . Then, the F N j generates a timestamp T 4 , computes M 8 = M 7 T 4 , and sends { M 6 , M 8 , T 3 , T 4 } to the user’s smart device.
Step 5: 
After receiving { M 6 , M 8 , T 3 , T 4 } from the F N j , U i verifies the freshness of T 4 . Then, the user’s smart device computes Y = C i h ( P W i r i ) , r C S * = M 6 h ( M 1 Y T 3 ) , S K i * = h ( M 1 r C S T T i Y ) , M 7 * = h ( S K i * M 6 ) , and M 8 * = M 7 * T 4 and checks M 8 * = ? M 8 . If it is equal, the F N j is authenticated and U i can use S K i for secure communication with the C S .

5. Cryptanalysis of Harbi et al.’s Protocol

In this section, we discuss the security weaknesses of Harbi et al.’s protocol [17] under the DY model and CK model. According to these adversary models, we prove that Harbi et al.’s protocol is vulnerable to insider, stolen verifier, and DoS attacks. We also prove that their protocol does not ensure untraceability of users and has an authentication problem.

5.1. Insider Attack

An adversary A can register with F N j as a legitimate user and authenticate with F N j and C S to collect authentication messages. Then, A can invade the session of another user U i l and compute the session key S K i l of U i l using the collected authentication messages. We show this process as follows.
Step 1: 
A inputs its own I D i , P W i , and B I O i to regenerate σ i , compute D i = h ( T T i σ i ) , and check D i * = ? D i for the login process. Then, A computes M 1 = ( M I D i M P W i ) , M 2 = h ( M 1 T 1 ) , and M 3 = h ( M 2 ) T T i to send an authentication request message { M 1 , M 2 , M 3 , T 1 } . After receiving the message { M 1 , M 2 , M 3 , T 1 } , the fog node sends { M 1 , h ( I D j ) , M 4 , M 5 , T 2 } to the cloud server, which sends { M 6 , M 7 , T 3 } back to the fog node. Finally, the fog node sends { M 6 , M 8 , T 3 , T 4 } to A. Next, A computes the session key S K i = h ( M 1 r C S T T i Y ) and obtains communication messages { M 1 , M 2 , M 3 , T 1 } and { M 6 , M 8 , T 3 , T 4 } during the AKA phase. Moreover, A computes Y = C i h ( P W i r i ) in order to compute the session key of other users.
Step 2: 
A invades the session of U i l and intercepts authentication messages { M 1 l , M 2 l , M 3 l , T 1 l } and { M 6 l , M 8 l , T 3 l , T 4 l } . Then A computes T T i l = M 3 l h ( M 2 l ) and r C S l = M 6 l h ( M 1 l Y T 3 l ) using Y from A’s own authentication phase. Finally, A can compute the session key S K i l of the legitimate user U i l by computing S K i l = h ( M 1 l r C S l T T i l Y ) . Therefore, Harbi et al.’s protocol cannot prevent insider attacks.

5.2. Stolen Verifier Attack

If the verification table of the cloud server { h ( I D j ) , C F j , Y } is leaked to A, then A can compute the user’s session key. The detailed procedure is described below.
Step 1: 
A obtains authentication messages { M 1 , M 2 , M 3 , T 1 } and { M 6 , M 7 , T 3 } by eavesdropping, then calculates T T i = M 3 h ( M 2 ) .
Step 2: 
A computes r C S = M 6 h ( M 1 Y T 3 ) in order to compute S K i = h ( M 1 r C S T T i Y ) .
Therefore, Harbi et al.’s protocol is insecure against stolen verifier attacks.

5.3. Untraceability

Legitimate users send authentication request messages { M 1 , M 2 , M 3 , T 1 } containing M 1 = ( M I D i M P W i ) to fog nodes over public channels. Fog nodes use M I D i and M P W i in the received M 1 to verify users via the mapping ( M I D i , M P W i , T T i ) on the blockchain. Because the values of I D i , P W i , and r i do not change in M I D i = h ( I D i P W i ) and M P W i = h ( P W i r i ) , the user sends an identical M 1 in every authentication message. Therefore, A can track the users by checking the value of M 1 in the login request message. Thus, Harbi et al.’s protocol cannot ensure user untraceability.

5.4. DoS Attack

In this attack, A sends countless authentication request messages to the cloud server via the fog node after obtaining the messages of other users. By performing a DoS attack, A can attempt to prevent legal users from accessing the cloud server by generating large network traffic which can flood the cloud server’s resources. The detailed steps are shown below.
Step 1: 
A obtains { M 1 , M 2 , M 3 , T 1 } from other users and computes T T i = M 3 h ( M 2 ) . Then, A forges M 2 A = h ( M 1 T 1 A ) and M 3 A = h ( M 2 A ) T T i using M 1 . Because the value of M 1 does not change in every session, the forged M 2 A and M 3 A are valid. A then sends multiple authentication request messages { M 1 , M 2 A , M 3 A , T 1 A } to the fog node.
Step 2: 
The fog node receives authentication request messages and checks | T 1 * T 1 A | Δ T . The fog node then proceeds through the user validation process by checking M 2 * = ? M 2 A , T T i * = ? T T i and verifying the mapping ( M I D i , M P W i , T T i ) on the blockchain. As all authentication request messages are forged using legitimate users’ credentials, the fog node cannot discard authentication request messages sent by A. The fog node continues to follow the steps of the protocol, which eventually becomes a heavy load for the fog node. Therefore, Harbi et al.’s protocol cannot resist DoS attacks.

5.5. Invalid Authentication Phase

In the authentication phase, the cloud server authenticates the fog node. When the cloud server receives the message { M 1 , h ( I D j ) , M 4 , M 5 , T 2 } from the fog node, the cloud server computes r j * = M 5 h ( h ( I D j C F j T 2 ) ) and T T i * = M 4 h ( M 1 r j ) . Then, the cloud server calculates M 4 * = h ( M 1 r j T T i * ) and checks M 4 * = ? M 4 to authenticate the fog node. However, the value of M 4 sent by the fog node is calculated differently, as follows: M 4 = h ( M 1 r j ) T T i . The value of M 4 cannot be the same; thus, the fog node cannot be authenticated by the cloud server.

6. Proposed Protocol

We propose a blockchain-based secure authentication protocol for fog-enabled IoT environments to resolve the security problems of Harbi et al.’s protocol. The proposed protocol consists of initialization, user registration, login and AKA phase, and user revocation phases. Figure 3 shows the user registration and AKA phases of the proposed protocol.

6.1. Initialization Phase

The system administrator S A performs this phase by distributing secret keys, fog node identities, and credentials to the fog nodes and cloud server.
Step 1: 
S A selects a private key X C S , a random number x C S , and a shared secret key Y. Then, S A chooses I D j , computes C F j = h ( h ( I D j ) X C S ) , and stores { I D j , C F j , Y } in each fog node.
Step 2: 
Next, S A computes I D j C S = h ( I D j ) h ( X C S x C S ) , C F j C S = C F j h ( x C S h ( I D j ) ) , and Y C S = Y h ( X C S h ( I D j ) C F j ) . Finally, S A stores { I D j C S , C F j C S , Y C S , x C S } in the cloud server and concludes the initialization phase.

6.2. User Registration Phase

Users should register with a fog node to access the data stored in the cloud server. The fog node uploads a block containing registered user information to the blockchain for the AKA phase. Using PoW-based blockchain takes 10 min to generate a block on average, while using PoS-based blockchain takes 64 s [50]. After confirming that the block has been uploaded, user authentication is enabled. Figure 4 shows the user registration phase, and the detailed procedures are described below.
Step 1: 
U i selects an identity I D i and password P W i , then computes M I D i = h ( I D i P W i ) , after which U i sends { M I D i } to the nearest fog node.
Step 2: 
When the F N j receives the message { M I D i } , it first checks whether { M I D i } already exists in the blockchain. If not, the F N j generates α i and H I D i , then computes A i = h ( M I D i α i ) , T T i = h ( A i Y ) , and P I D i = H I D i h ( Y α i ) . The F N j then uploads { M I D i , A i , H I D i } to the blockchain and sends { A i , T T i , P I D i , α i } back to U i .
Step 3: 
U i receives the message { A i , T T i , P I D i , α i } . Then, U i imprints B I O i and computes G e n ( B I O i ) = < σ i , τ i > , M P W i = h ( I D i P W i σ i ) , C i = M I D i A i , D i = M P W i T T i , and E i = h ( T T i σ i ) . Fnally, U i stores { τ i , C i , D i , E i , P I D i , α i } in the memory of the user’s smart device.

6.3. Login and AKA Phase

Users and the cloud server mutually authenticate each other in open channels with the assistance of fog nodes, using the blockchain to securely share a session key. Fog nodes do not participate in key negotiation, but do perform user verification and transmit messages to users and the cloud server. Fog nodes utilize the registered user information on the blockchain to ensure that the uploaded user information is not manipulated and that the user can be authenticated successfully even if some fog nodes fail. In the AKA phase, the identity of a user U i is verified by a nearby fog node F N j by querying the blockchain for user information. After this phase, users can access data stored in the cloud server using the shared session key for secure communication. The proposed protocol’s login and AKA phase proceeds as follows, and is shown in Figure 5.
Step 1: 
U i inputs I D i , P W i , and B I O i . Then, the smart device computes σ i = R e p ( B I O i , τ i ) , M P W i = h ( I D i P W i σ i ) , T T i = M P W i D i , and E i * = h ( T T i σ i ) and checks E i * = ? E i . If it holds, the smart device generates N u , T 1 and computes M I D i = h ( I D i P W i ) , A i = C i M I D i , M 1 = h ( N u M P W i ) h ( T T i A i T 1 ) , and M 2 = h ( h ( N u M P W i ) M I D i P I D i α i T 1 ) . Then, U i sends { M 1 , M 2 , P I D i , α i , T 1 } to F N j .
Step 2: 
When the F N j receives the user’s message { M 1 , M 2 , P I D i , α i , T 1 } , the F N j checks if | T 1 * T 1 | Δ T . If it holds, then the F N j computes H I D i = P I D i h ( Y α i ) and queries H I D i from the blockchain to check whether H I D i exists in the ledger. If it exists, the F N j extracts M I D i and A i according to H I D i . Then, the F N j computes T T i = h ( A i Y ) , h ( N u M P W i ) = M 1 h ( T T i A i T 1 ) , and M 2 * = h ( h ( N u M P W i ) M I D i P I D i α i T 1 ) and checks whether M 2 * = ? M 2 . If it holds, the F N j generates N F and T 2 , then computes M 3 = h ( h ( I D j ) C F j T 2 ) h ( h ( N u M P W i ) N F ) , M 4 = h ( h ( h ( N u M P W i ) N F ) h ( I D j ) C F j T 2 ) , and M 5 = M I D i h ( h ( h ( N u M P W i ) N F ) C F j T 2 ) . Finally, it sends { M 3 , M 4 , M 5 , T 2 } to the C S .
Step 3: 
After the C S receives the message { M 3 , M 4 , M 5 , T 2 } from the F N j , the C S checks if | T 2 * T 2 | Δ T . If it holds, the C S computes h ( I D j ) = I D j C S h ( X C S x C S ) , as the C S can know which fog node sent the message. Then, the C S extracts C F j C S and Y C S according to I D j C S , computes C F j = C F j C S h ( x C S h ( I D j ) ) , Y = Y C S h ( X C S h ( I D j ) C F j ) , h ( h ( N u M P W i ) N F ) = M 3 h ( h ( I D j ) C F j T 2 ) , and M 4 * = h ( h ( h ( N u M P W i ) N F ) h ( I D j ) C F j T 2 ) , and checks whether M 4 * = ? M 4 . If the validity is confirmed, the C S generates N C S and T 3 and computes M I D i = M 5 h ( h ( h ( N u M P W i ) N F ) C F j T 2 ) . Next, the C S and queries A i from the blockchain with M I D i . The C S then computes T T i = h ( A i Y ) , the session key S K i = h ( T T i h ( h ( N u M P W i ) N F ) N C S ) , M 6 = h ( M I D i T T i A i ) N C S , M 7 = h ( N C S C F j Y T 3 ) , and M 8 = h ( S K i M I D i T T i ) . Finally, the C S sends the message { M 6 , M 7 , M 8 , T 3 } to the F N j .
Step 4: 
When the F N j receives the message { M 6 , M 7 , M 8 , T 3 } , the F N j checks | T 3 * T 3 | Δ T . If it holds, the F N j computes N C S = M 6 h ( M I D i T T i A i ) and M 7 * = h ( N C S C F j Y T 3 ) , then checks M 7 * = ? M 7 . If the two values are same, the F N j generates a random number α i n e w and computes P I D i n e w = H I D i h ( Y α i n e w ) , M 9 = ( α i n e w P I D i n e w ) h ( h ( N u M P W i ) T T i T 4 ) , M 10 = h ( h ( N u M P W i ) N F N C S ) h ( P I D i n e w M I D i T T i T 4 ), and M 11 = h ( P I D i n e w α i n e w M 8 T T i T 4 ) . Then, the F N j sends { M 9 , M 10 , M 11 , T 4 } to U i .
Step 5: 
U i checks | T 4 * T 4 | Δ T ? . If it holds, U i computes ( α i n e w P I D i n e w ) = M 9 h ( h ( N u M P W i ) T T i T 4 ) , h ( h ( N u M P W i ) N F N C S ) * = M 10 h ( P I D i n e w M I D i T T i T 4 ) , S K i * = h ( T T i ( h ( h ( N u M P W ) N F ) N C S ) ) * , and M 11 * = h ( P I D i n e w α i n e w M 8 T T i T 4 ) . Then, U i verifies M 11 * = ? M 11 and updates { α i , P I D i } to { α i n e w , P I D i n e w } in their smart device.

6.4. User Device Revocation Phase

The proposed protocol includes a user device revocation phase to issue new parameters in case the user’s device is stolen or lost. This phase proceeds as follows.
Step 1: 
U i inputs their identity I D i o l d and password P W i o l d into a new device and computes M I D i o l d = h ( I D i o l d P W i o l d ) . Then, U i selects a new identity I D i n e w and password P W i n e w and computes M I D i n e w = h ( I D i n e w P W i n e w ) . Finally, U i sends { M I D i o l d , M I D i n e w } to the nearest fog node.
Step 2: 
When the F N j receives the message { M I D i o l d , M I D i n e w } , the F N j first checks for the existence of { M I D i o l d } in the blockchain. Then, the F N j updates { M I D i o l d } to { M I D i n e w } , generates α i n e w and H I D i n e w , and computes A i n e w = h ( M I D i n e w α i n e w ) , T T i n e w = h ( A i n e w Y ) , and P I D i n e w = H I D i n e w h ( Y α i n e w ) . The F N j uploads the updated user credentials { M I D i n e w , A i n e w , H I D i n e w } to the blockchain and sends { A i n e w , T T i n e w , P I D i n e w , α i n e w } back to U i . In future authentications, the F N j queries the updated user credentials for user verification.
Step 3: 
After receiving the message { A i n e w , T T i n e w , P I D i n e w , α i n e w } , U i imprints B I O i and computes G e n ( B I O i ) = < σ i , τ i > , M P W i = h ( I D i n e w P W i n e w σ i ) , C i n e w = M I D i n e w A i n e w , D i n e w = M P W i n e w T T i n e w , and E i n e w = h ( T T i n e w σ i ) . Then, U i stores { τ i , C i n e w , D i n e w , E i n e w , P I D i n e w , α i n e w } in the memory of the user’s smart device.

7. Security Analysis

The security features of the proposed protocol are analyzed using formal and informal methods. BAN logic, the RoR model, and AVISPA are utilized for formal analysis, and informal analyses are also conducted to prove our protocol’s security.

7.1. B A N   L o g i c

The widely known BAN logic [19] is a formal proof for verification of of a protocol’s mutual authentication. We prove that the proposed protocol ensures mutual authentication via BAN logic. Table 2 provides the notation and descriptions.

7.1.1. Rules

The basic rules of BAN logic are listed below.
1. 
Message Meaning Rule (MMR):
N 1 | N 1 K N 2 , N 1 { S 1 } K N 1 | N 2 | S 1
2. 
Nonce Verification Rule (NVR):
N 1 | # ( S 1 ) , N 1 | N 2 | S 1 N 1 | N 2 | S 1
3. 
Jurisdiction Rule (JR):
N 1 | N 2 | S 1 , N 1 | N 2 | S 1 N 1 | S 1
4. 
Belief Rule (BR):
N 1 | ( S 1 , S 2 ) N 1 | S 1
5. 
Freshness Rule (FR):
N 1 | # ( S 1 ) N 1 | # ( S 1 , S 2 )

7.1.2. Goals

In our paper, we define the user as U, the fog node as F N j , and the cloud server as C S . U and C S authenticate each other by establishing a session key S K i . To prove that S K i is shared only between U and C S , the following four goals should be achieved.
Goal 1: 
U | U S K i C S
Goal 2: 
U | C S | U S K i C S
Goal 3: 
C S | U S K i C S
Goal 4: 
C S | U | U S K i C S

7.1.3. Idealized Forms

In the proposed protocol, network participants send four messages { M 1 , M 2 , P I D i , α i , T 1 } , { M 3 , M 4 , M 5 , T 2 } , { M 6 , M 7 , M 8 , T 3 } , and { M 9 , M 10 , M 11 , T 4 } over insecure channels. These messages need to be transformed into idealized forms for BAN logic analysis, as shown below.
Message 1: 
U F N j : { h ( N u M P W i ) } T T i
Message 2: 
F N j C S : { h ( h ( N u M P W i ) N F ) } C F j
Message 3: 
F N j C S : { N C S } C F j
Message 4: 
U F N j : { h ( h ( N u M P W i ) N F N C S ) } T T i

7.1.4. Assumptions

The BAN logic assumptions of the proposed protocol are listed below. The network participants believe that they have received fresh timestamps and are sharing keys for secure communication. The following assumptions are required in order to meet the aforementioned goals.
A1:
F N j | # ( T 1 )
A2:
C S | # ( T 2 )
A3:
F N j | # ( T 3 )
A4:
U | # ( T 4 )
A5:
U | U T T i F N j
A6:
F N j | U T T i F N j
A7:
U | C S ( U S K i C S )
A8:
C S | U ( U S K i C S )
A9:
C S | C S C F j F N j
A10:
F N j | C S C F j F N j

7.1.5. BAN Logic Proof

We prove that the proposed protocol ensures mutual authentication between the network participants using rules, idealized forms, and assumptions. The four goals specified in Section 7.1.2 are achieved in the following steps.
Step 1: 
S 1 can be obtained from M s g 1 .
S 1 : F N j { h ( N u M P W i ) , T 1 } T T i
Step 2: 
S 2 can be obtained by applying M M R to S 1 and A 6 .
S 2 : F N j | U | ( h ( N u M P W i ) , T 1 )
Step 3: 
S 3 can be obtained by applying F R to S 2 and A 1 .
S 3 : F N j | # ( h ( N u M P W i ) , T 1 )
Step 4: 
S 4 can be obtained by applying N V R to S 2 and S 3 .
S 4 : F N j | U | ( h ( N u M P W i ) , T 1 )
Step 5: 
S 5 can be obtained from M s g 2 .
S 5 : C S { h ( h ( N u M P W i ) N F ) , T 2 } C F j
Step 6: 
S 6 can be obtained by applying M M R to S 5 and A 9 .
S 6 : C S | F N j | ( h ( h ( N u M P W i ) N F ) , T 2 )
Step 7: 
S 7 can be obtained by applying F R to S 6 and A 2 .
S 7 : C S | # ( h ( h ( N u M P W i ) N F ) , T 2 )
Step 8: 
S 8 can be obtained by applying N V R to S 6 and S 7 .
S 8 : C S | F N j | ( h ( h ( N u M P W i ) N F ) , T 2 )
Step 9: 
S 9 can be obtained from M s g 3 .
S 9 : F N j { N C S , T 3 } C F j
Step 10: 
S 10 can be obtained by applying M M R to S 9 and A 10 .
S 10 : F N j | F N j | ( N C S , T 3 )
Step 11: 
S 11 can be obtained by applying F R to S 10 and A 3 .
S 11 : F N j | # ( N C S , T 3 )
Step 12: 
S 12 can be obtained by applying N V R to S 10 and S 11 .
S 12 : F N j | C S | ( N C S , T 3 )
Step 13: 
S 13 can be obtained from M s g 4 .
S 13 : U { h ( h ( n u M P W i ) N F N C S ) , T 4 } T T i
Step 14: 
S 14 can be obtained by applying M M R to S 13 and A 5 .
S 14 : U | F N j | ( h ( h ( N u M P W i ) N F N C S ) , T 4 )
Step 15: 
S 15 can be obtained by applying F R using S 14 to A 4 .
S 15 : U | # ( h ( h ( N u M P W i ) N F N C S ) , T 4 )
Step 16: 
S 16 can be obtained by applying N V R to S 14 and S 15 .
S 16 : U | F N j | ( h ( h ( N u M P W i ) N F N C S ) , T 4 )
Step 17: 
S 17 and S 18 can be obtained using S 4 , S 8 , S 12 , and S 16 to achieve Goal 2 and Goal 4. Through the four steps, parts of S K i are passed through F N j , which has been proven to be trustworthy from the past steps. The C S receives ( h ( h ( N u M P W i ) N F ) and U i receives ( h ( h ( N u M P W i ) N F N C S ) to compute S K i = h ( T T i h ( h ( N u M P W i ) N F ) N C S ) .
S 17 : U | C S | U S K i C S   Goal 2
S 18 : C S | U | U S K i C S   Goal 4
 
Step 18: 
S 19 can be obtained by applying J R to S 17 and A 7 , while S 20 can be obtained by applying J R to S 18 and A 8 , as shown below.
S 19 : U | U S K i C S   Goal 1
S 18 : C S | U S K i C S   Goal 3
Therefore, the four BAN logic goals are achieved, proving that the proposed protocol ensures mutual authentication.

7.2. RoR Model

We confirm the session key security of the proposed protocol using the RoR model [20]. The proposed protocol has three participants: a user p U t 1 , fog node p F N j t 2 , and cloud server p C S t 3 . In the RoR model, we assume that the adversary A can use the transmitted public messages to perform attacks through various queries, such as E x e c u t e , C o r r u p t S D , S e n d , and T e s t . We present the details of the security proof following the steps in [51,52]. The queries and their definitions are as follows:
  • E x e c u t e ( P U t 1 , P F N j t 2 , P C S t 3 ) : A can eavesdrop on messages transmitted over the public channels between the three legitimate entities. A can attempt various security attacks based on the obtained messages. The E x e c u t e query is a passive attack.
  • C o r r u p t S D ( P U t 1 ) : A can obtain all stored secret parameters from the smart device of the legitimate user P U t 1 . Thus, the C o r r u p t S D query is an active attack.
  • S e n d ( p t , M s g ) : A can transmit a message to network participants p t and receive a response of the message according to the protocol. The S e n d query has the attributes of an active attack.
  • T e s t ( p t ) : A flips a coin C and receives a random string or a session key. If the session key S K i is fresh, then A obtains C = 1 ; if not, then C = 0 . Otherwise, A obtains a null value (⊥). If A is not able to distinguish the result, then S K i is secure. A can perform T e s t queries as many times as desired.
Theorem 1.
The adversary A attempts to calculate the session key S K i . Thus, we define A d v A as the advantage of A for this model. Here, q h a s h and q s e n d are the number of Hash and Send queries executed by A, respectively, with |Hash| as the range of Hash, while C and s are Zipf’s parameters [53]. Let A d v A be the advantage of A for this model.
A d v A q h a s h 2 | H a s h | + 2 m a x { C · q s e n d s , q s e n d 2 l D }
Proof. 
A performs various attacks in the following games: G n ( n = 0 , 1 , 2 , 3 ) . P r [ S u c c n ] is the probability of A guessing c correctly in G n .
G 0 : In G 0 , A does not perform any queries and has no information about S K i . A can only guess the random bit C.
A d v A = | 2 P r [ S u c c 0 ] 1 | .
G 1 : In G 1 , A performs the E x e c u t e and T e s t queries to verify the obtained session key. A tries to calculate the session key S K i = h ( T T i h ( h ( N u M P W i ) N F ) N C S ) with the obtained public messages. However, A must acquire M P W i , T T i , and the three random nonces N u , N F , and N C S in order to calculate S K i . However, A cannot compute the necessary parameters from the obtained public messages; therefore, A can obtain no advantage from G 1 .
P r [ S u c c 1 ] = P r [ S u c c 0 ]
G 2 : In G 2 , A performs S e n d and H a s h queries to acquire the session key. However, all messages obtained by S e n d queries use the one-way hash function h ( . ) to prevent leakage of any useful information. To compute the session key, A must forge a valid message that collides with the obtained message by using H a s h queries. Hence, utilizing the birthday paradox [54], we can induce the Equation (4).
Proof of Equation (4): Let P i be the event where the i-th H a s h query collides with one of the previous queries. Then, P r [ P i ] i 1 | H a s h | , because the i-th query just needs to be the same as one of the queries. We also let P ( | H a s h | , q h ) denote the possibility of an occurrence of at least one collision when performing q h in | H a s h | . Then, P r [ S u c c 2 ] 1 2 = P ( | H a s h | , q h ) = P 1 + P 2 + · · · + P q h a s h = 0 | H a s h | + 1 | H a s h | + + q h 1 | H a s h | = q h a s h ( q h a s h 1 ) 2 | H a s h | q h a s h 2 2 | H a s h | .
| P r [ S u c c 2 ] P r [ S u c c 1 ] | q h a s h 2 2 | H a s h |
G 3 : Finally, in G 3 , A executes the C o r r u p t S D query to obtain stored parameters { τ i , C i , D i , E i , P I D i , α i } from the smart device of U, where C i = M I D i A i , D i = M P W i T T i , E i = h ( T T i σ i ) , τ i denotes a helper string, P I D i represents a one-time pseudo-identifier, and α i indicates a random nonce. To legitimately send a login request message { M 1 , M 2 , P I D i , α i , T 1 } to the fog node, A must guess the value of I D i , P W i , and B I O i , which is impossible in polynomial time. By Zipf’s law [53], we can derive Equation (5).
Proof of Equation (5): Zipf’s law explains the relationship between frequency and rank in natural language. The frequency of a word is inversely proportionate to its rank in the frequency table, listed in decreasing order. According to the authors of [53], Zipf’s law can be applied to the distribution of passwords in real life. Their CDF-Zipf model is F r = C · r s , where F r is the cumulative frequency of passwords up to rank r, C and where s are constants for the password dataset. Because r = 1 , 2 , 3 , · · · , q s e n d and because A can use the dictionary to guess the password starting from rank 1 and below, or can just guess the password with the length of l D bits, A has the possibility of guessing the correct password P r [ S u c c 3 ] 1 2 = m a x { C · q s e n d s , q s e n d 2 l D } .
| P r [ S u c c 3 ] P r [ S u c c 2 ] | m a x { C · q s e n d s , q s e n d 2 l D }
When the games are all over, A guesses bit c. From the past four games, no information about bit C is leaked to A. Therefore, we can obtain Equation (6).
P r [ S u c c 3 ] = 1 2
Using Equations (2) and (3), we can obtain Equation (7).
1 2 A d v A = | P r [ S u c c 0 ] 1 2 | = | P r [ S u c c 1 ] 1 2 |
Moreover, using (6) and (7) yields Equation (8).
1 2 A d v A = | P r [ S u c c 1 ] P r [ S u c c 3 ] |
Applying the triangular inequality provides the following Equation (9).
1 2 A d v A = | P r [ S u c c 1 ] P r [ S u c c 3 ] | | P r [ S u c c 1 ] P r [ S u c c 2 ] | + | P r [ S u c c 2 ] P r [ S u c c 3 ] | m a x { C · q s e n d s , q s e n d 2 l D }
By multiplying two on both sides of (9), we finally obtain the desired result (10).
A d v A q h a s h 2 | H a s h | + 2 m a x { C · q s e n d s , q s e n d 2 l D } .

7.3. AVISPA Simulation

We simulate the proposed protocol using AVISPA [21,22], which is a security tool that can detect replay and MitM attacks. For AVISPA simulation, we code the High-Level Protocol Specification Language (HLPSL) to simulate the proposed protocol. The HLPSL code is converted to the Intermediate Format (IF), then the IF is put into four back-ends: the On-the-Fly Model Checker (OFMC), Constraint Logic-based Attack Searcher (CL-AtSe), SAT-based Model Checker (SATMC), and Three Automata based on Automatic Approximations for Analysis of Security Protocol (TA4SP). The OFMC and CL-AtSe back-ends are selected because our protocol includes exclusive-OR operations. The protocol is considered to be secure against replay and MitM attacks if a “SAFE” message is obtained in the Output Format (OF).
Below, we provide an explanation of the HLPSL code for the proposed protocol. The three entities U i , F N j , and C S in our protocol are written as r o l e s . Figure 6 presents the HLPSL code of the session and environment roles in our protocol.
Figure 7 shows the role of the user. In state 1, U i generates N u and T 1 , then computes M I D i , A i , and M P W i . Here, s e c r e t ( I D i , P W i , s e c 1 , A ) means I D i and P W i is a secret only known to U i . Then, U i sends { M 1 , M 2 , P I D i , α i , T 1 } to F N j . Later in state 2, U i receives { M 9 , M 10 , M 11 , T 4 } and verifies the session key and M 11 . U i performs r e q u e s t ( C , A , a u t h 3 , N C S ) to accept the freshness of N C S .
The simulation results using the OFMC and CL-AtSe back-ends are provided in Figure 8. The summary indicates that A cannot conduct replay or MitM attacks against the proposed protocol.

7.4. Informal Analysis

Formal analyses such as the RoR model, BAN logic, and AVISPA can verify security vulnerabilities, session key security, and mutual authentication. However, these analyses have difficulties in proving potential security attacks. Thus, we conduct informal analysis to verify the security robustness of the proposed protocol, including physical, stolen verifier, DoS, and desynchronization attacks.

7.4.1. Impersonation Attacks

To impersonate a user, fog node, or cloud server, A needs to create messages to send to other network entities. Specifically, A must calculate valid A i and T T i to impersonate a user. Moreover, A requires Y, h ( I D j ) , and C F j , which are securely stored in the fog node and cloud server, in order to impersonate the fog node or cloud server. Thus, our protocol can prevent impersonation attacks.

7.4.2. Insider Attacks

First, A registers with the F N j as a user and authenticates with the F N j and C S . Afterwards, A can invade other sessions to compute the session keys of other users. However, S K i consists of random numbers which are different in every session. Moreover, a user’s T T i cannot be calculated without A i and Y. Therefore, the proposed protocol can defend against insider attacks.

7.4.3. Off-Line Guessing Attacks

A obtains a user’s smart device and extracts the secret parameters { τ i , C i , D i , E i , H I D i } by power analysis. Afterwards, A tries to guess the correct P W i using the extracted parameters. A needs to either guess M I D i = h ( I D i P W i ) using M I D i = C i A i or guess M P W i = h ( I D i P W i σ i ) using M P W i = D i T T i . However, A i and T T i are values that the fog node sends to the user, and are not stored. Furthermore, to impersonate the legitimate user, A needs M P W i in order to calculate T T i = D i M P W i for the user authentication request message. M P W i contains not only I D i and P W i but also σ i , which makes guessing M P W i computationally infeasible. Moreover, σ i = R e p ( B I O i , τ i ) is the biometric secret key of a user generated by the fuzzy extractor. Hence, the proposed protocol can resist offline guessing attacks.

7.4.4. Physical Attacks

A can perform physical attacks such as side-channel attacks or smart device capture. In this way, A obtains secret parameters { τ i , C i , D i , E i , H I D i } ; however, without T T i and M P W i , impersonating users or cracking S K i is not possible. Moreover, even if A steals the smart device and extracts secret parameters, the legitimate user can receive new parameters by following the procedure in Section 6.4, making the stolen parameters useless. Therefore, the proposed protocol can defend against physical attacks.

7.4.5. Replay and MitM Attacks

In our protocol, random nonces and timestamps are included in every message and change in every session. When network participants receive a message, they check the freshness of the message using timestamps. Moreover, every message is masked with secret parameters that are shared offline. Thus, the proposed protocol can defend against replay and MitM attacks.

7.4.6. DoS Attacks

A can send numerous requests targeting the fog nodes in order to interfere with the login and authentication process. In the proposed protocol, calculating a login request message { M 1 , M 2 , P I D i , α i , T 1 } requires knowledge of the user’s secret parameters, such as M P W i and T T i . If A sends many messages, the fog node can filter the received messages by checking | T 1 * T 1 | Δ T . Even if T 1 is perceived as a valid timestamp, the fog node can calculate M 2 to filter the message. Because M 2 contains secret parameters shared between U i and F N j , A cannot calculate the correct value of M 2 . Hence, the proposed protocol can resist DoS attacks.

7.4.7. Mutual Authentication and Session Key Security

In the proposed protocol, all messages include timestamps T 1 , T 2 , T 3 , and T 4 to determine the freshness of the messages, and network participants validate the integrity of the messages by checking M 2 , M 4 , M 7 , and M 11 . For the security of the session key, we have proved that A cannot calculate a valid session key according to Section 7.4.12 and Section 7.4.13. Hence, the proposed protocol guarantees mutual authentication and session key security.

7.4.8. Untraceability

In the AKA phase of the proposed protocol, the fog node verifies the user by calculating the pseudo-identity of U i , that is, H I D i = P I D i h ( Y α i ) . In every session, the user sends P I D i and α i in the authentication request message { M 1 , M 2 , P I D i , α i , T 1 } to the fog node. In the authentication response message { M 9 , M 10 , M 11 , T 4 } , the fog node sends dynamically updated pseudo-parameters ( α i n e w P I D i n e w ) masked with h ( h ( N u M P W i ) T T i T 4 ) to the user for a future session and to prevent tracking by A. Moreover, even if A intercepts α i and P I D i from the public message, A still cannot compute H I D i , as A does not know the value of Y. Therefore, the proposed protocol guarantees user untraceability.

7.4.9. Desynchronization Attacks

The user sends P I D i and α i to the fog node at the beginning of authentication phase. The fog node then sends P I D i n e w and α i n e w to the user. A can attempt to delay the messages to interrupt authentication, but H I D i can be recovered by any matching P I D i and α i . The fog node can recover H I D i even if the user sends the P I D i and α i again. Thus, the proposed protocol can prevent desynchronization attacks.

7.4.10. Privileged Insider Attacks

A obtains the user registration request message { M I D i } . A also steals the smart device of a legitimate user to perform power analysis to extract stored parameters { τ i , C i , D i , E i , H I D i } . However, A cannot impersonate the user, because A cannot calculate T T i = M P W i D i without knowing the correct I D i , P W i , and σ i . Hence, the proposed protocol can resist privileged insider attacks.

7.4.11. Perfect Forward Secrecy

Suppose that A obtains the private key X C S . In this case, no useful information about the S K i can be derived from X C S . In the proposed protocol, the session key contains three random nonces, N u , N F , and N C S , each created using the three network participants and secret parameters of U i . Thus, the proposed protocol ensures perfect forward secrecy.

7.4.12. Session-Specific Random Number Leakage Attacks

Assume that A obtains three random numbers N u , N F , and N C S along with the public messages. In this case, A cannot compute S K i , as they are unable to calculate T T i = h ( A i Y ) and M P W i = h ( I D i P W i σ i ) . Hence, the proposed protocol can resist session-specific random number leakage attacks.

7.4.13. Stolen Verifier Attacks

Assume that the verification table { I D j C S , C F j C S , Y C S , x C S } of the cloud server is leaked to A. Without knowing the private key X C S , A cannot calculate h ( I D j ) = I D j C S h ( X C S x C S ) , C F j = C F j C S h ( x C S h ( I D j ) ) , and Y = Y C S h ( X C S h ( I D j ) C F j ) to calculate the session key S K i or impersonate as the fog node or cloud server. Therefore, the proposed protocol can prevent stolen verifier attacks.

7.4.14. Privacy Preservation and User Anonymity

A attempts to calculate the real identity I D i of the user U i using public messages. However, all messages are masked by random nonces and secret parameters using hash functions. Moreover, α i and P I D i are random nonces that are renewed every session, and contain no information about the user identity. Without knowledge of Y, it is difficult for A to compute H I D i = P I D i h ( Y α i ) in order to determine which user is requesting authentication. It is also hard for A to decide whether or not two users in different sessions are the same user. Only the fog nodes can verify the user by making queries according to the uploaded user credentials { M I D i , A i , H I D i } in the blockchain, and these queries are not recorded. Therefore, the proposed protocol preserves privacy and ensures user anonymity.

7.4.15. Key Compromise Impersonation (KCI) Attack

A acquires the long-term secret parameters { Y , X C S } . However, A cannot compute valid user authentication request message { M 1 , M 2 , P I D i , α i , T 1 } without the user information M I D i , A i , and T T i . A cannot calculate M I D i = h ( I D i P W i ) without knowing I D i and P W i , and cannot calculate A i = h ( M I D i α i ) without knowing both M I D i and α i . Thus, the proposed protocol can resist KCI attacks.

8. Performance Analysis

We compare the proposed protocol with other studies [17,30,31,32,33,34,35], analyzing the computation and communication costs as well as security and functionality properties. We also conduct simulation using NS-3 considering real-world applications.

8.1. Security Features Comparison

We compare the security and the functionality features of the proposed protocol with other related protocols [17,30,31,32,33,34,35]. We define (SF 1: “Impersonation attack”), (SF 2: “Insider attack”), (SF 3: “Offline guessing attack”), (SF 4: “Stolen user device, smart card”), (SF 5: “Replay attack”), (SF 6: “MitM attack”), (SF 7: “DoS attack”), (SF 8: “Mutual authentication and session key security”), (SF 9: “User untraceability”), (SF 10: “Desynchronization attack”), (SF 11: “Privileged insider attack”), (SF 12: “Forward secrecy”), (SF 13: “Session-specific random number leakage attack”), (SF 14: “Stolen verifier attack”), (SF 15: “User anonymity”), and (SF 16: “Key Compromise Impersonation attack”), respectively. The security features and functionalities are shown in Table 3. Except for the two protocols by Qiao et al. and Tomar et al., which have no parameter update process for SF 10, all features are compared. Moreover, other protocols do not adopt the eCK model and do not have protection against KCI attacks. As shown, the proposed protocol provides more security and functionality features than other related protocols. Therefore, the proposed protocol provides necessary security features for fog-enabled IoT environments.

8.2. Communication Cost Comparison

This section presents an analysis of the communication overhead generated during the authentication phase. According to [31,33], we set the bit sizes of the hash digest, identity, random number, timestamp, PUF response, Chebyshev polynomial, ECC point, and symmetric encryption to 160, 128, 128, 32, 128, 160, 320, and 128 bits, respectively. With this information, the communication costs of the proposed protocol can be calculated. The comparison results of the communication costs of related studies, including the protocol of Harbi et al. [17,30,31,32,33,34,35], are also shown in Table 4.
  • Message 1: The message { M 1 , M 2 , P I D i , α i , T 1 } needs (160 + 160 + 128 + 128 + 32) = 608 bits.
  • Message 2: The message { M 3 , M 4 , M 5 , T 2 } needs (160 + 160 + 160 + 32) = 512 bits.
  • Message 3: The message { M 6 , M 7 , M 8 , T 3 } requires (128 + 160 + 160 + 32) = 480 bits.
  • Message 4: The message { M 9 , M 10 , M 11 , T 4 } requires (256 + 160 + 160 + 32) = 608 bits.
The total communication costs of the proposed protocol are 608 + 512 + 480 + 608 = 2208 bits. The protocols by [30,31,32,33,34] do not utilize blockchain, meaning that the message from the end device needs to be relayed to the central server for authentication. In [35], Tomar et al. use ECC, where the ECC point has a size of 320 bits. In [17], M 1 is repeatedly transmitted for authentication. Therefore, the proposed protocol has lower communication costs than other related protocols, including that of Harbi et al. [17,30,31,32,33,35].

8.3. Computational Cost Comparison

In this section, we compute the computational costs of the proposed protocol in comparison to other related protocols. According to [17,55], we define the hash function (≈0.0023 ms), fuzzy extractor (≈2.226 ms), ECC scalar multiplication (≈2.226 ms), symmetric encryption and decryption (≈0.0046 ms), and ECC addition (≈0.288 ms) as T H , T F , T E M , T S Y M , and T E A , respectively. For PUF operation time (≈0.12 ms), we follow the result from [56] and denote it as T P U F . In [57], the execution time for random number generation is specified as (≈0.539 ms, T R N G ), while [39] states that the operation time for chaotic mapping is one third that of ECC scalar multiplication (≈0.742 ms, T C M ). Table 5 indicates the computational cost of the proposed protocol in comparison to other related protocols. The computational cost of Harbi et al.’s protocol [17] is slightly lower than that of the proposed protocol. However, our proposed protocol provides better security features than that of Harbi et al. Moreover, our proposed protocol is more lightweight compared to other protocols [33,34,35] that use ECC and Chebyshev polynomial. The protocols presented by [30,31,32] use lightweight cryptographic operations, as in our proposed protocol, but also perform more time-consuming operations such as fuzzy extraction and random number generation.

8.4. NS-3 Simulation

We simulated the proposed protocol using the NS-3 open-source discrete-event network simulator [23]. NS-3 can be used to simulate the data flows in a real-world network. With NS-3, we examined the end-to-end delay and throughput of the AKA phase in the proposed protocol. The length of each message was set as follows: { M 1 , M 2 , P I D i , α i , T 1 } : 76 bytes; { M 3 , M 4 , M 5 , T 2 } : 64 bytes; { M 6 , M 7 , M 8 , T 3 } : 60 bytes; { M 9 , M 10 , M 11 , T 4 } : 76 bytes. The number of users was set to 10, 20, 30, 40, and 50. The fog nodes and cloud server consisted of fixed infrastructure that communicates with as many users as possible. We performed the simulation using Ubuntu 16.04 LTS on an Intel Core i5-11400 @ 2.60 GHz CPU with 24.0 GB RAM. The simulation parameters are shown in Table 6.
In the proposed protocol, end-to-end delay and throughput were calculated as follows: end-to-end delay = i = 1 A t A r c v A s n d A t ; throughput = P r c v P s i z e T , where A t , A r c v , A s n d , P r , P s , and T denote the total number of authentication message packets, received time, sent time, total packets received, packet size, and total time, respectively. The simulation results are shown in Figure 9. The results demonstrate a proportionate increase in end-to-end delay and throughput as the number of users increases.

9. Conclusions

In this paper, we have reviewed Harbi et al.’s protocol and proved that their protocol can allow insider, stolen verifier, and DoS attacks. We have also discovered that their protocol cannot ensure user untraceability and has an authentication problem. To address these security problems, we propose a blockchain-based secure authentication protocol for fog-enabled IoT environments. We confirm that the proposed protocol provides security features via AVISPA, the RoR model, and BAN logic. We also confirm by informal analysis that our protocol can resist various security attacks. Finally, we compare the performance of our protocol with related protocols through comparative analysis and conduct simulation for practical deployment using NS-3. Unlike authentication protocols that use ECC, the proposed protocol uses lightweight cryptographic operations; despite this, it can defend against more diverse security attacks. Moreover, the proposed protocol adopts three threat models, namely, the DY model, CK model, and eCK model, demonstrating high robustness against more complex attacks. The results of our performance analysis reveal that the proposed protocol is more suitable for fog-enabled IoT environments than other protocols in terms of both efficiency and security. In future work, we plan to devise a more suitable authentication protocol for fog-enabled IoT environments.

Author Contributions

Conceptualization, T.K.; methodology, T.K. and D.K.; validation, Y.P. (Yohan Park) and Y.P. (Youngho Park); formal analysis, T.K. and D.K.; writing—original draft preparation, T.K.; writing—review and editing, D.K. and Y.P. (Yohan Park); supervision, Y.P. (Yohan Park) and Y.P. (Youngho Park); project administration, Y.P. (Youngho Park); funding acquisition, Y.P. (Yohan Park). All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by a National Research Foundation of Korea (NRF) grant funded by the Korean government (Ministry of Science and ICT) (RS-2024-00450915).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ayaz, M.; Ammad-Uddin, M.; Sharif, Z.; Mansour, A.; Aggoune, E.H.M. Internet-of-Things (IoT)-based smart agriculture: Toward making the fields talk. IEEE Access 2019, 7, 129551–129583. [Google Scholar] [CrossRef]
  2. Sutrala, A.K.; Obaidat, M.S.; Saha, S.; Das, A.K.; Alazab, M.; Park, Y. Authenticated key agreement scheme with user anonymity and untraceability for 5G-enabled softwarized industrial cyber-physical systems. IEEE Trans. Intell. Transp. Syst. 2021, 23, 2316–2330. [Google Scholar] [CrossRef]
  3. Reddi, S.; Rao, P.M.; Saraswathi, P.; Jangirala, S.; Das, A.K.; Jamal, S.S.; Park, Y. Privacy-preserving electronic medical record sharing for IoT-enabled healthcare system using fully homomorphic encryption, IOTA, and masked authenticated messaging. IEEE Trans. Ind. Inform. 2024, 20, 10802–10813. [Google Scholar] [CrossRef]
  4. Botta, A.; De Donato, W.; Persico, V.; Pescapé, A. Integration of cloud computing and internet of things: A survey. Future Gener. Comput. Syst. 2016, 56, 684–700. [Google Scholar] [CrossRef]
  5. Fox, G.C.; Kamburugamuve, S.; Hartman, R.D. Architecture and measured characteristics of a cloud based internet of things. In Proceedings of the International Conference on Collaboration Technologies and Systems (CTS), Denver, CO, USA, 21–25 May 2012; pp. 6–12. [Google Scholar]
  6. Atlam, H.F.; Walters, R.J.; Wills, G.B. Fog computing and the internet of things: A review. Big Data Cogn. Comput. 2018, 2, 10. [Google Scholar] [CrossRef]
  7. Gunawi, H.S.; Hao, M.; Suminto, R.O.; Laksono, A.; Satria, A.D.; Adityatama, J.; Eliazar, K.J. Why does the cloud stop computing? lessons from hundreds of service outages. In Proceedings of the Seventh ACM Symposium on Cloud Computing, Santa Clara, CA, USA, 5–7 October 2016; pp. 1–16. [Google Scholar]
  8. Mouradian, C.; Naboulsi, D.; Yangui, S.; Glitho, R.H.; Morrow, M.J.; Polakos, P.A. A comprehensive survey on fog computing: State-of-the-art and research challenges. IEEE Commun. Surv. Tutor. 2017, 20, 416–464. [Google Scholar] [CrossRef]
  9. Al Faruque, M.A.; Vatanparvar, K. Energy management-as-a-service over fog computing platform. IEEE Internet Things J. 2015, 3, 161–169. [Google Scholar] [CrossRef]
  10. Peter, N. Fog computing and its real time applications. Int. J. Emerg. Technol. Adv. Eng. 2015, 5, 266–269. [Google Scholar]
  11. Zhang, J.; Fang, H.; Zhong, H.; Cui, J.; He, D. Blockchain-assisted privacy-preserving traffic route management scheme for fog-based vehicular ad-hoc networks. IEEE Trans. Netw. Serv. Manag. 2023, 20, 2854–2868. [Google Scholar] [CrossRef]
  12. Kumari, A.; Tanwar, S.; Tyagi, S.; Kumar, N. Fog computing for Healthcare 4.0 environment: Opportunities and challenges. Comput. Electr. Eng. 2018, 72, 1–13. [Google Scholar] [CrossRef]
  13. Kocher, P.; Jaffe, J.; Jun, B. Differential power analysis. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 15–19 August 1999; pp. 388–397. [Google Scholar]
  14. Bicakci, K.; Tavli, B. Denial-of-Service attacks and countermeasures in IEEE 802.11 wireless networks. Comput. Stand. Interfaces 2009, 31, 931–941. [Google Scholar] [CrossRef]
  15. Almadhoun, R.; Kadadha, M.; Alhemeiri, M.; Alshehhi, M.; Salah, K. A User Authentication Scheme of IoT Devices using Blockchain-Enabled Fog Nodes. In Proceedings of the 2018 IEEE/ACS 15th International Conference on Computer Systems and Applications (AICCSA), Aqaba, Jordan, 28 October–1 November 2018; pp. 1–8. [Google Scholar]
  16. Guo, Y.; Zhang, Z.; Guo, Y.; Xiong, P. BSRA: Blockchain-based secure remote authentication scheme for fog-enabled Internet of Things. IEEE Internet Things J. 2023, 11, 3348–3361. [Google Scholar] [CrossRef]
  17. Harbi, Y.; Aliouat, Z.; Harous, S.; Gueroui, A.M. Lightweight blockchain-based remote user authentication for fog-enabled IoT deployment. Comput. Commun. 2024, 221, 90–105. [Google Scholar] [CrossRef]
  18. Dodis, Y.; Reyzin, L.; Smith, A. Fuzzy extractors: How to generate strong keys from biometrics and other noisy data. In Advances in Cryptology-EUROCRYPT 2004, Proceedings of the International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, 2–6 May 2004; Springer: Berlin/Heidelberg, Germany, 2004; pp. 523–540. [Google Scholar]
  19. Burrows, M.; Abadi, M.; Needham, R. A logic of authentication. ACM Trans. Comput. Syst. (TOCS) 1990, 8, 18–36. [Google Scholar] [CrossRef]
  20. Abdalla, M.; Fouque, P.; Pointcheval, D. Password-based authenticated key exchange in the three-party setting. In Public Key Cryptography—PKC 2005, Proceedings of the 8th International Workshop on Theory and Practice in Public Key Cryptography, Les Diablerets, Switzerland, 23–26 January 2005; Lecture Notes in Computer Science (LNCS); Springer: Berlin/Heidelberg, Germany, 2005; pp. 65–84. [Google Scholar]
  21. AIVSPA. Automated Validation of Internet Security Protocols and Applications. Available online: https://avispa-project.org/main (accessed on 24 April 2025).
  22. SPAN: A Security Protocol Animator for AIVSPA. Available online: https://people.irisa.fr/Thomas.Genet/span/ (accessed on 24 April 2025).
  23. Network Simulator 3. Available online: https://www.nsnam.org (accessed on 10 June 2025).
  24. Bonomi, F.; Milito, R.; Zhu, J.; Addepalli, S. Fog computing and its role in the internet of things. In Proceedings of the First Edition of the MCC Workshop on Mobile Cloud Computing, Helsinki, Finland, 17 August 2012; pp. 13–16. [Google Scholar]
  25. Hazra, A.; Rana, P.; Adhikari, M.; Amgoth, T. Fog computing for next-generation internet of things: Fundamental, state-of-the-art and research challenges. Comput. Sci. Rev. 2023, 48, 100549. [Google Scholar] [CrossRef]
  26. Burhan, M.; Alam, H.; Arsalan, A.; Rehman, R.A.; Anwar, M.; Faheem, M.; Ashraf, M. A comprehensive survey on the cooperation of fog computing paradigm-based IoT applications: Layered architecture, real-time security issues, and solutions. IEEE Access 2023, 11, 73303–73329. [Google Scholar] [CrossRef]
  27. Jia, X.; He, D.; Kumar, N.; Choo, K.K.R. Authenticated key agreement scheme for fog-driven IoT healthcare system. Wirel. Netw. 2019, 25, 4737–4750. [Google Scholar] [CrossRef]
  28. Ma, M.; He, D.; Wang, H.; Kumar, N.; Choo, K.K.R. An efficient and provably secure authenticated key agreement protocol for fog-based vehicular ad-hoc networks. IEEE Internet Things J. 2019, 6, 8065–8075. [Google Scholar] [CrossRef]
  29. Eftekhari, S.A.; Nikooghadam, M.; Rafighi, M. Security-enhanced three-party pairwise secret key agreement protocol for fog-based vehicular ad-hoc communications. Veh. Commun. 2021, 28, 100306–100322. [Google Scholar] [CrossRef]
  30. De Smet, R.; Vandervelden, T.; Steenhaut, K.; Braeken, A. Lightweight PUF based authentication scheme for fog architecture. Wirel. Netw. 2021, 27, 947–959. [Google Scholar] [CrossRef]
  31. Saleem, M.A.; Li, X.; Ayub, M.F.; Shamshad, S.; Wu, F.; Abbas, H. An efficient and physically secure privacy-preserving key-agreement protocol for vehicular ad-hoc network. IEEE Trans. Intell. Transp. Syst. 2023, 24, 9940–9951. [Google Scholar] [CrossRef]
  32. Tahir, H.; Mahmood, K.; Ayub, M.F.; Saleem, M.A.; Ferzund, J.; Kumar, N. Lightweight and secure multi-factor authentication scheme in VANETs. IEEE Trans. Veh. Technol. 2023, 72, 14978–14986. [Google Scholar] [CrossRef]
  33. Qiao, H.; Dong, X.; Jiang, Q.; Ma, S.; Liu, C.; Xi, N.; Shen, Y. Anonymous lightweight authenticated key agreement protocol for fog-assisted healthcare IoT system. IEEE Internet Things J. 2023, 10, 16715–16726. [Google Scholar] [CrossRef]
  34. Irshad, A.; Aljaedi, A.; Bassfar, Z.; Jamal, S.S.; Usman, M.; Chaudhry, S.A. FA-SMW: Fog-driven anonymous lightweight access control for smart medical wearables. IEEE Internet Things J. 2024, 12, 4275–4285. [Google Scholar] [CrossRef]
  35. Tomar, A.; Tripathi, S. Blockchain-assisted authentication and key agreement scheme for fog-based smart grid. Clust. Comput. 2022, 25, 451–468. [Google Scholar] [CrossRef]
  36. Subramani, J.; Maria, A.; Rajasekaran, A.S.; Al-Turjman, F.; Gopal, M. Blockchain-based physically secure and privacy-aware anonymous authentication scheme for fog-based vanets. IEEE Access 2022, 11, 17138–17150. [Google Scholar] [CrossRef]
  37. Ravi, B.; Kumar, M.; Hu, Y.C.; Hassan, S.; Kumar, B. Stochastic modeling and performance analysis in balancing load and traffic for vehicular ad hoc networks: A review. Int. J. Netw. Manag. 2023, 33, e2224. [Google Scholar] [CrossRef]
  38. Wei, L.; Cui, J.; Zhong, H.; Bolodurina, I.; Liu, L. A lightweight and conditional privacy-preserving authenticated key agreement scheme with multi-TA model for fog-based VANETs. IEEE Trans. Dependable Secur. Comput. 2021, 20, 422–436. [Google Scholar] [CrossRef]
  39. Tomar, A.; Tripathi, S. A Chebyshev polynomial-based authentication scheme using blockchain technology for fog-based vehicular network. IEEE Trans. Mob. Comput. 2024, 23, 9075–9089. [Google Scholar] [CrossRef]
  40. Subramani, J.; Maria, A.; Sivaraman, A.; Vijayakumar, P.; Alqahtani, F.; Tolba, A. An efficient anonymous authentication scheme for blockchain assisted and fog-enabled smart grid. Comput. Electr. Eng. 2024, 119, 109508–109522. [Google Scholar] [CrossRef]
  41. Alsaeed, N.; Nadeem, F.; Albalwy, F. A scalable and lightweight group authentication framework for Internet of Medical Things using integrated blockchain and fog computing. Future Gener. Comput. Syst. 2024, 151, 162–181. [Google Scholar] [CrossRef]
  42. Son, S.; Lee, J.; Park, Y.; Park, Y.; Das, A.K. Design of blockchain-based lightweight V2I handover authentication protocol for VANET. IEEE Trans. Netw. Sci. Eng. 2022, 9, 1346–1358. [Google Scholar] [CrossRef]
  43. Ryu, J.; Son, S.; Lee, J.; Park, Y.; Park, Y. Design of secure mutual authentication scheme for metaverse environments using blockchain. IEEE Access 2022, 10, 98944–98958. [Google Scholar] [CrossRef]
  44. Nakamoto, S. Bitcoin: A peer-to-peer electronic cash system. Decentralized Bus. Rev. 2008, 21260. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 11 June 2025).
  45. Buterin, V. A Next-Generation Smart Contract and Decentralized Application Platform. Available online: https://ethereum.org/en/whitepaper/ (accessed on 11 June 2025).
  46. Dolev, D.; Yao, A. On the security of public key protocols. IEEE Trans. Inf. Theory 1983, 29, 198–208. [Google Scholar] [CrossRef]
  47. Canetti, R.; Krawczyk, H. Universally composable notions of key exchange and secure channels. In Advances in Cryptology—EUROCRYPT 2002, Proceedings of the International Conference on the Theory and Applications of Cryptographic Techniques, Amsterdam, The Netherlands, 28 April–2 May 2002; Springer: Berlin/Heidelberg, Germany, 2002; pp. 337–351. [Google Scholar]
  48. LaMacchia, B.; Lauter, K.; Mityagin, A. Stronger security of authenticated key exchange. In International Conference on Provable Security, Berlin, Heidelberg, November 2007; Springer: Berlin/Heidelberg, Germany, 2007; pp. 1–16. [Google Scholar]
  49. Wazid, M.; Bagga, P.; Das, A.K.; Shetty, S.; Rodrigues, J.J.; Park, Y. AKM-IoV: Authenticated key management protocol in fog computing-based Internet of vehicles deployment. IEEE Internet Things J. 2019, 6, 8804–8817. [Google Scholar] [CrossRef]
  50. Yang, F.; Zhou, W.; Wu, Q.; Long, R.; Xiong, N.N.; Zhou, M. Delegated proof of stake with downgrade: A secure and efficient blockchain consensus algorithm with downgrade mechanism. IEEE Access 2019, 7, 118541–118555. [Google Scholar] [CrossRef]
  51. Kwon, D.; Son, S.; Kim, M.; Lee, J.; Das, A.K.; Park, Y. A secure self-certified broadcast authentication protocol for intelligent transportation systems in UAV-assisted mobile edge computing environments. IEEE Trans. Intell. Transp. Syst. 2024, 25, 19004–19017. [Google Scholar] [CrossRef]
  52. Yu, S.; Park, Y. A robust authentication protocol for wireless medical sensor networks using blockchain and physically unclonable functions. IEEE Internet Things J. 2022, 9, 20214–20228. [Google Scholar] [CrossRef]
  53. Wang, D.; Cheng, H.; Wang, P.; Huang, X.; Jian, G. Zipf’s law in passwords. IEEE Trans. Inf. Forensics Secur. 2017, 12, 2776–2791. [Google Scholar] [CrossRef]
  54. Boyko, V.; MacKenzie, P.; Patel, S. Provably secure password-authenticated key exchange using Diffie-Hellman. In Proceedings of the International Conference on the Theory and Applications of Cryptographic Techniques, Bruges, Belgium, 14–18 May 2000; pp. 156–171. [Google Scholar]
  55. Harbi, Y.; Aliouat, Z.; Refoufi, A.; Harous, S.; Bentaleb, A. Enhanced authentication and key management scheme for securing data transmission in the internet of things. Ad Hoc Netw. 2019, 94, 101948–101961. [Google Scholar] [CrossRef]
  56. Gope, P. PMAKE: Privacy-aware multi-factor authenticated key establishment scheme for advance metering infrastructure in smart grid. Comput. Commun. 2020, 152, 338–344. [Google Scholar] [CrossRef]
  57. Kilinc, H.H.; Yanik, T. A survey of SIP authentication and key agreement schemes. IEEE Commun. Surv. Tutor. 2013, 16, 1005–1023. [Google Scholar] [CrossRef]
Figure 1. Proposed system model.
Figure 1. Proposed system model.
Mathematics 13 02142 g001
Figure 2. Summary of the login and authentication phase of Harbi et al.’s protocol [17].
Figure 2. Summary of the login and authentication phase of Harbi et al.’s protocol [17].
Mathematics 13 02142 g002
Figure 3. Flow of the proposed protocol.
Figure 3. Flow of the proposed protocol.
Mathematics 13 02142 g003
Figure 4. User registration phase.
Figure 4. User registration phase.
Mathematics 13 02142 g004
Figure 5. Login and AKA phase.
Figure 5. Login and AKA phase.
Mathematics 13 02142 g005
Figure 6. HLPSL code of the session, environment, and goals.
Figure 6. HLPSL code of the session, environment, and goals.
Mathematics 13 02142 g006
Figure 7. HLPSL code of the user.
Figure 7. HLPSL code of the user.
Mathematics 13 02142 g007
Figure 8. AVISPA simulation results.
Figure 8. AVISPA simulation results.
Mathematics 13 02142 g008
Figure 9. Throughput and end-to-end delay of our NS-3 simulation.
Figure 9. Throughput and end-to-end delay of our NS-3 simulation.
Mathematics 13 02142 g009
Table 1. Notation and descriptions.
Table 1. Notation and descriptions.
NotationDescription
S A System administrator
C S Cloud server
F N j Fog node
U i User
XPrivate key of C S
YShared secret key between F N and C S
I D j Identity of F N j
I D i Identity of U i
C F j Credential of F N j
T T i Trust token of U i
r k , N k , α k Random number
H I D i Pseudo identity of U i
P I D i Temporary pseudo identity of U i
h ( ) Hash function
G e n ( ) , R e p ( ) Fuzzy extractor functions
σ i Biometric secret key of U i
τ i Helper string of U i
T n Timestamps
Δ T Maximum transmission delay
S K i Session key
, Exclusive-OR and concatenation operators
Table 2. BAN logic notation.
Table 2. BAN logic notation.
NotationDescription
N 1 , N 2 Principals
S 1 , S 2 Statements
N 1 | S 1 N 1 believes S 1
N 1 | S 1 N 1 once said  S 1
N 1 S 1 N 1 controls S 1
N 1 S 1 N 1 receives S 1
# S 1 S 1 is fresh
{ S 1 } K S 1 is encrypted with K
N 1 K N 2 N 1 and N 2 have shared key K
Table 3. Comparison of security and functionality features.
Table 3. Comparison of security and functionality features.
FeaturesSmet
et al. [30]
Saleem
et al. [31]
Tahir
et al. [32]
Qiao
et al. [33]
Irshad
et al. [34]
Tomar
et al. [35]
Harbi
et al. [17]
Proposed
SF 1×××
SF 2×××
SF 3×
SF 4×××
SF 5××
SF 6×
SF 7××××
SF 8×
SF 9××××
SF 10×
SF 11×
SF 12××
SF 13×××
SF 14××
SF 15××
SF 16×××××
⃝: “Provided security or functionality feature”; ×: “not provided security or functionality feature”; −: “Not considered”.
Table 4. Comparison of communication costs between the proposed protocol and related works.
Table 4. Comparison of communication costs between the proposed protocol and related works.
ProtocolsTotal Costs (bits)Messages
Smet et al. [30]48008
Saleem et al. [31]35524
Tahir et al. [32]26564
Qiao et al. [33]37444
Irshad et al. [34]46404
Tomar et al. [35]41924
Harbi et al. [17]22404
Proposed22084
Table 5. Comparison of computational costs.
Table 5. Comparison of computational costs.
ProtocolEnd DeviceInfrastructureTotal Costs (ms)
Smet et al. [30] 4 T S Y M + 2 T P U F + 1 T F 10 T S Y M + 2 T P U F + 2 T F
+ 12 T H + 1 T R N G + 27 T H + 2 T R N G 8.9291
Saleem et al. [31] 1 T S Y M + 1 T P U F + 2 T F 2 T S Y M + 1 T P U F + 1 T F
+ 6 T H + 1 T R N G + 10 T H + 2 T R N G 8.581
Tahir et al. [32] 1 T F + 3 T H + 2 T R N G 1 T S Y M + 10 T H + 3 T R N G 4.9555
Qiao et al. [33] 2 T C M + 7 T H + 1 T R N G 6 T C M + 4 T S Y M
+ 17 T H + 4 T R N G 8.7046
Irshad et al. [34] 2 T C M + 1 T S Y M 6 T C M + 6 T S Y M
+ 8 T H + 1 T R N G 16 T H + 5 T R N G 9.2574
Tomar et al. [35] 4 T E M + 7 T H + 1 T R N G 13 T E M + 4 T E A
+ 15 T H + 2 T R N G 39.6248
Harbi et al. [17] 1 T F + 8 T H 11 T H + 2 T R N G 3.3477
Proposed 1 T F + 11 T H + 1 T R N G 27 T H + 2 T R N G 3.9304
Table 6. Parameters for the NS-3 simulation.
Table 6. Parameters for the NS-3 simulation.
Simulation ParametersDescription
RAM specificationSamsung DDR4 2666 MHz 24.0 GB
Operating systemsUbuntu 16.04 LTS
CPU specificationIntel Core i5-11400 @ 2.60 GHz
NS-3 version3.29
Mobility modelRandomDirection2dMobilityModel
ConstantPositionMobilityModel
Propagation loss modelTwoRayGroundPropagationLossModel
Routing protocolAd-hoc On-demand Distance Vector
Network802.11ac
Simulation area500 × 500 m2
Simulation time500 s
Number of users10, 20, 30, 40, 50
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kim, T.; Kwon, D.; Park, Y.; Park, Y. Blockchain-Based Secure Authentication Protocol for Fog-Enabled IoT Environments. Mathematics 2025, 13, 2142. https://doi.org/10.3390/math13132142

AMA Style

Kim T, Kwon D, Park Y, Park Y. Blockchain-Based Secure Authentication Protocol for Fog-Enabled IoT Environments. Mathematics. 2025; 13(13):2142. https://doi.org/10.3390/math13132142

Chicago/Turabian Style

Kim, Taehun, Deokkyu Kwon, Yohan Park, and Youngho Park. 2025. "Blockchain-Based Secure Authentication Protocol for Fog-Enabled IoT Environments" Mathematics 13, no. 13: 2142. https://doi.org/10.3390/math13132142

APA Style

Kim, T., Kwon, D., Park, Y., & Park, Y. (2025). Blockchain-Based Secure Authentication Protocol for Fog-Enabled IoT Environments. Mathematics, 13(13), 2142. https://doi.org/10.3390/math13132142

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop