# Analysis of Lightweight Cryptographic Algorithms on IoT Hardware Platform +
## 4 Results  
This section presents the main benchmarking observations. For each metric, the best ten and the worst five performing algorithms are selected in a quick and brief overview. The focus will be on the following measurements:  
* The ROM, RAM, code size, and key schedule speed throughput and latency of the 39 ciphers. * The number of rounds, encryption/decryption speed throughput/latency, and energy throughput/latency of all the 119 ciphers. In addition, the measurement tools used are stated briefly for each metric. * Analysis of the number of rounds: As part of the algorithm design, modern ciphers increase their security (confusion and diffusion) through the repeated execution (n times) of a simple round function. In block ciphers, the input and output of the round function are equal to the cipher block size in general. As a standard rule, increasing the number of rounds \(n\) increases the security level, while decreasing the number of rounds would play a significant role in shortening the execution time of the encryption and decryption, which is one of the essences of lightweight cryptography. In this project, the range interval of the number of rounds of the studied algorithms is [8; 254], as shown in Figure 2. Among the five ciphers with the largest number of rounds, the Katan-Ktantan family is designed with the highest, while the Ace-64-128 and TinyJambu families are with the least among the smallest 10. * Analysis of code size: The code size is the size of the algorithm code written in C language. It is the occupied space on the disk or memory. Moreover, it might project the occupation of the ROM and RAM sizes. Many of the cipher implementations were optimized in coding for different considerations, among them, of significant importance, was changing the plaintext declaration in a way that takes no more space than what is required. According to the results illustrated in Figure 3, the range intervals of the code sizes are [3.6; 21] and [3.49; 17.3] in Kbytes for UNO and Pi, respectively. Of the 10 smallest code sizes, the least are Katan-32-80 and Present-64-128, whereas the biggest are Piccolo-64-80 and Rectangle-64-128 in UNO and Pi, respectively. Figure 2: 19 algorithms of smallest N of rounds and 13 of the biggest. Analysis of ROM size: Read-only memory or ROM is a non-volatile memory. Data stored in ROM are generally the code and the tables that do not need modifications. The Arduino Uno (ATMEGA328P) ROM size (Flash) used is 32 Kbytes in size, while the Pi's is a variable SD card where 64 Gbytes is used in this project. The Arduino IDE fulfills the ROM measurement requirement that gives the occupied size of the storage space. However, in Pi, the \"size\" command is used in the terminal (Linux OS) as a tool to obtain the text, data, Block Started by Symbol (BSS) (Block Started by Symbol is the space that contains all the uninitialized data), and DEC sizes (DEC = text + data + BSS) of the compiled code file in an Extensible Linking Format (ELF) extension. The range interval is [1.48, 6.05] and [3.81, 9.67] in Kbytes for UNO and Pi, respectively. Figures 4 and 5 show the least cipher-demanding ROM among the 10 smallest which are the LEA family/Prince-64-128 and Present-64-80, respectively, for UNO and Pi, while the biggest demand is Piccolo-64-80 for both platforms. Figure 4: The 10 smallest ciphers demanding ROM and 5 largest for UNO. Figure 3: Code size of algorithms used in benchmarking. (**a**) The 10 algorithms of DEC smallest code sizes and 5 of largest. (**b**) The 10 algorithms of smallest ENC code sizes and 5 of largest. (**c**) The 10 Algorithms of smallest code sizes and 5 of largest. Analysis of RAM occupation: Random-access memory (RAM) is the short-term memory where data are stored to be processed by the processor. Data are stored in the RAM in the form of a heap and stack. The size of UNO's RAM (SRAM) used is 2 Kbytes, whereas the Pi's is 1 Gbytes. The Arduino IDE is sufficient for obtaining the RAM usage by the ciphers.