Blockchain Technology Cryptography in Blockchain 2 — Questions and Answers
Question 1: What is a Merkle tree used for in blockchain?
- Encrypting user private keys
- Efficiently verifying the integrity of transaction sets (Correct answer)
- Generating new wallet addresses
- Signing blocks with miner identity
Correct answer: Efficiently verifying the integrity of transaction sets
A Merkle tree hashes pairs of transactions recursively, producing a single root hash that lets nodes verify any transaction without downloading the full block.
Question 2: Which property of a cryptographic hash function ensures that two different inputs cannot produce the same output?
- Pre-image resistance
- Avalanche effect
- Collision resistance (Correct answer)
- Determinism
Correct answer: Collision resistance
Collision resistance means it is computationally infeasible to find two distinct inputs that hash to the same digest.
Question 3: In Elliptic Curve Cryptography (ECC), the 'discrete logarithm problem' refers to the difficulty of:
- Factoring large prime numbers
- Finding the scalar k given the points k·G and G on the curve (Correct answer)
- Computing modular square roots
- Solving linear equations over finite fields
Correct answer: Finding the scalar k given the points k·G and G on the curve
Given the public point k·G and base point G, recovering the private scalar k is computationally infeasible, forming the security basis of ECC.
Question 4: What does the 'r' component of an ECDSA signature represent?
- The hash of the private key
- The x-coordinate of a random point on the elliptic curve (Correct answer)
- The message digest directly
- The nonce used in mining
Correct answer: The x-coordinate of a random point on the elliptic curve
In ECDSA, a random nonce k is chosen, and r is the x-coordinate of the point k·G modulo the curve order.
Question 5: Why is nonce reuse catastrophic in ECDSA?
- It doubles transaction fees
- It allows an attacker to compute the private key from two signatures (Correct answer)
- It invalidates the block reward
- It causes the signature to expire immediately
Correct answer: It allows an attacker to compute the private key from two signatures
If the same nonce k is used for two different messages, the private key can be algebraically derived from the two signature pairs.
Question 6: Which of the following best describes a zero-knowledge proof in a blockchain context?
- A method to encrypt block headers
- Proving knowledge of information without revealing the information itself (Correct answer)
- A consensus mechanism for lightweight nodes
- A technique for compressing transaction data
Correct answer: Proving knowledge of information without revealing the information itself
A zero-knowledge proof lets a prover convince a verifier that a statement is true without disclosing any underlying secret data.
Question 7: What is the primary purpose of a Key Derivation Function (KDF) like PBKDF2 in blockchain wallets?
- Generating public keys from private keys
- Strengthening a user password before using it as cryptographic key material (Correct answer)
- Validating transaction signatures
- Hashing block headers for Proof of Work
Correct answer: Strengthening a user password before using it as cryptographic key material
KDFs add computational cost (iterations, salting) to slow brute-force attacks when deriving encryption keys from user passwords.
What is a Merkle tree used for in blockchain?