Advertisement

Iran Journal of Computer Science

, Volume 2, Issue 3, pp 189–195 | Cite as

Blockchain-based security management of IoT infrastructure with Ethereum transactions

  • S. K. Tanzir MehediEmail author
  • Abdullah Al Mamun Shamim
  • Mohammad Badrul Alam Miah
Original Article

Abstract

The blockchain is nothing but a skilled magician one after one it is providing the mankind with wonders in the era of information technology and financial industry. In recent years, blockchain has received tremendous attention to providing a distributed, definitive, and auditable application in the Internet of Things (IoT). Most Internet of Things (IoT) is moving towards momentous scalability and security challenges. Blockchain technology is extravagant and entangles high bandwidth, prolongation, and memory overhead that are not compatible with IoT devices. This paper brings forward a new definitive, intimate, and lightweight masonry for IoT-based blockchain technology which forsakes the memory overhead and centralized system, while security and privacy benefits are maintaining. The preliminary investigation method is discussed a standardized IoT infrastructure, where data are stored and access is managed by a decentralized blockchain technology. The following integration method used terminal devices as network technology and Ethereum as the blockchain platform that produced backend that ensures high availability, security, and privacy, while replacing traditional backend systems. Diametrically, we illustrate the simulation outcome to highlight our approach that significantly related to security and privacy of Blockchain-based IoT applications.

Keywords

Blockchain Ethereum Etherscan Privacy Security Internet of Things Proof-of-work Distributed ledger Computing Smart contacts 

1 Introduction

The progression of technology has made us enter into a technologist world, where the main target is to deal with the security and privacy of information from various cyber-attacks [1]. Nowadays, networkable devices are becoming knowledgeable nowadays with the help of IoT and blockchain technology. This technology comprehends everything to bring the world closer to our hands. To ensure the security, secrecy, and centralization challenges of 50 billion of IoT devices in 2020 [2], there has been increased interest in blockchain technology. Recent networkable IoT devices are less memory, low energy, and lightweight; that is why, these devices must dedicate most of their gain able energy and executing functionality which effectively works for the security and privacy of the challenge [3]. Even, numerous threatening frameworks depend on the centralized system and so not necessarily well-suited for IoT network due to the difficulty of scalability and many-to-one nature of traffic. Most of the existing system of data exchange between various nodes mostly either disclose irrelevant or imperfect data for protecting user privacy and safety. In such a situation, to think about privacy and safety, IoT, system demands a lightweight, scalable, and distributed system [4]. To overcome from this event, we integrated IoT with blockchain technology to take challenges in it a lightweight, scalable, distributed, and private behavior. Blockchain technology not only addresses these scalable, distributed, and private behavior, but also shows a way for integrating all IoT devices to a common blockchain-based infrastructure [5, 6]. In 2008, Satoshi Nakamoto published the Bitcoin paper, which proposed a novel, digital currency of a decentralized, trustless infrastructure [7]. All transactions are stored on a distributed database and continuously verified using public-key cryptography. Development of IoT infrastructures suffers from of collecting data, storing data, and processing data in the cloud [8]. Selecting a significant method that enables data transmission from all IoT devices is another problem. Then, we propose a solution to explore what the future of the IoT infrastructure will be.

A Blockchain-based IoT infrastructure has described in this paper and how to the integration of various types of terminal devices with it. Our aims are to standardize the way of communication and create a fault-tolerant infrastructure that provided a beautiful way to query and get terminal-IoT devices data for the creation of next-generation (Industry 4.0) products and services. To acquire these goals, we have investigated how a network is used to store data which enable IoT gateways to push data and interact with other peers by Ethereum-Blockchain transaction. As a proof of our integration technique, a blockchain client is integrated into a digital long-range wireless data communication technology long-range gateway. A non-shareable peer-to-peer network that makes the use of this new blockchain enabled long-range gateways. The terminal, IoT devices’ send data through the IoT gateway store it to a distributed ledger.

2 Theme of blockchain

2.1 Blockchain

A blockchain is a decentralized, distributed, and public digital which consists of blocks. In general, every block is linked between them and collections of timestamped transactions [9]. This technology allows nodes to exchange data by creating a transaction. Each transaction depends on another transaction, where one transaction outputs are referred in another transaction as inputs thus creating chain among them [10]. The obtained blockchain representation is reported in Fig. 1. The first block is called generic block, and some extraordinary block in the network named miners try to solve a cryptographic puzzle named Proof of Works [11]. Thus, participating nodes build a trusted network over untrusted participants in the network. New transactions are verified by all participating nodes that omit the necessity of the central dependency and propose a distributed management system. Each block contains the hash of its previous block which ensures the constancy of the transaction; thus, alternation of any block from the network is unattainable [12]. If one transaction is valid, then the transaction is continuously stored in the public unchanging blockchain network that can be accessed by any node. All transactions among this network are signature using public-key cryptography; thus, their authenticity nature is accomplished [13].
Fig. 1

