Journal of Sensors

Volume 2019, Article ID 8520562, 9 pages

https://doi.org/10.1155/2019/8520562

## Influence of Encryption Algorithms on Power Consumption in Energy Harvesting Systems

^{1}Department of Microelectronics, University of Niš, Faculty of Electronic Engineering, Niš, Serbia^{2}Department of Computer Science, University of Niš, Faculty of Electronic Engineering, Niš, Serbia

Correspondence should be addressed to Ljubomir M. Vračar; sr.ca.in.kafle@racarv.rimobujl

Received 15 November 2018; Revised 8 March 2019; Accepted 21 March 2019; Published 8 April 2019

Academic Editor: Jaime Lloret

Copyright © 2019 Ljubomir M. Vračar et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Autonomous energy harvesting sensors present one of the most attractive areas of microelectronics at the moment. They are a part of Internet of Things (IoT) systems so the data need to be protected across transmission. One way for data protection is encryption and the other way is digital signature. However, energy consumption of those systems is increased using protections algorithms, and it should be considered because these are energy harvesting systems. The paper describes the ways in which data encryption and digital signature algorithms can be implemented in resource limited systems based on an 8-bit microcontroller. Alongside the implementation method, the paper deals with the energy demands of the selected encryption algorithms and digital signatures. The execution time, energy consumption, and memory consumption will be considered.

#### 1. Introduction

Continuous reduction of the microcontrollers’ and sensors’ energy consumption has boost development of various energy harvesting systems. Those are autonomous systems supplied by the energy gathered from their surroundings. The most common energy sources are the ambient light, thermal gradient, airflow, vibrations, and electromagnetic radiation. These devices have either a single power management circuit in order to reduce the complexity and dissipation or an optimized power management circuit for each energy source to increase efficiency of the whole system. They tend to work in low consumption mode whenever it is possible in order to increase their autonomy [1, 2]. Energy harvesting sensor nodes are organized in a sensor field around a base station that represents some kind of a data sink. Usually, every WSN node has just enough energy to periodically collect measured data and transfer collected data to the nearest base station in a single burst, using the single-hop infrastructureless architecture. Thus, an operating cycle of the node consists of the two operating modes: active and inactive. During the active mode, a node performs data acquisition and transmission. Usually, these operations last very short, around a few tens of milliseconds. WSN node spends much more time in the inactive mode in order to preserve energy and this period lasts from few seconds to few minutes. Ratio of the active and inactive periods represents an operating duty cycle of the node, in range approximately from 0.005% to 5%.

In addition, there is a need for data protection during transmission. Encryption and digital signature can be used for it [3–7]. Data are protected in this way, but energy consumption of system is increased because program complexity rises. Implementation of encryption algorithms in energy harvesting systems is mainly driven by WSN node energy limitations and characteristics of the system microcontroller. Energy consumption depends on the algorithm which has been used and the quantity of data transferred.

The lack of data and energy storage and low levels of electrical and computational performance in a node represent major obstacles to the implementation of established security techniques in wireless sensor network. Wireless sensor nodes often have very limited processing capabilities and the trend in manufacturing is to reduce the cost of nodes, not to increase computing power. The unreliable communication channel and unattended operation make effective security even more difficult to achieve.

Concerning security aspects, the problem of optimizing resources used for security, yet providing an adequate level of protection, is a hot topic at the moment [8, 9]. Researchers have made considerable efforts to develop lightweight cryptographic algorithms suitable for resource-constrained devices. In particular, the trade-off between energy and performance requirements of security solutions is of utmost relevance for energy harvesting systems. Each adopted security solution should be a good compromise between factors that are conflicting in nature such as power consumption and performances.

#### 2. Algorithms and Measurement Methods

Several algorithms of encryption can be implemented in autonomous sensors [10, 11]. It mainly depends on characteristics of microcontroller this is the part of system, in order to make the encryption run as efficiently as possible. Some of the algorithms for this application are TEA [12], XTEA [13, 14], and SKIPJACK. All listed are symmetric algorithms.

The name TEA is acronym of Tiny Encryption Algorithm, and adjective tiny indicates the simple way of doing and implementation. TEA algorithm encrypts data that are divided into 64-bit blocks using 128-bit key, and it was based on Feistel’s network (Feistel cipher). It was initially proposed to carry 64 rounds within the TEA algorithm; however, implementation with 32 rounds is common. Disadvantage of TEA is simple distribution of keys. Equivalent keys are the consequence of that; each key is equal to the other three.

XTEA (eXtended Tiny Encryption Algorithm) presents advanced version of TEA developed by David Wheeler and Roger Needham in 1997. Differences between TEA and XTEA are in the order of performing operations and in the way the keys are distributed. XTEA requires a small memory space so it is often used in systems whose hardware features are limited.

SKIPJACK algorithm was developed in the early 1980s by the American National Security Agency for encryption of Government’s documents. It runs within 32 rounds and encrypts 64-bit data blocks using an 80-bit key.

##### 2.1. Digital Signatures Algorithms

Unlike encryption, in digital signature, the data transmitted can be encrypted or may remain transparent and it is possible to determine the sender of the message. The digital signature algorithm consists of three parts: keys generating, signing, and signature verification. Some of digital signature algorithms are RSA [15], ElGamal [16], Rabin, Schnorr, and Nyberg-Rueppel. In this paper RSA and ElGamal algorithms were used.

RSA digital signature algorithm is based on RSA asymmetric encryption algorithm [17]. Today, this algorithm is most used. Key generating in this algorithm is based on calculating with large prime numbers* p* and* q*. It is recommended that* p* and* q* be the size of 512 to 1536 bits, to ensure proper security. Of course, this applies to computer systems that do not have memory constraints. When the RSA digital signature algorithm is implemented on a microcontroller, the sizes of the keys expressed in bits must be considerably smaller (the numbers* p* and* q* are 16-bit in size).

ElGamal’s digital signature algorithm was developed in 1985. The working principle of this algorithm is based on calculating discrete logarithms. The size of initial parameter* p* for keys generation is 16 bits like the parameter in RSA algorithms. Digital signature is based on asymmetric encryption algorithms and implementation of those algorithms on microcontroller is more complicated than symmetric ones because they are based on complex mathematical computation. However, we decided to use two digital signatures algorithms and three symmetric encryption algorithms in order to explore implementation possibilities of both algorithms. Before encryption the data are divided into 64-bits block for all three encryption algorithms. Only one of these blocks was used in the research because it is sufficient to represent data obtained from sensor (temperature sensor LM35). For sensors with the amount of output data (encryption input data) larger than 64 bits, it is necessary to divide data in the blocks and perform encryption for every block separately. Total execution time and system energy consumption in that case would be increased linearly.

Figure 1 shows algorithms that present ways in which a digital signature can be implemented in a microcontroller. These algorithms can be applied to any digital signature algorithm.