# Defense and Security Mechanisms in the Internet of Things: A Review
## 6 Discussion
Besides security considerations, the scalability of IoT protocols is a crucial factor. IoT devices have limited processing power. Therefore, the protocol's energy must not be depleted by computations on other devices while it is operating. To ensure this, lightweight cryptographic algorithms are highly recommended to create authentication or key agreement protocols. These algorithms provide a suitable level of data security without straining system resources, thereby reassuring the audience about these protocols' efficiency and resource management. The future challenges of the security mechanisms dedicated to the IoT environments include enhancing scalability and optimising energy consumption, privacy enhancements, resilience against various attacks, and validation (via formal and informal methods). Scalability depends on the cryptographic techniques and hardware parameters used. So, future research should focus on cloud environments, their optimisation, and methods for lightweight data processing in such infrastructures, including blockchain consensus algorithms. Low-power communication protocols (supported by low-computational-overhead encryption techniques) can enhance the energy efficiency of communication in IoT environ  
\begin{table}
\begin{tabular}{l c c c c c c} \hline \hline
**Protocol** & **Protocol** & **Protocol** & **Protocol** & **Protocol** & **Protocol** & **Protocol** \\ \hline
[110] & + & + & + & - & - & - & - \\
[112] & + & - & - &  
ments. Consequently, sophisticated cryptographic techniques can improve privacy. The examined defense mechanisms guarantee robustness against diverse attackers. Considering the need for experimental verification of the analysed protocols, we conducted security and simulation performance tests of these protocols. We used the ProVerif tool for security tests, which did not find any attack on the discussed protocols. In the case of performance tests, we simulated the execution of the entire protocol. Each proposed protocol has been designed distinctively, featuring varying phases and stages, diverse cryptographic algorithms, and different sent objects. We simulated these protocols utilising a methodology that will incorporate the capability of calculating execution times for alternative cryptographic techniques, including elliptic curve cryptography and blockchain technology. We considered the simulation environment with the following technical parameters of IoT devices: RAM: 16 GB, CPU Cores: 8. Figure 2 presents obtained performance results. Protocols such as [61; 121] with short execution times are optimal for applications requiring low latency, such as real-time IoT. Solutions with longer execution times, such as [131; 137], may be better suited for environments where higher security is a priority at the expense of performance. Figure 2: Total execution times summary for the entire protocol (RAM: 16 GB, CPU cores: 8) based on [15; 61; 110; 112; 114; 115; 117; 118; 120; 121; 128; 131; 133; 134; 137]. In the case of the reviewed anomaly and cyber-attack detection tools, in Table 8 we prepared a summary that contains the realised defense method, used AI techniques, dedicated environments, and used datasets and key results or findings. These considerations allow us to emphasise employing various AI methods for anomaly and cyber-attack detection. IDSs and IPSs play complementary roles in security systems. IDSs focus on monitoring network traffic and identifying suspicious events or anomalies, which allows analysts to respond quickly. On the other hand, IPSs actively block potential threats to minimise the risk of attacks in real time. It is worth emphasising that these systems should work together to provide comprehensive protection. IDSs and IPSs increasingly use advanced anomaly detection techniques like machine learning and behavioural analysis. Although these approaches increase the effectiveness of detecting new or unknown threats, they can generate false alarms, one of the main challenges in their practical implementation.