Structure of blockchain

2.2 Ethereum and smart contact

Ethereum is the blockchain-based distributed infrastructure for computing or compiles code fragment’s functionality that may interact [14]. Ethereum enables to build decentralized applications, where Ethereum wallet used as a gateway [15]. Ethereum helps to write, deploy, and use smart contracts. The smart contract’s block diagram representation is reported in Fig. 2. Ethereum enhances the scripting abilities of programming languages [16].
Fig. 2

Structure of smart contact

Ethereum network is becoming to be a distributed platform, where users can choose to customized format for transactions. Ethereum smart contract’s, programming is executed in a virtual machine called Ethereum Virtual Machine (EVM) [17]. Then, the customize function accessed terminal IoT devices using contract address and its Application Binary Interface (ABI) file [18]. In addition, Etherscan is the prime block searcher application program interface for the Ethereum Blockchain. A block explorer is materially a search engine that allows users to easily find, ensure and verify each transaction which has taken place on the Ethereum Blockchain.

3 Strategy of integration

Terminal IoT devices with gateways and blockchain technology can be integrated into a different process depending on the memory capabilities and power consumption. The terminal devices are always-on or battery powered always communicating with a gateway connected to the internet also always-on. Now, we discuss one of the following integration techniques.

3.1 Integration technique

Figure 3 shows an integration technique, where we are going to control the terminal device with my Ethereum wallet. First, use a smart contract to control terminal devices which are posting data onto the blockchain network. Gateway is enabled that is always on and it is connected via Wi-Fi to the internet and this gateway is running an instance to go Ethereum node, and therefore, this chip is interacting with that node and sending RPC calls to that Ethereum network. We used the Rinkeby Etherscan Network the test Ethereum network. We prefer Rinkeby network for proof of authority private networks and so that one of the things if we were to interact with this it one of the first things that we want for IoT security and privacy. How to interact with contracts and the contract that will be interacting with terminal devices for this, we need a smart contract address, and an API to interact with it provided by Etherscan. Then, the user should be able to access select functions to control terminal devices.
Fig. 3

IoT and blockchain integration technique

3.2 Integration strategies for, IoT gateways

Routing data among the network and verifying integrity together, IoT gateway works as a full node because of verifying each block when the transaction is begun. When the end devices communicate with the Ethereum network. In a thin-client terminal device, all the application processing and data management is carried out on the Ethereum network. The terminal, IoT devices are simply responsible for running the presentation. It could be operated in a thin-client mode if the terminal devices are not connected with battery powered and always off. In this model, the Ethereum network is only responsible for data management. The terminal devices implement the application logic and the interactions.

4 Proof of idea and access control interface

IoT protocol can deal blockchain technology when the terminal devices’ data were sent to an always-on gateway, which then routed this data stream through the official Ethereum client (Blockchain network) to a private Ethereum network using a smart contract [19]. Without creating a connection to any specific group for the transaction, gateway send their data as a block. After data have been received, these data are pushed into the Ethereum network for transactions.

Then, a file hash is received for accessing a particular function to control terminal devices that demonstrated here [20]. A smart proxy, communicate with the Ethereum network that has been sent from the gateway. Then, with the keystore/JavaScript Object Notation (JSON) file, to unlock this transaction, however, a smart contract should be assigned first for every terminal IoT devices. After being compiled keystore/JavaScript Object Notation file into bytecode then, smart contracts are sent to the public blockchain network. When a smart contract address is created, then this smart contact address and Application Binary Interface (ABI) created by the Etherscan network used to interact with terminal devices (see Fig. 4).
Fig. 4

IoT device data and access sequence diagram

4.1 Smart contract interface

  1. Check if the transaction is processed. Then, function is transaction (bool status).

     
  2. Check if the device is present. Then, the function get_terminal_device_ID (int index) public constant returns (int terminal_device_ID).

     
  3. Get timestamp values containing data (for a specific device) function get_device_timestamps (int terminal_device_ID) public constant returns (char[] timestamp).

     
  4. Get stored file hashes (handles) with certain timestamp (for a specific device) function get_terminal_device_data (int terminal_device_id, char[] timestamp) public constant returns (string file_hash).

     
  5. Push file hashes (hash_file) into the chain function set_terminal_device_data (int terminal_device_id) public returns (int index, string file_hash).

     
  6. For log action triggered the method log_action (int terminal_device_address, bool transaction, terminal_device_ID, int index, char[] timestamp, string file_hash).

     

