Skip to content
AL-802 (A) · Block Chain Technologies/Quick Revision Short Notes

Block Chain Technologies (AL-802 (A)) - Unit 1 Short Notes

How unit 1 is examined

This unit covers blockchain basics, public versus private chains, hashing, Merkle trees, digital signatures and the idea of a cryptocurrency; the marks sit in public vs private, the money characteristics of Bitcoin, hashing, Merkle trees and signatures.

Overview of Block chain

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>A blockchain is a distributed, append-only ledger in which transactions are grouped into blocks, and each block is linked to the previous one by its hash, so that stored data cannot be altered without detection.</mark>

Key points.

  1. The distributed ledger is a copy of the same record held by every node, so no single party owns the data.
  2. Cryptography (hashes and digital signatures) links the blocks, proves who authorised a transaction and makes tampering visible.
  3. The consensus mechanism is the rule by which all nodes agree on which block is added next, for example Proof of Work.
  4. Smart contracts and the P2P network complete the four components: contracts are code that runs automatically on the ledger, and the peer-to-peer network carries transactions and blocks between nodes.
  5. Together they give a ledger that is decentralised, transparent, immutable and needs no trusted middleman.

Asked: [7 marks] (May 2022) Describe four components of block chain technology.

Public Ledgers

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. A public ledger is a record of all transactions that anyone can read and every participant can verify.

  1. Every full node stores a copy, so the record is replicated and not held by one authority.
  2. Entries are added only by consensus and are never edited, only appended.
  3. Users appear under pseudonymous addresses, so the history is transparent but not tied to real names.

Bit coin

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. Bitcoin is the first cryptocurrency, a peer-to-peer digital cash system introduced in 2008 by Satoshi Nakamoto, with its ledger secured by Proof of Work.

  1. Its unit is the bitcoin (BTC), divisible to 100 million satoshis.
  2. Supply is capped at 21 million coins.
  3. Miners add a block about every 10 minutes and earn new coins plus fees.

Smart Contracts

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. A smart contract is a program stored on the blockchain that executes automatically when its coded conditions are met.

  1. It removes the need for a trusted intermediary because the code enforces the agreement.
  2. Once deployed it is immutable and its outcome is verified by all nodes.
  3. Example: an escrow contract releases payment only when delivery is confirmed.

Block in a Block chain

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. A block is a container of validated transactions plus a header that links it to the chain.

  1. The header holds the previous block hash, the Merkle root, a timestamp, the difficulty target and a nonce.
  2. The body holds the list of transactions.
  3. Because each block stores the previous hash, changing one block breaks every later block.

Transactions

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. A transaction is a signed record that transfers value or data from one address to another.

  1. It names inputs (coins being spent), outputs (new owners and amounts) and carries the sender's digital signature.
  2. Nodes validate the signature and check that the coins are unspent before relaying it.
  3. Valid transactions wait in a pool until a miner includes them in a block.

Distributed Consensus

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. Distributed consensus is the process by which many independent nodes agree on a single, consistent state of the ledger even when some nodes fail or cheat.

  1. It is needed because there is no central authority to decide which transaction order is true.
  2. Public chains use Proof of Work or Proof of Stake; permissioned chains use voting protocols such as PBFT.
  3. It prevents double spending.

Public vs Private Block chain

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. <mark>A public blockchain is open to anyone to join, read and validate, whereas a private blockchain restricts participation to invited members controlled by one organisation.</mark> A consortium blockchain is controlled by a group of organisations.

Comparison.

Basis Public Private Consortium
Access Anyone can join and read Only invited members of one organisation Approved members of several organisations
Consensus PoW or PoS, open to all miners Voting or PBFT among known nodes Voting or PBFT among member nodes
Decentralisation Fully decentralised Centralised or lightly decentralised Partly decentralised
Speed Slow, low throughput Fast, high throughput Fast
Trust and security Trust in code; very hard to attack Trust in the owner; less resilient Trust in the group
Transparency Fully public Limited to members Limited to members
Use cases Bitcoin, Ethereum, crowdfunding, voting Internal audit, asset tracking in one firm Trade finance, supply chain, banking groups

Answer frame. Open with the two definitions (and consortium if the question names it); draw the comparison table in the order access, consensus, decentralisation, speed, security, use cases; close with "public chains favour openness and trust, private and consortium chains favour speed and control".

