**3. Concepts of cryptography**

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 messages and vice versa, making use of a cryptographic key.

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 change of key cryptographic algorithm generates a new encrypted message. The key size is critical in a project, because the longer the key, more work will be crypto analyst to try to decipher the message. In general, keys have sizes of 64, 128 or 256 bits and may be higher or lower, according to security needs.

Currently, in addition to confidentiality, encryption also operates in the fields of integrity of authentication and is described below:


According to Boyle and Newe [20] encryption is the standard method for defending a WSN of most possible attacks, and the various levels of encryption implicate variations in overhead in the form of growth in the size of the package data, code size, processor usage, memory, etc.. The choice of a cryptographic algorithm to get efficient for a WSN is a large debate among researchers. According to Chen [21] the cryptographic methods used in WSN should meet the constraints of computational devices, and go through evaluation before being implanted.
