Blockchain-Based Security Model for LoRaWAN Firmware Updates
Abstract
:1. Introduction
- It presents the design and implementation of a Blockchain-based security model suitable for LoRaWAN using public permissionless Blockchain to secure firmware updates in LoRaWAN.
- The proposed work introduces the Firmware Update Service (FUS) that is responsible for the complete orchestration of firmware updates. The FUS manages the entire firmware update process of low-powered devices, performs the fragmentation, and maintains the end-to-end encryption.
- Finally, this work evaluates the impact of the security measures taken to secure the firmware and the overall cost involved in LoRa transmission.
2. Background
2.1. Firmware Updates
2.2. InterPlanentary File System
- Distributed Hash Tables (DHTs): IPFS utilizes distributed hash tables to find which peers are hosting the file. A hash table is a data structure based on the key–value pair. The DHT is distributed and updated across all the peers in the network [18]. The file can be found by asking the peers in the network since they all have the DHT.
- Block Exchanges (Bitswap): The core module that handles the exchange of blocks is the Bitswap protocol. Bitswap is a message-based protocol where all messages contain want-lists or blocks. It handles the requesting and sending of blocks to and from other peers in the network. The Bitswap protocol performs two main operations: it obtains the requested blocks and sends the blocks to other peers in the network [20].
- InterPlanetary Version Control Systems (IPVC): IPVC utilizes the version control system to provide version capabilities. This version control is suitable for large files and any type of content [21].
- Self-Certified Filesystems (SFS): SFS is a distributed file system that does not need any permissions for data exchange. It is a self-certifying filesystem, meaning that when the data is served to a peer, it is authenticated by the unique filename [22]. Each peer on the IPFS network is identified by the node ID that is produced from the node’s public key. It also holds a private key that is stored in the configuration file used for signing data. The peer also has the public key that is used for node identification in a network. During the communication, the public keys are exchanged so that when the peer communicates with other peers it can authenticate them. Authentication is achieved by computing the hash of the public key and matching it against the node ID, and, if the computed hash matches the node ID, the node can be trusted.
2.3. Blockchain and Smart Contract
- Gas: A unit of measurement that refers to the computational effort required to execute specific operations. The different kinds of operations will have different amounts of gas.
- Gas limit: Before the transaction is executed, the owner of the transaction is required to specify the maximum number of units of gas they are willing to pay for a transaction to be carried out. This number is called the gas limit.
- Gas used by transaction: This is the actual amount of gas that is used during execution. If the transaction owner specified an excessive amount of gas before the execution, the remaining gas will be returned to the owner.
- Gas price: The transaction owner also needs to specify the gas price before the transaction is carried out. This is the amount the owner is prepared to pay for each unit of gas. This can also be measured as a small fraction (gwei).
- Gas fee/transaction fee: This is the actual amount of fees the transaction owner will pay. It is usually measured in small fractions of the cryptocurrency, Ether (ETH), commonly referred to as gwei. The gas fee is the product of the gas used by the transaction and the gas price.
- Gas price (GP)
- Gas limit (GL)
- Nonce (N), the transaction sequence number for the sending account; this number increases for each transaction made by the sender
- To (AR), this field represents the destination address; it can be the recipient account or the smart contract address
- Data (TD), this field contains the code to execute a transaction in the Ethereum Virtual Machine (EVM), for example, in the case of contract deployment, this field will have the byte code of the contract along with the parameters to call the constructor (if any); this field may also contain the method signature along with the parameters
- Value (TV), this represents the amount of Ether that is transferred between sender and recipient
- {v, r, s}, the signature is represented by 3 variables: v, r, and s
- Decentralization: As mentioned, it is a peer-to-peer platform that does not depend on a single entity or a third party but is controlled by multiple nodes in the network.
- Openness: Blockchain relies on multiple nodes to maintain the ledger. Hence, anyone can join, make transactions, and be part of verifying the transactions.
- Auditability: It is auditable because all transactions can be traced back from the time they were created.
- Persistency: It is impossible to delete or alter the transaction once it has been verified and stored in the block.
- Ganache–CLI: This is a tool that acts as a Blockchain node, usually used to create a local Blockchain network for testing and local development [25].
- Geth: This is the Blockchain node that can run on the local computer and sync with the private or public Blockchain network [26].
- Infura Node: This node is a service node on the public network and is controlled by a third party that uses an Application Programming Interface (API) to access the node to interact with the network [27].
2.4. IoT Security
3. Related Work
4. Proposed Security Model
4.1. System Requirements and Assumptions
- System design should allow administrators to schedule updates to their devices to avoid network saturation and limit unintended downtime.
- One component must manage updates of multiple microcontrollers that compose IoT devices.
- The firmware update must be designed to be deployed over the air, and the update strategy should be adapted to the bandwidth constraints.
- Updates should be authenticated and integrity protected from end-to-end
- ○
- Authentication: The model should identify the firmware source, e.g., the manufacturer, so that the right firmware is stored on the end device.
- ○
- Integrity: The model should be able to check if the firmware image has not been modified both at rest and in transit.
- ○
- Confidentiality: The process of updating firmware involves sensitive information which may be required to be transmitted between different entities in the process. Hence, the information must only be be seen by the intended entity; therefore, it must be encrypted for confidentiality.
- Availability: End devices must be updated regardless of whether the manufacturer’s repository is off the network. Therefore, the model must eliminate the single point of failure.
- Replay Attack: The sensitive messages such as session keys can be eavesdropped on by the attacker during firmware updates; therefore, the model must make sure that no old messages are sent.
- Low-power consumption: The model must be suitable for low-powered (battery-powered) and constrained devices since most of the devices in LoRaWAN operate on battery and most are low-end devices without many resources.
- Heterogeneous devices: The IoT network consists of devices from different vendors, therefore the model must take into account the hardware heterogeneity of the IoT by not considering a single vendor.
- Encryption and decryption keys are on the secure hardware module.
- The firmware image is stored in public storage where anyone can have access.
- The firmware updates are applied on constrained devices with low processing capabilities and memory limitations.
4.2. System Architecture
- Manufacturers: Are responsible for the creation of the new firmware to make sure that the manufactured devices are up to date with the latest specifications, etc. They constantly push the firmware image and metadata to the IPFS and Blockchain network, respectively.
- Low-powered/LoRa devices: Firmware updates need to be delivered to IoT devices, and, since we are dealing with a constrained network, the device equipped with LoRa interface is required. This entity exchanges messages with other devices in the network via the LoRa gateway.
- Device Owners: The low-powered devices need to be configured and managed for firmware updates. The device owners are responsible for that.
- LoRa Gateway: Since the focus is on constrained devices, most cannot connect directly to the Internet to communicate with other devices. Moreover, most are not equipped with the LoRa interface; therefore, the gateway must establish communication among the devices. The gateway is equipped with LoRa and other interfaces that can connect low-powered devices with the outside world. The gateway receives and transmits data from the multiple low-powered devices and sends data to the LoRaWAN servers for further manipulation.
- LoRaWAN servers: The gateway does not process any messages received from the low-powered devices; therefore, there must be a place where messages can be processed. There is a number of LoRaWAN servers available to choose from, but this study considers The Things Network (TTN) stack V3 which is comprised servers that handle LoRa packets. The stack is open source, and it was chosen since it supports all LoRaWAN versions. Different modes of operation (Class A, B, and C) make it easy to manage users, gateways, applications, and end devices. The TTN stack V3 servers include:
- The Identity Server: Stores the applications, registered end devices, gateways, users, organizations, Open Authentication (OAuth) clients, API keys, and collaborators and acts as an OAuth 2.0 server with login and consent screens. Moreover, it provides different ways of integration.
- The Gateway Server: Maintains connections with gateways that support the UDP, Message Queuing Telemetry Transport MQTT, Google Remote Procedure Call gRPC, and Basic Station protocols. It forwards uplink messages to network servers and schedules downlink messages to the end devices via a LoRa gateway.
- The Network Server: Is responsible for keeping the state of all low-powered devices, performing cryptographic MIC checks, detecting replay attacks by performing frame counter checks, maping LoRa packets to the correct application server, and managing usage of LoRa gateways.
- The Application Server: Decrypts the data received from the LoRa end devices and encrypts the data sent to the low-powered device. The received data can be integrated into other IoT platforms via different protocols such as MQTT and HTTP.
- The Join Server: It is connected to the network server and is responsible for storing end device root keys and handling the Over The Air Authentication OTAA process. It also generates session keys and sends them to the network server and application server to enable the secure transmission of LoRaWAN messages.
- Blockchain: This consists of Blockchain nodes that store firmware, sync firmware metadata, and validate firmware update transactions. It also consists of a smart contract that enforces the rules during the firmware update. This work uses the public Blockchain network, because the metadata is usually shared by the manufacturers publicly, usually via the manufacturer’s website, or to the public repository, such as GitHub. In addition, Blockchain will also ensure that the metadata is stored securely and is tamper-proof.
- IPFS: This is a decentralized peer-to-peer network that consists of nodes that store and sync the firmware image. In the same way that the firmware metadata must be stored publicly, the image must also be stored publicly. Once the metadata is added to the IPFS network, it cannot be changed without altering the content identifier (CID), which enables the storage of data that does not need to change. Moreover, IPFS is chosen since it ensures the availability of the firmware.
- FUS: This study introduces the FUS, which is a component that is connected with the application server to manage firmware updates in LoRaWAN. As mentioned, most of the low-powered devices cannot connect directly to the internet, but they connect via the gateway. The FUS component connects the low-powered devices to the Blockchain network and establishes the end-to-end encryption to communicate securely with low-powered devices during the update process. FUS is responsible for the tasks explained in Table 4.
4.3. Smart Contract in the Proposed Security Model
- Deploy: The manufacturer and the FUS owner must first deploy the smart contract to the Blockchain network before any firmware update process can occur. When the smart contract is deployed, this function assigns the manufacturer’s smart contract address or the FUS smart contract address as the smart contract owner on the network. This enables knowing who created and deployed the smart contract on the network in the future.
- Add New Firmware: The manufacturer calls this function to add new metadata to the Blockchain. This is a crucial function and must not be called by anyone other than the manufacturer. Therefore, this function first checks who has called it before accepting the metadata into the Blockchain network.
- Register Device: The FUS calls this method to register a new low-powered device to the Blockchain. This is also a crucial function and must not be called by anyone other than the FUS owner. Therefore, this function first checks who has called it before it accepts the metadata into the Blockchain network.
- Check Update: The FUS calls this function on the manufacturer’s smart contract to check if there is any new firmware update available for the provided device model. If the firmware update is available, it returns true or else false.
- Retrieve Devices by Model: This function retrieves a set of devices by the model’s name.
- Retrieve Device Information: This is a decentralized peer-to-peer network that consists of nodes.
- Retrieve Manifest: This is a decentralized peer-to-peer network that consists of nodes.
- Get Device Status: This function obtains the current state of the device.
4.4. Deployment of the Manufacturer’s Smart-Contract and Update Service Smart Contract
4.5. Firmware Distribution
- Integrity: The firmware image could be modified during transmission. Therefore, the manufacturer hashes the firmware image using the SHA-256 algorithm to prevent any alteration that could take place during the update process. The calculated SHA-256 hash forms part of the metadata.
- Authentication: The manufacturer needs to sign the firmware to prove the ownership digitally. The manufacturer uses the private key to sign the metadata. The ECDSA signature is produced and appended to the firmware metadata. By appending the signature to the metadata, it will be easy to verify the authenticity of the firmware image. Moreover, this enables metadata to be immutable and tamper-proof since it is on the Blockchain network.
- Firmware Availability: The firmware image is deployed on the manufacturer’s IPFS node that syncs with the IPFS network. The other IPFS nodes on the network will sync the uploaded firmware, this ensures the high availability of the firmware image even if the manufacturer’s node is unavailable on the network.
- Authorization: The firmware metadata describes the firmware images. It consists of the integrity hash, the manufacturer’s digital signature, the firmware’s size, firmware version, location of the firmware, etc. Firmware metadata plays a considerable role during the verification process; therefore, not every entity is allowed to deploy the firmware metadata in addition to the manufacturer. The Blockchain smart contract enforces authorization only, allowing the manufacturer to be the only entity on the network to upload firmware metadata.
4.6. Device Registration
4.7. Firmware Initiation Process
4.8. Firmware Download
- Authentication: In the previous phase of firmware distribution, the manufacturer signed the firmware metadata and uploaded the metadata to the Blockchain network. In this phase, the manufacturer’s digital signature is used to prove the authenticity of the metadata. The manufacturer has three important keys on the Blockchain network: the private key, the public key, and the KMW. As demonstrated, the private key’s job is to sign the firmware and be kept secret. The wallet address is a hashed public key and is allowed to be shared with other entities on the Blockchain network. The wallet address plays a huge role in determining the authenticity of the firmware in the update process. The model uses a function that takes the ECDSA digital signature together with the metadata to produce the wallet address that signed the firmware metadata. The wallet address produced is matched against the wallet address registered earlier in the registration phase by the device owner. If the addresses are the same, this means the metadata comes from the authentic source and can then be used to download the firmware image.
- Integrity: Regardless of the secure channel between the IPFS and the FUS, firmware integrity must be achieved. The FUS obtains the firmware image and recomputes the SHA-256 hash which is then compared with the SHA-256 hash of the metadata. If both hashes are the same, it will be an indication that the firmware image has not been altered during its transmission.
4.9. End Device Firmware Distribution and Verification
- Confidentiality: The MIC needs to be encrypted when sent over the channel; hence, the MIC is encrypted with the session shared secret key KS. The end device receives the MIC and decrypts it with a similar AES session key. The end device uses the CTR mode when decrypting the MIC, as the data was encrypted using the same mode of operation.
- Authentication and Integrity: After the device has received all the firmware fragments including the missing ones, it must determine whether the firmware comes from the authentic source and has not been altered during the transmission. Figure 9 demonstrates this process of verification. Authentication is achieved by recomputing the MIC of the firmware using the HMAC-256/CMAC algorithm. The MIC product is then matched against the one received earlier. If the re-computed MIC and the received one are the same, it proves that the firmware image comes from the right source and has not been altered in transit.
4.10. Activity Diagram
5. Security Model Implementation
5.1. Computer
Algorithm 1: Upload a new firmware manifest | |
Input: firmware manifest details Result: manifestList is updated with a new manifest | |
mapping (string => FirmwareManifest) manifestList; | |
if msg.sender == firmwareProvider then | |
Upload the new firmware to the manifestList; | |
Emit newFirmware (Firmware Details); | |
else | |
Error: Not authorized for such operation; | |
end |
Algorithm 2: Check new firmware availability | ||
Input: model, fv Result: Returns true or false on the firmware availability | ||
mapping (string => FirmwareManifest) manifestList; String[] public modelList; uint256 i; | ||
for available model in modelList do | ||
if model == modelList[i] then | ||
manifestList[model.version] > fv then | ||
return true; | ||
end return false; | ||
end |
Algorithm 3: Retrieving the firmware metadata | ||
Input: model Result: Retrieve latest firmware manifest of a model | ||
mapping (string => FirmwareManifest) manifestList; uint256 i; | ||
for available model in modelList do | ||
if model == modelList[i] then | ||
return corresponding metadata | ||
end | ||
end |
Algorithm 4: Register a new LoRa device | |
Input: device details Result: Updated device list record | |
mapping (string => string[]) devs; mapping (string => Devices[]) devicesList; string[] public deviceIDList | |
if msg.sender == updateServiceOwner then | |
for available device in deviceIDList do | |
if devID == deviceIDList[i] then | |
exist == true; | |
end | |
end | |
if not exist then | |
add a new device to the deviceList | |
end | |
else | |
Error: Not authorized for such operation; | |
end |
Algorithm 5: Get device update status | |
Input: deviceID Result: Returns device update status mapping (string => Devices[]) devicesList; | |
functiongetDevStatus(string devID)do | |
return devicesList[deviceID].status; | |
end |
Algorithm 6: Retrieving the LoRa device information | ||
Input: devID Result: Retrieve latest firmware manifest of a model | ||
mapping (string => Devices[]) devicesList; string[] public deviceIDList; uint256 i; | ||
for available model in modelList do | ||
if devID == deviceIDList[i] then | ||
return devicesList[devID].version, devicesList[devID].name, devicesList[devID].model, devicesList[devID].ipfsHash, devicesList[devID].integrityHash, devicesList[devID].signature | ||
end | ||
end |
5.2. LoRaWAN Server and the FUS
5.3. RAK831 Concentrator Module and Raspberry Pi
5.4. LoPy4 and the Expansion Board
- Class Mode: The aim is to test the proposed model when the devices operate in Class A mode, where the device needs to send the uplink message before it receives the firmware fragment. The low-powered device is also equipped to operate in Class C mode, where it is always opened to receive firmware fragments.
- RX1, RX2, and RX delay: The low-powered device receives the fragments in two windows, the RX1 and RX2. The RX2 window/channel has a 10% duty cycle limit, whereas the other channels have a 1% duty cycle limit (per sub-band).
- Gateway and low-powered devices: Only one gateway and two low-powered devices are utilized. The gateway and device respect the duty cycle parameter.
- Region and Bandwidth: The low-powered devices are equipped to operate in the European region, this modulation operates in the radio band 863–870 MHz, with a bandwidth of 125 kHz.
- SFs: The SF impacts the communication performance of LoRa. LoRa utilizes an SF between 7 and 12. The model will be tested with all spreading factors to see the impact of different SFs during the firmware update process.
6. Results and Discussion
6.1. Evaluating Blockchain Operation Costs and Algorithm Complexity
- Gas Used which indicates the actual amount of gas used by a transaction. In this case, this the actual amount of gas used by a smart contract operation.
- Gas fee, which indicates the total amount of Ether charged during the transaction of an operation.
6.2. Evaluating the Cost of the LoRaWAN Updates and Cryptographic Techniques
- Update Time which is the time taken from when the firmware update is initiated until the firmware image is verified.
- Energy Consumption, which indicates the energy consumed by the low-powered device, the gateway, and cryptography techniques used for signature verification.
- Memory Consumption, which indicates the memory usage of cryptography techniques.
6.3. Discussion about Properties of the Proposed Model
6.3.1. Confidentiality, Integrity, and Authentication
6.3.2. Data Freshness
6.3.3. Availability and Peer-to-Peer Network
6.3.4. Constrained-Networks, Low-End Devices, and Performance Evaluation
7. Application Scenario Utilizing the Proposed Model
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- IoT Connected Devices Worldwide 2019–2030 Statista. Available online: https://www.statista.com/statistics/1183457/iot-connected-devices-worldwide/ (accessed on 12 October 2021).
- Leverege LCC. An Introduction to the Internet of Things; Leverege LCC: Washington DC, USA, 2018. [Google Scholar]
- Foubert, B.; Mitton, N. Long-Range Wireless Radio Technologies: A Survey. Futur. Internet 2020, 12, 13. [Google Scholar] [CrossRef] [Green Version]
- LinkLabs. Low Power, Wide Area Networks Networks (LPWANs). Thales 2017, 19, 855–873. [Google Scholar]
- Tawalbeh, L.; Muheidat, F.; Tawalbeh, M.; Quwaider, M. Applied Sciences IoT Privacy and Security: Challenges and Solutions. Appl. Sci. 2020, 10, 4102. [Google Scholar] [CrossRef]
- Microsoft Digital Defense Report. Netw. Secur. 2020, 2020, 4. [CrossRef]
- New Security Signals Study Shows Firmware Attacks on the Rise; Here’s How Microsoft is Working to Help Eliminate This Entire Class of Threats. Available online: https://www.microsoft.com/security/blog/2021/03/30/new-security-signals-study-shows-firmware-attacks-on-the-rise-heres-how-microsoft-is-working-to-help-eliminate-this-entire-class-of-threats/ (accessed on 12 October 2021).
- Rehman, M.M.U.; Rehman, H.Z.U.; Khan, Z.H. Cyber-Attacks on Medical Implants: A Case Study of Cardiac Pacemaker Vulnerability. Int. J. Comput. Digit. Syst. 2020, 9, 1229–1235. [Google Scholar] [CrossRef]
- What are LoRa and LoRaWAN?|The Things Network. Available online: https://www.thethingsnetwork.org/docs/lorawan/what-is-lorawan/ (accessed on 12 October 2021).
- Ertürk, M.A.; Aydın, M.A.; Büyükakkaşlar, M.T.; Evirgen, H. A Survey on LoRaWAN Architecture, Protocol and Technologies. Futur. Internet 2019, 11, 216. [Google Scholar] [CrossRef] [Green Version]
- Brtnik, V. Security Risk Assessment of LoRaWAN. Master’s Thesis, Leiden University, Leiden, The Netherlands, 2018. [Google Scholar]
- Aras, E.; Ramachandran, G.S.; Lawrence, P.; Hughes, D. Exploring the Security Vulnerabilities of LoRa. In Proceedings of the 2017 3rd IEEE International Conference on Cybernetics (CYBCONF), Exeter, UK, 21–23 June 2017. [Google Scholar] [CrossRef] [Green Version]
- Atzori, M. Blockchain Technology and Decentralized Governance: Is the State Still Necessary? J. Gov. Regul. 2017, 6, 45–62. [Google Scholar] [CrossRef]
- Durand, A.; Gremaud, P.; Pasquier, J. Decentralized LPWAN Infrastructure Using Blockchain and Digital Signatures. Concurr. Comput. 2020, 32, e5352. [Google Scholar] [CrossRef]
- Ribeiro, V.; Holanda, R.; Ramos, A.; Rodrigues, J.J.P.C. Enhancing Key Management in Lorawan with Permissioned Blockchain. Sensors 2020, 20, 3068. [Google Scholar] [CrossRef] [PubMed]
- Data Breaches and Cyber Attacks Quarterly Review: Q3 2021-IT Governance UK Blog. Available online: https://www.itgovernance.co.uk/blog/data-breaches-and-cyber-attacks-quarterly-review-q3-2021 (accessed on 12 October 2021).
- The Stolen Source Code For FIFA 21 Was Just Published Online. Available online: https://www.pandasecurity.com/en/mediacenter/security/source-code-fifa-21/ (accessed on 12 October 2021).
- McDonald’s Hit by Data Breach in Taiwan and South Korea-BBC News. Available online: https://www.bbc.com/news/business-57447404 (accessed on 12 October 2021).
- Manoj Athreya, A.; Kumar, A.A.; Nagarajath, S.M.; Gururaj, H.L.; Ravi Kumar, V.; Sachin, D.N.; Rakesh, K.R. Peer-to-Peer Distributed Storage Using InterPlanetary File System. In Advances in Artificial Intelligence and Data Engineering; Chiplunkar, N.N., Fukao, T., Eds.; Springer: Singapore, 2021; pp. 711–721. [Google Scholar]
- Bitswap|IPFS Docs. Available online: https://docs.ipfs.io/concepts/bitswap/ (accessed on 12 October 2021).
- GitHub-martindbp/ipvc: Inter-Planetary Version Control (System). Available online: https://github.com/martindbp/ipvc (accessed on 12 October 2021).
- What is IPFS?-A Beginner’s Guide|Hacker Noon. Available online: https://hackernoon.com/a-beginners-guide-to-ipfs-20673fedd3f (accessed on 12 October 2021).
- Vujičić, D.; Jagodić, D.; Randić, S. Blockchain Technology, Bitcoin, and Ethereum: A Brief Overview. In Proceedings of the 2018 17th International Symposium infoteh-jahorina (infoteh), East Sarajevo, Bosnia and Herzegovina, 21–23 March 2018; pp. 1–6. [Google Scholar] [CrossRef]
- Zarrin, J.; Wen Phang, H.; Babu Saheer, L.; Zarrin, B. Blockchain for Decentralization of Internet: Prospects, Trends, and Challenges. Clust. Comput. 2021, 24, 2841–2866. [Google Scholar] [CrossRef] [PubMed]
- GitHub-Trufflesuite/Ganache: A Tool for Creating a Local Blockchain for Fast Ethereum Development. Available online: https://github.com/trufflesuite/ganache (accessed on 12 October 2021).
- Go Ethereum. Available online: https://geth.ethereum.org/ (accessed on 12 October 2021).
- Ethereum|Infura Documentation. Available online: https://infura.io/docs/ethereum#section/Make-Requests/JSON-RPC-Methods (accessed on 12 October 2021).
- Pal, S.; Hitchens, M.; Rabehaja, T.; Mukhopadhyay, S. Security Requirements for the Internet of Things: A Systematic Approach. Sensors 2020, 20, 5897. [Google Scholar] [CrossRef] [PubMed]
- Bormann, C.; Ersue, M.; Keranen, A. Terminology for Constrained-Node Networks. Appl. Microbiol. Biotechnol. 2014, 85, 2071–2079. [Google Scholar] [CrossRef]
- LoRa AllianceTM. LoRaWAN Application Layer Clock Synchronization Specification v1.0.0; LoRa Alliance: Fremont, CA, USA, 2018. [Google Scholar]
- Jongboom, J.; Stokking, J. Enabling Firmware Updates over LPWANs; Embedded World: Nuremberg, Germany, 2018. [Google Scholar]
- Abdelfadeel, K.; Farrell, T.; McDonald, D.; Pesch, D. How to Make Firmware Updates over LoRaWAN Possible. In Proceedings of the 2020 IEEE 21st International Symposium on “A World of Wireless, Mobile and Multimedia Networks” (WoWMoM), Cork, Ireland, 31 August–3 September 2020. [Google Scholar] [CrossRef]
- Pycom. Pycom Documentation. Available online: https://docs.pycom.io/updatefirmware/ota/ (accessed on 12 October 2021).
- Lee, B.; Lee, J.H. Blockchain-Based Secure Firmware Update for Embedded Devices in an Internet of Things Environment. J. Supercomput. 2017, 73, 1152–1167. [Google Scholar] [CrossRef]
- Dhakal, S.; Jaafar, F.; Zavarsky, P. Private Blockchain Network for IoT Device Firmware Integrity Verification and Update. In Proceedings of the 2019 IEEE 19th International Symposium on High Assurance Systems Engineering (HASE), 3–5 January 2019; pp. 164–170. [Google Scholar] [CrossRef]
- Witanto, E.N.; Oktian, Y.E.; Lee, S.G.; Lee, J.H. A Blockchain-Based Ocf Firmware Update for IoT Devices. Appl. Sci. 2020, 10, 6744. [Google Scholar] [CrossRef]
- Anastasiou, A.; Christodoulou, P.; Christodoulou, K.; Vassiliou, V. IoT Device Firmware Update over LoRa: The Blockchain Solution. In Proceedings of the 2020 16th International Conference on Distributed Computing in Sensor Systems (DCOSS) IoT, Marina del Rey, CA, USA, 25–27 May 2020; pp. 404–411. [Google Scholar] [CrossRef]
- Mtetwa, N.; Tarwireyi, P.; Adigun, M. Secure the Internet of Things Software Updates with Ethereum Blockchain. In Proceedings of the 2019 International Multidisciplinary Information Technology and Engineering Conference, IMITEC, Vanderbijlpark, South Africa, 21–22 November 2019; pp. 1–6. [Google Scholar] [CrossRef]
- Cloud Security Alliance. Recommendations for IoT Firmware Update Processes Prepared by the Cloud Security Alliance. Available online: https://downloads.cloudsecurityalliance.org/assets/research/internet-of-things/recommendations-for-iot-firmware-update-processes.pdf (accessed on 12 October 2021).
- GitHub-Lora-Net Packet_Forwarder. Available online: https://github.com/Lora-net/packet_forwarder (accessed on 12 October 2021).
Name | RAM | Flash |
---|---|---|
Class 0 | <<10 kB | <<100 kB |
Class 1 | ~10 kB | ~100 kB |
Class 2 | ~50 kB | ~250 kB |
References | Benefit(s) | Limitation(s) |
---|---|---|
[32] | Illustrated how Long-Range (LoRa) alliance firmware can be utilized to provide the firmware update to a large number of devices. | The work does not cover the security on how firmware can be protected during transmission. |
[33] | Focus to deliver firmware updates to low-powered LoRa devices using both LoRa and Wi-Fi and the firmware image may be delivered fast in low-powered devices. | The approach requires that the end device must be equipped with Wi-Fi and, since Wi-Fi is a traditional technology, may consume more power of the end devices. |
[34] | Illustrated and discussed the Blockchain-based scheme that provides high availability, integrity, and authentication in depth. | The proposed scheme may be difficult to incorporate in constrained IoT devices because of limited resources. |
[35] | Demonstrated a Blockchain-based approach that shows how the integrity of firmware can be achieved. Provides a comparison between the proposed firmware update framework and existing frameworks. | The limited literature on firmware updates. The mechanism only ensures the integrity of the firmware image. No implementation and evaluation, only proposed the mechanism. |
[36] | The work provides two ways of updating the IoT devices, the client–server and the distributed approaches. Discuss the implementation and analysis of these two techniques. | The proposed techniques are sufficient for IoT devices with good resources but not for devices that are limited in resources. |
[37] | Discuss how low-powered devices can be updated based on the simulation tool developed by [14]. | The work performs firmware updates utilizing Blockchain, but it is not clear how the Blockchain was implemented and incorporated in the simulation tool developed by [14]. The mechanism claims to provide authenticity and integrity but does not specify which algorithms that were utilized to achieve these aims. Moreover, no security analysis was performed. |
[38] | The work focuses on IoT networks and delivers updates to IoT devices using Ethereum Blockchain and IPFS. | The solution provided is not suitable for constrained networks and focuses on the IoT devices that have good processing power. Additionally, It provides only one security property, which is integrity. |
Features and Properties | [32] | [33] | [34] | [35] | [36] | [37] | [38] |
---|---|---|---|---|---|---|---|
Target Low-End Devices | ✓ | ✓ | ✓ | ||||
Target High-End Devices | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | |
Availability | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
Confidentiality | ✗ | ✗ | ✗ | ✗ | ✗ | - | ✗ |
Integrity | ✗ | ✓ | ✓ | ✓ | ✓ | - | ✓ |
Authentication | ✗ | ✗ | ✓ | ✓ | ✓ | - | ✗ |
Data Freshness | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
Constrained-Network | ✓ | ✓ | ✗ | ✗ | ✗ | ✓ | ✗ |
Performance Evaluation | ✓ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ |
Distributed/P2P | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
Tasks | Description |
---|---|
Firmware requests | Handles and manages firmware requests by listening to Message Queuing Telemetry Transport (MQTT) topics. |
Connects to decentralized networks | The Firmware Update Service (FUS) is connected to the InterPlanetary File System (IPFS) and Blockchain network via HyperText Transport Protocol Secure (HTTPS) and the WebSocket. Performs the firmware image requests and runs a daemon that listens for new firmware updates in the Blockchain network. It connects to both manufacturer’s smart contract and the FUS smart contract address. |
State update | Continues updating the state of the device during the firmware update. |
Firmware fragmentation | Performs firmware fragmentation using the device’s spreading factor (SF). |
Cryptographic operations | Encrypts and decrypts sensitive data. Generates session keys to be used for that session of the firmware update. Performs authentication and integrity checks of the firmware image. |
Symbol | Meaning |
---|---|
KFUS | Firmware Update Service key |
KM | Master Key or a shared secret key |
KMW | Manufacturer’s wallet key |
KS | Session keys |
F(N) | Nonce update function |
KPR | The private key of the manufacturer |
Component | Environment and Libraries |
---|---|
Manufacturer Decentralized App | JavaScript, ReactJS, web3js, IPFS JavaScript API, MetaMask |
Blockchain Smart Contract for Manufacturer and FUS | Solidity v 0.4.21, Truffle |
LoRa Gateway | Raspberry pi + RAK831 |
LoRaWAN Servers | TTN Stack v.3.12.3 |
Blockchain Network | Ganache-cli, Infura Node |
IPFS Network | Public Network: Infura Node |
FUS | Web3py, paho-mqtt, IPFS–API |
Specifications | Description |
---|---|
Processor model | i5-4300M |
Processor frequency | 2.6 GHz |
Processor family | 4th gen Intel® Core™ i5 |
RAM | 8 GB |
Storage media | SSD |
Specifications | Description |
---|---|
LoPy | https://pycom.io/wp-content/uploads/2017/11/lopy4Specsheet17.pdf (accessed date: 12 October 2021) |
Pycom Expansion Board | https://docs.pycom.io/gitbook/assets/expansion3-specsheet-1.pdf (accessed date: 12 October 2021) |
Raspberry Pi 3 Model B | https://static.raspberrypi.org/files/product-briefs/Raspberry-Pi-Model-Bplus-Product-Brief.pdf (accessed date: 12 October 2021) |
RAK831 Module | https://docs.rakwireless.com/Product-Categories/WisLink/RAK831/Datasheet/ (accessed date: 12 October 2021) |
Parameter | Description |
---|---|
RX1 Window | Both downlink and uplink |
RX2 window | Downlink (869.525) |
Region | EU (channels duty cycle 1% and 10%) |
Gateway | 1 |
Low-powered devices | 2 |
Class mode | Class A and Class C |
RX1 delay (class a) | 5 [s] |
Bandwidth | LoRa.BW_125KHZ |
SFs | 7–12 |
Methods | Gas Cost Execution [gas] |
---|---|
uploadMetadata(1 kB) | 378,328 |
uploadMetadata(2 kB) | 689,116 |
uploadMetadata(3 kB) | 1,089,466 |
uploadMetadata(4 kB) | 1,176,024 |
uploadMetadata(5 kB) | 1,282,079 |
registerDevice(devInfo) | 49,418 |
updateDevInfo(devInfo) | 28,852 |
retrieveMetadata() | 0 |
retrieveDevsInfo() | 0 |
Algorithm | Complexity |
---|---|
Algorithm 1 | O (1) |
Algorithm 2 | O (N) |
Algorithm 3 | O (N) |
Algorithm 4 | O (N) |
Algorithm 5 | O (1) |
Algorithm 6 | O (N) |
Description | Number of Messages |
---|---|
Class A uplinks | 33 |
Class A downlinks | 25 |
Class C uplinks | 5 |
Class C downlinks | 25 |
Features and Properties | [32] | [33] | [34] | [35] | [36] | [37] | [38] | Model |
---|---|---|---|---|---|---|---|---|
Target Low-End Devices | ✓ | ✓ | ✓ | ✓ | ||||
Target High-End Devices | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ||
Availability | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Confidentiality | ✗ | ✗ | ✗ | ✗ | ✗ | - | ✗ | ✓ |
Integrity | ✗ | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ |
Authentication | ✗ | ✗ | ✓ | ✓ | ✓ | - | ✗ | ✓ |
Data Freshness | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ |
Constrained-network | ✓ | ✓ | ✗ | ✗ | ✗ | ✓ | ✗ | ✓ |
Performance Evaluation | ✓ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ |
Distributed/P2P | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mtetwa, N.S.; Tarwireyi, P.; Sibeko, C.N.; Abu-Mahfouz, A.; Adigun, M. Blockchain-Based Security Model for LoRaWAN Firmware Updates. J. Sens. Actuator Netw. 2022, 11, 5. https://doi.org/10.3390/jsan11010005
Mtetwa NS, Tarwireyi P, Sibeko CN, Abu-Mahfouz A, Adigun M. Blockchain-Based Security Model for LoRaWAN Firmware Updates. Journal of Sensor and Actuator Networks. 2022; 11(1):5. https://doi.org/10.3390/jsan11010005
Chicago/Turabian StyleMtetwa, Njabulo Sakhile, Paul Tarwireyi, Cecilia Nombuso Sibeko, Adnan Abu-Mahfouz, and Matthew Adigun. 2022. "Blockchain-Based Security Model for LoRaWAN Firmware Updates" Journal of Sensor and Actuator Networks 11, no. 1: 5. https://doi.org/10.3390/jsan11010005
APA StyleMtetwa, N. S., Tarwireyi, P., Sibeko, C. N., Abu-Mahfouz, A., & Adigun, M. (2022). Blockchain-Based Security Model for LoRaWAN Firmware Updates. Journal of Sensor and Actuator Networks, 11(1), 5. https://doi.org/10.3390/jsan11010005