Encryption

The sensor nodes are encrypted through Mosquitto over TLS. OpenSSL was used to create CA and broker keys and certificates, which were transferred to the gateway node. The CA certificate was used on the client nodes to give them a public key to encrypt traffic, which is, in turn, decrypted with a private key by the gateway node. The MQTT was configured to run over port 8883 and to utilize the generated certificates, thus allowing the MQTT traffic to be encrypted.


Heartbeat

The heartbeat system allows for the tracking of sensor connections to prevent the unsolicited removal of a sensor module and the creation of a secondary authentication method to prevent the addition of a malicious sensor module to the network. Ultimately, the gateway node will be alerted when it fails to receive the correct heartbeat from the individual nodes. The heartbeat consists of an established common seed between the gateway node and individual nodes. In order to ensure that the seed cannot be compromised by an attacker breaking into a node, the seed is wirelessly created using Diffie-Hellman key exchange (the symmetric key is used as the seed). The common seed is used for pseudorandom number generation, where each of the nodes, including the gateway node, will generate the same 10-digit random codes every five seconds. The individual nodes send their heartbeat codes to the gateway node where they are authenticated against the numbers being generated by the gateway node. Malicious nodes would neither be able to generate the same random number sequences as the legitimate nodes nor connect to the network.


External Media Encryption

Once the critical threat level is achieved, the box node triggers a Python process which encrypts the external media plugged into the box node, meaning that even if the attacker manages to escape the room whilst the alarm is sounding, the data in the box node will be incomprehensible for him. The encryption is done through a recursive file reading AES encryption program that deletes itself after completion in order to protect the key. There is a decryption program separate from the box node, which can be used to decrypt the data once it is back in the owner’s hands.