The Beebit project provides a set of modules for developers who attempt to secure data communication in Internet of Thing (IoT) environment.
Message Queue Telemetry Transport (MQTT) is a light-weight data exchange protocol [1]. The publisher/subscriber (Pub/Sub) pattern of MQTT is suitable for most IoT applications. Currently, MQTT is widely accepted by many IoT platform providers, such as Google IoT Core, Microsoft IoT Hub, Amazon IoT, etc. MQTT has built-in Transport Layer Security (TLS) which provides end-to-broker encryption. However, end-to-end security is demanded to exchange privacy data for security-sensitive IoT applications. Unfortunately, it can be a obstacle to directly add end-to-end security in application layer for IoT application developers.
The beebit-mqttc-sdk module implements an extensible and transparent end-to-end security to MQTT according to our research work - MQTT Thing-to-Thing Security (MQTT-TTS)[2]. There are three features of MQTT-TTS
- Provide end-to-end security
- Ease to extend security mechanisms
- Transparent to application developers
The implementation is based on open source project - Eclipse Paho[3]. Paho is the most popular project which provides MQTT and MQTT-SN client and supports a variety of languages. The beebit-mqttc-sdk is based on C language.
In order to applying Ciphertext-Policy Attribute-Based Encryption (CP-ABE) in MQTT-TTS, you MUST install the beebit-cpabe-sdk module (native C).
cd paho.mqtt.c
make clean
make uninstall
make
make install
Run subscriber on one terminal
./build/output/samples/paho_cs_sub au/csie --host iot.eclipse.org
Run publisher on the other terminal
./build/output/samples/paho_cs_pub au/csie --host iot.eclipse.org
hello world
Assume we want to add a dummy security mechanism, called RV_LOWER, in which encoder does nothing and decoder juse lower case of data.
- Redefine constant NOM
- Include your header file (eg.
#include "beebit_lower.h"
)
Add one entry in function pointer array, baseinit_sec_map[]
. (eg. init_lower
)
beebit_lower.h
beebit_lower.c
paho_cs_pub.c
paho_cs_sub.c
make clean
make uninstall
make
make install
- http://mqtt.org/
- Wei-Tsung Su, Wei-Cheng Chen, and Chao-Chun Chen, "An Extensible and Transparent Thing-to-Thing Security Enhancement for MQTT Protocol in IoT Environment,", Global IoT Summit 2019, Jun. 17-21, 2019, Aarhus, Denmark.
- https://www.eclipse.org/paho/