# Artificial Intelligence in Cybersecurity: A Review and a Case Study
## 6 Enhancing Security in Low-Rate Wireless Networks
### Optimizing IEEE 802.15.4 Encryption Using Genetic Algorithms  
Direct-Sequence Spread Spectrum (DSSS) is a technique that scrambles data with a high-speed, pseudo-random noise (PN) sequence generated from a high data-rate source [33]. This process expands the transmission bandwidth by a factor known as the spreading gain. We leverage the DSSS framework to integrate our encryption method. However, to enhance anonymity, we propose replacing the generic, publicly known IEEE 802.15.4 PN sequence table with a custom symbol-sequence table. To achieve this, we employ the GA to generate high-quality PN sequences. The GA optimizes three key metrics as outlined in [34]:  
* Balance Property \(f_{balance}\): This metric ensures a near-equal distribution of ones and zeros within the sequence, promoting signal clarity;
* Run Property \(f_{run}\): This metric minimizes the occurrence of consecutive ones or zeros (runs) within the sequence, mitigating potential signal bias;  
Figure 3: Flowchart of GA operations. * Correlation Property \(f_{run}\): This metric aims to minimize the similarity between different sequences generated by the GA. This reduces the likelihood of interference between users sharing the same channel. We mathematically evaluate these quality metrics using objective functions, similar to the approach used in [2]. However, we prefer a product function rather than a sum function to form a single objective, as we expect this choice to converge to the optimum more quickly. The GA prioritizes minimizing these functions to identify optimal PN sequences for our encryption scheme. To combine the desired balance, run length, and correlation properties of PN sequences into a single evaluation metric, Equation (1) is derived. This equation's output is then scaled between 0 and 1 for easier interpretation. Finally, this resulting objective function is used within the GA to find the optimal PN sequence. \[f_{objective} = \prod_{i=1}^{3}f_{i}\] \[\text{where }f = \{f_{balance},f_{run},f_{corr}\} \tag{1}\]  
The GA parameters were chosen in accordance with the recommendations outlined in [35]. The specific values assigned to these parameters are presented in Table 3.  
The success of reaching to the minima of the objective function (given in Equation (1)) is illustrated in Figure 4. The best objective (penalty) function value is found as \(2.14\times 10^{-7}\). By means of the GA, our proposal unveils a groundbreaking method for safeguarding communication within IEEE 802.15.4 networks. This novel sequence surpasses the standard set, offering a significant security boost. The advantages obtained by this approach are listed below:  
Evolving Security: Our GA successfully birthed a robust PN sequence, providing a secure alternative to the default options. GA operates within each session connection  
Figure 4: Performance over generations. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter Name** & **Value** \\ \hline \#Threads & 8 \\ \#Population & 80 \\ Cross-over rate & 0.80 \\ Mutation rate & 0.05 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Parameters used by GA.  
established by the transport layer, which is leveraged for cross-layer interoperability. This enables the generation of the subsequent anonymous PN sequence. This sequence is communicated from the sender to the receiver via Transport Layer Security (TLS), such as Secure Sockets Layer (SSL), layer data. Employing TLS in transport layer connections is indispensable for achieving maximum security. Consequently, enhanced security is provided on a continuous basis over time. Preserving Performance: Remarkably, this new sequence maintains the noise characteristics needed for the network to function flawlessly, with no impact on data transmission speed. Cloaked in Anonymity: The GA allows for the recreation of similar, yet distinct, sequences using the same parameters. This \"rediscovery\" feature introduces anonymity, a layer further strengthening communication security.