1. Introduction
Internet of Underwater Things (IoUT) sensor networks [
1] enable agencies to monitor underwater spaces to explore resources including gas and gold; measure water temperature; observe fish and oil or gas pipelines; and convey information pertaining to a tsunami, water contamination or other natural disasters [
2].
IoUT typically transmit data as sound variations [
3]. However, acoustic signals (1500 ms
) have long propagation delays [
3] and high bit error rates. Consequently, underwater communication channels result in low-quality transmission of data. In addition, IoUT devices are deployed in hostile environments and remain unattended, making underwater communication vulnerable to various malicious attacks [
4]. Other challenges arising from underwater deployment include dealing with variable water currents, batteries that are difficult to recharge or replace, limited memory, and low bandwidth of devices. These factors in IoUT networks result in an extra barrier to develop a secured routing protocol to collect data from underwater IoT sensors [
5].
Various routing architectures and protocols including hierarchical (vertical) [
6,
7] flat (horizontal) [
8], location based [
9], multipath routing [
10], query based [
11], and context aware [
12] have been deployed in underwater IoT networks to transmit sensed data to a base station on the surface [
13].
The network topology in hierarchical routing is divided into several layers resulting in a compact routing table enabling scalability required for large scale underwater IoT monitoring. Typically, a node with higher energy is nominated as a cluster head (CH) and other nodes with lower energy sense data. The CH’s role is to aggregate data and forward the data to the next level. The CH is changed over time due to battery depletion caused by the computational load of aggregating and transmitting data. Further, privacy within a cluster is at risk if the cluster head is compromised by malicious attacks. Therefore, the cluster head needs a mechanism to protect and maintain member nodes’ security and privacy.
A standard protocol in sensor networks known as proactive routing follows a static route but is unsuitable for IoUT devices that change their location with ocean currents [
14]. In contrast, reactive routing finds a path on demand by flooding the network with route request messages. Cluster-based reactive routing can be contemplated for large scale mobile underwater sensor networks to address the scalability issue but has high power consumption due to the need to infer the path before forwarding data.
To address IoUT routing issues, we present a lightweight, reactive protocol for hierarchical IoUT networks that require fewer control messages to infer routing the packet forwarding path than other reactive protocols. In this routing mechanism, the cluster head uses a Bloom filter to preserve the privacy of the member node. A Bloom filter contains multiple pseudo-identifiers generated from a node’s real identifier using different mathematical hash operations. As a result, the real identity stored in the Bloom filter is hidden from malicious nodes. In a routing protocol, control packets play significant roles in ensuring a node’s security and privacy. Nodes from the same manufacturers can utilize symmetric key cryptography to save energy while exchanging control packets. Symmetric key encryption uses the same key to encrypt the plaintext and decrypt the ciphertext. Nodes from different manufacturers need a key exchanging algorithm [
15] to communicate between them. The cryptographic hash function that maps data of arbitrary size to a fixed size of code is applied to perform authentication between nodes.
However, the next stage, after collecting IoUT data via a lightweight routing mechanism, is to store and process IoUT data securely. For this purpose, most IoUT architectures are comprised of interconnected underwater IoT devices that transmit data through perception, network, and application layers [
16] on the surface, to a remote central, often Cloud-based, server to analyze and store data generated by IoUT devices [
12,
17,
18,
19]. However, a centralized IoT architecture can be paralyzed by a Denial of Service (DoS) or Ransomware attack because the central server represents a single point of failure and performance bottleneck. To address this issue, a distributed peer-to-peer wireless sensor network has been suggested to store and process IoUT data [
19,
20]. However, security and privacy are challenged with a distributed peer-to-peer network while processing and sharing IoUT data.
Recently, Blockchain (BC) leveraged distributed, decentralized peer-to-peer networks [
8] have emerged to enable underwater IoT data to be stored securely and inexpensively without relying on any intermediary trusted authorities [
21] while ensuring privacy. Entities in the Blockchain network participate in processing and validating IoUT data prior to confirming the inclusion of IoUT data to the Blockchain. This process, called a consensus mechanism, substitutes the needs of third-party involvement to process IoUT data. The Consensus mechanism in the Blockchain prevents fraudulent activities and ensure data immutability, transparency, and operational resilience of the Blockchain ledger. Blockchain leverages public key infrastructure (PKI) to authenticate, authorize entities, and encrypt records in peer-to-peer networks. Two entities on a Blockchain network can independently communicate without the aid of intermediaries. The basic data unit of the Blockchain is called a transaction, and several transactions are organized into a Block. Every timestamped Block’s header contains a hash code of its immediate, previously confirmed Block. This creates a sequential linkage between data Blocks on the Blockchain, which confirms the irreversibility and ensures that data is tamper-proof.
From the above point of view, Blockchains can facilitate decentralized storage for recording IoUT data and secure processing and sharing IoUT data with different entities. Blockchain technologies have been promoted in IoUT applications that require decentralized access control, storage, and distributed trust [
19]. For instance, decentralized Blockchain-based IoUT architecture can be applied for the storage of data generated by many heterogeneous underwater IoT devices deployed at different places, and authenticating software update confirmation for a wide range of marine IoT devices. Further, the consumer or customer often needs to purchase different services such as software update, antivirus, anomaly detection software from a single third party in an IoUT network. In these kinds of applications, the customer needs to trust a single party’s solution blindly but the QoS (quality of service) for customers cannot always be guaranteed with a centralized IoUT architecture. The Blockchain technology can be adopted to enhance QoS for these kinds of IoUT applications. However, current Blockchain technology is not computationally efficient for handling IoUT Big data. Multiple nodes in the Blockchain contain a replica of the complete ledger. This distributed feature of the Blockchain demands high storage, and the consensus mechanism, which is the core component of the Blockchain, cannot process transactions faster than a traditional centralized IoUT architecture [
19]. The pros and cons of conventional IoUT architecture and Blockchain IoUT architecture are presented in
Table 1.
In this article, we merge a customized lightweight Blockchain with an underwater IoT network to provide interested stakeholders with various secure marine services, including secure storage, sharing, and trading platform for IoUT monitoring data. The architecture advanced here implements the Blockchain at the Cloud to accommodate the high computing and storage required for this technology. The framework facilitates aggregating continuous data, indexing, and handling vast amounts of IoUT data while maintaining privacy and security. We devised a lightweight consensus mechanism that is utilized to validate the processing and analysis of IoUT data. A smart Gateway Agent is envisaged to receive IoUT data from underwater monitoring sensors and insert them into Blockchain.
Our contribution includes the following design elements:
The hierarchical IoUT monitoring topology consists of underwater IoT devices at different levels, Gateway Agent in a Fog layer, and Blockchain in the Cloud layer.
The secure and lightweight routing protocol transfers the underwater IoT data to a lightweight Blockchain in the Cloud.
A lightweight consensus mechanism is proposed to process transactions in the Blockchain. The consensus mechanism selects a group of Miner nodes using the TOPSIS multi-criteria analysis method. Two use cases called IoUT Data Block Inclusion and IoUT Outcome Block Inclusion are investigated using the consensus mechanism.
The related research is described in
Section 2 before advancing solutions in
Section 3. The performance of the proposed approach is discussed in
Section 4 before the concluding remark in
Section 5.
3. Hierarchical Architecture for Underwater IoUT Monitoring
We present an end-to-end framework that handles the collection, processing, and storage of IoUT data. The architecture, as illustrated in
Figure 1 for monitoring generic IoUT applications, consists of three layers: Internet of Things layer, Fog layer (comprising one or more levels), and Cloud layer. The functional flow diagram of the framework is depicted in
Figure 2. The top, middle, and bottom parts of
Figure 2 describe the operation of the Internet of Things, Gateway Agent in the Fog, and Blockchain in the Cloud, respectively. The smart Gateway node is deployed in the Fog layer. The Cloud layer contains a distributed Blockchain that consists of varying Cloud service providers. In this section, we describe the hierarchical routing mechanism that forwards IoUT data to the surface nodes. The IoUT devices are deployed at different levels in the underwater environment.
3.1. Internet of Things Layer
In this layer, IoUT devices are organized into different levels of the underwater monitoring region, forming a grid network. Each block of the gird contains a cluster head, and members of that cluster are sensors broadcasting data within a specific range. The IoUT device with higher processing power, memory, and stability is normally nominated as the cluster head. The following assumptions are made to devise the secure routing in this layer:
Cluster head coverage: A cluster head’s range can cover its immediate top, bottom, left, and right rectangular area marked in the yellow shaded cells at the lower end of
Figure 1. A member node’s range is limited to its cluster. The monitoring region is vertically divided into different levels (e.g., the level close to the ground (or base) is 1, the next one is 2, and so on). The relative position of each IoUT device (represented as a dark shaded circle in
Figure 1) is determined by the level number (
L) of its associated cluster head (represented by a red shaded circle in
Figure 1). The cluster head’s level is higher than its member. If the cluster head level is
L, the member nodes’ level is
(for instance, if cluster head’s level is 4, every member node’s level under this cluster head is 3).
Key management: In this protocol, every node uses a common symmetric key, and an asymmetric key (public and private key pairs) for the communication. Every IoUT device obtains the common symmetric key (
) and the asymmetric key (private key (
) and public key (
)) inserted into the node’s hardware by their manufacturers. A manufacturer inserts a similar symmetric key and asymmetric key for all its IoUT devices. The public key of each IoUT device is stored on the Cloud Blockchain. The IoUT devices from various manufacturers need to register to the smart Gateway Agent placed in the Fog layer to join in the underwater monitoring. The Gateway Agent verifies the registered IoUT devices by retrieving their public keys from the Blockchain. Later, the smart Gateway Agent regularly obtains the updated keys from the Blockchain and distributes those keys among IoUT nodes of the monitoring region. Here, every node’s security key can be periodically updated through Blockchain, according to Lee [
55].
Nodes’ privacy: Cluster head and member IoUT devices are mobile and can change their levels. Nodes do not utilize their real identifier for performing communications with other nodes. Cluster head and member nodes use a shadow identity (
) with their level to preserve privacy. The cluster head uses a Bloom filter to keep track of its member IoUT devices. A Bloom filter is a data structure designed to locate or identify the presence of an element in a set rapidly and memory-efficiently. Several hash functions such as MurmurHash3 [
56], cityhash [
57], or fnvhash can be used to index the hash function in the Bloom filter. For example, the index function for a Bloom filter can be defined as
where
is the shadow identifier of an IoUT device,
is either MurmurHash3 or cityhash function, and
m is the size of the Bloom filter.
A Bloom filter is depicted in
Figure 3. Suppose the cluster head has two member nodes (identifier 10 and 20, respectively) to be recorded in its Bloom filter. The Fnvhash and MurmurHash of node
10 and 20 are 13 and 14, and 10 and 9, respectively. For node identifier 10, indices 13 and 14 contain 1 (color-marked) and, for node identifier 20, indices 9 and 10 hold 1 (color-marked). The cluster head generates an index from a node
using FnvHash and MurmurHash. If the respective indexes hold 1 in the Bloom filter, the node is a member of that cluster. The benefit of using the Bloom filter is that even If an attacker compromises a cluster head, the identity of the member nodes is not disclosed to the attacker.
3.1.1. Data Forwarding Phase
The first step of forwarding data from the source node to destination involves a node’s participation in a cluster. A new node needs to send a request control message to a cluster head to join the cluster. The request control message contains the manufacturer’s code, residual energy (
), and signature generated by the private key of the node. If the cluster head and the potential member node are produced from the same manufacturer, the cluster head sends an encrypted reply message using the common symmetric key (
). Otherwise, the cluster head asks the Gateway to provide it with the public key of the member node’s manufacturer. The cluster head verifies the member node’s signature using this public key. The control message containing a reply holds a data encryption key, identifier(
), and level number (
l) for the member node for further communication with the cluster head. This process is illustrated in flow diagram depicted in
Figure 4.
The cluster head generates data encryption key as follows: If the cluster head and the member node are from the same manufacturers, is encrypted using the common symmetric key .
If the cluster head and the member node are from the different manufacturers, they need to use the Diffie-Hellman Key Exchange algorithm to exchange data encryption keys. Similarly, the cluster head gets a data encryption key from the associated smart Gateway Agent for a certain period of communication.
The packet forwarding method is described below. A node transmits its sensed data to the associated cluster header. The format of the data packet is illustrated in
Table 3. The data packet has two parts, namely the header containing the timestamp (
t), node’s level number (
l), identifier(
), residual energy (
), and
as a signature; and body containing
. The cluster head produces
to verify the packet’s header information such as level (
l), identifier, and data contents. If the verification process is successful, the cluster head includes the data into its forwarding packet pool. The cluster head forms a big data packet by taking a certain amount of data from the forwarding packet pool. The cluster head encrypts data using a data encryption key (
) given by the Gateway Agent to which the cluster head is associated. The cluster head broadcasts this aggregated data packet throughout its range (marked by yellow rectangular shape in
Figure 1). The member nodes within the range of this cluster head also receive the aggregated data packet. However, only the cluster heads with a level higher than that of the sending cluster head’s level forward the aggregated data packet. Other nodes whose level is equal or lower than the sending node’s level discard the packet. The new forwarding cluster head updates the level field by inserting its level before broadcasting the packet further throughout its range. In this forwarding process, only cluster heads (more than one cluster heads at the same level) participate in forwarding a data packet to the destination without the need to exchange any control messages between the sending and forwarding cluster head.
For example, the level of the cluster head at ground level is 1; the level number of its member nodes is 0. The cluster head of its immediate upper level is 2, and the member nodes’ level of this cluster head is 1, which is equal to the level of the immediate lower level cluster head. Now, a cluster head at ground level broadcasts packets throughout the range. The cluster heads that exist at level 2 and to the right and left of the sender cluster head will receive the aggregated packet. The cluster head at level 2 will forward the packet as its level is greater than the sender cluster head (which is at ground level). Other cluster heads and normal nodes discard the packet as their level does not permit sending the data packet. All the cluster heads at level 2 wait for a period that is inversely proportionate to their energy after receiving the aggregated packets (
,
is random number needed to make each node’s waiting time different in case some of them have the same residual energy). The most competent cluster heads at level 2 forward the packets. Other cluster heads overhear the same aggregated packet and discard their copy. The forwarding cluster head will send an ACK control message to the sender cluster head. If the sender cluster head does not receive an ACK within a certain period, the sender will reduce the level of the packet and broadcast the packet again. As a result, other nodes might participate in forwarding the packet. This data gathering method and aggregated data packet forwarding are illustrated in Algorithms 1 and 2. Level-based routing mechanism ensures the involvement of small numbers of IoUT devices in forwarding a data packet without exchanging control messages. However, few control messages are periodically required to exchange security keys among the IoUT devices, the Gateway Agent, and Blockchain nodes.
Algorithm 1: Data Gathering by Cluster Head. |
|
Algorithm 2: Data Forwarding Algorithm. |
|
3.1.2. Cluster Head Selection
The member nodes under a cluster head include their residual energy every time they send a data packet to the cluster head. The cluster head needs to maintain a database to keep records for its members’ residual energy and periodically updates its database. If the current cluster head’s residual energy is below the threshold energy or if it leaves the current cluster, the current cluster head selects a member node as a new cluster head considering residual energy and link stability. The current cluster head informs the Gateway Agent about the next cluster head. The current cluster head shares the Bloom filter containing the list of the member nodes with the newly nominated cluster head (the next cluster head), and the newly nominated cluster head increases its level by one after receiving approval from the Gateway Agent.
3.2. The Gateway Agent on the Fog Layer
IoUT devices cannot support high processing and memory required for the Blockchain. Further, IoUT devices cannot be directly connected to the Blockchain because the current Blockchain technology cannot process IoUT data in real-time. The Gateway Agent service has been suggested to bridge IoUT devices and Blockchain. The Gateway Agent needs to be placed at the proximity of IoUT devices to sense, temporarily store, and process IoUT data before permanently adding the data into Blockchain. In this architecture, the smart Gateway Agent is placed at the Fog layer that is close to surface nodes of the underwater network. The reason is IoUT devices require a coordination node that is closer to them to manage the Blockchain on their behalf. The Fog has been called an extension of Cloud to facilitate the computing capabilities to the bottom/edge of the network to provide faster communication, storage, and software services to the lower end devices [
58]. Some computing resources, including storage and network services, have already been available on network devices such as a router, switch, and base station that are involved in routing the data produced from end devices. Further computing resources might be augmented to these devices to facilitate computing closer to the user’s devices. Fog improves the latency, quality of service, and quality of experience over Cloud because of its proximity to user’s devices.
The smart Gateway Agent in the architecture connects IoUT devices with the Blockchain through Base Station, as depicted in
Figure 1. A Software Agent (SA) executed on the Gateway Agent depicted in
Figure 5 gathers data from different cluster heads and makes Blocks for the consumers/customers who are interested in purchasing the IoUT data. The Gateway Agent coordinates and manages encryption keys for the Blockchain and IoUT devices. The Gateway Agent in the Fog does not directly take part in selecting a cluster head. Instead, the Gateway Agent provides a cluster head with a data encryption key. The Gateway Agent performs the role of certifying and approving the cluster head through Blockchain. The elected cluster head certifies its members.
Further, the Gateway Agent executes the selective Miner consensus protocol to reduce energy consumption in the Blockchain network. A small set of Miners are randomly selected with Proof of Stake (PoS) to validate the Block. The votes in favor of a Block are collected from the Miners selected using TOPSIS described in
Section 3.3.3. If the majority of Miners approve the Block, the Block is confirmed in the Blockchain. The small set of Miners equally shares the mining fee for verifying the Block in the Blockchain. In addition, the Gateway Agent also maintains a Bloom filter to record IoUT devices’ identities and separates benign and malicious Miners.
3.3. Blockchain on the Cloud Layer
In this section, we first discuss the motivation of using Cloud Blockchain to tackle IoUT data. Later, a customized Blockchain to be executed on the Cloud layer is described. The Proof of Stake (PoS) [
59] is one of the more efficient consensus mechanisms. With PoS, any Miner can participate in processing Blocks by locking a certain amount of digital coin to the system. We modified this approach by nominating a set of healthy Miners using the TOPSIS method. Further, we present two use cases where the modified PoS can be applied to process IoUT in the Cloud Blockchain efficiently.
IoUT devices come with various properties such as different manufacturers, security protocols, and power and memory capacities. The integration of heterogeneous IoUT data and the maintenance of updated security protocols for IoUT devices are challenging in the conventional IoUT infrastructure [
60]. Further, data generated from different IoUT devices are required to share with multiple stakeholders who are being operated by different legal rules and regulations. The cross border sharing of IoUT data poses the risk of malicious attacks and private information from being compromised. The current centralized architectures have proven not to be so efficient to protect data and disseminate data securely [
61] among different stakeholders.
The Blockchain structure can ensure integrity, confidentiality, availability, trust, anonymity, authentication, authorization, user control, non-repudiation, and privacy for the user’s record [
62]. To be more precise, every transaction in Blockchain contains the user’s signature, and Blockchain technology allows others to verify the legitimacy of the user’s record. Hence, data provenance is strictly maintained in the Blockchain. Multiple nodes store the complete ledger in a decentralized fashion, which ensures a reliable and tamper-proof storage system. These features of Blockchain technologies have motivated researchers to utilize it to form a secure connection between heterogeneous IoUT devices.
However, the adoption of Blockchain in IoUT needs to address the massive power and memory cost, poor scalability, and legislative compliance issue pertaining to this technology. Blockchain provides IoUT with higher security compromising computation and storage. IoUT devices are power and memory constraint and cannot adopt the Blockchain [
63].
The Cloud has been utilized to undertake the high processing and storage requirements for IoUT devices. However, the users need to trust a third-party Cloud service provider that cannot provide them with guaranteed accountability and traceability of their data [
64]. This problem can be solved if the Cloud service providers formed a peer-to-peer network and adopt Blockchain technology on that network.
In the framework, we assume that the Cloud service providers support the considerable storage and processing power required for adopting the customized Blockchain. Unlike traditional Cloud services, the customer does not need to trust the Blockchain-based Cloud service provider. Further, public nodes such as computers or smartphones can also participate in validating Blocks.
The components of a standard Blockchain (used in Bitcoin) are described in
Figure 6 before explaining the customized Blockchain in the next section.
The Blockchain operates on a peer-to-peer network depicted in
Figure 6a consisting of three kinds of nodes: half node, general node, and Miner nodes.
The half node and general node produce transactions formatted as in
Figure 6b and broadcast throughout the peer-to-peer network
The Miner nodes collect transactions and pack them into a Merkle tree to form a Block. Each Miner repeatedly inputs the Block into a cryptographic hash function incrementing the nonce field by one until it comes up with a target hash code for the Block. This process depicted in
Figure 6c is called Proof of Work. Only one Miner that can first publish the Proof of Work for the Block receives rewards.
Finally, all nodes except the half-nodes add the Block to the end of the existing ledger, as depicted in
Figure 6d, by executing the verification process.
3.3.1. Transaction
A Blockchain transaction is made by the Gateway Agent when it receives a data packet from IoUT devices or other devices. A transaction format is represented in
Table 4. The Gateway Agent makes different kinds of transactions such as IoUT data transaction, solution or outcome transaction, and financial transaction. A transaction may involve a large volume of data. Thus, the transaction on the Blockchain contains a pointer to the raw data. The sender indicates the Gateway Agent and the consumer indicates persons or organizations who purchase IoUT data. Public/private key is used to generate the signature, and the script describes the procedure for evaluating the transaction (e.g., verification of signature and the legitimacy of sender and receiver).
3.3.2. Data Block Structure
The structure of a data Block is presented in
Table 5. The Block has two parts: header and Data. In the header, Block Type represents the data type on the Block. For instance, the data Block contains records monitored by IoUT devices, and the problem-solution Block holds the transactions of a probable solution or outcome. The outcome-based Block is elucidated below. The Rate Vector field of the Block contains the rates given by Miners based on the accuracy of each solution. All transactions of a Block are organized in a Merkle tree. The Merkle tree ensures the integrity of the data and facilitates Miner to check the integrity without downloading each transaction in the Block.
3.3.3. The Lightweight Consensus Mechanism
In this section, we first discuss the procedure for selecting Miners for the proposed lightweight consensus mechanism. Secondly, we present two use cases where the consensus mechanism can be applied.
The Gateway selects a group of healthy BC (Blockchain) nodes to make the consensus process faster and reliable. This group of nodes takes part in the mining process on the Cloud Blockchain. The Gateway intends to nominate a group of Miners based on multiple criteria of a BC node. The criteria might include reputation, attack vulnerability, amount of locked coin, processing power, storage capacity, availability, throughput, and mining cost; network capabilities such as bandwidth and computing; and other criteria. An efficient method to combine multiple criteria to discover a set of qualified BC nodes to perform mining for IoT data is necessary. In this article, we propose to use TOPSIS [
65] (Technique for Order of Preference by Similarity to Ideal Solution) to rank BC nodes. TOPSIS, a multi-criteria decision analysis method, estimates the shortest geometric distance from the ideal best value and the longest geometric distance from the ideal worst value. Before applying TOPSIS, each selection criterion is weighted using AHP (Analytic Hierarchy Process) because each criterion mentioned above should not be considered as equally important. For example, reputation is two times more important than the amount of locked coin or stake; attack vulnerability is three times more desirable than storage capacity or availability; throughput is two times more expected than mining cost; and so on. AHP assigns a weight to each criterion using pairwise comparisons of the attributes or elements. TOPSIS-based Miner selection process is described below.
Step 1: The BC peer-to-peer network is partitioned into several zones. Primarily, a Gateway randomly picks a certain number of nodes from each zone.
Step 2: A rank evaluation matrix consisting of m randomly selected nodes from each zone as alternatives and n criteria is created. Each value in the matrix is identified as . The rank evaluation matrix is represented as .
Step 3: Each value in the matrix is normalized according to the following formula:
Step 4: Each value of the matrix is normalized according to the following formula: . Here, , which indicates normalized weight for a criterion, is produced using AHP.
Step 5: The worst alternative () and the best alternative () are chosen from each column (criterion) of the matrix. For example, for the criterion reputation, the best ideal value (alternative) is the maximum value of that column and the worst ideal value is the minimum value of that column. For criteria locked coin, processing power, storage capacity, availability, throughput, and network capability, the best ideal (alternative) value and worst ideal value are determined using the same formula. In contrast, for criteria attack vulnerability and mining cost, the best alternative is the minimum value of the respective columns and the worst alternative is the maximum value of the respective columns.
Step 6: Geometric distance is estimated between the target alternative i and the worst condition and respectively as follows: and .
Step 7: Rank is estimated according to the following formula:
Step 8: The Gateway selects a certain number of nodes following the ranking generated by using the TOPSIS. The TOPSIS process is illustrated in
Figure 7.
IoUT Data Block Inclusion: The following consensus mechanism is executed by the Miners to add a new IoUT data Block in the Blockchain. The procedure depicted in Algorithm 3 is described below.
First, a group of Miners is nominated by the Gateway Agent to verify the newly created Block using the TOPSIS selection method described above.
Second, Miners mainly verify the hash value of the immediate previous Block, the integrity of all transactions packed in the Merkle Tree of the Block, and the Gateway Agent’s signature.
Third, The Block is broadcast throughout the Blockchain network if specific numbers of the nominated Miners approves the Block as a valid Block.
Last, the general node adds the Block to the end of the current chain of Blocks.
IoUT Outcome Block Inclusion: The user can request different kinds of services related to IoUT data management from a Gateway Agent. The Gateway Agent solicits services from various entities that participate in managing the Blockchain network. The Gateway utilizes a distributed trust feature of the Blockchain to record the services in the Blockchain. The Gateway Agent initiates the following consensus mechanism when it needs to add a service outcome or a problem solution such as classification or clustering for anomaly detection. The use case depicted in Algorithm 4 is explained below.
First, the Gateway Agent nominates two small groups of Miners using the TOPSIS method.
Second, the first group called workers generates their respective outputs on a given problem or proposes a solution to solve a problem, and the second group of Miners called verifiers rate the results or answer.
Third, the verifiers accept a result of a developed solution only if the outcome from the solution does not exceed a threshold level of accuracy. The verifiers rate the solution/outcome based on the accuracy level.
Last, the workers that obtain higher ratings on the solutions of the problem receive rewards for this.
For instance, the Gateway Agent solicits an efficient method from a group of Blockchain nodes (
workers) to classify IoUT data as malicious and non-malicious data. The solutions from different
workers will be packed into a Block and transmitted to the verifier group (also nominated by the Gateway Agent). The
verifiers test the solution using their test dataset. The
verifiers measure the accuracy level for each solution and rate the solution according to the accuracy level. The
workers that obtain the highest rate for its solution will be financially rewarded. In such an application, the Gateway Agent does not rely on a third-party or centralized server for confirming a solution. The centralized server system may suffer from higher latency in such an application. In contrast, the Blockchain executing on the distributed peer-to-peer network ensures quick response on the user’s task avoiding a single point of failure.
Algorithm 3: Data Block Validation. |
|
Algorithm 4: Outcome Block Validation Algorithm. |
|
3.3.4. Multilevel Index on the Blockchain
The replication of the complete ledger is a significant reason for having higher security from Blockchain technology. Ledger replication enables an entity to validate IoT data without relying on the third-party. Further, data integrity and availability are guaranteed by replicating the ledger amongst multiple nodes. The distributed decentralized Blockchain storage facilitates multiple active data access point. The other benefit of the distributed ledger is that Blockchain can withstand the single point of failure, Ransomware, and Denial of Service attacks.
In general, transactions related to results or outcome generated from the analysis of raw IoT data, and the transactions related to software update and firmware are occasionally produced. These kinds of transaction can be replicated among multiple entities.
However, nodes that process data streamed from IoUT require a large volume of storage. Although the Cloud server supports massive storage for the Blockchain, volunteers or storage constrained devices might be reluctant to participate in the Blockchain [
31].
Validators in IoUT Blockchain do not require the complete chain of Blocks as in digital cryptocurrencies (Bitcoin) to confirm a new Block. Further, the consumer or customer is most interested in the most recent IoUT because recent data are typically the most significant in real-time IoUT monitoring. In such a case, few Cloud servers are allowed to store the complete ledger, and all other validators cache the most recent IoUT data.
Multilevel index records based on time attribute can be maintained in the Blockchain to track the most recent Blocks. A multilevel Blockchain index is depicted in
Figure 8. In
Figure 8, the multilevel index comprises the outer index and inner index. Every index record has a search key and two pointers where one pointer holds the hash code of the previous index record of the same level, and another pointer contains the hash code of the next level index record. The link between index records can preserve record integrity and prevent index records from being tampered.
Outer and inner index use year, month, and day, respectively, as a search key. Block’s content can be accessed through metadata representing the header’s information of a Block. Every entity in the Blockchain stores the complete multilevel index into the main memory and the most recent chain of Blocks in permanent storage rather than store the whole ledger. Several Cloud servers store the entire chain of Blocks. Consequently, limited memory nodes such as smartphones or laptop machines can take part in performing the verification process.
4. Performance Analysis
This section contains the performance analysis of the proposed architecture in terms of Block generation energy consumption, time, reliability, remaining energy, and standard security attack.
The architecture was simulated using Java Programming following the iFogSim [
66]. The simulation parameter is illustrated in
Table 6. IoUT devices with different power and memory capacity are considered in the simulation. A private Blockchain module is implemented using the idea introduced in [
67]. To implement the second use case of the consensus mechanism that is used to confirm a solution for a particular problem in the Blockchain, we considered a problem of anomaly detection given a dataset. The worker Miners proposed six classifiers, namely C5, C4
[
68], SVM, Naive Bayes (NB), Multilayer perception (MLP), Random Forest (RF) and other, as a probable solution of the problem. Each worker node proposed a classifier and put the classifier’s link in the solution transactions. The Blockchain verifier Miner used KDD Cup 1999 Data [
69] to measure the accuracy illustrated in
Figure 9 of the classifiers by Weka [
70]. The threshold accuracy level was assumed as 80%. The Miner accepted the solution, which had a skill above 80%. Here, the worker that proposed C5 with the highest accuracy obtained the highest rating from the verifier and was rewarded.
The simulation was executed in a m area. Different numbers of IoUT nodes (100, 200, 300, 400 and 500) were considered for different executions. We analyzed the performances of the architecture concerning the following parameters.
Energy Consumption: The energy consumption required for the simulated network includes energy for transmitting, receiving transactions, and validation of a certain number of Blocks.
Block Generation Time: The Block Generation time includes the time required for transmitting, making a certain number (100%) of Blocks, and validating the Blocks.
The simulation was run ten times, and the average value from 10 times simulation was used to represent the performance graph. The energy consumption to generate 100 Blocks using the proposed hierarchical routing under a different number of clusters (10, 15, 20, …, 50) and nodes is illustrated in
Figure 10a. The energy consumption increases with increasing cluster numbers as more nodes participate in sensing and forwarding data. However, for a particular cluster number with a variable number of nodes, the energy consumption does not significantly vary. The Block generation time in BoMLR (Blockchain Oriented Multilevel Routing) is illustrated in
Figure 10b. Block generation time keeps increasing with higher numbers of nodes and clusters. The fixed number of Gateway Agents experiences some queue latency because of the higher number of associated cluster heads, which reduces the Block per second.
The comparison of Block generation energy consumption and time for the BoML (Blockchain oriented multilevel) and SMH (secure multi-hop) routing are depicted in
Figure 10c,d, respectively. The SMHR shows higher Block generation energy consumption and time than BoMLR. In SMHR, authentication is performed between IoUT source node and the forwarding node before transferring data. The BoMLR does not need to perform authentication between the source node and the forwarding node before sending data as the node joins a cluster head through authentication. In BoMLR, IoUT devices do not need to generate a new key every time they transmit data to the Gateway. The IoUT devices do not need to exchange the control packet to establish a data forwarding route. Only nodes with higher levels participate in transferring the data packet to the Gateway Agent. Therefore, Block generation delay and energy consumption will be minimized.
Key management and level improve the packet delivery ratio of the proposed protocol. Bitcoin’s Blockchain processes around 3–4, and Ethereum [
71] processes around 20 transactions per second with Proof of Work that requires a high computational cost. In contrast, Proof of Stake used in our current setting can produce around 2500 Blocks per second. In the proposed architecture, some benign Miners validate the Block in Proof of Stake fashion unless forks are created. Forks on the Blockchain are resolved with Proof of Work and the longest chain rule. The hybrid Proof of Stake will process a higher number of transactions per second than Proof of Work. The PoW consensus mechanism used in the Bitcoin Blockchain demands high computational cost. The Proof of Stake used in the proposed Blockchain does not waste power unless forks occur. Further, Gateway Agent selects a small set of Miners to validate and confirm the Block in the Blockchain. The selection of a small set of Miners also improves the end-to-end energy consumption required for generating Blocks. Specifically, the consensus mechanism of the Blockchain can ensure better QoS for an individual.
The remaining energy comparison of the Internet of Things layer for BoMLR, SMHR [
39], HEED [
42], and LEACH [
41] protocol is illustrated in
Figure 11a. HEED and LEACH show higher remaining energy in comparison to BoMLR and SMHR because no security is employed in those routing approaches. However, our BoMLR’s network lifetime is higher than SMHR. In BoMLR, cluster head selection does not require the exchange of a control message to find the new cluster head as the current cluster head selects the next cluster head. Further, the next cluster head does not need to rediscover its member nodes as the present cluster head shares the Bloom filter holding the member nodes’ identifier with the next cluster head. The new cluster head does not need to send a control message containing cluster head information to its members. Member nodes just broadcast their data throughout the cluster, and the cluster head will receive the data as the cluster head’s level is greater than its members. Lightweight HMAC verifies the legitimate source node of a data packet. The aggregated data from the general nodes are forwarded to the Gateway Agent by only the cluster heads. The level number associated with each IoUT device guides the node to forward the data packet to the destination. In the proposed framework, avoidance of control message to discover the cluster head and forwarding nodes, involvements of fewer IoUT devices to forward the data packets results in lower power consumption in the IoUT network layer.
The reliability graph is presented in
Figure 11b. HEED and LEACH are vulnerable to different attacks because of the absence of a security approach while routing the data packet. SMHR always uses hardware inserted keys. In this approach, if a key is compromised, the packet is always captured by the attacker. On the other hand, in BoMLR, IoUT devices also use hardware inserted symmetric key to transmit data securely. However, IoUT devices obtain firmware updates for the keys from the Gateway Agent through the Blockchain. Thus, IoUT devices are not required to generate new encryption keys regularly. Further, key compromises do not impact heavily on the routing because of updating a firmware through Blockchain.
The IoUT framework may encounter diverse kinds of cyberattacks, and the mitigation of those attacks in light of our IoUT framework are presented in
Table 7 and
Table 8.