## 3 Long-Range, Low-Power IoT Communication Protocols and Their Security
### C-UNB/Sigfox
The twelve-byte packet keeps messages small and reduces the chances of packet collisions. **Security. ** An important element in C-UNB and Sigfox is the C-UNB server, similar to the one shown in Figure 3. A C-UNB server is a relay agent that receives and stores data from the cloud and sends data when the device wakes up. The C-UNB server listens for the device's uplink transmissions, acknowledges them, and sends any stored data at the same time. It also removes duplicate packets and performs security checks. It checks the authentication information sent by the devices and verifies that the frames have not been modified in transit. To accomplish this, it employs a lightweight approach, but no specific encryption algorithm is specified. A C-UNB frame header has a two-byte MIC, which is computed using the device's identity information together with the frame's sequence number and payload bits, using a secret key that is shared by the device and the C-UNB server. The same MIC is used in the downlink acknowledgment frame. Sigfox's radio specification [73] describes security from device to base station. The payload can be sent encrypted or in _clear mode_. If encryption is selected, Sigfox takes an approach similar to LoRa's EtM approach, where the payload is first encrypted and then the MAC is calculated. In either encrypted or _clear mode_, all frames will have a message authentication code (MAC), known as UL_AUTH, which is two to five bytes long. The payload encryption is performed with AES-CTR with a 128-bit encryption key \(\mathrm{K_{e}}\). The CTR value is generated by combining the twelve-bit message counter (MC), the eight-bit roll-over counter (RoC), and the device ID, as in Equation (9). The CTR value is updated for every frame. The result of the AES encryption, the CTR value with the key \(\mathrm{K_{e}}\), will be used as an input to the XOR logical operation with the message payload bits (the plaintext) to generate the encrypted payload (Equation (10)). Since Sigfox messages are small, with twelve bytes of payload, the AES-CTR mode works well because it allows any size of plaintext to be encrypted. \[\mathrm{Keystream}=\mathrm{AES-128\_enc}(\mathrm{K_{e}},\mathrm{ID}\,|\, \mathrm{RoC}\,|\,\mathrm{MC}) \tag{9}\]  
\[\mathrm{EP}=\mathrm{Plaintext}\,\mathrm{XOR}\,\mathrm{Keystream} \tag{10}\]  
where EP is the encrypted payload. Then, the Sigfox header is attached to the encrypted payload. Next, the UL_AUTH field is calculated. To calculate the UL_AUTH, the end-points use the frame's sequence number, device identification, and encrypted payload bits (Equation (11)). The key is a 128-bit AES authentication key \(\mathrm{Ka}\), and AES-128 in Cipher Block Chaining (CBC) mode is used. The AES-CBC mode generates a 128-bit MIC, but only two to five of the most significant bytes are used as the UL_AUTH. \[\mathrm{cmac}=\mathrm{AES-128\_cmac}(\mathrm{K_{a}},\mathrm{MC}\,|\, \mathrm{ID}\,|\,\mathrm{EP}) \tag{11}\]  
**Application Domains. ** Sigfox networks support different applications. For instance, asset tracking is a popular use of Sigfox end-points, which are installed in trolleys and trucks. Smart farming and monitoring of the environment are also example applications where end-points send measurements to the cloud. In the context of an automated metering infrastructure (AMI) network, a previous research study evaluated ultra-narrowband systems using a network simulator (NS-3) [74]. They simulated the physical and link layers of a C-UNB device and base station, using the application protocol called Device Language Message Specification--Companion Specification for Energy Metering (DLSM-COSEM). Although the C-UNB architecture provides frequency and spatial diversity, the amount of data sent by the smart meters was too large for the small packets. This required that the DLSM-COSEM payloads be fragmented, which resulted in a high collision rate in the simulations. Among the several IoT systems that use Sigfox, the design of a novel application for the mining industry is presented in [75].