# Security Issues in IoT-Based Wireless Sensor Networks: Classifications and Solutions
## 3 Security Protection Schemes
### Encryption Schemes
#### 3.1.1 Asymmetric Encryption  
Although asymmetric encryption algorithms are not popular in WSNs due to limitations in scalability, high energy consumption, and resource consumption due to complex computational requirements, some asymmetric encryption algorithms such as RSA (Rivest-Shamir-Adleman) or ECC (Elliptic Curve Cryptography) are still being researched and developed in WSNs for applications requiring high security levels.  
The security of RSA depends on the difficulty of calculating large integers. In RSA, the larger and more complex the integers, the higher the security. The security level of RSA increases as the key size increases, but it also increases the complexity of the encryption and decryption processes (consequently, processing time and power consumption make application difficult when WSN-IoT systems are inherently resource-limited) [50; 53]. In the context of WSN-IoT, several studies have implemented enhanced security models based on  
Figure 5: Some types of attacks in the network layer: (**a**) black hole attack; (**b**) gray hole attack.  
RSA. In [54], the author proposed an RSA-based solution for the Efficient Improved Digital Signature Technique (RSAEDSA). The simulation test results showed that the performance of the RSAEDSA outperformed the state of the art in terms of quality of service (QoS) parameters. The authors in [55] implemented a 2048-bit RSA technique based on improved RSA for WSN-IoT; the proposed scheme achieved encryption and decryption on MSP430 in just 0.14 s and 7.56 s, respectively. In addition, the method has a 112-bit security level, which helps to mitigate threats such as power analysis attacks.  
Elliptic Curve Cryptography (ECC) is a public key cryptography technique based on elliptic curve theory, helping to create faster, smaller, and stronger cryptography. Thus, elliptic curve-based security systems emerged as an alternative to RSA cryptographic systems. ECC generates ciphers through the properties of elliptic curve equations instead of the traditional method of using large prime numbers. Just like in RSA, ECC uses a key pair consisting of a public key and a private key. In the study [56], the authors provided a comparative analysis between RSA and ECC. Experiments were conducted to compare the time required for encryption and decryption using RSA and ECC on three input data samples, 8-bit, 64-bit, and 256-bit, with random keys. The simulation results show that ECC outperforms RSA in terms of performance and security with fewer parameters and that ECC is especially suitable for resource-constrained devices. Table 1 summarizes the time taken for encryption, decryption, and the total time taken for ECC and RSA.  
In some applications of WSN-IoT, ECC-based encryption techniques are developed to meet the applications with strict security requirements. In [57], the authors proposed an improved ECC encryption technique (IECC) by adding a secret key to enhance the security of the system in which the generated secret key is added to the formula of encryption and subtracted from the formula of decryption. The complexity of the encryption and decryption process is enhanced, making it difficult to detect the original data. The advantages of IECC meet security requirements such as low encryption, decryption time, and communication cost. Simulation results show that IECC, with average encryption and decryption times of 1.032 us and 1.004 us, respectively, is lower than previous ECC and RSA algorithms.