# A Secure Opportunistic Network with Efficient Routing for Enhanced Efficiency and Sustainability
## 3 Routing in Opportunistic Networks  
Ad hoc networks traditionally rely on continuous end-to-end paths between nodes for reliable data communication, necessitating high node density and adherence to conventional routing protocols [15]. However, in scenarios where such paths are intermittent or non-existent, conventional ad hoc networks face operational inefficiencies. Addressing this challenge, delay-tolerant networks (DTNs) offer a viable solution for communication in unstable networks, with a specific emphasis on opportunistic networks (OppNets) [16]. An OppNet strategically leverages every potential connection opportunity, overcoming the lim itations posed by incomplete paths and the constant mobility of nodes. Notably, an OppNet diverges from TCP/IP-based protocols and adopts a unique \"store-carry-forward\" communication topology [17]. The store-carry-forward approach operates as a \"hop-by-hop\" technique, involving intermediate nodes to relay messages from source to destination. Messages are temporarily stored in a node's buffer until it encounters another node [18; 19]. Upon contact, the message is transferred to the intermediate node, which then carries and forwards it to other nodes within the network. This iterative process continues until the message reaches its destination. However, due to the constant relocation of devices, establishing contact may take a considerable amount of time, thereby influencing OppNet performance based on node density and mobility. While the store-carry-forward paradigm is integral, it introduces a trade-off between message delivery probability and delivery delay. Routing protocols must carefully consider the number of copies distributed in the network and the selection of nodes for replication or forwarding, necessitating intelligent decision making based solely on local information at nodes. Existing routing algorithms for opportunistic networks fall into two principal classes: oblivious algorithms and contact-history-based algorithms [20]. Oblivious algorithms encompass direct delivery and Epidemic forwarding, with direct delivery exhibiting the worst delay and delivery probability. In contrast, Epidemic forwarding results in resource wastage. Contact-history-based algorithms, including Prophet, Fresh, and Meed, use nodes' encounter history to inform forwarding decisions. This study specifically delves into a comparative analysis of Epidemic, Prophet, Fresh, and Spray and Wait routing algorithms. The primary goal is to present an in-depth examination of their respective advantages and disadvantages while aiming to propose a novel, simple, and scalable routing model [21; 22; 23]. Epidemic and Prophet algorithms entail pairwise information exchange, with Prophet additionally considering delivery predictability. Spray and Wait, a more intricate algorithm, strategically restricts the number of message copies disseminated within the network through a two-phase process: Spray, where a finite number of copies are initially forwarded, and Wait, where nodes carrying copies patiently await until reaching the destination.