You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Blockchain technology is built on a foundation of cryptographic primitives. Understanding hashing, digital signatures, and Merkle trees is essential to grasping how blockchains achieve security, integrity, and trustlessness.
A hash function takes an input of any size and produces a fixed-size output (the hash or digest). In blockchain, hash functions serve as the backbone of data integrity.
| Property | Description |
|---|---|
| Deterministic | The same input always produces the same output |
| Fixed output size | Regardless of input size, the hash is always the same length |
| Pre-image resistance | Given a hash, it is computationally infeasible to find the original input |
| Second pre-image resistance | Given an input, it is infeasible to find a different input with the same hash |
| Collision resistance | It is infeasible to find any two different inputs that produce the same hash |
| Avalanche effect | A tiny change in input produces a drastically different output |
SHA-256 is the hash function used by Bitcoin. It always produces a 256-bit (32-byte) output:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.