Abstract
The Internet of Things (IoT) has altered the world in the last few years due to its capacity to impact almost every part of life. However, IoT raises concerns about data security and privacy because it collects data from devices via the cloud, increasing its vulnerability to hacking. IoT security is a serious issue that has delayed its widespread adoption. Several security and privacy solutions have been proposed for IoT contexts that meet prevalent security criteria such as authentication, integrity, and secrecy. However, due to resource restrictions and heterogeneous IoT devices, present solutions are unable to address the security requirements of the approaching large-scale IoT paradigm. Blockchain, well known for bitcoin and Ethereum, provides an intriguing approach for IoT security. The IoT and blockchain technologies may be combined and significant improvements in distributed systems have been made as a result of the widespread use of IoT technology. A novel framework with a unique design was proposed to improve security in bitcoin transaction by combining blockchain and SHA-256 hash algorithm. Additionally, the performance of proposed framework is compared with the state-of-the-art algorithms like MD5 and SHA1 in term of encryption time, power consumption, latency, speed and security. It is observed that the proposed framework takes 12 ms lesser latency than MD5 and consumes 2.7Wh lesser power consumption than SHA1 and provides better security than both the techniques.
Introduction
Blockchain is one of the latest trending technologies in the IT industry and is still emerging. People are still attempting to learn more about the technology and apply it to a variety of other industries than cryptocurrency, where it may be used more effectively. The concept of block-chain was proposed as the underlying technology for the cryptocurrency called Bitcoin. Block-chain was the building block for this peer-to-peer electronic cash system, which solved many existing problems in the prior versions of such systems. The blockchain is a growing list of records that are added to at the end when new blocks are added. Cryptography is used to connect and secure the neighboring blocks. The blockchain is inherently resistant to data changes contained inside the blocks. Once a data block is added to a blockchain, a change to that data will make changes to all subsequent data blocks. This is therefore preferred when it is appropriate to deny authorization for modifications. Blockchain has gathered enormous popularity since its implementation in cryptocurrencies owing to the numerous application possibilities it provides. As IoT moves closer to smart city standards, device or data security appears to be a key problem. As a result, a decentralized and distributed system based on the blockchain can fulfill the management of privacy in IoT ecosystems.
The IoT evolved in the last decade to achieve more automation in systems in which all nodes, devices, and sensor networks are universally interconnected. With smart transportation, smart healthcare, smart agriculture, and other smart city initiatives, the Internet of Things has made life easier [1, 2]. Security appears to be a major concern as billions of devices connect to ever-growing networks. It is challenging to implement advanced cryptographic approaches since the majority of devices have constrained resources. Recent research works show that employing blockchain will be the best solution for security concerns regarding IoT [3]. The present IoT ecosystem is a centralized system where devices are managed, identified, and authenticated centrally which raises the scalability issue. Therefore, blockchain provides a distributed authentication and management system that can enforce privacy and security as well. Deviating from the centralized system, blockchain provides automotive security, authentication, and trust management both in the distributed and decentralized IoT ecosystem. Blockchain, well known for its use in bitcoin and Ethereum, provides an intriguing approach to IoT security. Blockchain protects against data manipulation by restricting access to the Internet of Things devices and enables compromised devices in an IoT network to be shut off.
In the field of information security and management, cryptography algorithms are crucial. Different algorithms must be used to test the credibility and reliability of metadata exchanged between the sender and recipient parties of IoT applications. Electronic Signatures involve hashing as well, and different algorithms have varied safety procedures depending on how difficult it is to hack them. The most widely used hash protocols are SHA-1, SHA-2, SHA3, MD4, and MD5 among others. Running a sequence of SHA-256 hashing algorithms is essentially how ‘mining’ is done on the Bitcoin network. Today, hashing is used to create new transactions, timestamp them, and eventually reference them in earlier blocks in cryptocurrency blockchains. Due to the enormous computing power required by anyone attempting to tamper with the blockchain and the one-way nature of the hashing, it is nearly impossible to reverse a transaction once it has been added to the blockchain and consensus has been reached among operators of different nodes (validating that all of them have the right and true version of the entire ledger). As a result, hashing is essential for maintaining the blockchain cryptographic integrity and SHA-256 is the most widely used cryptographic algorithm.
The major contributions of this paper are:
To improve the blockchain security procedure, a revolutionary framework combining SHA-256 with blockchain was designed. A bitcoin transaction was implemented by utilizing blockchain technology. For privacy and security, the SHA-256 hashing technique is utilized. It is one of the most powerful hash functions known, and it is computationally efficient, with an ordinary computer being able to perform the process dozens or even hundreds of times per second. As a result, the SHA-256 method is used to hash the transactions in the proposed framework.
Techniques, as well as a pertinent work-study and a literature review, are covered in Section 2 of this paper. In section 3, Blockchain Technology is overviewed. Section 4 describes the development of a framework for safe blockchain using IoT. In Section 5, we’ll talk about how to put it all together. Section 6 examines the performance of various hashing algorithms. Finally, the project’s conclusion and the scope of future work are discussed in section 7.
Literature review
This section summarizes the major principles and gives sufficient background information on blockchain technology and blockchain in conjunction with IoT. Numerous academics have recently attempted to capitalize on the benefits of merging blockchain with IoT in a variety of application situations.
In [4], the article explored the blockchain idea and important variables, as well as a comprehensive examination of possible security threats and current solutions that may be used as defenses. This article also demonstrated ways to improve blockchain security by outlining important aspects that may be used to create various blockchain systems and security tools that address security flaws. Finally, the article also illustrates open challenges with blockchain-IoT systems as well as future research prospects.
In [5], the immutable and decentralized feature of blockchain is used to generate trust in blockchain-based IoT security solutions which are proposed in this paper. With the use of crypto-tokens for seamless user authentication, the system maintains a high level of security. Because crypto-tokens are pre-generated using multiple prediction models, this novel technique improves the system’s security without requiring user participation. Also, provided a technique for ensuring continuous security in the system by continually analyzing the user’s authentic presence in a valid IoT Zone without the need for user involvement. Every user interaction in an IoT environment is recorded as a transaction in the blockchain, and a sequence of these transactions makes up a user’s IoT trail. A valid user interaction necessitates the usage of a unique digital crypto-token which serves as an access control tool for the system thus preventing unwanted access. Tokens are pre-generated on the blockchain using a prediction model based on the user’s IoT trail by using blockchain as an underlying foundation in an IoT context and the concept of continuous security.
In paper [6], the author examined the case study of integrating BlockChain into IoT ecosystems to accomplish security and privacy. Blockchain has attracted a lot of attention since it was first used in cryptocurrencies because of the wide range of applications it allows. Device or data security appears to be a big worry as IoT progresses toward smart city needs. As a result, a decentralized and distributed system based on Blockchain can match the needs of IoT ecosystems in terms of privacy preservation. The importance of using Blockchain for IoT security, privacy, and administration is also discussed in this study.
In [7] a security architecture was established for implementing the internet of things in a constrained context, such as a smart city, power grid, or metro rail system, among other things. The framework guarantees that data is securely sent and authenticated across a wide range of networks and devices. The framework is based on blockchain technology’s underlying mechanism, as well as the usage of a secure hashing algorithm. Without breaking the chain, an attacker cannot change or supply fake data. The strength of this method is determined by the strength of the hashing algorithm. Hash functions are one-way functions, which implies that retrieving the input from a hash is very difficult. The chain cannot be broken if an attacker manipulates or feeds fake data. The blockchain, as a burgeoning technology, is widely employed in security systems and a variety of other sectors. IoT’s tremendous expansion and evolution will ensure that it becomes an indispensable aspect of modern civilization.
The integration trends of blockchain technology with IoT were explored in this paper [8], and the insights of this new paradigm were presented. In particular, this paper provided a complete assessment of the security gains obtained in IoT systems employing blockchain, as well as the issues that arise during this integration. In addition, the report identified the most important blockchain-based IoT applications.
The security and privacy aspects [9] of blockchain IoT applications are also examined, and numerous viable options to boost scalability and throughput are presented. The article also examines blockchain IoT application integration strategies and monitoring systems. The usage of containerization in a hybrid blockchain IoT integration architecture is advocated.
By using FPGA optimization approaches to execute experimental setup for SHAs, [10] this paper highlighted the Pros and Cons of optimization methodologies as well as their influence on performance levels.
Because of the brute force risks on UltraScale+FPGA dual-core systems, this paper [11] verified the SHA-1 and SHA-3 hash algorithms. They assessed passwords with 6 characters in 3 minutes, and the duration for the SHA-3 Hash Algorithm increases by 5.5 minutes due to the high complexity.
Although past research on blockchain and IoT has been massive, there have been few studies on the intersection of these two vital fields. To close this gap, this paper examines current blockchain technology and how it might be used to improve the security, efficiency, and performance of IoT devices. A cloud or mainframe has been used for storage purposes in this existing system and found that it has increased both the delay and response time of the data.
In the existing system, a mainframe or cloud for centralized storage has been utilized and it increased the data response time and delay. Using blockchain technology makes it simple to overcome the restrictions of the current data preservation and sharing methods [12]. Table 1 illustrates comparisons of related works.
Comparison with related works
Comparison with related works
The overall comparisons of related studies show how important it is to combine blockchain with IoT for data security and integrity. Additionally, it enhances secure data processing efficiency.
As seen in Fig. 1, the blockchain is a technology that enables transactions to be organized into blocks and recorded, cryptographically chains blocks in chronological order, and enables several servers to access the resulting ledger.

