**3.1. Classes of cryptographic algorithms**

Traditionally users of encryption algorithms used simple, but currently the goal is to make the algorithm so complex that without the key is practically impossible to extract some information through a cryptanalysis. The classes of cryptographic algorithms say about it as an encryption key is changed and also the quantity of keys involved in the application of the method. Most existing cryptographic algorithms can be classified as symmetric or asymmetric.

## *3.1.1. Symmetric encryption*

6 Will-be-set-by-IN-TECH

Different types of WSN applications require different security requirements. In an environment of temperature monitoring, where researchers collect data for research, it may be that safety requirements are not very important, but the monitoring of radiation near a nuclear power plant requires authenticity assurance, confidentiality, availability and integrity. Various architectures have been developed to provide security in WSNs, among them are: SPINS, TinySec MiniSec and besides these the IEEE 802.15.4 include a security framework to

SPINS (Security Protocols for Sensor Networks) developed by Perrig [15] consists of a set of security protocols that acts through encryption and message authentication codes. The TinySec was designed and implemented in the TinyOS operating system to be a mechanism for providing confidentiality, integrity and authenticity of the data link layer. It uses the CBC mode of operation that may be combined with various block ciphers as RC5 and skipjack [16]. The MiniSec is a protocol layer of security to WSN using OCB (Offset Codebook) mode for operating the block cipher, which eliminates the need of adding filler to the clear text blocks [17]. The standard IEEE 802.15.4 provides integrity, access control, confidentiality and replay protection in the link layer. The cryptographic algorithm used in this standard is AES [18]. According to Loureiro [4], a WSN tends to be autonomous and requires a high degree of cooperation to perform the tasks defined for the network. This means that traditional distributing algorithms, such as communication protocols and election of leader, should be reviewed for this type of environment before being used directly. Taking account also the limited computational power and especially of limited energy of devices is possible to deduce that not everything that works efficiently in traditional computer networks can be used in WSNs The computational limitations of a device restricting the choice of cryptographic algorithms and protocols safety. Furthermore, the lifetime of the batteries using techniques preclude the complex of security because it drastically decreases the life span of the network.

Encryption is the security solution most applicable in computing. In recent years asymmetric algorithms have been extensively studied in embedded systems with low computational power. The next section discusses concepts of cryptography, and the description of the

Data encryption emerged before the invention of computer. Diplomats, enthusiasts and mainly militaries contributed to the evolution of this art that consists in distort the information that is being transported, so that only the authorized recipient can decipher it. In this regard, a cryptographic algorithm can be set as a function that converts encrypted message in clear

Most cryptographic algorithms are public, according to Tanembaum [19] keeping the algorithm public gets rid of the creator from eager cryptologist to decode the system in order to publish articles, and that after five years of their exposure and no decoding was successful, the algorithm is assumed to be solid. Secrecy is the key that has the function to parameterize the cryptographic function, ie only with the key can encrypt or decrypt a message. Another important factor is that the key have the ability to change the output of the algorithm, so every

meet the services of data integrity, confidentiality and authenticity [3].

**2.4. Defense mechanisms**

[18].

algorithms RSA, ECC, HECC and MQQ.

messages and vice versa, making use of a cryptographic key.

**3. Concepts of cryptography**

Symmetric encryption or secret key cryptography is the use of only a key, both in the encryption and decryption of data. By the year 1976 this was the only known method for the use of encryption, but to be effective you need a secure channel for communication in which a cryptographic key can be changed.

Figure 3 illustrates a communication through symmetric encryption. The text is encrypted X and Y become the message through the encryption algorithm and key k. The message Y is sent to the receiver, which uses the key k to decrypt it, turning it on again in the text X. Also according to figure 3 you can see that the key k is transported by a secure channel, for the possession of it, a potential attacker could easily make the reading the original text. AES and DES are two examples of algorithms that are part of the class symmetrical.

### 8 Will-be-set-by-IN-TECH 224 Wireless Sensor Networks – Technology and Protocols

## *3.1.2. Asymmetric encryption*

The public key cryptography or asymmetric cryptography came up with a radical change of paradigms. According to Stallings [22] public key algorithms are based on mathematical functions, instead of permutation and substitution. Besides the single most important thing is that the public key cryptography is asymmetric, involving the use of two different keys, in contrast to the conventional symmetric encryption, which uses only one key. The use of two keys has profound consequences in the areas of confidentiality, key distribution and authentication. The main distinguishing feature of asymmetric encryption is that it allows the establishment of a secure communication between individuals, without the requirement of the previous share a single cryptographic key.

### **Figure 4.** Asymmetric Cryptography [22]

In this class of cryptographic algorithms are used two different keys for encryption and decryption: a public key and its corresponding private key. In this model, in accordance with figure 4, the receiver releases its public key to the sender can encrypt the message, but only the private key of the receiver, which is kept secret is able to decrypt it.
