Table 3: Elliptic Curve vs RSA.
key size 1024 2048 4096
RSA
enc 7.32 ±8% 7.00 ±8% 7.31 ±9%
dec 27.23 ±8% 46.62 ±3% 48.19 ±3%
gen 231.11 ±4% 935.05 ±6% 6509.54 ±6%
deriv 6.77 ±17% 6.40 ±7% 6.32 ±10%
key size 112 128 160 224 384 512
ECC-secpr1
gen 7.15 ±9% 8.27 ±11% 8.90 ±10% 32.55 ±6% 46.45 ±3% 6.28 ±7%
deriv 6.04 ±8% 7.02 ±11% 6.11 ±9% 6.40 ±8% 5.83 ±8% 6.71 ±9%
mix 7.90 ±13% 8.20 ±9% 9.91 ±11% 33.89 ±6% 44.52 ±3% 6.43 ±6%
those obtained for the hashing of small files (<8mJ).
The decryption operation is 4 to 7 times more ex-
pensive (≈ 50 mJ) which is comparable to the val-
ues observed for AES encryption/decryption for 1MB
files.The public key derivation is the least expensive
operation (around 6mJ). By contrast, for RSA, pri-
vate key generation operations are extremely expen-
sive to reach values ranging from 230mJ to 6500mJ,
i.e. 1000 times more than an encryption operation. In
a power optimization strategy, private key generation
should therefore be done outside the device.
7 CONCLUSION
In this study we proposed a framework to evaluate
the power consumption related to the consumption of
a single software function. We used this framework
to evaluate and compare the power consumption of
standard functions of the OpenSSL 1.1.1 library on a
Raspberry Pi. This article then details the power con-
sumption according to the different input parameters
of these functions (key size, file size).
The following are the general conclusions we
were able to draw at the end of the study:
• The minimum consumptions remain lower than
10mJ per execution.
• The maximum consumptions observed (except for
the generation of private key for RSA) are 4 to 5
times higher and of the order of 50mJ.
• The least power-consuming functions that we
studied are MD4 and MD5.
• The hash computation can have a consumption
multiplied by 7 according to the algorithm used.
• On the contrary, the different mode and operation
for AES are similar in terms of consumption.
• The cost of RSA encryption is curiously inexpen-
sive: it is less than an AES encryption and is of the
order of a hash computation. The decryption is
more expensive but remains similar to the values
observed for an AES encryption or decryption.
In the longer term, this study open two distinct
lines of research: it allows to evaluate the energy
extra-cost of implementing a secure solution versus
an insecure or less secure solution and it makes it pos-
sible to highlight the normal behavior (in term of en-
ergy consumption) of an isolated security function.
REFERENCES
De Meulenaer, G., Gosset, F., Standaert, F.-X., and Pereira,
O. (2008). On the energy cost of communication
and cryptography in wireless sensor networks. In
2008 IEEE International Conference on Wireless and
Mobile Computing, Networking and Communications,
pages 580–585. IEEE.
El-Haii, M., Chamoun, M., Fadlallah, A., and Serhrouchni,
A. (2018). Analysis of cryptographic algorithms on
iot hardware platforms. In 2018 2nd Cyber Security
in Networking Conference (CSNet), pages 1–5. IEEE.
Gutmann, P. (2012). Cryptlib security toolkit, version 3.4.
http://www.cryptlib.com.
Jiang, W., Guo, Z., Ma, Y., and Sang, N. (2013).
Measurement-based research on cryptographic algo-
rithms for embedded real-time systems. Journal of
Systems Architecture, 59(10, Part D):1394 – 1404.
Li, Q. and Zhou, M. (2011). The survey and future evolution
of green computing. In IEEE/ACM International Con-
ference on Green Computing Communications, pages
230–233.
Montenegro, J. A., Pinto, M., and Fuentes, L. (2017). What
do software developers need to know to build secure
energy-efficient android applications? IEEE Access,
6:1428–1450.
Omrani, T., Rhouma, R., and Sliman, L. (2018).
Lightweight cryptography for resource-constrained
devices: a comparative study and rectangle cryptanal-
ysis. In International Conference on Digital Economy,
pages 107–118. Springer.
OpenSSL-Management-Committee (2020). Openssl.
https://www.openssl.org/.
Texas-Instrument (2018). Ads111xultra-small, low-power,
i2c-compatible, 860-sps, 16-bitadcs with internal
reference, oscillator and programmable comparator.
https://www.ti.com/product/ADS1115.
Tiwari, V., Malik, S., and Wolfe, A. (1995). Power anal-
ysis of embedded software: First step towards soft-
ware power minimization. Very Large Scale Integra-
tion Systems, IEEE Transactions on, 2:437 – 445.
SECRYPT 2021 - 18th International Conference on Security and Cryptography
494