# Security Issues in IoT-Based Wireless Sensor Networks: Classifications and Solutions
## 3 Security Protection Schemes
### Key Management Protocol Schemes  
Key management includes establishing and maintaining keys (protection, distribution, use, destruction...) according to security policies (authenticity, confidentiality, integrity, scalability, and flexibility) and must ensure the resource constraints of the WSNs. The key management must also meet the handling requirements for malicious nodes (includingresilience, revocation, and recovery). Key management protocols can be classified as shown in Figure 6.  
The underlying network structure plays a vital role in the operation of key management protocols. According to the network structure, protocols can be divided into two types: centralized keying mechanisms and distributed keying mechanisms. In a centralized key management mechanism, an entity called a key distribution center (KDC) controls key generation, regeneration, and distribution. The only proposed centralized key management mechanism is the LKHW mechanism, which is based on the logical key hierarchy (LKH) [65]. The LKHW combines the advantages of both LKH and directed diffusion, while implementing both forward and reverse secrecy in which the energy cost scales logarithmically with the group size. In distributed key management approaches, different controllers are used to manage key regeneration and distribution, leading to minimizing the risk of errors and allowing for better scalability. Most of the proposed key management methods are based on distributed keying mechanisms. These methods can also be classified into probabilistic key management schemes or deterministic key management schemes, which are discussed in detail as follows. In the deterministic key management mechanism, the LEAP local authentication and encryption protocol was proposed by the authors of [66]. This proposed solution allows for key revocation and renewal, ensuring high resilience against node intrusion. The designed protocol supports the establishment of four separate key types: individual keys (to be shared with the base station), pairwise keys (shared with other sensor nodes), cluster keys (shared with multiple neighboring nodes), and global keys (shared by all nodes in the network). The security capabilities of LEAP were evaluated under various attack models, showing that LEAP is effective against wormhole attacks, node cloning attacks, and HELLO flood attacks. In addition, LEAP's complexity is proportional to the number of nodes in the network and reasonable resource consumption. Simulation results to evaluate the performance of LEAP show its cost-effectiveness in computation, communication, and storage. Figure 6: Key management protocols in WSNs. [PERSON] [67] proposed the BROSK protocol (Broadcast Session Key Negotiation Protocol) which is resistant to some common attacks such as denial of service attacks, replay attacks, or spoofing attacks. The security mechanism of BROSK is based on the control of key exchange between network nodes in WSNs. The proposed BROSK method is scalable since the time required to complete the key negotiation does not depend on the number of sensor nodes. At the same time, the protocol saves energy costs by reducing the number of transmissions. A key distribution mechanism for WSNs with distributed and randomly deployed network nodes was proposed by [PERSON] and his colleagues [68]. The pairwise key pre-distribution (CDTKeying) solution proposed by the authors is based on the application of design theory to key distribution, thereby increasing the probability that two nodes will share a key and reducing the length of the key path. Another study to solve the problem of pairwise key establishment in distributed sensor networks was mentioned by the authors in [69]. The authors presented two pre-key distribution schemes including an ID-based one-way function scheme (IOS) and multi-deterministic Blom space scheme (DMBS).