Blocks in a chain correspond to those that came before them, just like page numbers in a book.
A ‘header’ carrying block-specific information in the bitcoin comprises technical information about the block, a reference to the previous block, and a fingerprint (hash) of the data included in this block, among other things. This hash is required for ordering. Each block on a blockchain refers to the previous block not by ‘block number,’ but by the block’s fingerprint, which is wiser than a page number since the fingerprint is defined by the block’s contents. As shown in Fig. 2, a blockchain is a tamper-evident shared digital ledger that records transactions in a public or private peer-to-peer network. The blockchain functions as a single source of truth, allowing users of a blockchain network to review just transactions that are important to them.

Blockchain Shared a Digital Ledger.
Blockchain design goals are as follows: i) Decentralization: a decentralized public ledger since data is stored across its peer-to-peer network. Blockchain eliminates the vulnerability of a single point of failure since there is no centralized node to store data. Decentralization eliminates the need for a third party. ii) Autonomy: No one entity has power over the BC. To store, transport, or update data in the BC, the majority of nodes in the network must agree. By using a decentralized consensus approach, it ensures stability and consistency without the need for a trusted third party, hence enabling autonomy. iii) Transparency: Blockchain technologies are extremely transparent. If data is to be entered or updated into the ledger, it must be vetted and authorized by the system. As a result, fraudulent transactions cannot be recorded in the ledger. iv) Security: The two features that make the system fundamentally secure are a cryptographic signature unique to each block and a consensus mechanism, the protocol by which the nodes in the network confirm each block. Users of the system create a digital signature of their transaction using public key cryptography. As a result, if any information is changed, the signature becomes invalid. There is no single point of failure in a decentralized system, and data may be changed from a single location because all peers in the network maintain the information. To change every entity on a fixed blockchain, massive quantities of resource-intensive computing will be required.
As seen in Fig. 3. Blockchain is a decentralized peer-to-peer network, as opposed to a centralized “Hub and Spoke” network in which each NODE is having a duplicate of the ledger.

