## 2 Literature Review  
Several researchers have conducted surveys on the security-related issues in the IoT [1; 13; 14]. These surveys provide a comprehensive understanding of the existing security vulnerabilities and challenges that different applications face. Many recent types of research have provided countermeasures against data injection attacks in the IoT. These countermeasures can be divided into five main categories: software attestation, anomaly detection, trust management, signature-based techniques, and digital watermarking techniques. These scholars have employed solutions to counter injection attacks on the sensory data of IoT applications. Numerous papers have been proposed using a software attestation technique that looks for evidence of node modification. The main idea of software attestation techniques is to challenge nodes with a challenge request where they need to respond with the correct solution in order to check the node software's integrity. [PERSON] et al. have proposed SEDA, a collective software-based attestation solution that is based on a challenge-response mechanism [15]. SEDA forms the network as a spanning tree where each child node (attester) is challenged by its parent (verifier) to respond with the correct report that is calculated based on a nonce and a shared secret. SEDA only considers software-based attacks; therefore, it cannot secure networks in the presence of a physical attacker [16]. [PERSON] et al. [17] have proposed an anomaly-detection-based mechanism that uses an Extended Kalman Filter (EKF) with the Generalized Likelihood Ratio (GLR) to check whether or not the new reading differs from the normal model's state. The system starts by estimating the normal model of the network, and then a similarity check based on EKF and GLR will be performed on new measures that are received from neighbor nodes. Using anomaly detection techniques can be easily deployed on top of any application required. The only drawback of such techniques is that they need to accurately define the boundary for expected behavior [9]. Location-aware End-to-end Data Security (LEDS) [7] proposed a location-based trust management technique that relies on the location of the nodes. LEDS ensures data integrity and authenticity using a location-aware key management framework where three different types of keys are generated based on the location of the sensors. The weakness of this work is that it relies on a static, configured location parameter, which limits its usage to a specific number of applications [18]. Signature-based detection techniques have been the basis of much more research. In the Dynamic En-route Filtering scheme (DEF) scheme [19], a message authentication code (MAC) is used as a signature to verify the integrity of a report. Each sensing node will generate multiple authentication keys using one-way hash chains. These keys will be disseminated by the cluster head (CH) to the forwarding nodes using preloaded secret keys. DEF uses many keys, since it involves using both authentication keys and secret keys. It also involves a vast number of communication messages between nodes to complete a single round. [PERSON] et al. [20] and [PERSON] et al. [21] have used a keyed-hash message authentication code (HMAC) to provide integrity. [PERSON], et al. [22] proposed a new scheme to provide both integrity and confidentiality. To ensure the end-to-end integrity of aggregated data, they have used a homomorphic MAC (H-MAC) algorithm. The homomorphic MAC can be added, i.e., \(H-MAC(a+b)~{}=~{}H-MAC(a)~{}+~{}H-MAC(b)\). Moreover, a homomorphic encryption algorithm is used in this scheme to provide confidentiality. These schemes provide integrity at an additional cost of data processing and communication. PCREF, which was proposed in [18], uses a message authentication polynomial (MAP) to provide integrity. Every node is assigned a polynomial primitive that is used for authentication and checking.