Featured image for How to Implement Blockchain in IoT?

// Blockchain

How to Implement Blockchain in IoT?

Do you have any questions?
Alexander Safonov
Write to author
Featured image for How to Implement Blockchain in IoT?

Internet of things — is a term describing the system, where smart devices(things) interact as humans do by the means of the internet. In this article, we will show how to integrate the blockchain technology into an IoT network, and what difficulties might appear.

Why does IoT need a blockchain?

How to Implement Blockchain in IoT?

The idea of Internet of Things is that various smart devices, such as sensors, wearables, complicated mechanisms (actuators), collect data, connect to the internet and other devices through routers and gates via Bluetooth or Wi-Fi. They share and collect data and/or commands. Moreover, in the IoT networks devices with user interfaces can be applied, like personal computers, laptops, tablets, etc.

This technology is used for various purposes — starting at data transfer between meteorological and hydro-meteorological stations or launching the infrastructure for smart houses and towns. The issues, methods, and ways to apply IoT constantly appear. So do the requirements for their security and scaling. According to the Gartner forecast, these two things will be the main difficulties for IoT development in the next few years, and the very best solution is blockchain technology.

These are the major «gaps», that blockchain technology can fix:

  • Out of date firmware. Not many suppliers offer regular updates for their IoT solutions, and not many users will update the firmware, when a new version is available. In the outdated firmware, security gaps and weak points might appear, so the systems can be unproductive and easily hacked.
  • Weak authentication. Many IoT solutions use simple authentication for applications with strong programmed passwords. This type of security is easily hacked, just by finding the proper password.
  • Unsecure connection. Many data leaks in IoT are the consequence of poor security measures during the data transfer between IoT devices or IoT and the cloud, or during the data storage on a device or in the cloud.
  • Physical intrusion. There is a chance that the hackers will change the configuration of the IoT device, for example, when they need to overhear something, record video or launch DDoS attacks.

The advantages of IoT implementing

Data decentralization. The information collected by IoT is oftentimes stored and managed by centralized servers, which is a possibility for hacking the confidential data by third-party people. Moreover, the network might fall immediately.

The decentralized structure of the blockchain considers that there is no centralized control point and data storage, so there are no single attack points. Despite clouds, the blockchain network is managed by different independent points, so there is no organization to control a major amount of data generated by the devices of IoT.

Secure dives updating. The increased safety and secure measures of blockchains allows the developers to solve the outdated IoT software issues, since they can safely transfer the code on the IoT devices. This was successfully tested by the University of Tulsa workers, who used the open-source blockchain to update the ESP8266 firmware via Wi-Fi connection.

Enhanced privacy. The blockchain can even hide the connection between the devices, offering transaction validation without third-party implementation. Moreover, the blockchain can optimize the IoT protocols, and supply the encryption. This lowers the risks of data leaking and IoT network hacking.

Enhanced data management. IoT networks should transfer huge amounts of data in real-time through devices, systems and platforms, which raises new challenges for data management. The blockchain allows the devices to transfer data directly, without server’s, cloud’s, or local database’s help., This shortens the number of transactions at least for one third (device — other device — server / cloud / local network — device). Moreover, smart contracts can make most of the processes between IoT devices automatic.

Enhanced scaling. Decentralized blockchain networks share the workload, which provides an improved transaction processing and increases the coordination between billions of IoT devices that are connected to it. The ability to share the data also helps to scale.

Stricter authentication. To identify the users, many blockchain platforms use the decentralized PKI approach that generates hidden and open keys. This approach is different from centralized PKIs, its security measures are much more developed since only the user has the hidden key for their personality identification, while the network provider gets the open key. Since both keys are cryptographically generated, it is practically impossible to hack them.

Automatic connection. Blockchain technology helps to make the commands and messages in IoT automatic by the means of smart contracts. These computer algorithms are used within IoT devices for data analysis, IoT devices temperature measuring, and daily temperatures measuring. The other example is an automatic filling of custom documents or automatic duty checkout after passing the border.

3 ways to integrate blockchain technology in an IoT network

How to Implement Blockchain in IoT?

Before developing an IoT architecture based on blockchain, you will need to consider the way it will interact. Here you will have 3 solutions.

IoT — IoT.  This is actually the easiest way of blockchain integration into the IoT network, since it requires using only a sharing register for IoT data storage.  The data transferring will take place out of the blockchain using various mechanisms of routing. This will help to achieve fast transaction speed and fewer delays. Furthermore, this approach offers the ability to offline work for the devices.

This is an easy solution to implement, since it is not considering major changes to the workflow of the IoT devices, all you need to do is to set up the transferring, storing, and extracting data from blockchain instead of a cloud or a server.

IoT — blockchain. For this approach, the IoT devices interaction will take place through the blockchain, which actually works as a cloud for traditional IoT networks. From one point of view, this will enhance the tracing, security of communication, workflow automatization, and it will increase the capacity. From the other point of view, it will make the system much more complicated, which will cause delays, if the blockchain is not fast enough.

The implementation of this blockchain in IoT networks is complicated, since it requires many changes in the work of IoT devices and the blockchain development. Furthermore, a proper blockchain with increased working speed, capacity and zero fees should be used. This can be an IOTA, Modum.io, or Riddle & Code-based blockchain.

Hybrid approach. In this case, a major part of data and interactions are shared between the IoT devices, while the blockchain stores only some types of data. This brings a lot of advantages, but the low delays and high working speed for IoT devices in real-time are hardly possible.

Moreover, this approach helps to introduce fog computing to compensate for the limits of blockchains and IoT devices. For example, you can use this computing method to extract, store, and use the analysis of private data by the means of peripheral devices instead of cloud computing which will help to save operating expenses.

