# Study About the Performance of Ascon in Arduino Devices
## 5 Performance Analysis of the Ascon Implementation
### Measures in the Encryption/Decryption Operations with Ascon  
A series of comparison tables are shown below. They contain different results for the three analyzed versions of Ascon: Ascon-128, Ascon-128a, and Ascon-80 pq (see Section 2.1). The implementations we have considered are the reference implementations. The tables collect data related to processor clock cycles. As it is well known, clock cycles are a metric used to evaluate the performance of a cryptographic algorithm in terms of computational efficiency. For all cases, we considered the following parameters for Ascon-128 and Ascon-128a: 16-bytes for the master key and the nonce, the block size is 16 bytes, and 8 bytes are used for AEAD--whereas for Ascon-80 pq, we considered 20-bytes for the master key, 16-bytes for the nonce, 16-bytes for the block size, and 8-bytes for the authenticated data (see Table 1). Tables 5 and 6 show the number of cycles and encryption and decryption operations in some specific periods of time (1 s, 5 s, and 10 s) for both processes of encryption and decryption, for each version of Ascon on an Arduino DUE. It can be seen that the number of cycles and operations for the encryption and decryption processes in each time period for the three versions of Ascon are very similar. In fact, the average of the number of cycles for Ascon-128 in all cases, whether in encryption or decryption and regardless of the time period, is 33,011, except in the case of encryption with Ascon-128, in which it is 33,015. For Ascon-128a, these values are also very similar, and the averages vary between 30,661 and 30,663. The same occurs for Ascon-80 pq, where the averages of cycles are between 34,490 and 34,497 for any period of time. Comparing the different versions of Ascon among them for this device, it is clear that the number of cycles, on average, for Ascon-128a, are lower than for the other two Ascon versions, whereas the values, on average, for Ascon-80 pq are the biggest for the three periods of time considered. On the other hand, Tables 7 and 8 present the number of cycles and encryption and decryption operations in the same considered periods of time for the same processes, for the three versions of Ascon on an Arduino Mega2560. As in the case of Arduino DUE, the number of cycles and the number of encryption and decryption operations in each time period for each process and for the three versions of Ascon are very similar. For this device, the lowest number of cycles, on average, are also obtained for Ascon-128a version for both processes. On its part, the greatest number of cycles, on average, is for Ascon-80 pq, again. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Variant**} & \multicolumn{6}{c}{**Number of Cycles and Encrypptions in the Encryption Process. Arduino DUE**} \\ \cline{2-7}  & **\# Cyc. (1 s)** & **\# Dec. (1 s)** & **\# Cyc. (5 s)** & **\# Dec. (5 s)** & **\# Cyc. (10 s)** & **\# Dec. (10 s)** \\ \hline Ascon-128 & 84,013,860 & 2545 & 420,003,696 & 12,723 & 840,006,636 & 25,446 \\ Average & 33,011 & — & 33,011 & — & 33,011 & — \\ Ascon-128a & 84,018,480 & 2740 & 420,000,840 & 13,697 & 840,000,924 & 27,394 \\ Average & 30,663 & — & 30,663 & — & 30,663 & — \\ Ascon-80 pq & 84,028,644 & 2436 & 420,031,332 & 12,178 & 840,016,884 & 24,355 \\ Average & 34,494 & — & 34,490 & — & 34,490 & — \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Number of cycles (Cyc.) and decryptions (Dec.) in the decryption operation in Arduino DUE for the three versions of Ascon.