Security Programming Guide
Development website
  • Introduction
  • Initial page
  • Integrity
  • Authenticity
  • Confidentiality (privacy)
  • Secure Communication Scheme
  • Key Management on Meshlium
  • Code examples and extended information
  • API changelog
Powered by GitBook
On this page

Was this helpful?

Secure Communication Scheme

PreviousConfidentiality (privacy)NextKey Management on Meshlium

Last updated 4 years ago

Was this helpful?

It is possible to communicate from Waspmote to Meshlium directly using secure communication schemes.

In the case that XBee modules are used to communicate, the user has the chance to enable the AES-128 link layer encryption that these modules provide. On the other hand, application layer encryption can be used thanks to the AES encryption libraries. This second option is available for any kind of communication module provided by Waspmote (XBees, LoRa, 3G, GPRS, WiFi, Bluetooth, BLE, Industrial Protocols, etc). The API libraries permit to use AES encryption with different key sizes: 128, 192 or 256 bits.

The following diagram shows how the communication scheme works:

The user has three different possibilities: AES-128, AES-192 and AES-256. Regarding the cipher block mode, only ECB is supported to communicate to Meshlium. Besides, zeros padding is the only choice permitted.

The process of how to encrypt a previously created frame is as follows:

  1. Create a new Frame (ASCII or BINARY)

  2. Generate an encrypted frame from the original one

  3. Send the encrypted frame

Once the encrypted frame is received by Meshlium, the sensorParser decrypts the frame and stores the sensor fields inside the database automatically.

Example of sending encrypted frames to Meshlium via XBee-802.15.4:

For more information about how to create encrypted frames go to: .

Data Frame guide
https://development.libelium.com/aes-07-aes-128-ebc-zeros-with-frame/
Figure : Communication scheme