The difficulties of blockchain in IoT integration

Difficult choice of a consensus protocol. To choose the best blockchain option for the IoT you will need to take into account that many mechanisms can not be used in the modern IoT environment due to high requirements to the computing power, scaling difficulties, high fees etc.

For instance, if you choose the Bitcoin or Ethereum Blockchain, then each transaction between the devices will cost 2-20 dollars. Since the IoT deals with thousands or even millions of transactions every day, a vast amount of money is necessary, which is a huge drawback. Furthermore, the blockchains are very picky in terms of validators, which is not appropriate for IoT, since IoT devices are tiny sensors with little computing power and limited functionality.

To match the blockchain consensus algorithm and the IoT environment, it should fit the following criteria:

  • High transaction speed.
  • Low computing costs.
  • Low transaction fees.
  • Low communication complexity.
  • IoT-focused validation methods.
  • High level of fault tolerance
  • Sybil attacks resistance.
  • DoS attacks resistance.
Today, only a few consensus algorithms fit these requirements, many of them are built on BFT (Byzantine Fault Tolerance). Here is a comparison of the most popular consensus mechanisms. We highlighted green the parameters that fit the IoT conceptionBlockchain and red that are not.

How to Implement Blockchain in IoT?

How to Implement Blockchain in IoT?

Limited resources of the Internet of Things infrastructure.  The next problem is in the limited computing abilities and little memory available of the IoT devices. The blockchain technology requires a lot of memory to store the record and power to mine.

As for now, no one has found a solution for this issue, but it seems that IBM is really close. They have invented the concept of versatile and regional blockchains. The idea is that the network nodes are divided on:

  • Simple p2p nodes — store their blockchain address and balance;
  • Standard p2p nodes — store recent transaction and simple nodes;
  • p2p exchangers — replicate the complete blockchain and perform the data analysis.
Weak data encryption.  Encryption — is a crucial part of many modern applications, programs, and systems. Unfortunately, IoT devices can not interact with systems and users and encrypt the data as blockchain does.

One of the possible solutions to increase the encrypting security in IoT is providing the entropy encryption, based on quantum random number generation. This approach uses quantum physics-based data that is different from classical physics, because it is random.

You can apply the mechanism of quantum random number generation to improve IoT network encryption. EaaS providers offer high-quality sources of entropy on the physical processes of quantum devices ground. These devices guarantee real randomness, which can be used by the developers to make their IoT applications, systems, and devices safer and secure from cyberattacks.

Scaling difficulties. The problem is that IoT networks continue their rapid growth, which means that more smart devices, more transactions, and more data should be processed. The connection between the IoT elements normally requires immediate data transferring. All this causes difficulties with scaling, especially for blockchains with poor working speed.

The perfect architecture of a blockchain for the Internet of Things should process thousands of transactions per second and provide security for simple network nodes. This can be achieved in a few ways.

  • Parallel computing. This processes a few transactions at a time and increases the transaction effectiveness. Moreover, when one chain gets too complicated, it can be divided on parallel chains to help the traffic. This computing method can be used for data collecting and analysis in the IoT, for vast amounts of data analysis, and side projects processing that require a lot of computing.
  • Other solutions that increase the work speed of a blockchain. Protocols like Plasma and Plasma Cash, have the potential of increasing the work speed by using affiliate chains, parental chains, and root chains by also adding smart contracts that can interact with the main blockchain.No standard communication protocols. The traditional IoT network devices usually connect to the internet via secure and fast connection methods (wireless or wired), like DSL/ADSL, Wi-Fi, 4G and LTE. Smart devices for blockchain and IoT integration are usually connected to the internet via protocols with low bandwidth and energy consumption: 802.15.4, 802.11a/b/g/n/p, LoRa, Zigbee, NB-IoT, and Sigfox. However, these protocols are not designed to work with blockchains.
To solve this issue, the developers need to create special protocols that will be designed to work with blockchains and IoT networks. For this, they need a lot of time and money.

The risk of overloading smart contracts with IoT devices. We have discussed the advantages that the Internet of Things gets for smart contracts integration. But, it still brings some difficulties.

  • Smart contracts require third-party data sources to complete the contract. The problem is that the work of smart contracts can be hacked this way, so it needs a strong authentication, security and trust on the Internet of Things environment.
  • Smart contracts can be overloaded since they might require access to a couple of data sources. While smart contracts are decentralized, they still require a lot of computing power, and this is a critical issue for IoT.
The way this issue can be solved is not known yet. As for now, the developers use independent control, but this is complicated, expensive, and not always secure. The overloading issue can be solved by increasing the productivity of the devices, transactions, and bandwidth.

Conclusion

Blockchain technology can increase the security and productivity of IoT networks, it can also provide decentralization and the possibility to use smart contracts. However, the implementation of this technology brings a range of problems, such as limited resources of Internet of Things, weak encryption, problems with scaling and protocols of communication that focus on both IoT devices and blockchain networks.

These issues do not have proper solutions for simple and fast blockchain integration. It can be done by the means of custom development, which should be only done by a reliable technical partner, with proper developing experience, such as — Merehead.


How to Implement Blockchain in IoT? key takeaways:

#1. Why does IoT need a blockchain?
#2. The advantages of IoT implementing
#3. 3 ways to integrate blockchain technology in an IoT network
#4. The difficulties of blockchain in IoT integration
#5. Conclusion

Get a free consultation

How can we help you?

Full name *
Email *
Phone
Your budget
Tell us about your project
 

Alexander Safonov
Author of the post

Customer Review