What is the technology behind blockchain?
Wed, Oct 7, 2020 •5 min read
Category: Code Stories / Blockchain
In our previous post, we gave an overview of what blockchain technology is, the benefits that come with it, how different industries are utilizing it, and how to choose the right blockchain service for your business.
In this follow-up, we will look a bit deeper into the technology that sits behind blockchain, and what makes it work.
Blockchain in 100 words
Before talking about the technology, here is a quick recap on what we mean when talking about blockchain. Deloitte provides this one hundred word summary of the concept.
“You (a “node”) have a file of transactions on your computer (“a ledger”). Two government accountants (let’s call them “miners”) have the same file on theirs (so it’s “distributed”). As you make a transaction, your computer sends an e-mail to each accountant to inform them.
Each accountant rushes to be the first to check whether you can afford it (and be paid their salary “Bitcoins”). The first o check and validate hits “REPLY ALL,” attaching their logic and verifying the transaction (“proof of work”). If the other accountant agrees, everyone updates their file. “
The image below helps visualize what a blockchain process might look like.
The core technology of blockchain
At the heart of blockchain is three leading technologies; cryptographic keys, a peer-to-peer shared ledger network, and a method of storing transactions of that network.
How the technologies work together
A cryptographic key consists of a private and public key that helps perform successful transactions between two parties. Every individual that is a member of a blockchain will have access to both of those keys and use them to generate a secure digital identity reference. In our earlier example, when an accountant confirms a deal, it will become certified by a mathematical verification and a secured transaction between two parties connected in the blockchain network.
Imagine two people who want to perform a blockchain transaction. The first will attach the relevant information to the public key of the second party, where it is collated into a block. The block will contain a digital signature, timestamp, and any other appropriate information. The block gets transmitted across the nodes of the network until the right individual uses a private key that matches, completing the transaction.
Hashing
To secure the data, blockchain technology uses hash encryption. The public key of a sender, the address of the receiver, the transaction, and private key details, all transfer using a SHA-256 algorithm. Any encrypted information will be transmitted and added to the blockchain once verified. We won’t go into detail about SHA-256 here, but in short, by design, it makes it nearly impossible to hack the hash encryption. You can read more about hashing here, and an example is shown in the image below.
The blocks in a blockchain tend to consist of four headers; the hash, transaction details, nonce, and a previous hash. The previous hash relates to the address of the last block, transaction details say what needs to happen, the nonce is a number in cryptography to differentiate the block’s hash address, and the hash address is a 256-bit, 64 character length value, that is unique to the block.
Merkle Trees
A Merkle Tree is a method of structuring data so that a large amount of information can be verified for accuracy quickly and efficiently. It has become an essential part of blockchain technology to optimize the speed at which it can operate. If you think that blockchains can have hundreds or thousands of blocks, with each containing a vast number of transactions, it is an advantage to minimize data use when processing and verifying them.
The Merkle Tree takes all transactions ID and puts them through a mathematical process, resulting in a single character code, called a Merkle Root. With a Merkle Root, any computer can quickly validate that a specific transaction took place on a particular block.
Mining
When transactional details are added to a blockchain ledger, it is known as mining. You have probably heard about people who mine bitcoin for a living. When mining, the miner generates a hash of a block transaction, ensuring the safety of the blockchain without a centralized system.
Summary
A blockchain can be set up in several ways and carry out different functions, as alluded to in our previous article. In this summary, we have highlighted the core technology and processes sitting behind a blockchain, attempting to demystify the term.
With years of experience building blockchain applications, Rumble Fish can help you apply the technology in your business or sector.