Intro to Blockchain, Asymmetric Cryptography and Consensus Mechanisms

Introduction

As we step into the world of decentralization, we might find ourselves lost by a flood of new—not necessarily difficult—concepts. We might feel overwhelmed, mix up some terms, struggle to explain concepts or ideas clearly, or feel everything too abstract. But every big name has been there before, and they were able to get through it—so there’s still hope for us.

In this article, we’ll break down what a blockchain is, how they work, and some interesting topics such as Assymetric Cryptography and Consensus Mechanisms.

What is a Blockchain?

A blockchain is a decentralized, distributed database of transactions that are securely and transparently recorded across multiple nodes. It is updated and shared across many computers in a network, making it almost impossible to alter any existing information. It’s called “blockchain” because a “block” represents a new set of transactions that has been linked to the previous one, forming a growing chain.

Blockchains have some key characteristics that make them unique:

  • Decentralization: Instead of relying on a middleman like a traditional bank, no single entity controls the network. This enables peer-to-peer transactions that are verified by multiple participants (nodes) whom perform the same computation and then compare their results to reach consensus. This gives us more autonomy, which means no more banking hours, holidays, trusting banks or depending on them to move our money.

  • Immutability: The data that has already been recorded on the blockchain can’t be altered or deleted—it’s permanent, ensuring the integrity of the information. No one can tamper with the blockchain, not even the creator. This is because every block is linked to the previous one using cryptographic hashes, and changing one would break the entire chain—unless the majority of the network agrees to it. This brings more resistance to fraud and unauthorized manipulation.

  • Transparency: Participants can see everything happening on the blockchain because transactions are publicly visible. This property builds trust and is what allow us to minimize reliance on trust-based systems.

  • Security: Transactions are secured using cryptographic techniques, which prevent fraud and unauthorized modification. This is reinforced by the thousands of nodes that store the same data, making it nearly impossible for it to be altered without gaining control over the majority of them.

How do Blockchains work?

To ensure data is securely recorded, verified and shared across a distributed netrowk, blockchains function by combining several core components and processes. Being the main blocks of this system—quite literally—blocks.

Blocks

A block is a collection of data and transactions submitted to the network. Once a transaction is initiated, it is broadcast to all participants (nodes) in the network. These nodes independently verify the transaction to make sure it’s valid, and then the transaction becomes part of a block, along with multiple transactions.

In addition to transaction data, a block also includes: a timestamp showing when it was created, a unique identifier (called a hash), and the hash of the previous block of the chain.

Each block’s hash is created based on the data it contains, meaning its hash will change if any part of the block’s data changes. The previous block’s hash is also included in each new block, creating a cryptographic link between all blocks—which forms a secure and tamper-resistant chain. If someone tried to alter a previous block, it would break the entire chain.

Transactions

Every action on a blockchain is recorded as a transaction. Once it’s initiated, a node is in charge of processing it, and once it’s verified, the transaction is grouped with many others into a block.

All transactions are hashed together and recorded inside the block at once, and even if there’s dozens, hundreds, or even thousands of them, it’ll preserve a consistent and trusted history. This happens because each block refers to the previous one (its “parent”), and this linking prevents fraud since any attempt to alter any block in history would invalidate subsequent blocks, and it would instantly be noticed by the rest of the network.

Cryptographic Hashing & Digital Security

Blockchains rely on cryptographic hashing to ensure the integrity and security of data. A hash function converts any piece of data into a fixed-length of characters (a hash). Even a small change in the input data changes the resulting hash completely, making it easy to detect any manipulation of data, no matter how small.

This process makes the blockchain secure because nobody can decrypt the data on the blockchain.

In addition to hashes, blockchains use digital signatures to verify the authenticity of transactions, preventing fraud and forgery. Digital signatures are used when making a transaction, our wallet signs it with our private key—a secret code only each of us possess. This creates a unique signature that anyone can verify using our public key—proving that the transaction came from us and hasn’t been tampered with.

This system is called public-key cryptography, and this is how it works:

  1. Our public key is mathematically generated from our private key using a method called elliptic curve multiplication—a process that is "practically irreversible”, which means it’s almost impossible to calculate a private key from a public key or address.

  2. Our blockchain address (ie. in MetaMask) is generated from this public key.

  3. Our private key is what gives us control over our assets—either accessing to our funds and enabling transactions, or even removing them from our account. This is why we should never share our private key.

Nodes

A node is any computer that participates in a blockchain network. Nodes store, verify and share blockchain data to one another, making decentralization possible. In this process, a transaction is sent to the network to be checked by multiple nodes to make sure its data is valid, and only after reaching consensus is it added to the chain.

Thousands and millions of nodes secure the blockchain, which makes our data secure even if some of them go offline—big difference from traditional banks.

There are different types of nodes:

  • Full Nodes: Keep a complete, up-to-date copy of the most recent 128 blocks. They verify every transaction and block.

  • Archive Nodes: Store the entire history of the blockchain, from the genesis block (the very first block). They’re often used by developers, explorers and tools like MetaMask.

  • Light Nodes: Store only a small portion of data and are mostly used in mobile apps and smaller devices.

Consensus Mechanisms

Because blockchain networks are decentralized, meaning there’s no central authority to decide which transactions are valid, there needs to be a way for all participants to agree on what’s true—that’s what consensus mechanisms are for. These are sets of rules and processes that allow all participants (nodes) to agree on the current state of the blockchain.

These ensure that every new block added to the chain contains only valid and agreed-upon transactions, which helps prevent fraud, double spending, and conflicting versions of the blockchain.

There are different types of Consensus Mechanisms:

  • Proof of Work (PoW): Used by Bitcoin. Miners compete to solve complex mathematical puzzles to validate transactions, and the first to solve it gets to add the next block and earn a reward. This process requires a lot of energy and computing power but is highly secure.

  • Proof of Stake (PoS): Used by Ethereum. Instead of mining, validators are chosen to validate and add new blocks based on the amount of cryptocurrency they hold and “stake” (lock up). This mechanism consumes much less energy than PoW and is considered more eco-friendly.

There are more advanced or alternative models of consensus mechanisms which include Delegated Proof of Stake (DPoS), Proof of Authority (PoA), and Byzantine Fault Tolerance (BFT), but we won’t be learning about them here.

Conclusion

Learning blockchain just takes curiosity and a bit of patience. Now that we’ve learned how blocks, transactions, cryptography, and consensus all work together, we’re already one step ahead.

There’s still a lot more to explore, but hopefully this is a solid starting point to continue learning with more confidence.

1
Subscribe to my newsletter

Read articles from Huilén Canullán directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Huilén Canullán
Huilén Canullán

Front-End Dev @ noyasoftware | Builder-to-be @ dev3pack