In opportunistic IoT (OppIoT) networks, non-cooperative nodes present a significant challenge to the data forwarding process, leading to increased packet loss and communication delays. This paper proposes a novel Context-Aware Trust and Reputation Routing (CATR) protocol for opportunistic IoT networks, which leverages the probability density function of the beta distribution and some contextual factors, to dynamically compute the trust and reputation values of nodes, leading to efficient data dissemination, where malicious nodes are effectively identified and bypassed during that process. Simulation experiments using the ONE simulator show that CATR is superior to the Epidemic protocol, the so-called beta-based trust and reputation evaluation system (denoted BTRES), and the secure and privacy-preserving structure in opportunistic networks (denoted PPHB+), achieving an improvement of 22%, 15%, and 9% in terms of average latency, number of messages dropped, and average hop count, respectively, under varying number of nodes, buffer size, time to live, and message generation interval.
Keywords: Opportunistic Network Environment (ONE) simulator; beta distribution; opportunistic IoT networks; reputation; security; trust.