## 3 Proposed Work
### Using DNA-BASED Encryption to Secure Data Packets  
Our proposed scheme, the \"DNA-based encryption technique\" for secure routing for Zigbee devices in IoT networks, is a novel \"DNA block cipher symmetric algorithm\". The \"DNA sequence\" generates a secret encryption key (SecKey). This proposed technique perfectly fits the limited \"computation resources\" of \"Zigbee devices [10; 31; 32]\". The proposed \"encryption technique\" performs the following two steps: (1) key generation and (2) encryption.  
* Generation of the Key: The \"DNA sequence\" generates the keys regardless of size, where each letter in the DNA sequence is followed by four randomly arranged bits. DNA sequences are made up of a series of letters. In Table 2, each alphabet is represented in binary using two bits. The four \"DNA letters (A, C, G, and T)\" are then used to segment the DNA sequence into 1-byte segments ({K\({}_{\text{O}_{1}}\), K\({}_{\text{2}}\), K\({}_{\text{O}_{3}}\)... K\({}_{\text{O}_{i}}\)), where these segments stand in for the secret key (SecKey).  
* Process of encryption: The suggested \"DNA-based\" technique is a \"block cipher\" that performs operations on the input data bytes, including substitution and transposition. Figure 2 depicts the detailed flow of DNA-based encryption techniques. The two procedures are explained below: 1. Phase of Substitutions: The input data must be divided into N segments ({B\({}_{\text{O}_{1}}\), B\({}_{\text{O}_{2}}\), B\({}_{\text{O}_{3}}\)... B\({}_{\text{O}_{i}}\)) with a 1-byte segment size before applying the substation phase. Using the XOR operation between DNA segments of Sk ({K\({}_{\text{O}_{1}}\)K\({}_{\text{O}_{2}}\), K\({}_{\text{O}_{3}}\)... K\({}_{\text{O}_{i}}\)),) and I bytes ({B\({}_{\text{O}_{1}}\), B\({}_{\text{O}_{2}}\), B\({}_{\text{O}_{3}}\)... B\({}_{\text{O}_{i}}\)),)} of the input data segments, the updated bytes (A1, A2,..., An) are generated, and the process is repeated \"N\" times. Finally, the \"Ai\" bytes are generated as a result. 2. Phase of transposition: The resultant Ai bytes' bits are switched during the transposition phase. Table 3 represents the DNA sequences and the set of operations that are used  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**S. No.** & **Letters from DNA** & **Representation in Binary** \\ \hline
1 & A & 00 \\ \hline
2 & T & 01 \\ \hline
3 & C & 10 \\ \hline
4 & G & 11 \\ \hline \hline \end{tabular}
\end{table}
Table 2: The letters in the DNA sequence are represented in binary.  
to generate the Sk bytes, which are the foundation for the \"bits-swapping process\" carried out on A {A\({}_{O_{1}}\), A\({}_{O_{2}}\), A\({}_{O_{3}}\)... A\({}_{O_{1}}\),).). Do not swap, for instance, if the first two-bit sequence of the alphabet is \"00\" and \"01\". The DNA sequence's third and fourth bits are swapped if they are \"01\" and \"11\". Figure 3 depicts the transposition flow. Likewise, until the entire data gets encrypted, the \"substitution\" and the \"transposition\" operations are performed repeatedly [33].  
* Encryption Process: Transposition is performed first, then substitution, when the \"decryption\" initializes. The \"final byte of the encrypted input data\", or the Edata, serves as the starting point for the decryption process, which proceeds gradually to the first byte [12; 34; 35]. Given that both the sender and the receiver of the input data must follow the \"swapping rules\" in Table 3, the \"transposition phase restores\" the \"swapped bits\" to their original positions. After the \"transposition phase\", \"the substitution phase\" starts by performing an XOR operation using the final byte of the \"DNA sequence\", in which the transmitter of the Edata terminates the \"substitution operation\" and the last byte of the Edata. Up until the first byte of Edata, the substitution is still in effect. The initial input data will be restored after the substitution phase.  
Figure 2: The proposed “DNA-based Encryption Process”..