Asked: [7 marks] (May 2022, May 2024) Differentiate between public versus private block chain. What are the key differences between public, private and consortium blockchains, and what are some use cases for each type?

Understanding Crypto currency to Block chain

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. A cryptocurrency is digital money secured by cryptography, and the blockchain is the ledger technology that lets it work without a bank.

  1. The blockchain records who owns which coins and stops double spending.
  2. Cryptocurrency is one application of blockchain; blockchain also serves contracts, supply chains and identity.
  3. Coins act as the incentive that pays the nodes securing the ledger.

Permissioned Model of Block chain

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. A permissioned blockchain allows only identified, authorised participants to read, write or validate.

  1. Members are known, so consensus can use fast voting instead of mining.
  2. Roles and access rights are enforced, giving privacy and regulatory compliance.
  3. Examples: Hyperledger Fabric and Corda, used by enterprises.

Overview of Security aspects of Block chain

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. Blockchain security rests on cryptography, consensus and replication that together give integrity, authenticity and availability.

  1. Hash links make past data tamper-evident.
  2. Digital signatures ensure only the owner can spend.
  3. Consensus and replication resist single-point failure; the main threat is a 51% attack, where one party controls most of the mining power.

Cryptographic Hash Function

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>A cryptographic hash function maps input of any length to a fixed-length output (the digest), is easy to compute, and cannot practically be reversed.</mark>

Key points.

  1. Blockchain uses SHA-256 for block hashes, transaction IDs, Proof of Work and Merkle trees.
  2. Addresses are built with SHA-256 followed by RIPEMD-160 to give a short 160-bit value.
  3. Signatures use ECDSA (Elliptic Curve Digital Signature Algorithm): the sender hashes the transaction and signs the hash with the private key, and anyone verifies it with the public key.
  4. Example of signing: Alice hashes "pay Bob 5", signs the hash with her private key, and nodes verify with her public key before accepting.

Answer frame. Open with "cryptography in blockchain provides integrity, authentication and non-repudiation"; list SHA-256, RIPEMD-160 and ECDSA with the use of each; close with the signing example.

Asked: [7 marks] (May 2024) Which cryptographic algorithm used in Blockchain? Explain in detail.

Properties of a hash function

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. A hash function $H$ maps a message $m$ of any size to a fixed-size digest $H(m)$; SHA-256 always gives 256 bits.

Key points.

  1. Deterministic: the same input always gives the same output.
  2. Pre-image resistance (one-way): given $h$, it is infeasible to find $m$ with $H(m)=h$.
  3. Second pre-image resistance: given $m_1$, it is infeasible to find $m_2 \ne m_1$ with the same hash.
  4. Collision resistance: it is infeasible to find any two different inputs with the same hash.
  5. Avalanche effect and fast computation: a tiny input change alters the output completely. Example: SHA-256("abc") starts ba7816bf, while SHA-256("abd") starts a52d159f.

Asked: [7 marks] (May 2022) What is a Hash function? Write down the properties of a Hash function.