a) Legacy Network Centralized DB.

b) Blockchain Network Distributed Ledgers.
A blockchain is made up of a series of blocks that keep track of transactions. Every block has a link to the one before it and the one after it. As a result, it’s nearly difficult for someone to tamper with a single record. This is because an attacker will have to change a chain of blocks to evade detection. To ensure the security of a blockchain system or network, a detailed risk as-assessment approach is carried out. To safeguard a blockchain solution against online fraud, violations, and other threats, it is necessary to adopt protected innovative frameworks, security testing procedures, and secure coding standards.
Cryptography is generally employed to protect the blockchain’s records. At the same time, network participants carry their private keys, which are assigned as a result of the transactions they have completed. These keys serve as digital signatures for individuals. If any record is changed, this digital signature will no longer be valid and the peer network would be disrupted. Furthermore, blockchains are distributed. This is one of the key characteristics of blockchain that contributes to its high level of security. It is spread, for example, over peer-to-peer net-works. These are updated regularly, so they’re always up to date.
There is no single point of failure or access since there is no connectivity to a central place. As a result, altering the blockchain will need a vast amount of processing power or at least control over 51% of it. Even the most aggressive attackers and hackers would find this impossible. As a result, blockchains are extremely resistant to forgery and fraud.
Hashing Algorithms are useful in a variety of security-related applications. When you sign up for a Facebook, Instagram, or Snapchat account, for example, the password you provide is processed by the Algorithm and returned as a hash.
Figure 4 depicts how any sort of data (passwords, text, etc.) is processed by the hash algorithm/function and returned as a new value.

Operation of hashing algorithms.
Hash functions are divided into various categories and some of them that are most popular are I) Secure Hashing Algorithm (SHA-2 and SHA-3) ii) RACE Integrity Primitives Evaluation Message Digest (RIPEMD) iii) Message Digest Algorithm 5 (MD5) iv) BLAKE2.
Cryptographic hash functions come in a variety of forms, each of which provides distinct bit values based on the type of hash, as shown in Fig. 5. In the widespread application in block-chain technology, SHA-256 is possibly the most well-known of all cryptographic hash algorithms.

Cryptographic Hash Functions Types.
In the Internet of Things, blockchain is a revolutionary technology that uses a decentralized, distributed, public, and real-time ledger to hold transactions between IoT nodes. A blockchain is a collection of blocks, each of which is connected to the ones before it. The cryptographic hash code, preceding block hash, and data are all included in each block. Blockchain transactions are the fundamental units for transferring data between IoT nodes. IoT nodes are many types of physical yet smart devices that include embedded sensors, actuators, and programs, as well as the ability to connect with other IoT nodes. The function of Blockchain in IoT is to provide a method for securely processing data records via IoT nodes. Figure 6 shows the advantages of combining Blockchain and IoT in various IoT applications. Blockchain is a safe and open technology that can be utilized by anybody, anywhere. This type of technology is required for IoT to provide safe communication between IoT nodes in a diverse environment. Anyone who is authenticated to interact inside the IoT may trace and examine Blockchain transactions. The use of Blockchain in the Internet of Things may assist to increase communication security.

Blockchains with the Internet of Things.
Every aspect and dimension of existence has been swallowed by digitization and automation. The IoT has been a key facilitator of the transformation. There are still concerns with IoT that must be addressed, such as the limited address space for the growing number of devices when utilizing IPv4 and IPv6, as well as major security vulnerabilities such as insecure access control systems. Blockchain is a distributed ledger system with several advantages, including increased security and traceability. As a result, blockchain can be a strong basis for the transaction and interaction-based apps. By definition, IoT systems and applications are scattered.
Communication between IoT peer devices is an important feature of IoT deployments that should not be overlooked as it is at the heart of all IoT communication. As a result, P2P networks for IoT device interactions are formed, with each IoT device acting as a node. When integrating IoTs with blockchain, the key design choice must be made at the level or stage where the peer-to-peer interactions will occur, i.e., through the blockchain, directly from one IoT peer to another peer, or within a hybrid design architecture.
IoT is a concept that is emerging and developing rapidly. Another innovation is the Internet of Things (IoT), which makes it possible for physical and digital objects to connect to and communicate with one another. This results in new digital services that enhance our experience. IoT consumers now feel vulnerable due to the growing security issues raised by IoT technologies’ quick adoption and expansion.
Consider the data that will be obtained from various external subsystems, controllers, and sensors as an example [12]. The readings acquired by the sensor will be forwarded to the gate-way interface using this approach. Gateway ID, Connected Device Information, and Data Classification are all available on the gateway interface. To establish a blockchain, the data was transmitted to a hashing mechanism. This work proposes a novel framework to improve the security by hashing the bitcoin transactions. Using blockchain in bitcoin, tampering or modifying data is not permitted because it is immutable, secure and transparent.
The following architecture gives answers to the heterogeneous IoT and centralized gateways that make up the smart data transfer’s confidentiality, integrity, and authentication concerns. In smart data transmission gateways and heterogeneous IoT, the SHA256 algorithm is used to tackle secrecy and authentication issues. In addition, blockchain technology is employed to ensure that data kept in the gateway is secure. By efficiently molding raw data, the data transformation method is applied in the architecture.
The architecture diagram of the entire system comprised of the sensor module, controller, middleware, and subsystems is shown in Fig. 7. SHA-256 is the most well-known cryptographic hash function as blockchain technology is considering making use of it. On a block-chain network, transactions are validated using the SHA-256 hashing algorithm.

Architectural diagram.
The following components make up the smart messaging system:
A hardware infrastructure that includes the IoT end device, a controller, subsystems, and communication infrastructure that allows IoT devices and systems to communicate.
A smart message system is made up of several IoT devices that collect data from a variety of sources. These data are then transferred to a middleware, which subsequently sends the data to various analysis platforms, which analyze the data and offer the necessary information. The processed data [13] is subsequently returned to the middleware, which routes it to the appropriate actuator. The data will be delivered to the middleware based on the data’s criticality. Data classification can be used to achieve many levels of data protection. Data in plain text. Data with sender and client authentication. Mutual authentication and encryption
The sensor devices are IoT end devices that capture raw sensor data and deliver it securely to the middleware and they are deployed at various locations. All the sensor modules must first be registered in the middleware, which is a one-time operation that assigns them an ID and a controller with which to communicate. This also sets the communication security settings and keys.
A controller will be assigned to a group of sensor modules. Sensor nodes can only communicate with the controllers that have been assigned to them. All data collected by all sensors registered under a certain controller is delivered to that controller which will check each sensor’s data before sending it to the middleware. If any of the sensor modules go down or stop responding, the controller can send an alert to the administrator. The blockchain technique secures communication between sensors and controllers, ensuring that no man-in-the-middle attack, reply at-tack, or masquerade assault is feasible.
The security for communication between IoT devices and the utility subsystems is provided by the middleware in this design. The middleware provides central control and management for efficient resource use and it is in charge of sending data to utility subsystems, registering sensor devices, and storing data collected by sensors. In the middleware, each end device is registered. The middleware serves as a common interface for a wide range of sensors, devices, platforms, operating systems, and applications and it also plays an important part in the overall system’s security. In Fig. 8, the parameters are the end device’s received signal strength, a timestamp and a hash of the data gathered by the sensor, and the calculated received signal strength and timestamp, as well as a key. At the moment of registration, the devices are given a key and along with that key, signal strength, time stamp, and the hash value of data at time Tx 1 and data at time Tx 2 are calculated. Data refers to the sensor reading, as well as the timestamp and received signal intensity. The hash digest of the data is computed using the SHA256 method and yet, there is to be a collision with this 256-bit hash algorithm that uses a keyless cryptographic hashing approach.