Check existence of the new device using get_terminal_device_ID (int index) and then their hashes file is calculated and obtained using two method corresponding get_terminal_device_data () method and get_terminal_device_timestamp() method for preparing distributed ledger. The actual smart contract function is set_terminal_device_data () is worked when a new datum is added in this network, then a log_action () function is triggered then under this function every terminal IoT devices will be run. Connections between IoT devices with the Ethereum network using smart contracts, as demonstrated with our technique [21].

5 Evaluation and analysis

This section provides a complete discussion on a distributed ledger, and the security as well as performance of the blockchain-based IoT devices by the exchange of Ethereum.

5.1 Model analysis

The Integration model can deal with the distributed ledger, because distributed ledgers use nodes (terminal devices) to record, share, and synchronize transactions. The smart-contract’s, interface has been designed into many implementations of distributed ledgers such as Ethereum [22]. Our proposed integration method used smart-contract Ethereum distributed ledger that is stored itself and is executed when there is a request to store a transaction between terminal IoT devices and Ethereum network. Then, the smart-contract check for required pre-condition is satisfied that is stored in a distributed ledger; here, Al terminal devices’ information is stored in this ledger. When new terminal IoT devices have arrived then check the pre-condition immediately and if satisfied the pre-condition that is stored into the distributed ledger, and then, this terminal IoT devices will be added to this network. Here, terminal IoT devices are maintained in a way to better protect users and there is a more consistent approach in the methods for storing and retrieving identity information of each terminal IoT devices by Ethereum public distributed ledgers.

5.2 Security analysis

There are three main security requirements that need to be addressed by any security design, namely: Confidentiality, Integrity, and availability, named CIA [23]. Confidential information should not be accessible to unauthorized users. Integrity means data may only be modified through an authorized mechanism and authorized users should be able to access data for legitimate purposes as necessary called availability [24]. These three types of security mechanism included our integrated infrastructure when we started transaction among IoT devices by the Ethereum network. Table 1 summarizes of this infrastructure for security management for Ethereum transaction.
Table 1

Security evaluation

Requirements

Employed safeguard

Confidentiality

Symmetric encryption.

Integrity

Hashing

Availability

Limiting acceptable transactions

User control

Logging with JSON file

5.3 Resources’ analysis

We configure two types of Ethereum network connections in our infrastructure which we used Wi-Fi and LoRaWAN as an IoT protocol. The two connections among the Ethereum network and IoT devices are 1-month-old, non-shareable-Ethereum network around one million blocks and, a shareable Ethereum network around two million’s blocks. In this, two configurations, peak-memory cost may differ from various setups due to synchronization of speed among the Ethereum network and IoT devices such as mining full node, non-mining full node, non-mining light node, and mining archive node. In general, every node is called a client a device that communicates with the Ethereum network. Table 2 shows the statistics of resources of different nodes for a private Ethereum network and for the shareable Ethereum network.
Table 2

Resource consumption due to synchronization speed in different nodes

Properties

Mining full node

Non-mining full node

Non-mining light node

Mining archive node

Distributed storage platform user

Active

Active

Active

Active

Verify block transaction

Yes

Yes

No

Yes

Memory use in private Ethereum network

1–1.5 GB

0.5–0.8 GB

Around 0.3 GB

1.2–1.7 GB

Memory use in public Ethereum network

At least 4 GB

At least 2 GB

Around 0.2 GB

At least 5 GB

The statistics is given below for a private Ethereum network and for the shareable or public Ethereum network. In general, mining full node is used in powerful servers, non-mining full node is used in IoT Vendor Server, Strong IoT Gateway, etc. Non-mining light node is used in IoT gateways and end devices, whereas mining archive node is a special case of a full node.

5.4 Data analysis

