Factual Demonstration of Blockchain Routing in Delay Tolerant Network

Frequent disconnection, high end-to-end latency, dynamic topology, sparse node density, lack of pre-existing infrastructure, and opportunistic message transmission on wireless link, makes routing difficult in Opportunistic network (Oppnet). In present scenario, Oppnet allows the people to interact with contrasting ways like with diverse mobility, groups, and etc. During transmission of messages in such network security and trust performs major role. Delay Tolerant Network (DTN) are much prone of having inherent risk of attack. Malicious node, selfish node, and attacks are major impact on deteriorating network performance. To prevent the network from such deteriorating factors, this paper introduces the new platform to provide reliable and authentic transmission of message in opportunistic network. Blockchain-based Routing in Opportunistic Network (BRON) uses the concept of Blockchain through which each node work as an authentic node and transmit the secure messages in Oppnet. Opportunistic Network Environment (ONE) tool is used to implement BRON. This protocol generates 36% reduced packet drops ratio, 57% enhanced delivery ratio, 55% lesser overhead ratio, 35.2% reduced average latency, and 65% lesser average buffer time as compared to direct delivery ratio with respect to number of nodes


Introduction
Subset of Delay or Disruption Tolerant Network is known as Oppnet. This network captured great attention of researchers due to its working characteristics in highly challenging atmosphere. Message dissemination in different regions of opportunistic network is done with using Store-Carry-Forward mechanism. In this mechanism, whenever an Oppnet node receives the packet from one of its neighbouring nodes, packet is stored and carried in nodes' buffer until it encounters another reliable relay node. Irregular connection and no end-to-end route between sender to receiver makes the Oppnet routing different from traditional routing [1]. Vehicular-ad-hoc network, habitat monitoring, emergency & special operations, and communication in smart atmosphere are few emerging & innovative applications of Oppnet. Only with the mutual-effort with all participating Oppnet nodes in network makes the high successful transmission of messages. This mutual-effort individually rely upon each and every node in the network. Few nodes in the network behaves as malicious or selfish or un-cooperative due to finite buffer capacity, limited energy, and irregular wireless connection. Message dropping, large amount of un-necessary message transmission, longer time to forward the message, lack of message integrity, and etc are few factors which intensify the network load and decelerate the network performance. Because of open joining property of users in Oppnet makes difficult to prevent this network from selfish or malicious or un-cooperative nodes/users. To maintain the security and trust in Oppnet, it is important to control these un-cooperative nodes. Working environment of Oppnet with Store-Carry-Forward approach is depicts in fig. 1. It includes contrasting small handheld electronic devices with bundle layer. This bundle used for keeps the message in their buffer and passed this message whenever current Oppnet nodes found the best relay node. Mobile Ad-hoc Network (MANET) and DTN network are base of Oppnet.
Opportunistic network includes multifarious properties and also vulnerabilities from DTN and MANET [2]. Many security hazards exist in Oppnet like (a) Lack of message integrity: various heterogenous network transmit the message in Oppnet which enhance the threat of message integrity. (b) Breach of privacy: because relay node keeps the message in their buffer, so it is easy to breach nodes' location, identity, and message content. (c) Exposure of message confidentiality: due to Store-Carry-Forward principle in Oppnet, makes possible to copy the content of message by relay/ intermediate node. (d) Resource consumption attack: finite nodes' energy, buffer space, and calculation power, increases the risk of resource consumption attack. (e) Illegitimate access: limited resources for nodes in network, makes the huge risk of illegitimate access by selfish nodes which becomes the factor of poor efficiency in network performance. (f) Denial of Services (DoS) & Injection attack: protracted delay in message dissemination and intermittent interruption of connectivity in network are the outcome of DoS attack. In injection attack, attacker attempt to inject fictitious data packet in Oppnet, to mislead the normal nodes [3][4].
To implement dynamic trust, security, and to cope with vulnerabilities in opportunistic network, blockchain is the appropriate tool. Decentralization, non-modifiable, and security are the traits of Blockchain Technology (BT). The foundation of BT is consensus algorithm, through which it eliminates the issue of associated trust among nodes in scattered network. Delivery of content, financial environment (banks), non-financial environment (decentralized storage of data), and etc. are few applications of BT. Decentralized characteristics of BT can achieved trust and security between nodes in Oppnet. The fundamental purpose of this research paper is: 1. Trust mechanism is proposed by using Blockchain Technology. Mobile-Infrastructure based method is used to develop this routing in Opportunistic Network.
2. For dynamic trust updates of Oppnet nodes Proof-of-Work and Proof-of-Stake approach is applied.
3. To implement BRON protocol ONE tool is used. 4. Results of proposed protocols are compared with other existing protocols.
This research paper is structured as follows: literature review on contrasting trust-based routing protocols of opportunistic network is presented in section 2. Preliminaries used in proposed model with BT are described in section 3. Section 4, introduced the novel BRON routing protocol for Oppnet. Implemented results of BRON's performance, and security analysis are discussed in section 5. Finally, paper is concluded with future scope in section 6.

