## 3 Benchmark Results
### Symmetric Cryptography  
We initiate the analysis of security performance in a PDA with the simplest cryptographic operations: symmetric ciphers and hash functions. Benchmark tests were conducted using eight different plaintexts of size 20 B, 1 KB, 10 KB, 100 KB, 250 KB, 500 KB, 750 KB and 1 MB. For each plaintext file the test was repeated from 500 times for big files, up to 50,000 for small ones, with the aim that the uncertainty of the results is less than 0.01%. Regarding symmetric cryptography, we analyzed the resources employed by DES, 3 DES and AES to encrypt and decrypt a file using the Electronic Code Book (ECB) cipher mode, in which each plaintext block is encrypted in turn with the block cipher. ECB is the easiest of the cipher modes because there are no dependencies between ciphered blocks. We take this mode for our analysis as a reference point, because of its simplicity and its widespread use. Since in ECB the plaintext is cut in blocks of a predefined size and these blocks are sequentially encrypted by the processor, we have modelled the consumed energy and time of symmetric encryption with a linear equation: \(Consum=a\cdot x+b\), where \(Consum\) is the consumed energy or time, \(x\) is the size in _KB_ of the plaintext. So, there exists a constant component \(b\) associated to the load of the program and the key setup phase, and an incremental one \(a\) that is proportional to the size of the input. The key setup phase is common to all block ciphers and it is performed before the encryption/decryption. This phase consists in expanding the input key in order to derive a distinct and cryptographically strong key. Then, the ciphering proceeds through a repeated sequence of mathematical computations over input blocks of data. The results demonstrate the model is correct because obtained regression lines present a determination coefficient \(r^{2}\) above \(99.9\%\). Table 3 shows temporal costs of symmetric cryptographic algorithms (encryption and decryption) for both iPAQ3970 and Hx2790 platforms. It expresses the linear regression for each tested algorithm in function of the input-text size \(x\) in _KB_, and besides, it compares the performance rate between the two devices. \begin{table}
\begin{tabular}{c c c c} \hline  & \multicolumn{3}{c}{**Time (ms)**} \\ \cline{2-4}  & **iPAQ3970** & **Hx2790** & **Ratio** \\ \hline DES (64) & 0.24 + 1.04x & 0.27x & 3.83 \\ \hline
3 DES (192) & 0.90 + 2.66x & 0.02 + 0.73x & 3.66 \\ \hline AES (128) & 0.02 + 0.71x & 0.16x & 4.44 \\ \hline AES (256) & 0.03 + 0.97x & 0.21x & 4.56 \\ \hline \end{tabular}
\end{table} 
Table 3: Temporal costs of symmetric algorithms in a PDA (ms). Results are better in the Hx2790 device, which is faster. While the clock frequency of the Hx2790 is \(1.56\) times faster than the one of iPAQ3970, cryptographic performance has improved more than threefold. This is because not only the core processor speed is greater but also is the system bus, and what is more, the processor has an internal memory for optimizing the performance. Furthermore, the increase of performance when using a faster PDA is demonstrated to be greater for AES algorithms than for DES or 3 DES. The implementation of AES can take profit of the major resources of a device. In any case, we notice that AES algorithms perform much better than DES and 3 DES in both ARM processors. The required time to cipher or decipher a DES file is even worse than the time required for doing it using AES with keys of 256 bits, and the security level of this last one is stronger. Nowadays DES algorithm is considered weak, not because it is vulnerable to security flaws, but because the keys are so small that they may be discovered by brute force attacks. From the time cost expressions, it is remarkable that the required initialization time for DES and 3 DES algorithms is greater than that of AES (in fact, in Hx2790 the initialization cost of most of the algorithms is is smaller than 1 \(\mu\)s, and so, depreciable).