Hash pointer and Merkle tree

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. A hash pointer stores the address of data together with the hash of that data. <mark>A Merkle tree is a binary tree in which every leaf is the hash of a transaction and every parent is the hash of its two children, ending in a single Merkle root.</mark>

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u1-01" viewBox="0 0 734 262" width="734" height="262" role="img" aria-label="Merkle tree of four transactions; H1 = hash of Tx1, H12 = hash of H1 and H2, Root = hash of H12 and H34, stored in the block header"><style>#dsfig-u1-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u1-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u1-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u1-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u1-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u1-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u1-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u1-01 .t{fill:#16181D;font-weight:500}#dsfig-u1-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u1-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u1-01 .dot{fill:#16181D}#dsfig-u1-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u1-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u1-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u1-01 .ah{fill:#454C5A}#dsfig-u1-01 .ah.hi{fill:#2340B8}#dsfig-u1-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u1-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u1-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u1-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u1-01 .e{stroke:#B1B7C3}html.dark #dsfig-u1-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u1-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u1-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u1-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u1-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u1-01 .t{fill:#E6E8ED}html.dark #dsfig-u1-01 .t.inv{fill:#0F1115}html.dark #dsfig-u1-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u1-01 .dot{fill:#E6E8ED}html.dark #dsfig-u1-01 .ann{fill:#8FA3FF}html.dark #dsfig-u1-01 .lbl{fill:#858D9C}html.dark #dsfig-u1-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u1-01 .ah{fill:#B1B7C3}html.dark #dsfig-u1-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u1-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u1-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u1-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah1" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh1" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="355" y1="39" x2="169" y2="103"/><line class="e" x1="355" y1="39" x2="541" y2="103"/><line class="e" x1="169" y1="103" x2="107" y2="167"/><line class="e" x1="169" y1="103" x2="293" y2="167"/><line class="e" x1="107" y1="167" x2="45" y2="231"/><line class="e" x1="293" y1="167" x2="231" y2="231"/><line class="e" x1="541" y1="103" x2="479" y2="167"/><line class="e" x1="541" y1="103" x2="665" y2="167"/><line class="e" x1="479" y1="167" x2="417" y2="231"/><line class="e" x1="665" y1="167" x2="603" y2="231"/><rect class="n" x="329" y="24" width="52" height="30" rx="8"/><text class="t" x="355" y="39" dy=".35em" text-anchor="middle">Root</text><circle class="n" cx="169" cy="103" r="17"/><text class="t" x="169" y="103" dy=".35em" text-anchor="middle">H12</text><circle class="n" cx="107" cy="167" r="17"/><text class="t" x="107" y="167" dy=".35em" text-anchor="middle">H1</text><circle class="n" cx="45" cy="231" r="17"/><text class="t" x="45" y="231" dy=".35em" text-anchor="middle">Tx1</text><circle class="n" cx="293" cy="167" r="17"/><text class="t" x="293" y="167" dy=".35em" text-anchor="middle">H2</text><circle class="n" cx="231" cy="231" r="17"/><text class="t" x="231" y="231" dy=".35em" text-anchor="middle">Tx2</text><circle class="n" cx="541" cy="103" r="17"/><text class="t" x="541" y="103" dy=".35em" text-anchor="middle">H34</text><circle class="n" cx="479" cy="167" r="17"/><text class="t" x="479" y="167" dy=".35em" text-anchor="middle">H3</text><circle class="n" cx="417" cy="231" r="17"/><text class="t" x="417" y="231" dy=".35em" text-anchor="middle">Tx3</text><circle class="n" cx="665" cy="167" r="17"/><text class="t" x="665" y="167" dy=".35em" text-anchor="middle">H4</text><circle class="n" cx="603" cy="231" r="17"/><text class="t" x="603" y="231" dy=".35em" text-anchor="middle">Tx4</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Merkle tree of four transactions; H1 = hash of Tx1, H12 = hash of H1 and H2, Root = hash of H12 and H34, stored in the block header</figcaption></figure>

Key points.

  1. Construction: hash each transaction, pair the hashes, hash each pair, and repeat until one root remains (an odd node is duplicated).
  2. The root is stored in the block header, so one 32-byte value represents all transactions.
  3. Integrity: changing any transaction changes its leaf and every hash up to the root.
  4. Verification is efficient: a light client proves a transaction is in a block with only $\log_2 n$ hashes (the Merkle path).
  5. Hash pointers chain blocks together, so a change in an old block breaks every later pointer.

Answer frame. Open with the definition; draw the four-leaf tree; explain construction, then integrity, then the Merkle path for verification and scalability; close with "Merkle trees make blockchains tamper-evident and light-client friendly".

Asked: [7 marks] (May 2024) What are Merkle Tree? How importance are Merkle Tree in Blockchains.

Digital Signature

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>A digital signature is a hash of a message encrypted with the sender's private key, which anyone can check with the sender's public key.</mark>

Steps.

Step 1: Sender computes the hash of the message.
Step 2: Sender signs the hash with the private key.
Step 3: Message and signature are sent.
Step 4: Receiver hashes the received message.
Step 5: Receiver verifies the signature with the sender's public key to recover the sent hash.
Step 6: If the two hashes match, the signature is valid.

Key points.

  1. Authentication: only the private-key holder could have produced the signature.
  2. Integrity: any change to the message changes the hash and the check fails.
  3. Non-repudiation: the signer cannot deny having signed.
  4. In blockchains it authorises every transaction (ECDSA).

Answer frame. Open with the definition; draw sender, hash, sign, send, verify as boxes; give the steps; close with the three guarantees.

