Wireless security is one of the trending topics nowadays. Depending on the type of application, it can get even more relevance than the rest of technical aspects. In order to provide the necessary security for most projects, panStamps now include a dual mechanism consisting of an anti-playback system and a basic smart encryption engine run from firmware.
Anti-playback relies on the nonce field, included in every SWAP packet. This nonce byte continuously evolves on each status transmission whilst commands have to match the current nonce for each mote. Otherwise, they are discarded my the mote. This mechanism protects the wireless network against anyone sitting in front of your house and recording the command used to open your garage door.
Smart encryption is implemented from firmware and, as such, it has been designed to be efficient and effective. Instead of using heavier algorithms, panStamps (optionally) run a simple XOR-based encryption using a 12-byte password and the evolutive nonce as the encryption operands. Our new smart algorithm overcomes the typical vulnerabilities of other basic XOR encryptions thanks to the following strategies:
Security is now available from the panStamp Arduino library and has to be configured from the user application as follows:
And finally, this is the piece of code used to encrypt and decrypt wireless packets: