Intro To BC
Intro To BC
What is Blockchain?
Definition 1: A blockchain is a chain of blocks, where each block contains a list of transactions or
data. These blocks are linked together in a chronological order, forming an unbreakable chain. Once
a block is added to the chain, it cannot be altered or deleted, ensuring that the data within it is
immutable.
In blockchain technology, hashing is a crucial mechanism used to ensure data integrity, security, and
immutability. It involves taking an input (or "message") and using a cryptographic hash function to produce a
fixed-length string of characters, typically a hexadecimal number. This string is known as the hash value or
hash digest. Even a small change in the input data will result in a completely different hash value, making it
an effective way to detect changes in data.
How Hashing Works in Blockchain:
1. Creating a Block:
1. A block in a blockchain typically contains a list of transactions and a previous block hash (except
the first block, called the genesis block).
2. The hash of the block is generated by hashing the contents of the block (transactions, timestamp,
etc.) along with the previous block’s hash.
3. This creates a unique identifier (the hash) for the block.
2. Chain of Blocks:
1. Each block contains the hash of the previous block, which forms the blockchain.
2. If someone tries to alter the data in any block, the hash of that block will change, causing a
mismatch in the "previous block hash" of the following block.
3. Since each block is linked to the previous one, altering one block will change all subsequent
blocks’
hashes, making it easily detectable.
Example of Hashing:
Let’s take a simple example:
• Input: “Hello, Blockchain!”
• SHA-256 Hash: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda2959fb6b62e1ed2d1a4
Challenges remain, particularly around scalability, energy usage, and legal issues.
https://andersbrownworth.com/blockchain/