# Evaluating the Performance of Lightweight Ciphers in Constrained Environments--The Case of Saturnin
## 3 Evaluating the Performance
### Experimental Results  
For both algorithms, the key size that we utilized is 256 bits--i.e., we chose the maximum possible size for AES key, in order to perform comparisons with the same key sizes. Our original message, before the crypto procedure, is the ANSI string \"This is my top secret message...1\", having length equal to 32 bytes (256 bits).  
To estimate the performance, the client makes 100 requests to the server and measures the total time needed for the following operations:  
* Sending the request to server;
* Encrypting the message;
* Transmitting the (encrypted) message back to the client;
* Decryption of the message received;
* Writing the result on the screen.  
Figure 2: A screenshot from the execution of a setup, illustrating that, for both ciphers, the decrypted messages coincide with the original plaintext.  
As stated above, the server responds initially by sending back the message unencrypted, then it sends it back with AES encryption and finally, with Saturnin encryption (and, thus, the above operations are being adjusted accordingly). Hence, we actually estimate the time duration for three different scenarios--one for each of the above cases (for the first case, no encryption operation is performed).  
In order to illustrate more clearly the comparison between AES and Saturnin in terms of performance, the server repeats, for both cases, the encryption algorithm 500 times and, at the subsequent iteration, it sends the encrypted message to the \"client\". In other words, we deliberately introduced the same encryption delays for both cases, since otherwise the time needed for encryption was negligible to be measured by the software. By these means, the server encrypts 16,032 bytes (501 \(\times\) 32 bytes) in total.  
The results of the above are shown in Figure 4, which illustrates that, in almost all cases, Saturnin is nearly two times faster than AES (i.e., the estimated RTT is being reduced almost to the half value). More precisely, the minimum measured RTT for AES was 173 ms and the maximum was 220 ms. For Saturnin, the corresponding minimum value was 83 ms and the maximum 196 ms.  
For a more concrete comparative study, we also estimated the mean value of all RTTs measured, for each case (AES and Saturnin). By these means, we can verify that the mean value of the RTT for the Saturnin was 93.71 ms, whereas the corresponding value for AES was 185.27 ms.  
It should be stressed that, as we noticed, there exist variations in time measurements on the client side per request, while the time measurements on the server side are always the same. This happens because the client measures the total time of the transaction, whereas the server measures only the time of the encryption. That is why the server almost always prints (measures) 168 ms for AES encryption and 76 ms for Saturnin encryption--and this is actually the pure comparison on the performance of the encryption operations between Saturnin and AES. Therefore, we actually verify that the network load has also a crucial role for the overall performance of an encrypted network communication. In any case though, even if we focus explicitly on these values, we again come to the conclusion that Saturnin is about 2 times faster than AES.  
Figure 3: A screenshot after a response from the server to the client, illustrating the time needed for encryption for both AES and Saturnin (which is independent from the network and, thus, constant).