Trends in Information Systems- Blockchain Technology

8 minute read

Published:

Introduction

As companies become increasingly digitalized, their risk of security breaches also increases. Many companies are now beginning to prioritize their cybersecurity in an attempt to safeguard their data, and one technology which may assist these companies is blockchain. Blockchain is an emerging technology which enhances the way we interact with data, due to its transparent and secure nature. It relies on a decentralized network of devices containing an identical record of transactions or data (PwC, 2021), which adds data to the network based on consensus, trust, and computationally intensive algorithms, making it effectively impossible to create a fraudulent transaction, revert the state of the data, or harm data integrity.

Consensus Algorithms

A core technical aspect of blockchain technology is how a network decides whether an operation can be recorded or not. This is typically done through computers on a blockchain network establishing consensus, and it is achieved by implementing an algorithm which dictates whether or not a network will accept an attempted addition. This is more formally known as a consensus algorithm (Bach et al., 2018).

Proof of Work (PoW) Algorithms

Proof of work is currently a popular mechanism for securing blockchain networks. This concept is best explained through a worked example, which is a (simplified) version of how Bitcoin (a blockchain-based network) implements proof-of-work (Nakamoto, 2008). Source code is provided, which is written in Python 3.

To start, imagine that we have a bitcoin network that stores some transaction data. We have a new transaction that needs to be stored in the network, shown below. The transaction data is ordinary JSON, and we will store it directly as JSON:

{'transaction_value': 20}

To store this record, we first need to hash the data. The data is hashed because hashes can be used to create computationally expensive work- this is explained fully in the following paragraph. A hash is simply a function that takes some data (a file or some text) as input, and returns some alphanumeric text as output (Wolfram, 2021). You can think of the output as an “ID number” for that input- in other words, if you give that same file or text to the same hash algorithm, it’ll return the same result. In this example, we will be using the SHA-256 hash algorithm.

Although directly storing the hash is viable, it would be straightforward for a malicious actor to add fake transactions just by calculating the SHA-256 hash for any transaction they wish, which is not ideal. To prevent this from happening, we use the concept of work. If it takes a lot of time and effort for a transaction to be added, opportunistic attacks become impractical. Furthermore, work can also be used to establish trustworthiness in the network. Due to the fact that transactions need power and time, and transactions are added sequentially, this means that the oldest chain of transactions can be treated as the most trustworthy one, because of how difficult it would be to impersonate (Nakamoto, 2008). Therefore, computers that wish to add transactions to the network will need to engage in some computationally intensive work as part of the process. This is the key to making fraud impractical.

With the relevant context established, criteria can be set for implementing proof of work. This can be done by adding some constraint to the SHA-256 hash that is generated. This constraint will be that each hash needs to begin with a certain amount of zeros (in this example, 5), which is the same way that proof of work is implemented in Bitcoin (Nakamoto, 2008). Note that there is no shorcut for calculating a hash with a constraint of this type- it can only be done through trial and error, and further note that Bitcoin hashes take much longer to calculate than the upcoming example.

The final code for doing this is given below:

import hashlib
import json


data = {'transaction_value': 20}
hash = hashlib.sha256()

nonce = 0
entry = ""
# The hash must start with 5 zeros to be considered as valid
while (hash.hexdigest()[0:5].count("0") != 5):
    # A nonce (also known as a cryptographic nonce) is an incrementing value that is prepended to the hash, to ensure that new hashes are generated continuously (NIST, N.D.).
    nonce = nonce + 1
    entry = str(nonce) + json.dumps(data)
    # The hashlib object must be reinstantiated with the new entry. If repeated calls to update() are made instead,
    # the actual hash argument is the current argument concatenated with all previous arguments. This makes verification much harder.
    # Encoding must be specified as well. If it isn't, the output from this script could be copied into a different SHA-256 generator, but a completely different result would be attained.
    hash = hashlib.sha256(entry.encode("utf-8"))

print(f"Hash found after { nonce } iterations, entry { entry }, hash: { hash.hexdigest() }")

Once a valid hash is found, the nonce will be broadcasted with the transaction data to the network. Each other computer in the network can then easily verify that the work was actually done, by calculating the SHA-256 hash of the nonce and the data broadcasted. If the majority of computers on the network agree that the data is valid (after comparing the hash output), it is then added to the network.

Other Consensus Algorithms

Although it is an excellent method for guaranteeing safety, proof of work has notable disadvantages. The main disadvantage of it, is the extreme power consumption caused by the amount of computations necessary to provide proof of work- it is estimated that Bitcoin power consumption exceeds the amount of electricity that Portugal uses, per year (Bach et al., 2018). Due to the associated impacts of excessive power consumption, newer consensus algorithms are being developed which overcome this limit by eliminiating the need for expensive computations or use it for something practical, although they are still in the early stages of development. Two examples are proof of luck, which implements a random, time-based delay on adding a transaction to the network, and proof of exercise, which maintains a computational load similar to that traditional proof of work algorithms, but with the aim of solving scientific problems as opposed to hash-based puzzles (Bach et al., 2018).

Relevance to Industry

Blockchain technology has steadily been attracting attention from industry. In a survey, Deloitte (2020) noted there was a 16% increase in companies using blockchain technology compared to 2019, and further show that 86% of respondents are working with executives who have a use case for blockchain. As an example of the potential of blockchain technology, IBM (2021) created a bespoke solution for Renault, which effectively moved all their supply chain documentation and supply chain processes to blockchain based technology. The technology reduced the necessity of communication for document sharing, improving automation and nearly eradicating clerical errors which required hours of manual work to solve. The networked nature of blockchain technology also meant that their clients could also experience the benefits of this system.

Conclusion

Although still in its infancy, blockchain technology promises a high degree of cryptographic safety, which can be used to protect digital assets and maintain that protection throughout the lifetime of the network, which is an offering that is highly desirable for companies that are becoming increasingly digitalized. Current implementations of this technology have environmental downsides due to how these networks implement data verification, however, new innovations may mitigate this. Overall, the technology is a strong contender for improving the data realm of information systems, and will have a growing impact in the years to come.

References

Bach, L., Mihaljevic, B. & Zagar, M. (2018) ‘Comparative analysis of blockchain consensus algorithms’, 2018 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO). Opatija, Croatia, 21-25 May. Web: IEEE. 1545-1550.

Deloitte. (2020) Deloittes’s 2020 Global Blockchain Survey: From Promise to Reality. Web: Deloitte.

IBM (2021) Driving auto supply chains forward with blockchain. Available from: https://www.ibm.com/case-studies/renault/ [Accessed 26 July 2021].

Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. Available from: https://bitcoin.org/bitcoin.pdf [Accessed 21 July 2021].

NIST. (N.D.) nonce - Glossary. Available from: https://csrc.nist.gov/glossary/term/nonce [Accessed 26 July 2021].

PwC. (2021) Making sense of bitcoin, cryptocurrency and blockchain. Available from: https://www.pwc.com/us/en/industries/financial-services/fintech/bitcoin-blockchain-cryptocurrency.html [Accessed 26 July 2021].

Wolfram. (2021) Hash Function. Available from: https://mathworld.wolfram.com/HashFunction.html [Accessed 26 July 2021].