Blockchain methods.
The sensor value, a time stamp, and another essential parameter RSSI are all included in the data section. If an attacker intends to spoof a packet and deliver it to the controller, the forged data packet should have the same hash digest as the prior data. By examining prior data or even deploying sensors to obtain the readings, an attacker can readily predict the sensor value in the following packet. He can also figure out what timestamps will be in the following data packet. The crucial parameter was added to prevent valid packets from being created by guessing. The requirement was for a one-of-a-kind parameter that neither a commuter nor a person could predict. The RSSI value was chosen as the parameter based on the outcomes of the trials.
Many cryptographic techniques [13, 14] use the hash function as a key component. The use of hash functions for numerous operations is a key aspect of blockchain technology. Hashing is a way of computing a substantially unique output for all sizes of input by applying a hash function to it. It enables users to collect input data and hash data independently and get identical outputs, demonstrating that the data has not changed. Take SHA256 as an example of how a hash algorithm can be optimized and implemented on proactive reconfigurable computers.
The speed at which the problem can be solved by an algorithm will be determined by its throughput. The following is the formula for putting it into practice in which T is the throughput, B is the data block size, fmax is the maximum clock frequency, N is the pipeline series, and d is the computation delay and is shown in Equation (1) where the frequency and throughput are proportional to the number of pipeline series.
For messages with a length of no more than bits, the SHA256 hash algorithm generates a message digest, which is a hash result with a length of 256 bits. The digest is a 64-character hexadecimal text that may be represented as a 32-byte array. The SHA256 algorithm is broken down into five distinct steps: (i) Increase the number of 0 bits in the supplied data until it reaches 448 bits. Then, a 64-bit length will be added until the input data reaches 512 bits. (ii) Separate the 512-bit spliced data into 16 groups: M0–M15. (iii) Set the initial values of A, B, C, D, E, F, G, and H to h0–h7 and the vectors K0–K63 and h0–h7. (iv) Loop from 0 to 63 with the variable t, then update as follows:
Blockchain is a distributed database technology that generates highly hard-to-tamper-with ledger entries. It allows for the distribution of each record among several participant nodes and the recording of all transactions in immutable records. Security is provided by the use of strong public-key cryptography, a strong cryptographic hash, and total decentralization.
When employed in blockchain, SHA-256 provides the following advantages. Because each block in the blockchain ledger is issued a unique hash value, it is collision resistant.
Preimage resistance: Given a hash value, the input cannot be reproduced. This guarantees that during the bitcoin proof of work, miners cannot estimate the value of the nonce by translating the acceptable hash back into the input; instead, they must utilize the brute force approach, which assures that the job is completed.
Deterministic: Given the same input, the hash function’s output should always be the same.
Large output: The 256-bit output adds up to 2256 possibilities, making brute force cracking of the hash difficult.
Avalanche effect: If the input is changed little, the outcome changes substantially. This ensures that the hash value cannot be deduced from the input values. This increases the hash’s security.
The basic component of the technology blocks. They are an accumulation of several little systemic transactions. To store a reference to the previous transaction, each new block contains an SHA-256 hash of the previous transaction. It creates a “chain” of blocks, as a result, hence the name. Computationally, it is difficult to produce blocks; it takes a lot of time and numerous specialized processors. Blockchain technology is regarded as tamper-resistant since it is challenging to create a block, altering one requires altering the previous block, and changing the chain in its entirety requires altering all subsequent blocks. A typical structure of blockchain [15] is illustrated in Fig. 9. Peers join the system using private-public key pairs that are unique to them. When a block is created, it is distributed to miners, who must validate all of the transactions in the block.

A typical structure of blockchain.
IoT devices should be encrypted before being outsourced, as seen in Fig. 10. Proof of space must be created by each peer in a peer-to-peer system to support their claims and deposits. In proof of space, miners evaluate the verification equations and connect genuine transactions in the blockchain to confirm transactions.

