A simple step by step guide to understand what is blockchain

first to understand what is blockchain and bitcoin lets start with

what is hashing?

Hashing is the transformation of some string of characters to another fixed length string using some hash algorithm.
In simple words: A hash function takes some input data and creates some output data.

example of hashing using md5 hash function

Input: “I owe my sister $5”
Output: “a0680c04c4eb53884be77b4e10677f2b”
If the input is changed the output will change!

types of hash functions?

there are lots of different types of hash functions
for blockchain it is SHA256 hash function.
here 256 means the length of the output message in bits.

Summary of so far:

we looked at
what is hashing?
exmaple of hashing
which hash function does blockchain uses?

Now

What are some uses of Hashing?

Some popular uses of hashing are:

  1. Password storage
  2. Data Integrity Check
  3. Address on a Blockchain.

lets look at each of the popular uses of hashing

  1. Password storage:

a. Why hashing for password storage?
Hashing provide protection to password storage
b. How does hashing provide protection to password storage ?
instead of storing plain password we can store the hash value of the password. For example, store (UserID, Hashvalue{Password})
Now to check the password when entered by the user is correct or not. We can check the hash value of the password that was stored previously with the current hash value of the input password.
Hashing is simple. But calculating the reverse is nearly impossible, that is creating password out of the hash value of the password is very hard problem. That is the reason why we use hashing for password storage.

Address on a Blockchain using hashing

First lets try to understand what is blockchain?

What is blockchain?

Blockchain is a simple chain of blocks, like linked list in C programming. What are blocks? Block is like a data structure that stores information.

So the addresses on a blockchain are derived by a process of hashing public keys. Signatures are a fundamental part of blockchains. Similar to signing a check, cryptographic signatures determine which transactions are valid. Signatures are generated from a hash of data to be signed, and a private key.Metaphysically, blocks in a blockchain are identified by their hash, which serves the dual purpose of identification as well as integrity verification. An identification string that also provides its own integrity is called a self-certifying identifier.

If you like my post please follow me and upvote the content! Enjoy steaming! :)