Data analysis in blockchain systems depends on various metrics. Bitcoin offer output limits with its 10-min average with the fixed block size of 1024 KB [25]. However, in Ethereum transaction, there is no fixed block size, but included an amount of resources to be used by transaction’s limit for each block called gas limit. Similar to resource analysis, data analysis statistics of a non-shareable Ethereum network and for the shareable Ethereum network is, for 1-month-old, non-shareable Ethereum network has a maximum gas limit of four million seven hundred twelve thousand three hundred and eighty-eight gas/block. Where average gas price is twenty-one thousand gas and the average block time is 14 s, so we get that a block may only contain two hundred’s twenty-four transactions, so data throughput will be fifty-seven thousand six hundred transaction/h and for the shareable Ethereum network has a maximum gas limit of six million seven hundred eighteen thousand nine hundred four gas/block. Where average gas price of twenty-one thousand gas and an average block time of 30-s, so we get that a block may only contain three hundred’s twenty transactions, so data throughput will be thirty-eight thousand five hundred twenty transaction/h.

Table 3 shows the data throughput for a private Ethereum network and shareable or public Ethereum network is given. Although this output indicates fewer directions to support full-scale expansion today, but need to remark that all transactions are created only by one IoT gateway. Where every IoT gateway may be distribute thousands of terminal-IoT devices. Using this ability of Ethereum transaction, it is possible to maintain a billion of IoT devices securely.
Table 3

Data throughput in blockchain systems with Ethereum transaction

Properties

Private transaction

Shareable transaction

Default mining strategy of a minimum block gas limit

4712388

6718904

Gas price

384.284 Ethereum

384.284 Ethereum

Transaction per block

224 transaction

320 transaction

Average block time (s)

14

30

Output

57,600 transaction/h

38,520 transaction/h

6 Discussion

For better perception, this section discusses which parts of the IoT and blockchain technology can be improved, and the challenge of how to tackle upcoming various future automation and data exchange manufacturing technology.

Real-Time Application Because of trustless nature of blockchain technology, it is able to store data in a distributed ledger. In this situation to develop a real-time IoT infrastructures’, data propagation delay, memory consumption, and computational complexity should be minimized by proposing these infrastructures’ data exchanging can be handled using smart contracts in future heterogeneous technologies.

Incapacity Ethereum uses proof of work and consensus algorithms that promise that every block is backed by much computational work. This way is inconsistent, because every miner of blockchain network is doing hard calculations. Integration of the IoT with blockchain technology typically facing, memory limit, and may create monopolies due to the centralization of stakes, but concerning future technologies like the IoT, cyber-physical systems, cloud-computing, cognitive computing in the era of the fourth industrial revolution, this limitation may be used as a feature.

7 Conclusion

To deal with the increasing IoT devices, it is exigent to improve the method of communication among them. Combination of decentralized, trustless nature, fault-tolerant data storage and DDoS resistant of blockchain technology, a new type of IoT infrastructures may be created. By this infrastructure, increasing IoT devices may be compact-into this novel infrastructure by their functionality, computational complexity, computing techniques, and memory capacities. This achievement will lead to various models, where data exchange between nodes can be guided using this technology. These technologies are highly committed for the future fourth industrial revolution, where automation and data processing among various manufacturing technologies is the main challenge.

Notes

Supplementary material

42044_2019_44_MOESM1_ESM.ino (5 kb)
Supplementary material 1 (INO 5 kb)