Literature Review
In this section, peculiar types of security-based routing protocols of Oppnet are classified and compared in huge domain of Ad-hoc networks. Although lots of work on routing protocols in Oppnet has already done in past years, but very few researchers give attention in aspect of security and trust mechanism in Oppnet routing. Fig. 2 presents, the classification of secure routing schemes in Oppnet. Table 1 presents the different category of secure protocols, and also differentiate these protocols in contrasting terms like their properties, pros, cons, and etc.   [5]. Bootstrapping Security Association in Opportunistic Network (CB) [6]. Trust in Opportunistic Network (NCB) [7]. Social Trust in Opportunistic Network (NCB) [8]. Trust Management Scheme Based on Behaviour Feedback for Opportunistic Network (NCB) [9] REaLization of Incentives to Combat Selfishness [10]. Incentives and Reputation for Opportunistic Networks using sociAl Network [11]. Socially Selfish Aware Routing [12]. Incentive-based pub/sub [13].

Motivation
Security, trust, and privacy in opportunistic network are ever the complicated and tough work. Selection of intermediate node in Oppnet depends on various factors and among of them trust is primary parameter. While designing routing protocols in Oppnet; dynamic network topology, limited buffer size of nodes, energy, recurrent links among nodes, finite resources, and etc. are many factors through which, routing becomes a crucial task. According to table 1, many researchers introduced various security approach with novel features. Each existing protocol have their own unique features as well as some limitations. Authors used cryptographic approach which uses asymmetric algorithm to provide privacy in Oppnet. [5]. Bootstrapping scheme prevent the Oppnet from sybil attack by using end-to-end encryption with self-organising key management [6]. Incentive based approaches [10][11][12][13][14][15][16] and trust, security & privacy-based many approaches are introduced in [17][18][19][20][21][22][23][24]. But some factors like; inconsistent behaviour of nodes, active & passive attack in network, privacy issues, message integrity, trust between nodes, and etc. motivates author to introduce BRON routing protocol. Subsequentially authors discovered that, blockchain technology can be applied in opportunistic network. Now a days blockchain is such a spectacular technology which provides always unbelievable performance in various field.

Background of BRON
The sequence of techniques applied in diverse applications, having characteristics of decentralization, irrefutable, and immutable is known as Blockchain Technology. Smart contracts, record keeping, securities, fraud reduction, digital currency, and etc are application of BT. Blockchain is the core method, which is used for "Bitcoin". It is the digital cryptocurrency, a novel concept introduced by Satoshi Nakamoto in 2008 [25]. Public, private, and consortium (semi-private) are three categories of BT. To provide the features of transparency, and security in distributed network; public-BT is applied. It gives open and equal rights to each user in the network. Banks, government colleges, taxation institutes, hospitals, and other applications, where security, privacy, and more access control is required; consortium or private BT is used. Consensus algorithm & decentralization strategy enables BT to provides security. Proof of Work (PoW), Proof of Stake (PoS), Practical Byzantine Fault Tolerance (PBFT), Delegated Proof of Stake (DPOS), Ripple, and Tendermint are different versions of Consensus algorithm of BT [26].

