Cryptocurrency Cryptography and Hashing 4 — Questions and Answers
Question 1: What is the 'birthday attack' vulnerability in hashing, and why does it matter for blockchain?
- An attack that exploits birthday-related metadata in transactions
- A statistical attack finding hash collisions faster than brute force due to probability theory (Correct answer)
- An attack on block timestamps near miner birthdays
- A replay attack using old transaction data
Correct answer: A statistical attack finding hash collisions faster than brute force due to probability theory
The birthday paradox shows collisions can be found in roughly 2^(n/2) attempts rather than 2^n, so 256-bit hashes provide ~128-bit collision security.
Question 2: What is a 'commitment scheme' in cryptography as used in some blockchain protocols?
- A smart contract that commits funds to a fixed interest rate
- A method to commit to a value privately and reveal it verifiably later (Correct answer)
- A protocol for miners to commit to a block before broadcasting
- A cryptographic signature scheme for multi-party transactions
Correct answer: A method to commit to a value privately and reveal it verifiably later
A commitment scheme lets a party bind to a chosen value without revealing it, then later open the commitment to prove what they chose.
Question 3: How does a Merkle proof allow lightweight clients (SPV nodes) to verify a transaction?
- By downloading the full blockchain and searching for the transaction
- By providing a branch of hashes from the transaction to the Merkle root without sending all transactions (Correct answer)
- By asking miners to re-hash the block for verification
- By comparing timestamps with the network time protocol
Correct answer: By providing a branch of hashes from the transaction to the Merkle root without sending all transactions
A Merkle proof supplies only log2(n) hashes needed to reconstruct the path to the root, enabling transaction verification without full block data.
Question 4: What makes the Discrete Logarithm Problem (DLP) important for elliptic curve cryptography in blockchains?
- It ensures mining difficulty adjusts properly
- It is computationally infeasible to derive a private key from a public key (Correct answer)
- It prevents double-spending by making transactions unique
- It allows faster SHA-256 computation on GPUs
Correct answer: It is computationally infeasible to derive a private key from a public key
The DLP hardness on elliptic curves means computing the private key from the public key is computationally infeasible with current technology.
Question 5: What does 'deterministic' mean when describing a cryptographic hash function?
- The function uses a random seed to vary output
- The same input always produces the same output (Correct answer)
- The output length varies based on input
- The function can be reversed with the same algorithm
Correct answer: The same input always produces the same output
Determinism means identical inputs always yield identical hash outputs, which is essential for consensus across blockchain nodes.
Question 6: In HD (Hierarchical Deterministic) wallets, what role does HMAC-SHA512 play?
- It encrypts the wallet's seed phrase for storage
- It derives child key pairs from a parent key and a chain code (Correct answer)
- It generates the random seed for the wallet
- It hashes transaction data before signing
Correct answer: It derives child key pairs from a parent key and a chain code
HD wallets use HMAC-SHA512 with a parent key and chain code as inputs to deterministically derive child private and public keys.
Question 7: What is 'salting' in the context of password hashing for cryptocurrency wallet security?
- Adding extra characters to lengthen a private key
- Appending a random value to a password before hashing to prevent rainbow table attacks (Correct answer)
- Encrypting the hash output with a secondary key
- Splitting a wallet seed across multiple hash functions
Correct answer: Appending a random value to a password before hashing to prevent rainbow table attacks
A salt is a unique random value added to each password before hashing, ensuring identical passwords produce different hashes and defeating precomputed lookup tables.
What is the 'birthday attack' vulnerability in hashing, and why does it matter for blockchain?