CBP Bitcoin Basics and Cryptography 3 — Questions and Answers
Question 1: What is the role of RIPEMD-160 in creating a Bitcoin address?
- It hashes the SHA-256 output of a public key to produce a 160-bit address payload (Correct answer)
- It encrypts the private key for storage
- It generates the proof-of-work nonce
- It signs transactions on the Bitcoin network
Correct answer: It hashes the SHA-256 output of a public key to produce a 160-bit address payload
RIPEMD-160 is applied to the SHA-256 hash of a public key, producing a 20-byte hash used as the core of a Bitcoin address.
Question 2: What is a Merkle tree used for in a Bitcoin block?
- To efficiently summarize and verify all transactions in a block with a single root hash (Correct answer)
- To store the private keys of miners
- To calculate the mining difficulty target
- To link blocks together in the blockchain
Correct answer: To efficiently summarize and verify all transactions in a block with a single root hash
The Merkle tree hashes pairs of transactions recursively until one Merkle root hash represents all transactions, enabling efficient and tamper-evident verification.
Question 3: What is 'double spending' and how does Bitcoin prevent it?
- Spending the same bitcoins twice; prevented by the blockchain's timestamped consensus ordering transactions (Correct answer)
- Mining the same block twice; prevented by the difficulty adjustment
- Creating two wallets with the same key; prevented by key uniqueness
- Broadcasting a transaction to two nodes; prevented by node blacklisting
Correct answer: Spending the same bitcoins twice; prevented by the blockchain's timestamped consensus ordering transactions
Double spending means using the same coins in two transactions; Bitcoin's blockchain consensus ensures only the first confirmed transaction is valid.
Question 4: What is the significance of the 'nonce' field in a Bitcoin block header?
- Miners increment it to change the block hash until it meets the difficulty target (Correct answer)
- It records the number of transactions in the block
- It stores the miner's wallet address for the coinbase reward
- It timestamps the block to the nearest second
Correct answer: Miners increment it to change the block hash until it meets the difficulty target
The 32-bit nonce is iterated by miners during proof-of-work to find a block hash below the current difficulty target.
Question 5: What does Base58Check encoding provide over standard Base58 in Bitcoin addresses?
- An embedded checksum that detects transcription errors (Correct answer)
- Stronger encryption of the address payload
- Compression of the address to fewer characters
- Compatibility with QR code scanners
Correct answer: An embedded checksum that detects transcription errors
Base58Check appends a 4-byte checksum (double SHA-256) to the payload before encoding, allowing wallets to detect mistyped addresses.
Question 6: In the context of Bitcoin, what is a 'peer-to-peer network'?
- A decentralized network where nodes communicate directly without a central server (Correct answer)
- A network where only miners can broadcast transactions
- A hierarchical network with designated relay nodes
- A private network between exchanges for settlement
Correct answer: A decentralized network where nodes communicate directly without a central server
Bitcoin's P2P network allows any node to connect directly to other nodes, broadcast transactions, and download the blockchain without a central coordinator.
Question 7: What is the primary function of a Bitcoin full node?
- To independently validate every transaction and block against all consensus rules (Correct answer)
- To generate new bitcoins through mining
- To store only the block headers for lightweight verification
- To manage the private keys for a user's wallet
Correct answer: To independently validate every transaction and block against all consensus rules
A full node downloads and validates the entire blockchain, enforcing all consensus rules without trusting any other party.
What is the role of RIPEMD-160 in creating a Bitcoin address?