1
Weeks 1–3: Cryptography, Bitcoin Basics, Merkle Trees⚠️ Week 1–3 Pattern
Hash properties tested EVERY exam. Know: SHA-256, avalanche effect, public/private key roles, Merkle tree math, Bitcoin block structure.W1·Q1HOT
Which statement correctly describes the SHA-256 hash function?
- a) Output size grows with input size
- b) Always produces a fixed 256-bit output regardless of input size
- c) It encrypts data for secure communication
- d) Different inputs can map to same output intentionally
Answer: (b)
SHA-256 always outputs exactly 256 bits. Critical: hashing ≠ encryption. Hashing is one-way; encryption is reversible with a key. This distinction is tested every semester.W1·Q2HOT
The avalanche effect in hash functions means:
- a) Hash function is slow to compute
- b) A single-bit change in input causes ~50% of output bits to change
- c) The hash avalanches when input is very large
- d) Output bits are always 0 or 1 alternately
Answer: (b)
Avalanche effect: flip 1 input bit → approximately half (~128 of 256) output bits flip. This makes tiny tampering detectable.W1·Q3HOTTRAP
Which property guarantees that given a hash output H, it is computationally infeasible to find the input M?
- a) Pre-image resistance
- b) Collision resistance
- c) Second pre-image resistance
- d) Avalanche resistance
Answer: (a)
Pre-image resistance: given H(m), cannot find m.Second pre-image resistance: given m1, cannot find m2 where H(m1)=H(m2).
Collision resistance: cannot find any m1≠m2 where H(m1)=H(m2).
These are three DISTINCT properties — know all three!
W1·Q4CALC
A hash function produces 128-bit output. How many hash computations are needed on average for a birthday (collision) attack?
- a) 2¹²⁸
- b) 2⁶⁴
- c) 2³²
- d) 2¹⁶
Answer: (b) — Formula: 2^(N/2)
Birthday attack on N-bit hash requires ~2^(N/2) computations.128-bit → 2^(128/2) = 2⁶⁴ computations.
W1·Q5HOT
Which provides non-repudiation?
- a) Symmetric encryption
- b) SHA-256 hash
- c) Digital signature using private key
- d) HMAC with shared secret
Answer: (c)
Non-repudiation = sender cannot deny sending. Only private key digital signature achieves this — only you have your private key, so only you could have signed.W1·Q6TRAP
HMAC (Hash-based Message Authentication Code) provides:
- a) Non-repudiation and authentication
- b) Message integrity and authentication, but NOT non-repudiation
- c) Confidentiality only
- d) Digital signature equivalent
Answer: (b)
HMAC uses a shared secret key. Both parties know the key, so either could have generated it — no non-repudiation. Digital signatures use asymmetric keys, providing non-repudiation.W2·Q1HOTTRAP
Bob receives Alice's message encrypted for confidentiality and signed for authenticity. Which keys does Bob use?
- a) Alice's Public Key + Bob's Private Key
- b) Bob's Private Key to decrypt + Alice's Public Key to verify signature
- c) Bob's Public Key to decrypt + Alice's Private Key to verify
- d) Shared symmetric key for both
Answer: (b) — Golden Rule
Encryption: Alice encrypts with Bob's PUBLIC key → Bob decrypts with Bob's PRIVATE key.Signature: Alice signs with Alice's PRIVATE key → Bob verifies with Alice's PUBLIC key.
Memory trick: "Encrypt TO someone = use THEIR public key. Verify FROM someone = use THEIR public key."
W2·Q2HOT
Which statement about asymmetric vs symmetric encryption is TRUE?
- a) Asymmetric is faster than symmetric encryption
- b) Symmetric encryption enables non-repudiation
- c) Asymmetric encryption is slower but solves the key distribution problem
- d) Symmetric requires two different keys
Answer: (c)
Symmetric = one shared key, fast, but how do you securely share the key? Asymmetric = public/private pair, solves key distribution, but computationally expensive. In practice: hybrid (TLS uses asymmetric to exchange symmetric key).W2·Q3DEFN
In a PKI (Public Key Infrastructure), what is the role of a Certificate Authority (CA)?
- a) Mine blocks in proof-of-work
- b) Issue digital certificates binding public keys to identities, and revoke them when needed
- c) Store private keys for users
- d) Validate smart contract execution
Answer: (b)
CA vouches that "this public key belongs to this person/organization" via a signed certificate. If a private key is compromised, CA can revoke the certificate. Hyperledger Fabric uses CA for MSP identity management.W2·Q4HOT
What does the nonce in a Bitcoin block header do?
- a) Identifies the miner who found the block
- b) Stores the number of transactions
- c) A 32-bit value miners vary to find a hash below the target difficulty
- d) Encrypts the coinbase transaction
Answer: (c)
Nonce is a 32-bit field (0 to 2³²-1 ≈ 4.29 billion values). Miners try different nonce values until hash(block_header) < target. If all nonces exhausted, miner changes extra-nonce in coinbase or timestamp.W2·Q5HOT
A Bitcoin block ID is computed as:
- a) SHA-256 of the entire block (header + transactions)
- b) Double SHA-256 of the block header only
- c) SHA-256 of the Merkle root only
- d) SHA-256 of the previous block hash
Answer: (b)
Block ID = SHA256(SHA256(block_header)). Header only, not entire block. Header contains: version, prev_block_hash, merkle_root, timestamp, bits (difficulty), nonce.W3·Q1CALCHOT
Bitcoin block reward is 3.125 BTC, block time = 10 min. BTC mined in 24 hours?
- a) 312.5 BTC
- b) 450 BTC
- c) 900 BTC
- d) 225 BTC
Answer: (b)
Blocks/day = (24×60)/10 = 144 blocks/dayTotal = 144 × 3.125 = 450 BTC/day
W3·Q2CALCHOT
Merkle tree with 16 transactions — total number of nodes (all levels including leaves and root)?
- a) 32
- b) 16
- c) 31
- d) 15
Answer: (c) — Formula: 2n−1
For a perfect binary tree with n leaves: Total nodes = 2n−1 = 2(16)−1 = 31Breakdown: 16 leaves + 8 + 4 + 2 + 1 = 31
W3·Q3CALCHOT
To prove a transaction is in a Merkle tree with 64 transactions, how many hashes must be provided in the Merkle proof?
- a) 32
- b) 8
- c) 6
- d) 64
Answer: (c) — Formula: log₂(n)
Merkle proof path length = log₂(n) = log₂(64) = 6 hashesEach level provides the sibling hash. SPV (Simplified Payment Verification) uses this.
W3·Q4TRAP
A Merkle tree has an odd number of transactions. What happens?
- a) Extra empty transaction is added
- b) The last transaction's hash is duplicated
- c) The tree is rebuilt in a different structure
- d) An error is thrown and no block is produced
Answer: (b)
Bitcoin handles odd leaves by duplicating the last hash. This allows the tree to always be a perfect binary tree. Note: This duplication behavior has been the source of a historical Bitcoin vulnerability (CVE-2012-2459).W3·Q5HOT
Which halving event set Bitcoin's reward to 3.125 BTC?
- a) 3rd Halving (2020)
- b) 4th Halving (2024)
- c) 2nd Halving (2016)
- d) 5th Halving (2028)
Answer: (b)
Halving history: 2009=50 BTC → 2012=25 → 2016=12.5 → 2020=6.25 → 2024=3.125 BTC. Every 210,000 blocks (~4 years).W3·Q6DEFN
What is a UTXO (Unspent Transaction Output)?
- a) A mining reward given to miners
- b) An unverified transaction waiting in mempool
- c) A discrete chunk of Bitcoin that has been received but not yet spent, used as input to new transactions
- d) An invalid transaction returned by the network
Answer: (c)
Bitcoin uses UTXO model (not account balances). Each transaction consumes UTXOs as inputs and creates new UTXOs as outputs. Your "balance" = sum of all your UTXOs. Ethereum uses account model instead.W3·Q7HOT
What is the purpose of a coinbase transaction?
- a) Transaction to buy crypto on Coinbase exchange
- b) A transaction that reclaims lost Bitcoin
- c) The first transaction in every block that creates new Bitcoin as block reward for the miner
- d) A transaction signed by Satoshi Nakamoto
Answer: (c)
Coinbase transaction has no inputs (creates Bitcoin from nothing). It rewards the miner with block subsidy + transaction fees. The coinbase contains the "extra nonce" which miners use when 32-bit nonce space is exhausted.W3·Q8CALC
Bitcoin difficulty is adjusted every 2016 blocks. If blocks were being mined at 8 minutes average (faster than 10 min target), what happens to difficulty?
- a) Difficulty decreases
- b) Difficulty increases (target hash value decreases)
- c) Difficulty stays same — only adjusted monthly
- d) Block time increases automatically to compensate
Answer: (b)
If blocks found faster than 10 min → too much hash power → increase difficulty (lower the target threshold). Formula: New_target = Old_target × (actual_time / 2016×10 minutes). Difficulty ∝ 1/target.W3·Q9HOT
Which field in the Bitcoin block header links it to the previous block?
- a) Merkle root
- b) Nonce
- c) Previous block hash
- d) Timestamp
Answer: (c)
Each block header contains the hash of the previous block header. Changing any old block would change its hash, breaking the link chain — this is what makes blockchain tamper-evident.W3·Q10HOT
What does a Bitcoin miner actually compete to find?
- a) A prime number larger than the previous prime
- b) The private key of another miner
- c) A nonce such that SHA256(SHA256(block_header)) produces a hash below the target difficulty value
- d) The longest possible transaction chain
Answer: (c)
PoW puzzle: find nonce N such that Hash(block) < Target. "Below target" means the hash starts with a certain number of leading zeros. Difficulty = how many leading zeros required.2
Weeks 4–6: Forks, Ethereum, Consensus — BFT/Paxos⚠️ Week 4–6 Pattern
Fork definitions, 51% attack limits, Ethereum gas/units, BFT formula (n≥3f+1 vs 2f+1) — all appear every exam.W4·Q1HOTTRAP
Which can a 51% attacker NOT do?
- a) Reverse their own recent transactions
- b) Block specific transactions from confirming
- c) Steal Bitcoin directly from other users' wallets
- d) Mine blocks faster than the rest of the network
Answer: (c)
CAN: double-spend own txs, censor txs, mine competing chain, earn extra rewards.CANNOT: steal from wallets, change max supply, reverse old deeply-confirmed blocks, break cryptography.
W4·Q2HOT
A soft fork is defined as:
- a) A permanent chain split requiring all nodes to upgrade
- b) A backward-compatible protocol upgrade where non-upgraded nodes still accept new blocks
- c) A temporary split when two miners find blocks simultaneously
- d) A fork introduced by an attacker to double spend
Answer: (b)
Soft fork: tightens rules, old nodes accept new blocks. Hard fork: loosens rules, old nodes reject new blocks → chain permanently splits. Examples: SegWit = soft fork. Bitcoin Cash = hard fork.W4·Q3HOT
A temporary fork (natural fork) occurs when:
- a) Two miners find valid blocks almost simultaneously, creating two competing chains
- b) An attacker controls 51% of hash power
- c) A software upgrade is applied to half the nodes
- d) Network connectivity is permanently lost
Answer: (a)
Resolved by the longest chain rule (most cumulative PoW). The network converges when one chain gets another block first. This is why Bitcoin recommends 6 confirmations for finality.W4·Q4DEFN
What is a Sybil attack and how does PoW prevent it?
- a) Creating fake transactions — PoW prevents by signature verification
- b) Creating many fake identities to gain network influence — PoW prevents by making identity creation computationally expensive
- c) Flooding the network with spam — PoW prevents with transaction fees
- d) Eavesdropping on transactions — PoW prevents via encryption
Answer: (b)
In Sybil attack, adversary creates thousands of fake nodes to control vote. PoW prevents this: influence ∝ computational power, not number of identities. Creating 1000 fake identities doesn't help without 1000× the hardware.W4·Q5HOT
Bitcoin's "longest chain wins" rule actually means:
- a) The chain with the most blocks (by count)
- b) The chain with the most cumulative proof-of-work (most difficulty)
- c) The chain with the largest transactions
- d) The chain chosen by the node with most connections
Answer: (b)
"Longest" = most cumulative work, not most blocks. Two chains of same block count but different difficulties would resolve in favor of the higher-difficulty chain.W5·Q1HOTCALC
Which Ethereum unit relationship is CORRECT?
- a) 1 Ether = 10⁹ Wei
- b) 1 Gwei = 10⁹ Wei
- c) 1 Ether = 10⁶ Gwei
- d) 1 Finney = 10⁹ Wei
Answer: (b)
1 Ether = 10¹⁸ Wei (NOT 10⁹ — common trap!)1 Gwei = 10⁹ Wei ✓
1 Ether = 10⁹ Gwei
Gas prices specified in Gwei. Largest denomination = Ether.
W5·Q2HOT
Which Ethereum operation costs zero gas?
- a) Calling a function that writes to storage
- b) Reading/querying blockchain state via a view function
- c) Emitting an event
- d) Transferring Ether to another address
Answer: (b)
In Ethereum: read operations (view/pure functions) = free (0 gas) when called externally. State-modifying operations (write storage, transfer ETH, emit events) cost gas. This is because reads don't require consensus.W5·Q3HOT
Which consensus mechanism uses Intel SGX trusted hardware for random wait time generation?
- a) Proof of Stake
- b) Proof of Burn
- c) Proof of Elapsed Time (PoET)
- d) Delegated Proof of Stake
Answer: (c)
PoET (used in Hyperledger Sawtooth): Each node gets a random wait time from trusted SGX enclave. Shortest wait time wins. Fair without computational waste. Verifiable because SGX produces signed proof.W5·Q4DEFN
What is the EVM (Ethereum Virtual Machine) and why is it important?
- a) A virtual mining rig that runs Ethereum node software
- b) The hardware infrastructure for Ethereum data centers
- c) A sandboxed, deterministic runtime environment that executes smart contracts identically on all nodes
- d) An emulator for running Bitcoin scripts on Ethereum
Answer: (c)
EVM ensures deterministic execution: same code + same input = same output on ALL nodes worldwide. This is essential for consensus. EVM is Turing-complete but gas-bounded (prevents infinite loops).W5·Q5DEFN
What is Proof of Burn in blockchain consensus?
- a) Destroying hardware to prove commitment
- b) Sending cryptocurrency to a verifiably unspendable address to gain mining rights proportional to burned amount
- c) Burning electricity via PoW computation
- d) A penalty mechanism for malicious validators in PoS
Answer: (b)
PoB: burn coins to unspendable "eater address" → gain virtual mining power proportional to burned coins. Demonstrates long-term commitment (cannot recover burned coins). Alternative to PoW's energy waste.W6·Q1HOTCALC
A system has 7 nodes under Byzantine Fault Tolerance model. Max faulty nodes tolerated?
- a) 1
- b) 2
- c) 3
- d) 4
Answer: (b) — n ≥ 3f+1
7 ≥ 3f+1 → 3f ≤ 6 → f ≤ 2. Max 2 Byzantine faults.Note: For crash faults (Paxos): n ≥ 2f+1 → 7 ≥ 2f+1 → f ≤ 3. Different answer!
W6·Q2CALC
What is the minimum number of nodes needed to tolerate 3 Byzantine faults?
- a) 6
- b) 7
- c) 10
- d) 9
Answer: (c) — n = 3f+1
n = 3(3)+1 = 10 nodes minimum for BFT with f=3.For crash faults: n = 2(3)+1 = 7 nodes.
W6·Q3HOTTRAP
In Paxos, if fewer than a quorum of acceptors respond, which property is affected?
- a) Safety — conflicting values may be decided
- b) Liveness — no value can be decided, but no bad decisions are made
- c) Both safety and liveness simultaneously
- d) Neither — Paxos always proceeds
Answer: (b)
Safety = "nothing bad happens" (never violated in Paxos).Liveness = "something good eventually happens" (violated if no quorum).
Without majority: cannot decide → liveness affected. But conflicting decisions never occur → safety preserved.
W6·Q4HOT
What problem does Multi-Paxos solve over basic Paxos?
- a) Handles Byzantine faults unlike basic Paxos
- b) Eliminates the repeated Prepare phase by electing a stable leader for multiple rounds
- c) Reduces the number of nodes needed for consensus
- d) Replaces Paxos entirely with a simpler algorithm
Answer: (b)
Basic Paxos: every instance requires full Prepare → Promise → Accept → Accepted (2 round-trips).Multi-Paxos: elect stable leader once → only Accept → Accepted needed (1 round-trip) for subsequent slots.
W6·Q5HOT
Why does PBFT have O(n²) communication complexity?
- a) Each replica must store O(n) copies of each message
- b) In the Prepare and Commit phases, every replica must send messages to every other replica
- c) The leader must do O(n²) cryptographic operations
- d) View change requires O(n²) leader candidates
Answer: (b)
PBFT phases: Pre-prepare (1→n), Prepare (n→n²), Commit (n→n²). Each of n replicas messages all n replicas = n² messages. This is why PBFT doesn't scale beyond ~100 nodes.W6·Q6HOT
PBFT requires n ≥ 3f+1. Why is 3f+1 specifically required (not 2f+1)?
- a) To ensure at least f+1 honest nodes can form a quorum
- b) To ensure quorum (2f+1) always contains at least f+1 honest nodes, even if f nodes are Byzantine and f are crashed
- c) To handle network partitions with 3 segments
- d) Because 3 is the minimum for triangle-based routing
Answer: (b)
With f Byzantine nodes: worst case = f faulty + f crashed/slow + (n-2f) honest respond. For quorum (2f+1) to have majority honest: n-2f > f → n > 3f → n ≥ 3f+1.3
Weeks 7–9: Hyperledger, Algorand, Bitcoin-NG, ByzCoin⚠️ Week 7–9 Pattern
Fabric transaction flow (Endorse→Order→Validate), MSP vs CA, Algorand VRF (j=0 meaning), Bitcoin-NG key-block vs micro-block all heavily tested.W7·Q1HOT
Correct Hyperledger Fabric transaction flow order:
- a) Order → Endorse → Validate
- b) Endorse → Order → Validate
- c) Validate → Endorse → Order
- d) Endorse → Validate → Order
Answer: (b)
E-O-V:1. Endorse: Client sends proposal to endorsing peers who simulate & sign.
2. Order: Orderer sequences transactions into blocks (no execution).
3. Validate: All peers check endorsement policy + MVCC (read-write set) → update world state.
W7·Q2HOTTRAP
What is the role of MSP (Membership Service Provider) in Hyperledger Fabric?
- a) Issues X.509 certificates to participants (that's the CA)
- b) Defines which identities are trusted and maps certificates to roles (admin, peer, client)
- c) Executes chaincode
- d) Orders transactions into blocks
Answer: (b)
MSP ≠ CA. CA issues certificates. MSP uses those certificates to determine membership and roles. MSP defines: which CAs are trusted, which certificate attributes map to which roles, revocation lists.W7·Q3HOT
What is the purpose of Channels in Hyperledger Fabric?
- a) To increase block production speed
- b) To create logically separate ledgers among specific subsets of participants with data isolation
- c) To replace the consensus mechanism
- d) To store private keys securely
Answer: (b)
Channels = private "subnets" within Fabric network. Each channel has its own ledger, chaincode, and ordering service. Organizations not on a channel cannot see its transactions. Like private chat rooms within a larger platform.W7·Q4HOT
In Fabric, the Orderer service's role is:
- a) Verify signatures and execute chaincode
- b) Store the world state database
- c) Sequence transactions into blocks (does NOT validate/execute transactions)
- d) Issue membership certificates
Answer: (c)
Orderer only sequences — it creates a deterministic order of transactions. It does NOT execute chaincode or validate business logic. After ordering, peers do the validation (endorsement policy check + MVCC).W7·Q5HOT
Hyperledger Fabric's world state vs blockchain:
- a) World state stores transaction history; blockchain stores current values
- b) World state stores current key-value snapshot (fast reads); blockchain stores full transaction history (immutable audit log)
- c) They store identical data in different formats
- d) World state is encrypted; blockchain is plaintext
Answer: (b)
World state (CouchDB/LevelDB) = current state of all assets, queryable. Blockchain = append-only log of all transactions. World state can be rebuilt from blockchain. CouchDB enables rich JSON queries; LevelDB only simple key lookups.W7·Q6HOT
Which statement about Hyperledger Fabric is FALSE?
- a) Fabric uses modular design with pluggable consensus
- b) Chaincode is Fabric's smart contract (written in Go/Java/Node.js)
- c) Fabric requires a native cryptocurrency to pay for transactions
- d) Fabric supports private data collections for confidentiality
Answer: (c) — FALSE
Fabric does NOT require a native cryptocurrency. This is a key difference from Ethereum. Fabric uses identity and policy-based access control instead of economic incentives.W8·Q1HOT
In Bitcoin-NG, what are the two types of blocks and their roles?
- a) Leader-blocks (elect leader) and transaction-blocks (transactions) — both mined via PoW
- b) Key-blocks (PoW, elect epoch leader) and micro-blocks (no PoW, contain transactions, produced by leader)
- c) Mining-blocks (for miners) and user-blocks (for users)
- d) Checkpoint blocks (finality) and normal blocks (transactions)
Answer: (b)
Bitcoin-NG separates leader election from transaction processing:Key-block: PoW puzzle → winner becomes epoch leader (contains public key).
Micro-blocks: Leader signs and broadcasts these rapidly (~every few seconds) with transactions. No PoW needed.
W8·Q2HOT
What problem does ByzCoin solve that Bitcoin-NG has?
- a) Bitcoin-NG lacks transaction privacy
- b) Bitcoin-NG's faulty leader can produce invalid micro-blocks with no accountability — ByzCoin adds PBFT-like collective signing for immediate finality
- c) Bitcoin-NG is too slow — ByzCoin increases block size
- d) Bitcoin-NG has no Merkle tree structure
Answer: (b)
Bitcoin-NG: faulty leader can create bad micro-blocks, detected only when next leader creates key-block. ByzCoin: uses CoSi (collective signing) — a committee of recent key-block winners signs each micro-block → immediate Byzantine fault tolerance.W8·Q3HOT
CoSi (Collective Signing) reduces PBFT communication from O(n²) to:
- a) O(n)
- b) O(n log n)
- c) O(n) messages and O(log n) latency via tree-based multi-signature aggregation
- d) O(1) — constant time
Answer: (c)
CoSi uses a tree structure: leader broadcasts to tree, signatures aggregate up the tree (Schnorr signatures are aggregatable). Result: O(n) messages total, O(log n) communication rounds. Verifier sees one aggregated signature.W9·Q1HOT
In Algorand's VRF cryptographic sortition, if a node receives j = 0, it means:
- a) Node is selected as the block proposer
- b) Node is NOT part of the consensus committee for this round
- c) Node has voting weight of 0 in committee
- d) VRF seed was invalid
Answer: (b)
Algorand VRF outputs: (hash, proof, j). j=0 → not in committee. j>0 → in committee with voting weight j. Nodes only reveal their role when they broadcast — prevents targeted attacks before selection is known.W9·Q2HOT
Algorand's security assumption tolerates up to what fraction of malicious stake?
- a) 33% (1/3)
- b) 50% (1/2)
- c) Less than 1/3 of total stake (similar to BFT)
- d) Any amount — Algorand has no Byzantine assumption
Answer: (c)
Algorand assumes honest stake > 2/3 of total stake. Adversary can control <1/3 of stake. This maps to classic BFT assumption. Difference: Algorand achieves this at scale through VRF-based random selection.W9·Q3HOT
In Hyperledger Indy, who are Stewards?
- a) Regular users who hold credentials
- b) Organizations that issue verifiable credentials (like universities)
- c) Trusted institutions that run RBFT validator nodes on the Indy network and can approve Trust Anchors
- d) Developers who write Indy chaincode
Answer: (c)
Hierarchy: Stewards (run validators, most trusted) → Trust Anchors (approved by Stewards, issue credentials, e.g., universities) → Users/Holders (receive credentials). Stewards ≠ Trust Anchors.W9·Q4HOT
What is the DID (Decentralized Identifier) URI structure?
- a) did:method:method-specific-identifier (e.g., did:sov:WRfXPg8dantKVubE3HX8pw)
- b) did://method/identifier
- c) method:did:identifier
- d) identifier.method.did
Answer: (a)
DID format: did:[method]:[method-specific-id]"did" = scheme, "method" = which DID system (sov=Sovrin/Indy, eth=Ethereum, etc.), last part = unique ID on that ledger.
Resolves to a DID Document containing public keys and service endpoints.
W9·Q5HOT
In Self-Sovereign Identity (SSI), the trust triangle involves:
- a) Miner, Node, User
- b) Issuer (issues credential), Holder (stores credential), Verifier (checks credential)
- c) Admin, Peer, Client
- d) Steward, Trust Anchor, Validator
Answer: (b)
Issuer (e.g., university) → issues VC to Holder (student) → Holder presents to Verifier (employer). Verifier checks on ledger (Indy) that issuer's schema/definition is valid. Issuer never involved in presentation.W9·Q6DEFN
What does support_revocation: False mean in a Hyperledger Indy credential definition?
- a) The credential can never be issued
- b) The credential definition does not support revocation — once issued, credentials with this definition cannot be revoked
- c) The credential is automatically revoked after issue
- d) Revocation requires manual intervention
Answer: (b)
Setting support_revocation=False when creating a credential definition means the resulting credentials cannot be revoked later. Once set, cannot be changed. For revocable credentials, support_revocation=True and a revocation registry must be created.W9·ByzCoin·Q1HOT
ByzCoin improves upon PBFT by integrating PoW and CoSi. Which correctly describes improvements for n nodes?
MSQ — select all correct
- a) ByzCoin reduces communication from O(n²) to O(n) — WRONG (reduces to O(n) messages but latency is O(log n))
- b) ByzCoin reduces consensus latency from O(n²) to O(log n) via tree-based structure
- c) ByzCoin reduces verification from O(n) to O(1) via Schnorr multi-signatures
- d) ByzCoin eliminates need for leader node — WRONG (still needs leader)
Answer: (b) and (c)
PBFT = O(n²) messages. ByzCoin CoSi tree = O(n) total messages, O(log n) latency. Schnorr multi-sig aggregates n signatures into 1 → O(1) verification for any third party. Leader still exists — just changes each key-block round.W9·SSO·Q1TRAP
Which is NOT true about Single Sign-On (SSO)?
- a) A single user can access multiple services with one login
- b) A single identity provider typically maintains the identity
- c) During authentication, identity is not directly exposed to all services
- d) Identity holders use the Identity Provider to authenticate other identity holders
Answer: (d) — NOT TRUE
In SSO: the Identity Provider (IdP) authenticates users to services — NOT other users. The IdP authenticates, not the users. (a), (b), (c) are all valid SSO properties. SSO is centralized — distinct from decentralized SSI/DID model.W9·ALGORAND·Q1HOT
If Algorand's BA* protocol fails to reach final consensus in one round, how does it resolve?
MSQ — select all correct
- a) Runs BA* repeatedly with timeout, then moves to next round with new randomly selected committee
- b) Exactly 10 executions of BA* required to force consensus under weak synchrony
- c) Running BA* 2–3 times is mathematically sufficient even with up to 49% malicious participants
- d) Permanently halts blockchain to prevent fork
Answer: (a) and (c)
Algorand: if tentative consensus, timeout triggers → new BA* round with fresh committee via VRF. Mathematical proof: 2-3 BA* iterations sufficient for finality even with 49% malicious. This gives Algorand near-instant finality without sacrificing safety.W7·PBFT·Q1HOT
What mechanism ensures liveness in PBFT when the primary (leader) becomes faulty?
- a) Increasing the block size limit
- b) Timeout-based view change protocol — replicas detect unresponsive primary and elect a new one
- c) Switching to Proof of Work temporarily
- d) Re-broadcasting all pending transactions
Answer: (b)
PBFT view change: if replicas wait too long without progress (timeout), they broadcast VIEW-CHANGE message. Once 2f+1 VIEW-CHANGE messages received, new view starts with new primary. This is how PBFT achieves liveness despite Byzantine primary.W7·FABRIC·Q1HOT
What are the key architectural features of Hyperledger Fabric?
MSQ — select all correct
- a) Modular design with pluggable consensus components
- b) Mandatory native cryptocurrency for paying fees
- c) Separation of transaction endorsement from ordering
- d) Public anonymous participation (like Bitcoin)
Answer: (a) and (c)
Fabric: modular (pluggable consensus: Raft, Kafka, custom), separates endorsement from ordering (unique to Fabric). NO native token, NO anonymous participation — it's permissioned with known identities via MSP/CA.W7·BYSANTIUM·Q1HOT
What conditions must hold in a Byzantine quorum system to ensure safety?
- a) Any two quorums must intersect in at least one correct (honest) replica
- b) Quorums may be completely disjoint to increase throughput
- c) Quorum size must equal exactly half the network
- d) Faulty replicas must form a standalone quorum
Answer: (a)
Quorum intersection property: any two quorums must share at least f+1 nodes. Since at most f nodes are Byzantine, at least one honest node is in both quorums. This prevents "split-brain" — two different values being simultaneously committed.4
Weeks 10–12: Payment Channels, Privacy, Attacks, Applications⚠️ Week 10–12 Pattern
HTLC (atomic swaps), Eclipse attack mechanics, selfish mining calculation, privacy techniques (chaff coins/mixins), Project Ubin, blockchain trilemma.W10·Q1HOT
HTLC (Hash Timelock Contract) — what happens if the secret is NOT revealed before timeout?
- a) Funds are permanently locked
- b) Funds auto-transferred to recipient after extra delay
- c) Sender gets a refund — funds returned to original sender
- d) Contract is re-executed with new parameters
Answer: (c)
HTLC two paths: (1) Reveal correct hash preimage (secret) before timeout → receiver gets funds. (2) Timeout expires without secret → sender gets refund. Neither party loses — either swap completes or reverts. Basis of Lightning Network and atomic cross-chain swaps.W10·Q2HOT
In a Lightning Network payment channel, what happens on-chain vs off-chain?
- a) All payments recorded on blockchain for auditability
- b) Only channel open (funding) and channel close (settlement) are on-chain; intermediate payments are off-chain
- c) Every 100 payments, a summary is recorded on-chain
- d) Lightning only works for Bitcoin amounts over 0.1 BTC
Answer: (b)
Lightning Network: open channel (1 on-chain tx) → unlimited instant off-chain payments → close channel (1 on-chain tx settling final balance). Scales Bitcoin by orders of magnitude. Uses HTLCs for routing multi-hop payments.W10·Q3HOT
What makes HTLC atomic in cross-chain swaps?
- a) Both swaps happen in the same block
- b) Either both transfers complete (secret revealed) or both revert (timeout) — no partial state possible
- c) A trusted escrow atomizes the swap
- d) Both chains use the same consensus protocol
Answer: (b)
Atomicity: Alice locks BTC with hash H, Bob locks ETH with same hash H. If Alice reveals secret S (where H=SHA256(S)), Bob's ETH is released. If not, both revert. Cannot have half-swap. No trusted third party needed.W10·Q4DEFN
What is the Blockchain Trilemma (Performance Triangle)?
- a) Trade-off between Throughput, Latency, and Cost
- b) You can achieve at most two of: Scalability, Security, and Decentralization simultaneously
- c) Trade-off between PoW, PoS, and PBFT consensus mechanisms
- d) Trade-off between Consistency, Availability, and Partition Tolerance (CAP theorem)
Answer: (b)
Blockchain Trilemma: Scalability + Security + Decentralization — pick 2.Bitcoin = Secure + Decentralized (not scalable).
Fabric = Secure + Scalable (not decentralized — permissioned).
Some L1s sacrifice security for speed.
W10·Q5HOT
Project Ubin Phase 3 (DvP) main objective was:
- a) Retail CBDC for Singapore citizens
- b) Atomic Delivery-versus-Payment: simultaneous exchange of digital securities and cash across different blockchain systems
- c) Cross-border remittances for Southeast Asia
- d) Replacing MAS payment infrastructure
Answer: (b)
Project Ubin DvP: Monetary Authority of Singapore (MAS) + SGX. Goal: eliminate settlement risk by making securities and payment transfer happen simultaneously and atomically across different ledgers.W11·Q1HOTCALC
Selfish miner mines 2 blocks privately, block reward = 6.25 BTC. Honest miner mines 1 block. Selfish miner releases 2-block chain (wins). Total attacker reward?
- a) 6.25 BTC
- b) 12.5 BTC
- c) 18.75 BTC
- d) 3.125 BTC
Answer: (b)
Selfish miner gets 2 block rewards = 2 × 6.25 = 12.5 BTC. Honest miner's 1 block is orphaned (0 reward). Honest miner wasted effort. Attacker earned more than fair share relative to time invested.W11·Q2HOTCALC
Fomo3D: each ticket purchase extends timer by 30 seconds. Attacker buys ticket with 3 minutes remaining, then prevents all other purchases by filling blocks. How many purchases were prevented?
- a) 3
- b) 6
- c) 9
- d) 12
Answer: (b)
3 minutes = 180 seconds. Each purchase = 30 seconds extension.180 ÷ 30 = 6 purchases prevented.
Attacker's strategy: buy ticket → timer extends → spam blocks with high-fee useless transactions → other users' purchase txs can't confirm → timer expires → attacker wins pot.
W11·Q3HOTMSQ
Eclipse attack — attacker has 40% hash power, victim has 30%, rest of network has 30%. After successful eclipse, which are TRUE?
- a) Attacker now controls 70% of network hashrate
- b) Honest nodes (victim + rest) can no longer combine their hashing power
- c) Attacker competes directly with victim: 40% vs 30%
- d) Attacker competes directly with rest of network: 40% vs 30%
Answer: (b), (c), (d)
(a) WRONG — attacker does NOT gain victim's hash power. Eclipse splits the honest network.Victim and rest of network are isolated from each other → each faces attacker separately with only 30% vs attacker's 40%. Attacker has majority over each isolated group.
W11·Q4HOT
How does Eclipse Attack isolate a victim Bitcoin node?
- a) DDoS the victim node with packet floods
- b) Fill victim's "new" and "tried" peer connection tables with attacker-controlled IPs so all connections go to attacker nodes
- c) Intercept and drop all victim's TCP packets at router level
- d) Spam the victim with invalid blocks until it disconnects
Answer: (b)
Bitcoin maintains two peer tables: "new" (new addresses) and "tried" (previously connected). Attacker fills both with its own IPs via ADDR messages. After victim restarts, all connections go to attacker. Defense: change table management to limit attacker IPs per /24 subnet.W11·Q5HOT
What are Chaff coins (Mixins) used for in blockchain privacy?
- a) To increase transaction fees for miners
- b) A type of stablecoin pegged to gold
- c) Decoy transaction inputs/outputs added to obscure the real sender/receiver from graph analysis
- d) Coins burned to prove identity
Answer: (c)
Chaff coins = decoys in transaction graph. Real transaction mixed with fake inputs. Observer cannot determine which inputs/outputs are real vs decoy. Used in Monero (ring signatures). Prevents transaction graph analysis from revealing identities.W11·Q6HOT
In the double-spend attack with mining pool, what exactly happens?
- a) Attacker mines two blocks with the same transaction
- b) Attacker pays vendor, receives goods, then the mining pool confirms a conflicting transaction returning coins to attacker, orphaning the vendor's payment
- c) Attacker submits same transaction twice to the mempool
- d) Attacker uses two different addresses to double their balance
Answer: (b)
Sequence: (1) Attacker pays vendor (Tx_v). (2) Vendor ships goods. (3) Attacker broadcasts Tx_a (same inputs, returns to attacker) + 51% hashpower builds longer chain with Tx_a. (4) Network accepts longer chain → Tx_v orphaned → Vendor has no payment but already shipped goods.W12·Q1HOT
What is a suitable use case for blockchain?
- a) High-frequency trading requiring microsecond latency
- b) Storing large video files for a streaming platform
- c) Transparent, tamper-evident supply chain tracking shared among multiple distrusting parties
- d) Managing a single company's internal database with one admin
Answer: (c)
Blockchain is suitable when: multiple distrusting parties, need immutability/transparency, no central trusted authority available. NOT suitable for: single owner, high frequency, large files (blockchain isn't a file store), microsecond needs.W12·Q2HOT
In decentralized marketplaces without central platforms, the main unresolved challenge is:
- a) Smart contract execution cost
- b) Difficulty ordering transactions
- c) Lack of a quick trusted authority for real-time dispute resolution (e.g., hotel room issues)
- d) Inability to list multiple services
Answer: (c)
Centralized platforms (Booking.com, Airbnb) provide instant dispute resolution via customer support. Fully decentralized systems have no equivalent — if your hotel room is unsatisfactory, there's no entity to quickly intervene. Smart contracts cannot adjudicate subjective disputes.W12·Q3HOT
What is Hyperledger Aries and how does it relate to Indy?
- a) Aries is a replacement for the Indy ledger with better performance
- b) Aries is a protocol/agent framework that fills the peer-to-peer transport gap above Indy — it handles credential exchange between agents
- c) Aries is the consensus algorithm used by Indy nodes
- d) Aries provides Indy's cryptographic primitives
Answer: (b)
Indy = distributed ledger for DIDs/schemas/credential definitions. Aries = agents communicate using Aries protocols (DIDComm) to exchange VCs peer-to-peer. Indy stores public data; Aries handles private bilateral agent communications. Aries works with multiple ledgers, not just Indy.W12·Q4DEFN
What is a Verifiable Credential (VC)?
- a) A password stored on the blockchain
- b) A tamper-evident digital credential with cryptographic proof, issued by an Issuer about a Subject, held and presented by the Holder
- c) A smart contract that verifies identity automatically
- d) A certificate stored in CA's central database
Answer: (b)
VC contains: claims (e.g., "Jane has a degree"), issuer DID, holder DID, cryptographic proof. The issuer signs the VC with their private key. Verifier checks signature using issuer's public key on ledger. Holder controls when/to whom they present credentials.W12·Q5HOT
What is the Genesis File in Hyperledger Indy?
- a) The first transaction ever written to Indy ledger
- b) A configuration file containing IP addresses, ports, and public keys of the initial Indy pool nodes — needed to connect to the network
- c) The master private key for the Indy network
- d) Satoshi's original blockchain configuration
Answer: (b)
Genesis file is bootstrapping configuration. Without it, a client cannot find and verify any node in the Indy network. Contains: node IPs, ports, and their BLS/Ed25519 public keys to verify node signatures. Analogous to Bitcoin's hardcoded seed nodes.W12·Q6HOT
Which is NOT a feature of blockchain that makes it suitable for supply chain?
- a) Immutable audit trail of product journey
- b) Multiple distrusting parties can share one ledger
- c) Smart contracts can automate payment on delivery
- d) Blockchain can verify physical product quality without IoT sensors
Answer: (d)
Blockchain cannot verify physical world facts — it can only record what is told to it (oracle problem). Physical quality needs IoT sensors, RFID, QR codes as oracles. Blockchain records the data submitted, but cannot independently verify the physical item matches the data.📐
All Key Formulas & Calculations⚠️ Every formula here has appeared in assignments
Calculation questions appear in at least 5 of 12 weeks. Memorize all of these.Byzantine Fault Tolerance
n ≥ 3f + 1
n=total nodes, f=Byzantine faulty
7 nodes → f≤2 | 10 nodes → f≤3
4 nodes → f≤1 | 13 nodes → f≤4
7 nodes → f≤2 | 10 nodes → f≤3
4 nodes → f≤1 | 13 nodes → f≤4
Paxos / Raft (Crash Faults)
n ≥ 2f + 1
NEVER confuse with BFT. Crash = node stops. Byzantine = node lies.
7 nodes → f≤3 | 5 nodes → f≤2
7 nodes → f≤3 | 5 nodes → f≤2
Merkle Tree Total Nodes
Total = 2n − 1
n = leaf transactions
16→31 | 8→15 | 4→7 | 32→63
16→31 | 8→15 | 4→7 | 32→63
Merkle Proof Path Length
Steps = log₂(n)
n = transactions
64→6 | 32→5 | 16→4 | 8→3
Used in SPV (light clients)
64→6 | 32→5 | 16→4 | 8→3
Used in SPV (light clients)
Bitcoin Daily Production
144 blocks/day
24×60÷10 = 144
Daily BTC = 144 × 3.125 = 450 BTC
Weekly = 144×7 = 1,008 blocks
Daily BTC = 144 × 3.125 = 450 BTC
Weekly = 144×7 = 1,008 blocks
Hash Collision Attack
2^(N/2) attempts
N-bit hash → birthday attack needs 2^(N/2)
128-bit → 2⁶⁴ | 256-bit → 2¹²⁸
128-bit → 2⁶⁴ | 256-bit → 2¹²⁸
Ethereum Units
1 Ether = 10¹⁸ Wei
1 Gwei = 10⁹ Wei ← TESTED
1 Ether = 10⁹ Gwei
Gas prices in Gwei
1 Ether = 10⁹ Gwei
Gas prices in Gwei
Nonce Space
32-bit → 2³² ≈ 4.29B
When all nonces exhausted:
→ change extra-nonce in coinbase
→ or change timestamp
→ change extra-nonce in coinbase
→ or change timestamp
Bitcoin Halving
Every 210,000 blocks ≈ 4 years
2009: 50 BTC → 2012: 25
2016: 12.5 → 2020: 6.25
2024: 3.125 BTC
2016: 12.5 → 2020: 6.25
2024: 3.125 BTC
Difficulty Adjustment
New_T = Old_T × (actual / target)
target = 2016 blocks × 10 min = 20,160 min
Blocks faster than 10min → difficulty ↑
Blocks slower → difficulty ↓
Blocks faster than 10min → difficulty ↑
Blocks slower → difficulty ↓
ByzCoin Complexity
PBFT: O(n²) → CoSi: O(n)
CoSi tree: O(n) messages
O(log n) latency rounds
Schnorr aggregate sig = O(1) verify
O(log n) latency rounds
Schnorr aggregate sig = O(1) verify
Selfish Mining Gain
Reward = k × block_reward
k = private blocks accepted
2 private blocks × 6.25 = 12.5 BTC
Honest miner's block orphaned = 0
2 private blocks × 6.25 = 12.5 BTC
Honest miner's block orphaned = 0
Fomo3D Timer
Prevented = Time ÷ Ext_per_tx
3 min remaining ÷ 30s/purchase
= 6 purchases prevented
= 6 purchases prevented
PBFT Message Complexity
O(n²) total messages
Prepare phase: n×n messages
Commit phase: n×n messages
Bottleneck for large networks
Commit phase: n×n messages
Bottleneck for large networks
📌 Consensus-Driven Data Transfer — Why Important?
In permissioned blockchain interoperability (e.g., Fabric to Fabric), the destination network must receive data that is provably finalized on the source. "Consensus-driven" means: data transfer happens only after the required endorsers (2f+1) have signed off. This prevents acting on data that might be "rolled back" or "orphaned." Contrast with permissionless: you'd use SPV (Merkle proofs + sufficient confirmations) to prove a tx is finalized on Bitcoin/Ethereum before bridging assets.
📌 Oracle Problem — Why Blockchain Cannot Verify Physical World
Blockchain is deterministic — all nodes must reach the same conclusion from the same data. But physical world data (temperature, product quality, sports scores) requires external input. An oracle is a trusted data feed. The oracle problem: if the oracle lies or is compromised, the blockchain faithfully records wrong data (immutably!). Solutions: Chainlink (decentralized oracles), multiple independent oracles with median value, IoT with hardware attestation.
⚖️
Critical Comparisons — 8 TablesMost Tested Comparison Type
"Which is different between X and Y" or MSQ "which are true about X" — appear almost every assignment.1. Permissioned vs Permissionless
| Feature | Permissionless (Bitcoin/ETH) | Permissioned (Fabric/Indy) |
|---|---|---|
| Access | Anyone, anonymous | Invited, identity verified via MSP |
| Consensus | PoW / PoS | PBFT / Raft / RBFT |
| Transparency | Fully public | Selective — channels/private data |
| Speed | Slow (minutes/block) | Fast (seconds/block) |
| Token | Required (ETH, BTC) | No native token needed |
| Sybil Protection | PoW (cost of identity) | Identity certificates (MSP/CA) |
| Finality | Probabilistic (confirmations) | Immediate (Byzantine agreement) |
2. Safety vs Liveness
| Property | Safety | Liveness |
|---|---|---|
| Meaning | "Nothing bad ever happens" | "Something good eventually happens" |
| In consensus | No two nodes decide different values | A value will eventually be decided |
| In Bitcoin | Confirmed tx cannot be reversed | Tx eventually gets confirmed |
| Paxos, no quorum | ✅ Preserved always | ❌ Affected (no progress) |
| FLP Impossibility | Cannot guarantee both | In async system with failures |
3. Consensus Protocol Comparison
| Protocol | Fault Model | Min Nodes | Finality | Scale |
|---|---|---|---|---|
| Paxos | Crash faults | 2f+1 | Yes | Medium |
| Multi-Paxos | Crash faults | 2f+1 | Yes | Medium |
| Raft | Crash faults | 2f+1 | Yes | Medium |
| PBFT | Byzantine | 3f+1 | Immediate | Small (O(n²)) |
| PoW (Bitcoin) | Byzantine | N/A | Probabilistic | Large |
| Algorand VRF | Byzantine (<1/3) | N/A | Near-immediate | Large |
| ByzCoin | Byzantine | 3f+1 | Immediate | Medium+ |
4. Soft Fork vs Hard Fork vs Temporary Fork
| Type | Cause | Result | Resolution |
|---|---|---|---|
| Soft Fork | Protocol upgrade tightening rules | Backward-compatible, old nodes accept new blocks | Gradual adoption |
| Hard Fork | Protocol upgrade changing rules incompatibly | Permanent chain split — two coins | Each chain independent (e.g., BCH) |
| Temporary Fork | Two miners find blocks simultaneously | Short-lived competing chains | Longest chain rule (resolved in blocks) |
5. UTXO Model vs Account Model
| Feature | UTXO (Bitcoin) | Account (Ethereum) |
|---|---|---|
| State representation | Set of unspent outputs | Account balances directly |
| Privacy | Better (new addresses per tx) | Worse (persistent address) |
| Parallelism | Better (UTXOs independent) | Harder (shared state) |
| Smart contracts | Complex/limited | Natural — account holds code+state |
| Double-spend check | Check UTXO not already spent | Check nonce + balance |
6. Bitcoin-NG vs ByzCoin vs PBFT
| System | Key Idea | Problem Solved | Weakness |
|---|---|---|---|
| Bitcoin-NG | Key-block elects leader; micro-blocks carry txs | Increases Bitcoin throughput | Faulty leader can produce bad micro-blocks |
| ByzCoin | PoW + CoSi committee signing of micro-blocks | Fixes Bitcoin-NG's faulty leader issue | Committee overhead; scalability limits |
| PBFT | All-to-all message exchange for Byzantine agreement | Deterministic BFT for permissioned networks | O(n²) messages — doesn't scale |
7. Hyperledger Indy vs Aries
| Component | Layer | Role | Key Entities |
|---|---|---|---|
| Hyperledger Indy | Ledger | Stores DIDs, schemas, cred definitions. RBFT consensus. | Stewards (validators), Trust Anchors |
| Hyperledger Aries | Agent/Transport | P2P protocol for secure credential exchange between agents | Agents (Issuer, Holder, Verifier) |
| Verifiable Credentials | Data format | Signed claims from Issuer about Subject | Issuer → Holder → Verifier |
8. Pre-image Resistance vs Collision Resistance vs Second Pre-image
| Property | Given | Find | Difficulty |
|---|---|---|---|
| Pre-image resistance | Hash h | Any m where H(m)=h | 2^N work |
| Second pre-image resist. | Message m1 | m2≠m1 where H(m1)=H(m2) | 2^N work |
| Collision resistance | Nothing | Any m1≠m2 where H(m1)=H(m2) | 2^(N/2) work (birthday) |
9. Smart Contract Platform Comparison
| Feature | Ethereum | Hyperledger Fabric | Hyperledger Sawtooth |
|---|---|---|---|
| Type | Permissionless public | Permissioned enterprise | Permissioned enterprise |
| Smart contract | Solidity / EVM bytecode | Chaincode (Go/Java/Node.js) | Transaction Processor (any lang) |
| Consensus | PoS (Casper) | Raft / PBFT (pluggable) | PBFT / PoET |
| Native token | ETH (required for gas) | None | None (optional) |
| Privacy | Public (all see all) | Channels + private data | Private transactions |
| Scale | ~15–30 TPS (post PoS) | 1,000+ TPS | 1,000+ TPS |
🛡️
All 9 Attack Types — Complete ReferenceWeek 11 had 5+ attack questions
Know mechanism, not just name. "What can they do" AND "what can they NOT do".51% Attack
Attacker controls >50% hash power. Controls block production.
CAN: double-spend, censor txs, mine faster
CANNOT: steal wallets, change supply, break crypto
CANNOT: steal wallets, change supply, break crypto
Sybil Attack
Create many fake identities to gain disproportionate influence in P2P network.
Defense: PoW (cost per identity), PKI (CA-verified identity)
Eclipse Attack
Fill victim's peer connection tables with attacker-controlled IPs to isolate them from honest network.
Splits honest network → attacker has majority over each isolated group. Defense: IP diversity limits.
Selfish Mining
Mine blocks privately, release strategically to waste honest miners' effort and earn disproportionate rewards.
Requires ~33% hashrate to be profitable. Orphans honest miners' blocks.
Double Spend
Spend same UTXO in two transactions. Use 51% to get conflicting tx confirmed.
Vendor ships goods → payment tx orphaned → attacker keeps goods + coins. 6 confirmations mitigate.
Transaction Privacy Leakage
Graph analysis of public blockchain reveals sender/receiver identity despite pseudonymity.
Defense: Chaff coins (mixins), CoinJoin, stealth addresses, Zero-Knowledge Proofs
Replay Attack
Rebroadcast valid signed transaction to execute it again (or on another chain after fork).
Defense: Transaction nonce (Ethereum), replay protection in hard forks, chain ID
Front-Running (DeFi)
Miner/validator sees pending tx in mempool, inserts own tx before it to profit (e.g., copy trade).
Possible because miners choose tx ordering. MEV (Miner Extractable Value). Defense: commit-reveal, private mempools.
Fomo3D Block Stuffing
Attacker wins prize by preventing other ticket purchases — stuffs blocks with high-fee useless transactions.
3 min remaining ÷ 30s/purchase = 6 prevented purchases. Timer expires → attacker wins pot.
Deep Dive: Eclipse Attack (Appeared 4× in W11)
Steps: (1) Attacker sends many ADDR messages with its IPs. (2) Victim's "new" table fills with attacker IPs. (3) Victim restarts (or attacker forces disconnect). (4) All reconnections go to attacker nodes. (5) Victim is now isolated — sees only attacker-controlled chain. Effect with 40%/30%/30% split: Attacker doesn't gain victim's power. Instead: victim faces attacker alone (30% vs 40%), rest of network faces attacker alone (30% vs 40%). Attacker has advantage over each isolated group.📝
Mock Test — 30 Questions (Full Coverage)Instructions
Click answers to check. Your score updates live. Questions span all 12 modules at exam difficulty.
Mock Test Score
0 / 30
Answer questions to see your grade
⚡
Last-Night Cheatsheet — Everything in One PlaceQuick revision
Every item here covers high-frequency exam topics. 5 minutes = full coverage before your test.Cryptography
SHA-256 outputAlways 256 bits
Hashing vs EncryptionHash = one-way, Encrypt = reversible
Non-repudiationDigital signature (private key)
Encrypt to BobBob's PUBLIC key
Sign as AliceAlice's PRIVATE key
Verify AliceAlice's PUBLIC key
Pre-image resist.Given H, find M: 2^N work
Collision resist.Find any m1≠m2: 2^(N/2) work
HMACAuth + integrity, NOT non-repudiation
Bitcoin Formulas
Block time10 minutes target
Blocks per day144
Current reward3.125 BTC (2024–2028)
Daily BTC mined144 × 3.125 = 450 BTC
Block IDSHA256(SHA256(header))
Nonce size32-bit = 2³² values
Difficulty adjustEvery 2016 blocks
Odd Merkle leavesDuplicate last hash
Soft forkBackward compatible
Hard forkPermanent chain split
Consensus Formulas
BFT (Byzantine)n ≥ 3f+1
Paxos/Raft (Crash)n ≥ 2f+1
Merkle total nodes2n − 1
Merkle proof stepslog₂(n)
Birthday attack2^(N/2)
Paxos safetyNever violated
Paxos livenessAffected without quorum
PBFT complexityO(n²) messages
CoSi complexityO(n) msgs, O(log n) rounds
Ethereum
1 Ether =10¹⁸ Wei
1 Gwei =10⁹ Wei
Gas unitComputational work unit
View functions0 gas (read-only)
EVM purposeDeterministic execution
SolidityTuring-complete, gas-bounded
PoET usesIntel SGX hardware
PoB sends toUnspendable eater address
Hyperledger Fabric
TX flowEndorse → Order → Validate
MSP roleIdentity + roles (not issue certs)
CA roleIssues X.509 certificates
Orderer roleSequence txs only (no exec)
ChannelPrivate ledger subset
World stateCurrent snapshot (CouchDB)
BlockchainFull tx history (immutable)
No tokenNo native cryptocurrency
Indy / Aries / SSI
DID formatdid:method:identifier
StewardsRun RBFT nodes, approve Trust Anchors
Trust AnchorsIssue credentials (e.g., university)
Aries purposeP2P transport above Indy
Genesis fileIP/ports/keys of initial nodes
support_revocation:FCannot revoke credential later
VC trust triangleIssuer → Holder → Verifier
Advanced Consensus
Bitcoin-NG key-blockPoW, elects epoch leader
Bitcoin-NG micro-blockCarries transactions (no PoW)
ByzCoin vs BTC-NGFixes faulty leader via CoSi
Algorand j=0NOT in committee
Algorand security<1/3 stake adversary
PoET HWIntel SGX enclave
Blockchain trilemmaScalability + Security + Decent.
Attacks One-Liners
51%Double-spend + censor (not steal)
SybilFake identities → PoW cost
EclipseFill peer tables → network split
Selfish miningPrivate blocks → orphan honest
Double spendVendor ships, tx orphaned
Chaff coinsDecoys for graph privacy
ReplayRebroadcast signed tx → nonce fixes
Fomo3DBlock stuffing → timer expires
HTLC / Payment Channels
HTLC secret revealedReceiver gets funds
HTLC timeoutSender gets refund
Atomic swapEither both complete or both revert
Lightning on-chainOpen + close only
Lightning off-chainAll intermediate payments
Project Ubin DvPAtomic securities + cash exchange
MeiTY 17 Use Cases (India National Strategy)
AgricultureFarm records, crop insurance
EducationDegree verification, certificates
Financial ServicesKYC, lending, payments
HealthcarePatient records, drug traceability
Land RecordsTamper-proof property titles
Supply ChainTrack goods from farm to shelf
JudiciaryImmutable court records
IdentityDigital ID, Aadhaar integration
Published: Jan 202117 national interest areas
When Blockchain is NOT Suitable
High-frequency dataSensor data needing rapid delete/modify
Large file storageVideo streaming — not a file store
ML trainingComputation intensive — not on-chain
Microsecond latencyHFT — blockchain too slow
Single ownerNo trust issue = no need for blockchain
Key signalMultiple distrusting parties = blockchain fits
Paxos Roles & Properties
ProposerInitiates consensus, sends Prepare
AcceptorVotes on proposals (majority = quorum)
LearnerLearns the decided value
One node = 3 roles?Yes — roles are logical, not physical
Basic Paxos roundsPrepare→Promise→Accept→Accepted
Multi-Paxos optimizationSkip Prepare phase with stable leader
Classic Paxos faultCrash faults ONLY (not Byzantine)
Distributed Systems Key Terms
State Machine ReplicationSame inputs → same state on all nodes
Byzantine Generals ProblemAgree despite malicious nodes
FLP ImpossibilityNo async system guarantees both safety+liveness
CAP TheoremConsistency, Availability, Partition — pick 2
View change (PBFT)Replace faulty primary — ensures liveness
Weak synchronyAdversary controls network for bounded time only
Bitcoin Halving Timeline
GENESIS
2009
50 BTC
1ST HALVING
2012
25 BTC
2ND HALVING
2016
12.5 BTC
3RD HALVING
2020
6.25 BTC
4TH HALVING ★
2024
3.125 BTC
5TH HALVING
2028
1.5625 BTC
📊
Topic Confidence Tracker 0%
Your Study Progress
Mark topics as Done or Weak to track your preparation.
How to use
After studying each topic, mark it Done (green) or Weak (red). Focus revision on weak areas — your progress syncs automatically in this browser.Your Weak Topics (need revision)
No weak topics marked yet — start marking above!
🌟
Weeks 10–12 Deep: Interoperability, Stellar, Ripple & Use Cases⚠️ Often underestimated — 3-5 questions from here
Stellar performance numbers, Project Ubin phases, SCP steps, Ripple UNL overlap — all appeared in Week 12 assignments verbatim.W12·STELLAR·Q1HOT
What performance characteristics were observed for the Stellar network?
- a) Transaction throughput of ~1,000 TPS and 10s finality
- b) ~350 TPS throughput AND ~1 second finality/latency
- c) Energy consumption comparable to Bitcoin mining
- d) Confirmation times of 3–5 minutes like Bitcoin
Answer: (b) — Both are correct (MSQ)
Stellar designed for fast, efficient transactions. ~350 TPS (high throughput) and ~1 second finality (near-instant). Compare: Bitcoin ≈7 TPS, 60min finality. Ethereum ≈15 TPS, ~15s blocks.W12·STELLAR·Q2HOT
SCP (Stellar Consensus Protocol) uses federated voting. The key steps are:
MSQ — select all correct
- a) Propose
- b) Vote
- c) Accept
- d) Prepare
- e) Confirm
Answer: (b), (c), (e)
SCP federated voting steps: Vote → Accept → Confirm. Nodes vote on values, accept once sufficient agreement reached, confirm to finalize. "Propose" and "Prepare" are Paxos terms, not SCP.W12·RIPPLE·Q1HOT
According to research by Amores-Sesar et al., what level of UNL (Unique Node List) overlap is now recommended for safety in the Ripple network?
- a) 20%
- b) 40%
- c) 80%
- d) Over 90%
Answer: (d)
Very high UNL overlap (>90%) ensures most nodes agree on the same trusted validators, improving network safety and consistency. Lower overlap risks safety violations where different nodes have conflicting views.W12·UBIN·Q1HOT
Project Ubin Phase 2 (MAS Singapore) used decentralized multilateral netting to solve:
- a) Preventing double-spending of digital currencies
- b) Verifying identities between banks
- c) Gridlock situations where banks lack liquidity for individual payments but are overall solvent
- d) Stopping unauthorized access to central bank accounts
Answer: (c)
Gridlock: banks cannot complete payments due to temporary liquidity shortages, even if net-positive. Multilateral netting allows multiple obligations to cancel out efficiently — Bank A owes B, B owes C, C owes A → net to zero.W12·COLLABFED·Q1HOT
How does CollabFed combine multiple service provider signatures into a single response?
- a) Schnorr multi-signatures
- b) CoSi (Collective Signing) using BLS signatures
- c) Ring signatures
- d) HMAC with shared secret
Answer: (b)
CoSi with BLS allows multiple signatures to be aggregated into one compact, verifiable signature. This improves efficiency — verifier checks one signature instead of N signatures. BLS (Boneh-Lynn-Shacham) signatures are aggregatable unlike ECDSA.W12·COLLABFED·Q2HOT
In CollabFed decentralized marketplace, how is a request from a public blockchain verified and transferred to a private consortium ledger?
- a) Through a central broker API
- b) Using SPV (Simplified Payment Verification) plus approval from two-thirds of service providers
- c) By running Proof of Work on the private ledger
- d) By encrypting it with a shared private key
Answer: (b)
SPV verifies the request EXISTS on the public blockchain (lightweight verification without full node). Two-thirds approval (supermajority) ensures Byzantine fault tolerance on the consortium side before processing privately.W10·INTEROP·Q1HOT
In permissioned blockchain interoperability (e.g., TradeLens to We.Trade), what MUST be included with data moving from source to destination network?
- a) Endorsements/signatures from source network + compliance with source's Exposure Control policy
- b) Proof that data was encrypted using destination network's private key
- c) Physical bill of lading in PDF format
- d) Mining proof from the source network
Answer: (a) — Both (a) parts correct
For data to be accepted: (1) Endorsements = consensus proof from source that data is finalized. (2) Exposure Control = source network policy defining what data can be shared with destination. Both required.W10·INTEROP·Q2HOT
In three-party atomic swap (Alice-Bob-Carol) with timelocks 6Δ, 5Δ, 4Δ — why is the staggered sequence critical?
- a) To ensure car title is transferred before Alice spends alt-coins
- b) To allow Carol to claim Bitcoin and Bob to claim alt-coins before their contracts expire, even if secret is revealed late in the chain
- c) To prevent Bitcoin network from crashing due to volume
- d) To ensure Alice has least time to act
Answer: (b)
Staggered timelocks give each participant buffer time. If Carol uses secret at 4Δ to claim BTC, Bob still has 1Δ window (until 5Δ) to use same secret to claim alt-coins from Alice. Without staggering, chain might break mid-swap.W10·INDY·Q1HOT
In permissioned interoperability relay, what does the Data Acceptance Policy evaluate?
- a) Current exchange rate of assets being transferred
- b) Whether received data has sufficient valid attestations/signatures from the source network
- c) Identity of the programmer who wrote the source chaincode
- d) Whether source network has higher market cap than destination
Answer: (b)
Data Acceptance Policy is the destination network's "trust threshold" — minimum number of valid signatures from source needed before destination accepts the data as valid and writes it to own ledger. Like requiring 5 of 7 endorsers.W10·INDY·Q2HOT
In Hyperledger Indy, which statements correctly describe roles of Stewards and Trust Anchors?
MSQ — select all correct
- a) Stewards can register new DIDs (verinyms) on the ledger
- b) Trust Anchors maintain the RBFT consensus nodes
- c) Trust Anchors (e.g., University) issue verifiable credentials to users
- d) Stewards are pre-approved participants who can approve transition to Trust Anchor role
Answer: (a), (c), (d)
(b) is WRONG — Stewards run RBFT nodes, NOT Trust Anchors. Stewards → most trusted, approve Trust Anchors, write to ledger. Trust Anchors → issue credentials. Users → hold credentials.W10·HTLC·Q2HOT
Risks of using a Centralized Trusted Third Party (TTP) for cross-chain asset transfers:
MSQ — select all correct
- a) Users must relinquish control of funds to third party
- b) Third party is a single point of failure
- c) Cross-chain transfers cannot be done using TTP
- d) Users may lose funds if TTP is compromised or shuts down
Answer: (a), (b), (d)
(c) is WRONG — TTPs DO enable cross-chain transfers (that's their purpose). The risks are: trust required, single point of failure, counterparty risk. HTLC solves this by removing the TTP entirely.W12·GOVT·Q1HOT
Why is it better to store a blockchain-based access log for sensitive government data rather than duplicating the data?
- a) It speeds up access to large files
- b) It allows deletion of stored data
- c) It minimizes breach risks while keeping transparent record of who accessed what
- d) It removes need for centralized storage entirely
Answer: (c)
Storing actual sensitive data on-chain is risky (immutable = can never be deleted, visible to all nodes). Storing only access logs (who/when/what accessed) keeps sensitive data off-chain while providing transparent, tamper-evident audit trail.Project Ubin — All 5 Phases Summary
| Phase | Focus | Key Technology | Outcome |
|---|---|---|---|
| Phase 1 | Tokenized SGD on distributed ledger | Ethereum private chain | Proof-of-concept for digital cash |
| Phase 2 | Decentralized interbank settlement | Multilateral netting, gridlock resolution | Eliminated gridlock in payment queues |
| Phase 3 ★ | Delivery vs Payment (DvP) | Atomic swap of securities + cash | Simultaneous cross-ledger settlement |
| Phase 4 | Cross-border payments | Multi-currency transactions | Linked with other CBDCs globally |
| Phase 5 | Ubin+ / Industry integration | Full production ecosystem | Real industry deployment |
Interoperability Methods Comparison
| Method | How it works | Trust Model | Example |
|---|---|---|---|
| Centralized TTP | Trusted third party holds assets during swap | Trust in TTP — single point of failure | Exchanges (Binance, Coinbase) |
| Atomic Swap (HTLC) | Hash timelock, no intermediary | Trustless — cryptographic | BTC↔LTC cross-chain |
| Relay/SPV | Light client proof from source chain | Cryptographic — source consensus | CollabFed public→private |
| Side Chains | Separate chain with 2-way peg to main chain | Semi-trusted — federation | Liquid Network (BTC sidechain) |