Security and data encryption

The SX1272 does not implement any security method. Data encryption is an optional feature provided by the Waspmote\'s API, and it is highly recommended to take advantage of it using in real projects. That means we can make the LoRa module send packets previously encrypted by Waspmote micro-controller. This way we will ensure nobody can read our packets, and the authenticity of the senders is verified.

Advanced Encryption Standard (AES) is a symmetric key encryption algorithm that supports key lengths of 128, 192, and 256 bits and encrypts a block of elements (set of bits) at the same time, unlike stream ciphers that encode each single item individually. This feature allows the algorithm to be very fast. It has the advantage of occupying very little memory and consequently makes it very suitable for low memory capacity devices.

AES is able to encrypt and decrypt a block of data using a key. The key and the block of data have a fixed length. The input is always 128-bit (16 bytes), while the key can be 128-bit, 192-bit or 256-bit (16, 24 and 32 bytes respectively). The information is encrypted with AES using a private key shared exclusively between the origin and the destination.

AES is classified as a block cipher algorithm. This means it has different modes of operation, like ECB or CBC mode. In this case it has been used ECB (electronic codebook) mode, which is the simplest of the encryption modes, with a ZEROS padding scheme.

For further information, please check the Waspmote Encryption Programming Guide:

And also the encryption examples:

Security in transmissions

When creating or joining a network, using security is highly recommended to prevent the network from attacks or intruder nodes. It is necessary to enable security and set the same encryption key in all nodes in order to set security in a network. If not, it will not be possible to communicate between different LoRa modules.

When creating a link between 2 nodes, it is possible to use the Waspmote encryption libraries to make the communication secure.

SX1272 encryption example:

It is also possible to make the communication secure using the Waspmote Frame.

SX1272 encryption example transmitting a frame:

Last updated