## 3 Benchmark Results
### Key Generation Algorithms  
The evaluated public key algorithms are RSA, DSA, Elliptic Curve Cryptography (ECC) and Pairings. We have evaluated RSA and DSA using keys of 512, 1,024 and 2,048 bits. We have set the public exponent of RSA keys to 3 because it provides better performance in signature verifications; this exponent is usually used in constrained environments where a lot of verifications have to take place. The results using other exponents do not differ a lot, signature generations are more efficient and verifications are not so much, but overall, the general performance of the algorithm is quite the same. For the case of ECC, we have tested the algorithm using three curves, secp112r1, secp160r1, and secp224r1. All curves are over a prime field and their parameters are chosen verifiable at random. The length of the field order of each curve is: 112 bits for the secp112r1, 160 bits for the secp160r1 and 224 bits for the secp224r1. Regarding Pairings, we have analyzed key generation algorithms for two digital signature schemes: BLS signatures from [10], and BB signatures from [11]. We have generated the pairing using type A curves as defined in [12] which are the fastest and most efficient. The prime order of cyclic groups \(G_{1}\) and \(G_{2}\) is 160 bits, and the elements of the groups take 512 bits to represent. Figure 3: Throughput (represented with bars) and Energy Performance (represented with dots) of hash algorithms. Table 5 shows key sizes of different cryptographic systems for equivalent security levels. Values are from the European Network of Excellence for Cryptology (ECRYPT) [13], which are very similar to the ones issued by other organizations like NIST in [14]. Figure 4 shows the temporal and energy costs of asymmetric key generation in our testing devices. The generation of ECC keys is by far the fastest algorithm, followed by pairing key generation. Moreover, the generation of 1024-bit DSA keys is nearly unacceptable by PDA devices, with execution times that greatly surpass 5 seconds, which is a lot. Nevertheless, in systems that do not require to renew cryptographic keys in short time periods, key generation has to be run only once and so, time  
Figure 4: Temporal costs (represented with bars) and Energy costs (represented with dots) of asymmetric key generation algorithms. \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Equivalent**} & \multicolumn{2}{c}{**Asymmetric key**} \\ \cline{2-3}  & **ECC** & **RSA** \\ \hline
48 & 96 & 480 \\ \hline
56 & 112 & 640 \\ \hline
80 & 160 & 1248 \\ \hline
112 & 224 & 2048 \\ \hline
128 & 256 & 3248 \\ \hline
256 & 512 & 15424 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Security level of cryptographic algorithms. performance is not really significant. What matters is the performance of working with those keys, that is, digital signature algorithms that we will see next. RSA and DSA key generation involves primality testing, which is an expensive operation. Besides, prime tests are probabilistic, which means that the execution times are not always the same and occasionally can be very long. The required time to find proper primes increases polynomially with the size of the searched prime. Figure 4 shows average values. The generation of a 512-bit RSA key requires finding two prime numbers of 256 bits, and the generation of a 512-bit DSA key requires a prime number of 512 bits. This last operation is more expensive than RSA's because of the size of the prime, and so, it takes more time. On the other hand, we also note that the increment of time delay due to the complexity increase of some operations (_i.e._, the size of the key), is even more significant when using slower microprocessors. The generation of 2048-bit RSA and DSA keys is too resource consuming for the devices under test and can not be assured that the generation will end successfully. So, results are not provided in the figure.