References

  1. 1.
    Dorri, A., Kanhere, S.S., Jurdak, R., Gauravaram, P. Blockchain for IoT security and privacy: The case study of a smart home. In: 2017 IEEE International Conference on Pervasive Computing and Communications. Work. PerCom Work. 2017 618–623,  https://doi.org/10.1109/percomw.2017.7917634 (2017)
  2. 2.
    Quadri, S.A.I., Sathish, P.: IoT based home automation and surveillance system. In: 2017 International Conference on Intelligent Computing and Control Systems (ICICCS), pp. 861–866. IEEE, 15–16 June 2017 (2017).  https://doi.org/10.1109/ICCONS.2017.8250586
  3. 3.
    Ramachandran, G.S., Krishnamachari, B.: Blockchain for the IoT: Opportunities and challenges, pp. 21–33 (2018). http://arxiv.org/abs/1805.02818
  4. 4.
    Toffler, A.: Future Shock: IoT benefits beyond traffic and lighting energy optimization. 98–100 (1990)Google Scholar
  5. 5.
    Lee, J.H.: BIDaaS: Blockchain Based ID As a Service. IEEE Access 6, 2274–2278 (2017).  https://doi.org/10.1109/ACCESS.2017.2782733 CrossRefGoogle Scholar
  6. 6.
    Puthal, D., Malik, N., Mohanty, S.P., Kougianos, E., Yang, C.: Blockchain as a decentralized security framework. IEEE Consumer Electron Mag 7, 18–21 (2018).  https://doi.org/10.1109/MCE.2017.2776459 CrossRefGoogle Scholar
  7. 7.
    Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system. [Online]. https://bitcoin.org/bitcoin.pdf (2008). Accessed Aug 2018
  8. 8.
    Dorri, A., Kanhere, S.S., Jurdak, R.: Blockchain in internet of things: challenges and solutions. (2016). arXiv: 1605.05187
  9. 9.
    Zheng, Z., Xie, S., Dai, H., Chen, X., Wang, H.: An overview of blockchain technology: architecture, consensus, and future trends. In: Proceedings of—2017 IEEE 6th International Congress on Big Data, BigData Congress. 2017 557–564,  https://doi.org/10.1109/bigdatacongress.2017.85 (2017)
  10. 10.
    Liu, X.: IOT2. 0: Internet of Things Based on Blockchain. IEEE IEMCON 2018 - The 9th IEEE Annual Information Technology, Electronics & Mobile Communication Conference, Vancouver, BC, 1–3 November 2018 (2018)Google Scholar
  11. 11.
    Conteh, J., Copland, F., Cresese, A.: Multilingual teachers’ resources in three different contexts: empowering learning. Multiling Turn Lang Educ 1, 158–178 (2014).  https://doi.org/10.1007/978-3-319-40162-1 CrossRefGoogle Scholar
  12. 12.
    Jesus, E.F., Chicarino, V.R., De Albuquerque, C.V., Rocha, A.A.A.: A survey of how to use blockchain to secure internet of things and the Stalker attack. Secur Commun Netw (2018).  https://doi.org/10.1155/2018/9675050 Google Scholar
  13. 13.
    Foil Arms and Hog.: WTF is Brexit?—Foil Arms and Hog—YouTube. YouTube 1–9,  https://doi.org/10.1007/s10838-008-9062-0 (2016)
  14. 14.
    Eibhlín, O.: Detecting Patterns in the Ethereum Transactional Data using Unsupervised Learning. (2018). https://scss.tcd.ie/publications/theses/diss/2018/TCD-SSSDISSERTATION-2018-027.pdf
  15. 15.
    Donsez, D., Quéma, V.: Blockchains for Trusted IoT. https://wiki.eclipse.org/images/0/01/Eclipse-IoT-Days-Grenoble-2018-lockchain.pdf (2018)
  16. 16.
    Buterin, V.: OffsetMapping. (2009).  https://doi.org/10.5663/aps.v1i1.10138
  17. 17.
    Hildenbrandt, E. et al.: KEVM: A complete semantics of the ethereum virtual machine. In: Proceedings - IEEE 31st Computer Security Foundations Symposium, CSF 2018, vol. 2018, pp. 204–217. IEEE Computer Society. (2018).  https://doi.org/10.1109/CSF.2018.00022
  18. 18.
    Tonelli, R., Destefanis, G., Marchesi, M., Ortu, M.: Smart Contracts Software Metrics: a First Study. arXiv: 1802.01517v1 (2018)Google Scholar
  19. 19.
    Gatteschi, V., Lamberti, F., Demartini, C., Pranteda, C., Santamaría, V.: Blockchain and smart contracts for insurance: is the technology mature enough? Future Internet 10, 8–13 (2018).  https://doi.org/10.3390/fi10020020 CrossRefGoogle Scholar
  20. 20.
  21. 21.
  22. 22.
    Opportunities and Use Cases for Distributed Ledger Technologies in IoT, pp. 1–42 (2018). https://www.gsma.com/iot/opportunities-distributed-ledger-in-iot
  23. 23.
    Komninos, N., Philippou, E., Pitsillides, A.: Survey in smart grid and smart home security: issues, challenges and countermeasures. Commun Surv Tutorials IEEE (2014).  https://doi.org/10.1109/comst.2014.2320093 Google Scholar
  24. 24.
    Wadhwa, N., Hussain, S.Z., Rizvi, S.A.M.: A Combined Method for Confidentiality, Integrity, Availability and Authentication (CMCIAA). In: World Congress on Engineering II, 6–9 (2013)Google Scholar
  25. 25.
    Özyılmaz, K.R., Yurdakul, A.: Designing a blockchain-based IoT infrastructure with Ethereum, Swarm and LoRa. (2018). http://arxiv.org/abs/1809.07655

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of Information and Communication TechnologyMawlana Bhashani Science and Technology UniversityTangailBangladesh

Personalised recommendations