# DNA-PRESENT: An Improved Security and Low-Latency, Lightweight Cryptographic Solution for IoT
## 4 Security, Cost, and Performance Analysis
### Security Analysis  
Security is a primary requirement of any cryptographic algorithm. Confusion is a property that an encryption algorithm must possess to provide a complex relationship between plaintext and the ciphertext produced. Diffusion is when a slight change in plaintext disperses over the entire ciphertext [14; 16; 17; 18; 19; 20; 21; 22; 67]. Both confusion and diffusion are essential elements of a cryptographic algorithm to ensure optimal security [45]. Three experiments are conducted to evaluate these properties of the algorithms, including the avalanche effect, bit error rate, and correlation coefficient test. This evaluation methodology proves to be highly effective in assessing the security strength of lightweight block ciphers and can subsequently be adapted for other cryptographic primitives. 1. **Avalanche Effect (AE)**: The avalanche effect (AE) is one of the significant characteristics of cryptographic algorithms. It assesses the diffusion property of the algorithm where one bit in a key or in plaintext is changed to observe the bit difference in ciphertext (Equation (2)). In Equation (2), \"x\" denotes the length of the encrypted block, which is 64 bits for both algorithms, followed by \"\(c_{i}\)\" and \"\(p_{i}\)\", which are the \(i\)th positioned ciphertext and plaintext bits. Later, in Equation (3), a percentage of the bits is calculated for a fair comparison. The AE value should be \(\geq\)50% to ensure perfect diffusion [67; 68; 69]. \[AE=\frac{1}{x}\sum\limits_{(i=1)}^{x}|c_{i}-p_{i}|\] (2) \[\text{\emph{Percentage of } bits }\text{\emph{changed}}=(AE)\times 100\] (3)  
The test has been applied to both algorithms from two different perspectives, key sensitivity and plaintext sensitivity, and the datasets are given below in Tables 3 and 4. The key sensitivity test will involve changing the value of the secret key, while the  
Figure 15: Categorization of tests for analysis. plaintext sensitivity test will require modifications to the plaintext bits. A perfect combination of each key against each plaintext has been created, where no key or plaintext combination has been ruled out in the evaluation. The exact numbers of secret keys, plaintext, derived ciphertext blocks, and obtained bits are presented in their respective columns. Derived blocks are directly proportional to the number of secret keys and plaintext for key and plaintext sensitivity. The derived bits are the ciphertext bits, which, for both PRESENT and DNA-PRESENT, are 64 bits (hence, derived blocks \(\times\) 64 = derived bits). * **Key Sensitivity**: The size of the secret key is a major concern in symmetric encryption systems, and according to NIST, the key length should be \(\geq\)128 bits to ensure a basic defense against a brute force attack [70; 71], which is met by DNA-PRESENT. Moreover, a well-designed algorithm should possess a desirable property of extreme sensitivity towards the bit change, where a small difference in the secret key can significantly affect the ciphertext even though the plaintext is kept constant [68]. Table 3 is used as the input for datasets while using Equations (2) and (3) to perform key sensitivity tests. The results are summarized in Table 5. A total of 1152 observations are derived and categorized into five different categories for a comprehensive review. The DNA-PRESENT has no observations in the \(\leq\)30% category. A 50% bit change is considered the ideal AE; for DNA-PRESENT, this value has increased to 10.33% from 9.81%. A perfect value with \(>\)50% AE has 4.6% more observations for DNA-PRESENT, indicating an evident increase in AE using DNA-PRESENT. The key sensitivity observed values are graphically presented in Figure 16a-i, following the same order of datasets as presented in Table 3, and exact observed values are plotted, respectively. These graphs endorse that DNA-PRESENT is more sensitive to key changes compared to PRESENT. It can be seen from the graphs that only