On Hash Browns and Blockchain Security
Virtual Operations
We work with organisations to help them build, support, maintain and grow their automated processes through AI and RPA .
In our fifth Newsletter on Demystifying Blockchain, we are delving into the depths of Blockchain security and explaining (at a high level) what is meant when people talk about “hash cryptography” and "consensus networks”. As ever, beyond explaining what these are, we’re going to look at how they can be of benefit to organisations.?
Securing data in a Blockchain?
Let’s start with hash cryptography (sometimes referred to as cryptographic hash functions), which sounds very abstract and complicated, but is in fact a common and straightforward way of securing data in Blockchain and many other data-related applications. Each time a transaction takes place in a Blockchain network – such as a sale, purchase or an update to the ownership of an asset – a record of that transaction is created. Readers of our earlier Newsletters may recall that these records are spread out among several network "nodes" at various locations (known as Decentralised Ledgers). This keeps the integrity of the data - if somebody tries to alter a record at one instance of the database, the other nodes are not altered, and all the other participants can cross-reference each other and easily pinpoint the node with the incorrect information.??
But these records are not stored in their original form, as this would make them far too easy to change. They are secured in encrypted form using hash cryptography, which mathematically converts any form of data into a unique sequence of text called a “hash”. Whilst each unique piece of data will always produce the same unique hash, the process is incredibly difficult to reverse, so it is very secure.??
The part where we talk about Hash Browns?
It can be hard to visualise hash cryptography in the abstract, but it is not dissimilar to making hash browns for breakfast. If you take specific measures of potatoes, flour and eggs, and mix them together and cook them, you get a unique hash brown that reflects the specific measures of ingredients you put in as well as how you cooked it. But once you have the finished hash brown, it is nearly impossible for a hacker to “de-mix” it to get back to the original potatoes, flour and eggs.?
How to create a Hash?
So how does hashing work? Here’s a super-simplified way of creating a unique hash using the words “Virtual Operations”.? Note that the approach used to create this hash is made up for illustrative purposes and is unlikely to be the approach used in enterprise applications:?
To start with, we have created two rows of numbers, corresponding to each letter's position in the alphabet. The first row is letters, 1,3,5 etc. And the second row is letters 2,4,6, etc.?
Adding up the numbers in each row we get:???
117 (row 1), and??
145 (row 2).?
To further encrypt the data, let’s reverse the numbers and then multiply them together:?
711 X 541 = 384651?
...and then substitute each second number with the letter it corresponds to in the alphabet:?
3H4F5A?
And there we have our hash of “Virtual Operations”:? 3H4F5A. Any other words - or even removing one letter from these words - would create an entirely different hash. It is unique to these words, in this exact order i.e., “Operations Virtual” would give a different hash again. It would be exceedingly difficult for someone to derive the original words from the hash. But it is verifiable as there is a logic behind it.?
领英推荐
Consensus Networks?
As well as delivering security through encryption, hashing is an efficient way to store data, as the hash is of a fixed size, even though the original data may have been much bigger. See above how we made a 6-digit hash out of the 18-digit phrase “Virtual Operations”.?
?Blockchains hash each transaction before bundling them together into blocks, with code called “pointers” linking each block to its predecessor. Because each block links to its predecessor, data in the blockchain can’t be unilaterally changed, because a change in any transaction will produce an entirely different hash, which would no longer correspond with the hashes of all later blocks.?
The security within Blockchain is sometimes described as “tamper proof”, although from the above you can see that it might better be expressed as “tamper evident”.? A discrepancy within one block does not change the rest of the network but gives rise to an alert that the node in question may have been tampered with in some way. This is where we come to the concept of Consensus Networks within Blockchain.??
As a Blockchain network holds multiple copies of the same ledger across its nodes, a set of rules are needed for deciding what to do if one or more copies differs from the others. Consensus is the process by which the nodes on a network decide which blockchain transactions are valid and which are not. Consensus mechanisms are the software methodologies used to achieve this agreement. It’s these sets of rules that help to protect networks from malicious behaviour and hacking attacks.??
There are many different types of consensus mechanisms in use, depending on the Blockchain and its application. To run through them all is beyond the scope of this Newsletter, but while they differ in their usage, security, and scalability, they all share one purpose: to ensure that records are true and honest. When you hear Blockchain phrases such as (but not limited to) Proof of Work (PoW), Proof of Stake (PoS), Proof of Authority (PoA), or Proof of History (PoH), you’ll now know that these refer to consensus mechanisms within a Blockchain network.?
Security in the real world?
As Blockchain security relies on the cryptography and consensus mechanisms described above, pretty much every Blockchain is a use-case in their application. However, to illustrate this security working in practice, we can refer to a case study from an earlier Newsletter which looked at the healthcare industry.?
Blockchain is used in the healthcare industry for many applications, but, as an example, there have historically been issues over the sharing of patient data, particularly sensitive information relating to an individual's health. Such data is typically held by healthcare providers and nearly impossible to securely share with non-critical third parties without the risk of compromising the identity of an individual patient and their current health status. ?
To solve this, a healthcare Blockchain network called SAFE has been developed and is now used by organisations such as Delta Airlines, Arizona State University, and the Mayo Clinic, serving over 150,000 users. As each new patient is onboarded onto SAFE, the system uses a form of hash cryptography to generate a unique health identifier, which is both authentic and verifiable. This means any participant in the network can check the record, which allows for patient matching across various data sources such as hospitals, primary care doctors, and more.??
While the Blockchain network is transparent, it is also private, using the cryptography described above to conceal the identity of any individual with complex and secure codes that can protect the sensitivity of medical data. The decentralised nature of the technology allows healthcare providers to share the same information quickly and safely, meaning patients should receive the right treatment at the right time, whichever provider is managing their care. At the same time, the secure nature of the Blockchain records means that, as one participant states:
“You don’t have to trust an intermediary, you can trust the cryptography...” ?