IoT system with blockchain.
Make a new one. Block Class, a blockchain is made up of N blocks that contain valuable information. For instance, transaction histories are stored in bitcoin blocks, which form the basis of all cryptocurrencies. The block also contains technical data such as its version number, present timestamp, and a hash of the preceding block.
To prove how to construct or mine new blocks on the blockchain, a proof of work (POW) method will be utilized. The purpose of POW is to come up with a number that fits certain requirements and is both difficult to calculate and easy to verify. The proof of work is based on this concept.
Hashcash is the workload-proof algorithm used in bitcoin and it is similar to the previous situation, but it’s much more difficult to figure out. The issue here is that miners are fighting for the ability to build blocks. In general, the difficulty of computation is directly proportional to the number of specified characters that the goal string must fulfill, and after calculating the result, the miner will receive a certain quantity of bitcoin reward.
We’ll make a blockchain class with a function Object () {[native code]} that produces an initialized empty list (to contain our blockchain), as well as Century Express and the transaction list. Here’s an example of what we do in class:
Creation block and initialize the block list, add a transaction, create a new block
Mining is the enchantment and it is fairly straightforward. It accomplishes the following three goals: Demonstration of calculating work POW. Create a new agreement that gives miners a currency. Make new blocks and join them to the chain.
The workload proof algorithm used in bitcoin is called hashcash. Similar to the prior issue, but significantly more challenging to comprehend. The issue, in this case, is between miners over the ability to construct blocks. The number of required characters in the goal string is often inversely correlated with computation difficulty, and when the result is calculated, the miner will be rewarded with a particular amount of bitcoin (through transaction).
Find a number P so that the hash value of the string spliced with proof of the previous block begins with four zeros.
Performance analysis
Data is secured using various encryption techniques, and security plays a vital role. The comprehensive data encryption security that has been put in place helped assets or things that are based online and are incredibly valuable. For hiding information, there are several encryption techniques available.
The time needed to encrypt and decrypt data, security efficiency, memory utilization, power consumption, jitter, and latency will all be considered in this comparison. SHA256 is the most secure hashing method than SHA1 [17] or MD5 [16]. MD5 had the fastest hashing method, followed by SHA256, and finally SHA1. In the end, SHA256 outperforms SHA1 and MD5 in terms of security.
Table 2 compares the encryption times of MD5, SHA1, and SHA256 for a 10MB input, as well as power consumption, latency, and security level. MD5 is the fastest and uses the least amount of electricity. Between these three algorithms, SHA1 used the most power. MD5 has the most delay, followed by SHA256 and finally SHA1. Finally, SHA256 is more secure than SHA1 and MD5 when it comes to encryption.
Comparison among MD5, SHA1 and SHA256
Comparison among MD5, SHA1 and SHA256
Table 3 shows the comparisons of speed among MD5, SHA1, and SHA256. These comparisons were made using various byte steam like 16 bytes, 64 bytes, 256 bytes, and 1024 bytes.
Comparison of speed among MD5, SHA1 AND SHA256
Figure 11 shows the graph comparing the speed performance of the MD5, SHA1, and SHA256 (used in the proposed work) algorithms in terms of speed. Finally, SHA-256 is one of the successor hash algorithms to SHA-1 and it is one of the most powerful hash functions accessible. Substantially, SHA-256 is not more difficult to develop than SHA-1, and it hasn’t been hacked yet.

Speed Comparison.
Data security will be guaranteed by the blockchain technique at every level of the system. An attacker cannot modify the data or provide false information without breaking the chain. The robustness of the hashing algorithm determines the robustness of the approach. Since hash functions are one-way operations, it is highly challenging to recover the input from a hash digest. Blockchain technology is a rapidly developing methodology used in security systems and several other sectors. Furthermore, this paper explored numerous security difficulties, challenges, weaknesses, and assaults that restrict the increased adoption of blockchain technology from a range of perspectives. By restricting access to IoT devices and allowing compromised devices in an IoT network to be turned off, blockchain protects against data manipulation. SHA-256 is one of the most powerful hash functions available and it is one of the successor hash algorithms to SHA-1. SHA-256 isn’t much more difficult to create than SHA-1. Due it’s advantages, SHA-256 is used in proposed framework for hashing the transactions. The proposed framework was improved by including blockchain components to make it more dependable, safe, and scalable. Finally, regarding the security and privacy aspects of blockchain, the SHA-256 hash algorithm was implemented. IoT applications are investigated and approaches for increasing the scalability and throughput of such systems are offered.
In the future, the semantic-based approach to access control would have been advanced to the next level of security by taking into account the history of the user’s request and establishing fine-grained policies. With the suggested system, which will be implemented with heterogeneous devices in a genuine social network, other elements like trust will be explored.
Footnotes
Acknowledgments
The author would like to appreciate the effort of the editors and reviewers. This research did not receive any specific grant from funding agencies in the public, commercial or not-for-profit sectors.
