The Basics to Blockchain

Riya Kumar
5 min readApr 7, 2019

Recently there’s been a lot of hype over blockchain, about everything ranging from cryptocurrencies that made people thousands of dollars to using it for property and housing. So what’s all the hype about? How does this mysterious tech work, and why are people so hyped about it?

What is “the blockchain”?

The blockchain is a system where data is stored in “blocks”, these blocks can’t be changed and the more data the more blocks are created. The blocks are all connected cryptographically and are very secure similar to a “chain” connecting them.

The blockchain is unique from other systems, like the internet in the way that it is decentralized and not owned by any one party. What that means is that multiple computers or devices can hold the data from the blockchain due to its distributed and decentralized nature. The cryptography provides security to the data being kept in the blocks as well as transparency at the same time as everyone has a copy of the ledger.

There are 2 main features: it is a distributed ledger and decentralized system.

Distributed ledger meaning that each that is a member of that system has a copy of the ledger and is independently adding to the blockchain.

Decentralized system meaning that no one entity owns all the data and a lot of the times a 3rd party is eliminated as parties can communicate directly with each other.

How does it work?

Blockchain and specifically cryptocurrency works like this: A transaction is recorded by one computer, it contains the following information; it’ll have a message who it is from, who it is to, the amount being transferred, and the signature confirming this transaction isn’t fraudulent. Similar to this:

But in a blockchain, there’s extra cryptographic measures in place that replace the signature as seen in the picture above.

They become something called a private key which is only known by the person that “signed” on that block or transaction, the computer then tries to decrypt it and if it is successfully able to execute that task and can decrypt it, it’s able to figure out whose signature it is and confirm that it isn’t a fraudulent transaction.

“Signatures” or private keys are different for each transaction and can’t be copied, providing extra security.

Then if the block is approved its added to the ledger but since the ledger is decentralized and distributed, every device on the network is sent a copy of that transaction. Think of the ledger as a huge spreadsheet containing transactions happening around the world and everyone has a copy of it. This is similar to what the blockchain would look like!

Delays in checking whether the blocks match and avoiding fraud can lead to the ledgers being different in the devices on the blockchain. So bringing it back to the spreadsheet, since the ledgers can be different as the blocks may be different due to calculations, the spreadsheets all need to be matched/calibrated.

To calibrate them, each ledger is given a math problem to solve and the one able to solve it fastest lets all the other devices know that its ledger is correct. The system is made in a way that the majority is favored since all the ledgers are given the same problem and some ledgers are similar to each other, the system is looking for the ledger with the most amount of correct answers and how fast it was able to come to that conclusion. This voting process repeats repeatedly for each transaction on the ledger.

Transparency

In cryptocurrency transactions the public key to each of the transactions executed is on the blockchain so that everyone can see it (shown in the image under latest transactions), allowing a new level of transparency that hasn’t existed before. This can be useful for things such as supply chains where you could trace where a product is throughout the blockchain.

In addition to that this can be helpful for people to keep companies accountable if they decide to switch to cryptocurrency in the future as people can simply search up their public key and see the amount transacted

Unchangeable Data (Immutable!)

The blocks containing data can’t be changed due to the hash they carry, making it very difficult to hack/tamper with.

Image result for hash on blockchain

The algorithms used to calculate a hash vary but a popular one is SHA-26 which, no matter how long the input, returns an output that is 256-bits long. This is especially useful to track a block so that no matter how long the input data, the hash length stays the same length.

Small changes in the input data can dramatically change the hash, and that is exactly why it’s so useful in the blockchain. Each block has its own block pointer which basically means that it points to the hash of the block before it and it contains the hash of the data from the block before it. So tampering with one block and its data means that the hash is changed for all the blocks in the chain, essentially changing the whole chain.

Key Takeaways

  • Blockchain is living up to its hype!
  • Blockchain is decentralized and on a distributed ledger, making it different from other programs
  • The private and public keys allow the blockchain transparency as well as security
  • The data in a blockchain is immutable and extremely difficult to hack due to the hash

--

--