After blockchain took the world of cryptocurrencies by storm, it seems that the new goal is to conquer the “Internet of Things” world. However, it faces challenges whereby its potential may become its own enemy.
Targeting the IoT world comes with no surprise due to its common features with the cryptocurrencies case: IoT devices play the role of users, whereas, data exchanges are equivalent to money transactions. Besides, it is important to keep in mind that security has always been a great weakness in the IoT environment and that is why it is such a good field for the almighty (and very secure) blockchain to make its appearance.
The foundations of blockchain are very well known and indeed provide good reasons to use them in IoT deployments :
Security: everything in blockchain is certified, so it is possible to determine its origin and therefore its legitimacy. Moreover, it provides integrity through the use of methods that generate hashes. This is done with highly complex computing algorithms that current PCs can afford, but it poses a problem for a less powerful device.
Distributed: The ledger (the “accounting book” that registers every exchange) is shared among all devices so that there is a copy in each of them. The number of copies provides strength to the system and in consequence, a system with a small number of nodes may be vulnerable to signal disruptions during transactions.
Immutable: Every transaction is written on a ledger, where, it is only possible to write, but never erase. This can be a challenge when we talk about memory-limited devices.
These 3 principles bring complexity to the design, but apart from them there are 2 more issues, inherent to IoT, that you must take that into account while designing your blockchain solution, due the huge impact they may have on the battery life of unplugged devices:
- There could be an intensive use of the network when there are many devices or several transactions taking place
- There could be a heavy use of the CPU to make all the processing that blockchain requires.
But then, is it really possible to use blockchain in an IoT deployment?
Well, in technology, there is rarely just a simple answer or just one single solution, and Blockchain is not an exception to this. The potential implementations are strongly conditioned by the different application environments, and therefore it is quite difficult to come up with a generic answer that solves all the problems and is valid for all use cases.
However, when facing challenges like this one, a good way to start is to try to reduce all those weaknesses that are not critical aspects in the solution and strengthen those that really are. Blockchain provides great flexibility in terms of design, which is great since in IoT we would be using devices as different as a container inside a ship, a light activator in a smart city, or a humidity sensor in a car making factory; so take advantage of that.
Here are some ideas on how you could try to overcome the challenges in blockchain and make use of it within your IoT deployments:
In a network where devices have very little processing power, but where there is a great deal of them, usual ciphering algorithms (such as the commonly used sha512 algorithm) could be simplified in Exchange for a longer chain (blocks containing hashes from the previous block) that preserves its integrity.
In plain English: You could use a lighter ciphering algorithm and compensate this with a big number of devices that make that ciphering.
To optimize the size of the ledger, you could work on compressing the oldest entries (in the same way Unix systems do with logrotate), so temporary registries take only a few kB.
To increase the strength of the network and the blockchain, it possible to add small devices that store and distribute the ledger without making a big investment (there is currently a great diversity of simple boards in the market).
Finally, although you have almost unlimited possibilities when distributing and connecting your devices depending on your interests, to minimize the potential risks of tampering nodes in the network, you should always remember this:
- Do not keep nodes with critical functions isolated with just a single connection to a mesh network.
- Avoid switches and similar traffic-concentrator devices.
These elements become easy targets in attacks due to their important role. (You may want to learn more about the security challenges in IoT)
Blockchain is a very powerful tool to guarantee the integrity of the information, but its full potential and use cases are yet to be discovered. What is clear is that IoT is a field where Blockchain will be present, someway or another.
Article written by Javier Sanz, Firmware and Blockchain Developer at Barbara IoT.