Security Model in Oppnet
In this subsection, Blockchain-based routing model is illustrated. Fig. 3 depicts the architecture; in this, each node in opportunistic network uses the block-id. This model works in two phases; 1. Authentication phase, 2. Trustworthiness-phase. In authentication phase; whenever an oppnet-node wants to communicate in network; node generates the request for the same function. Block is created with user-id, and now this block is disseminated in the network for the authentication. Each oppnet-node in opportunistic network received the block with user-id. Electednode in network verify the authentication of requested block. If this block is approved by elected-node this block can become the part of the network. This approved block now added to the current blockchain with unique block-id. In trustworthiness-phase; according to blockchain header ( fig. 5) node will receive/forward the message to relay node.

Procedure of BRON
Authentication Phase; in this phase, all nodes are established with certified public-key which is provided by Blockchain technology. For authentication process of a new node, Itsuku PoW [27] approach is applied. This approach is improved version of MTP-Argon2 [28]. It prevents from hash composability attack, computation attack and also resolve the problem of parallel search, memory storage, and pseudo-random array. Handling & evaluation of trust with hard-to-forge mathematical computation is sorted by "Itsuku PoW" by using the concept of memoryhardened.

Input: (C, D, S, l)
Input challenge: C Difficulty: D Autonomous Segment: S Length of Segment: l Output: (N, H,

Stop
Algorithm-1 presents how the new oppnet-node get authenticated & can join the network with blockchaincertificate. In this algorithm four input (C, D, S, I) and four output (N, H, Ȉ, Ƚ) parameters are used. BLAKE2 [29] algorithm is used to calculate the hash function (H). It uses 128 bytes input and generates 64 bytes output in one processing. While computing of B0 and adding C with hash function doesn't increase any computation cost.
Trustworthiness procedure of proposed protocol is described in Algorithm-2. Majority voting concept from [30] is used. Here, set of authenticated blocks "B" is used as an input parameter, which comes from algorithm-1. "I" is the set of events or task like; message receive, or transmit, or storage. For each B (as node) with particular task i; trust value is evaluated by . Majority trust for each task is calculated by fn (i). Communication in network depends upon the majority trust value of node (B). Value of trust given by each node is either 0 or 1. 0 indicates complete trust and 1 presents complete distrust. Whenever the node trust computed as 0, that node will not be the part of network and automatically removed from the network. Concept of blockchain with trust among nodes in opportunistic network enables to achieves many benefits like; Availability, Consistency, Decentralized network, and Message integrity. Fig. 4, shows the flow diagram of Blockchain based routing in opportunistic network. Eq. (1) is used by new block node, for find the shortest distance from itself to authenticated block node in network.

Block-Header Format of BRON
Format of blockchain header for proposed routing protocol is shown in fig. 4. Each node in opportunistic network uses this header before performing action. It is structured in eight different fields. The description of each field is as;

Set-up for Simulation of BRON
For measure the performance of proposed protocol BRON; java-based and open-source emulator named ONE [31] tool is used. Intel(R) Core (TM) i5-8265U processor, CPU @ 1.80 GHz speed, 8GB RAM, and 64-bit OS system is used for the simulation of proposed work.  1. Packet Drop Ratio: It is defined as the ratio of number of packets losses to the number of packets created. Whenever the buffer occupancy of node is adequate, opportunistic node will drop the packets. This parameter should be always lesser.
2. Delivery Ratio of Packets: This parameter must be high as possible during packets disseminating in the network. Ratio of successful transmission of packets to the total number of packets produced in the network is known as delivery ratio of the packets.
3. Overhead Ratio: For any routing protocol overhead ratio should be minimum as possible in the network. Overhead ratio is known as the number of message duplicate copy produced per original message during message broadcasting to the relay node in the network.

Average
Buffer Time: This parameter should be minimum for efficient and reliable routing protocol. Before successful delivery of packet at the receiver node average time spent by packet in the node's buffer is known as average buffer time.

Average
Latency: It is defined as the average travel time spent by the packet, from message packet created by source node to packet received by receiver node in the network. Average latency parameter is always as minimum for enhancing the performance of any routing protocol. As far as number of nodes increases packet drop factor also increases in every routing protocol. Proposed protocol performs 36% more efficiently as compared to direct delivery protocol, and 23% more efficiently as compared to spray and wait protocol, in terms of packet delivery ratio.  figure 7, this is clearly present that BRON protocol performs very well in terms of delivery ratio whenever the nodes increase. Proposed protocol gives 57% higher delivery ratio in comparison with direct delivery ratio. At initial time of simulation almost all discussed protocol like direct delivery, prophet, spray & wait, and BRON performs same in terms of delivery ratio. But when the nodes increase BRON protocol works more adequately as compared to other protocols as shown in figure 7. Simulation results of the parameter overhead ratio with respect to no. of nodes are shown in figure 8. As compared to direct delivery protocol, BRON produces 55% lesser overhead ratio. In the beginning simulation time, when nodes are 20 to 40, BRON gives lesser and almost constant overhead ratio. As soon as no. of nodes are goes higher i.e., 60 to 100; overhead ratio is also increases. Proposed routing protocol works 50% more effiently as compared to spray & wait in terms of overhead ratio.

Performance Results and Comparison of
Implemented results of the factor average latency time and buffer time with respect to the no. of nodes are shown in figure 9 and figure 10 respectively. BRON works more adequately in terms of average latency and buffer time as compared to other protocols like prophet, spray & wait, and direct delivery. Proposed protocol produces 35.2% lesser average latency time as compared to direct delivery protocol. In respect of average buffer time, BRON performs 65% more efficiently. From beginning to end duration of BRON implementation, there is no major changes in terms of average latency parameters when no. of nodes are increases as depicts in figure 9. Average buffer time is decreases as far as number of nodes are increases, when the number of nodes is increases as presents in figure 10.  Figure 11. shows the performance metrics of packet drop ratio with respect to TTL parameters. BRON works 24% more efficient as compared to direct delivery protocol in terms of packet drop ratio with respect to TTL. At beginning simulation time of packet drop ratio vs. TTL, BRON and prophet performs almost in same way. But as far as TTL varies from 300 to 500 minutes, BRON works more adequately as compared to prophet. Implementation results of the factor delivery ratio with respect to TTL is presents in figure 12. As compared to direct delivery protocol, BRON performs 26% more efficiently in terms of delivery ratio when TTL varies. Whenever the TTL value goes to higher, delivery ratio is also decreasing negligibly in case of all protocols. But BRON still performs adequately as compared to other protocols. Overhead ratio vs. TTL result is shown in figure  13. Proposed protocol generates 33% lesser overhead ratio as compared to direct delivery protocol when TTL varies. As far as when TTL value increases, overhead ratio is also increasing slightly. BRON works more efficiently as compared to prophet, spray & wait, and direct delivery in terms of overhead ratio with respect to variation in TTL value. Figure 14 and figure 15 depicts the performance of BRON and other routing protocols, for the parameter average latency and average buffer time when TTL value varies from 100 to 500 minutes. Proposed routing protocol performs 27% more efficiently as compared to direct delivery protocol in terms of average latency when TTL varies. Average latency parameter is slightly decreasing, when TTL value increases for all the considered protocol as shown in figure 14. However, BRON works efficiently as compared to other protocols in terms of average latency when TTL varies. BRON takes 13% lesser buffer time as compared to direct delivery protocol with respect to TTL value as shown in figure 15. Whenever the TTL value increases, buffer average time also increases slightly for all protocol shown in figure 15, but BRON takes lesser buffer time as compared to all other protocols.

3.
Performance results while varying the field speed of the nodes: All the parameters mentioned in table 3 are remains default, when the field speed of nodes is varies from 0.2 to 1 km/h. Figure 16-20 presents the simulation results for the parameter packet drop ratio, delivery ratio, overhead ratio, average latency, and buffer time when the speed of the nodes in the network varies. BRON performs 43% more efficient in terms of packet drop ratio as compared to direct delivery protocol, when speed of nodes varies. There are no major changes has been considered while simulating the BRON protocol when speed of node varies from 0.2 to 1 km/h. But packet drop ratio is slightly increases when the node's speed increases. However, BRON performs much efficient in terms of packet drop ratio with respect to node's speed, as compared to other protocols which described in figure 16.  Figure 17 presents the results for the parameter delivery ratio when speed of the node varies. BRON performs efficiently as compared to other protocols in terms of delivery ratio with respect to speed of the node varies. BRON produced 24% enhanced delivery ratio in comparison with direct delivery protocol. As far as speed of the nodes increases, delivery ratio of the proposed protocol is also enhanced, this is the positive aspect of the proposed work.
Implementation results for the parameter overhead ratio with respect to speed of node is shown in figure 18. Proposed protocol generates 29% reduced overhead ratio as compared to direct delivery protocol when node's speed varies. Overhead ratio is also decreasing when speed of the nodes increases in case of BRON. As compared to other protocol, BRON performs much efficiently in terms of overhead ratio vs. speed of nodes. The simulated results for the parameter average latency and average buffer time with respect to speed of the node are shown in figure 19 and figure 20 respectively. With the comparison of direct delivery protocol, BRON gives 47% reduced average latency when node's speed varies. As depicts in figure 19, it is very clear that proposed protocol works adequately in terms of average latency factor whenever the speed of the nodes varies. Figure 20 shows the performance result for the parameter buffer time vs. speed of the node. Here, BRON takes 21% lesser buffer time as compared to direct delivery protocol when the speed of the node varies. BRON also performs more efficiently as compared to other protocol which presented in figure 20.  described in table 3 are kept default, when the field message size is varies from 100 KB to 500 KB. Simulation results for the parameter packet drop ratio, delivery ratio, overhead ratio, average latency, and buffer time when the message size in the network varies are presents in the figure 21-25. The simulated result for the proposed protocol BRON for the factor packet drops ratio when the message size is varies is presents in figure 21. As far as message size is increasing, there is also some increment in average packet drops in case of all protocols. However, BRON generates 23% lesser packet drops ratio as compared to direct delivery protocol whenever, message size varies in the network.
The results for the parameter average delivery ratio when the message size varies is presents in figure 22. BRON performs better as compared to other protocol in terms of delivery ratio vs. message size varies. Proposed protocol generates 25% more delivery ratio as compared to direct delivery protocol when message size varies. Delivery ratio parameter is decreases negligibly, as far as message size in increases, in case of all protocol as described in figure  22. Figure 23 describes the results for the factor overhead ratio with respect to the message size varies. BRON generates 44% lesser overhead ratio as compared to direct delivery protocol with respect to message size varies. Overhead ratio is decreases, as far as message is increases. Here, BRON works adequately as compared to all other protocols as described in figure 23.
Average latency factor with respect to the message size varies is shown in figure 24. BRON works much more efficiently as compared to other protocols in terms of average latency parameter when message size varies. BRON, performs 34% more adequately as compared to direct delivery protocol in terms of average latency with respect to variation in message size. Result for the factor average buffer time with respect to variation in message size is presents in figure 25. BRON takes 15% reduced buffer time as compared to direct delivery protocol, when size of messages is varies. Buffer time of all the considered protocols are increases slightly, when the message size is increases. At beginning of the simulation time BRON takes 1401.845 sec. buffer time at 100 KB message size but afterwards, when message size is 500 KB, it takes 1505.14 sec. buffer time.

Conclusion and Future Work
The primary object of Opportunistic network is to provide secure and reliable communication in discontinuous linked devices. With the consideration of major challenges of this network, here the author proposed the safe and reliable trustworthy routing protocol named BRON. It utilised the idea of blockchain, to provide the reliable source to destination link for disseminating the packet in the network. Idea of Proof-of Work and Proof-of-Stake is used for the selection of trusted node in the Opportunistic network. By adoption of blockchain technology, trusted platform for Opportunistic network is provided. BRON is implemented on ONE tool and its result are evaluated. The performance of proposed routing is also compared with other protocols. BRON generates 36% reduced packet drops ratio, 57% enhanced delivery ratio, 55% lesser overhead ratio, 35.2% reduced average latency, and 65% lesser average buffer time as compared to direct delivery ratio with respect to number of nodes. In each and every aspect of proposed protocol, simulation result indicates that BRON is better routing protocol for Opportunistic network.
In future work, real-life application-based routing for opportunistic network will be considered. To enhanced the performance of BRON, few modifications can be included in algorithm of BLAKE2 [29]. Detection of malicious node can also be included as a new feature in BRON.

Declaration
Funding: Not Applicable Conflict of interest: The authors declare that they do not have any conflict of interests. This research does not involve any human or animal participation. All authors have checked and agreed the submission.

Availability of data and material: Not applicable
Code Availability: Not Applicable, we have not used any dataset.