Asked: [7 marks] (May 2022) Discuss the working of a digital signature.

Public Key Cryptography

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. Public key (asymmetric) cryptography uses a mathematically linked key pair: a public key shared with everyone and a private key kept secret.

  1. Data encrypted with the public key can be decrypted only with the private key, giving confidentiality.
  2. Data signed with the private key can be verified with the public key, giving authenticity.
  3. The private key cannot be derived from the public key; examples are RSA and ECC.

A basic crypto currency

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. A basic cryptocurrency is digital money whose ownership is recorded on a blockchain, spent with digital signatures and created and secured through consensus.

Three characteristics of money (Bitcoin).

  1. Medium of exchange: money is accepted in payment; Bitcoin is accepted by many merchants and transfers directly between users without a bank.
  2. Store of value: money keeps its worth over time; Bitcoin has a fixed supply of 21 million coins, so its scarcity protects it from inflation.
  3. Unit of account: prices can be quoted in it; Bitcoin is divisible into 100 million satoshis, so small prices can be expressed.
  4. Portability: it is carried as a private key and sent anywhere in minutes; durability comes from the replicated ledger.

Does a public blockchain need a native currency?

  1. Validators spend electricity or stake capital, so they need a reward; block rewards and transaction fees pay them.
  2. Open membership invites Sybil attacks (fake identities), so joining must cost something; PoW cost or a stake of coins provides this.
  3. The native coin also lets the chain penalise cheaters, for example by slashing the stake.
  4. Alternatives such as fiat payment, reputation or donations exist, but they are centralised or weak against Sybil attacks.
  5. Conclusion: a public chain needs some native token for incentives and Sybil resistance; permissioned chains do not, because members are known.

Answer frame. For Q1, define the functions of money, then take each characteristic with Bitcoin's feature; for Q2, open with validator incentives, then Sybil resistance, then rewards and fees, then alternatives, and close with the conclusion.

Asked: [7 marks] (May 2022) Define the three major characteristics of money that Bitcoin possesses. Asked: [7 marks] (May 2022) Discuss whether a public block chain requires its own native cryptocurrency to provide incentives to its validator network.

Last-minute revision

  • A blockchain is a distributed, hash-linked, append-only ledger.
  • Four components: distributed ledger, cryptography, consensus, smart contracts / P2P network.
  • Public: open, PoW or PoS, slow, fully decentralised; private: invited, voting, fast, centralised.
  • Consortium: controlled by a group of organisations.
  • Hash properties: deterministic, pre-image, second pre-image, collision resistance, avalanche.
  • SHA-256 gives 256 bits; addresses use SHA-256 then RIPEMD-160; signatures use ECDSA.
  • Merkle root summarises all transactions; a proof needs $\log_2 n$ hashes.
  • Digital signature: hash, sign with private key, verify with public key; gives authentication, integrity, non-repudiation.
  • Money functions: medium of exchange, store of value, unit of account.
  • Bitcoin supply is 21 million; 1 BTC = 100 million satoshis.
  • A public chain needs a native token for rewards and Sybil resistance.

Memory hooks

  • Hash properties: "D-P-S-C-A" (Deterministic, Pre-image, Second pre-image, Collision, Avalanche).
  • Money: "E-S-U" (Exchange, Store, Unit).
  • Signature: sign with private, verify with public; encrypt with public, decrypt with private.
  • Merkle: leaves are transactions, root goes in the header.

Coverage checklist

  • Overview of Block chain: four components question.
  • Public Ledgers: definition and points.
  • Bit coin: definition and points.
  • Smart Contracts: definition and points.
  • Block in a Block chain: definition and points.
  • Transactions: definition and points.
  • Distributed Consensus: definition and points.
  • Public vs Private Block chain: differentiate question, public, private and consortium question.
  • Understanding Crypto currency to Block chain: definition and points.
  • Permissioned Model of Block chain: definition and points.
  • Overview of Security aspects of Block chain: definition and points.
  • Cryptographic Hash Function: which cryptographic algorithm question.
  • Properties of a hash function: hash function and properties question.
  • Hash pointer and Merkle tree: Merkle tree question.
  • Digital Signature: working of a digital signature question.
  • Public Key Cryptography: definition and points.
  • A basic crypto currency: money characteristics question, native cryptocurrency incentives question.
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in