Blockchain Technology Cryptography in Blockchain 5 — Questions and Answers
Question 1: What is a 'length extension attack' and which hash function family is vulnerable to it?
- An attack on RSA using extended Euclidean algorithm; affects all hash functions
- An attack where knowing H(m) lets an attacker compute H(m||extra) without knowing m; affects SHA-1 and SHA-2 (Merkle-Damgård) (Correct answer)
- An attack on Merkle trees using extra leaf nodes; affects SHA-3 only
- An attack that extends private keys; affects ECDSA
Correct answer: An attack where knowing H(m) lets an attacker compute H(m||extra) without knowing m; affects SHA-1 and SHA-2 (Merkle-Damgård)
Merkle-Damgård construction (SHA-1, SHA-256) is vulnerable to length extension because the internal state after hashing m is exposed in H(m) and can be continued.
Question 2: In BLS (Boneh-Lynn-Shacham) signatures used in Ethereum 2.0, what key advantage do they offer over ECDSA?
- BLS signatures are shorter than ECDSA by 50%
- BLS signatures are aggregatable, allowing many signatures to be combined into one compact signature (Correct answer)
- BLS eliminates the need for a hash function
- BLS works without a public key infrastructure
Correct answer: BLS signatures are aggregatable, allowing many signatures to be combined into one compact signature
BLS signature aggregation lets thousands of validator signatures be combined into a single constant-size signature, drastically reducing on-chain data.
Question 3: What is stealth addressing in privacy-focused blockchains?
- Replacing wallet addresses with usernames to avoid tracking
- Generating a unique one-time address for each transaction so the recipient's master address is never published on-chain (Correct answer)
- Encrypting the sender's address using the miner's public key
- Using zero-knowledge proofs to hide wallet balances
Correct answer: Generating a unique one-time address for each transaction so the recipient's master address is never published on-chain
Stealth addresses allow senders to derive a fresh address for each transaction using the recipient's public key, ensuring payments cannot be linked to a known address.
Question 4: How does Verifiable Random Function (VRF) cryptography contribute to blockchain consensus mechanisms like Algorand?
- It replaces hashing with a signature for mining
- It allows a node to generate a random output with a proof that it was computed correctly, enabling unpredictable but verifiable leader election (Correct answer)
- It provides symmetric encryption for block propagation
- It creates zero-knowledge proofs for transaction validation
Correct answer: It allows a node to generate a random output with a proof that it was computed correctly, enabling unpredictable but verifiable leader election
VRFs produce a pseudorandom output and a proof; in Algorand, validators use VRFs to secretly determine if they are selected as block proposers, preventing targeted attacks.
Question 5: What is the significance of the 'secp256k1' curve parameter used in Bitcoin and Ethereum?
- It is a NIST-standardized curve chosen for its resistance to side-channel attacks
- It is a Koblitz curve chosen for efficient computation, though its parameter origins are not as transparently documented as NIST curves (Correct answer)
- It is a supersingular curve enabling pairing-based cryptography
- It is a 521-bit curve offering post-quantum resistance
Correct answer: It is a Koblitz curve chosen for efficient computation, though its parameter origins are not as transparently documented as NIST curves
secp256k1 is a Koblitz curve with parameters that allow efficient scalar multiplication; unlike NIST curves, its constants were chosen with a clear mathematical formula rather than opaque seeds.
Question 6: In post-quantum cryptography, why are current blockchain signature schemes (ECDSA, BLS) considered at risk?
- Quantum computers can factor large primes faster, breaking SHA-256 directly
- Shor's algorithm on a sufficiently large quantum computer can solve the elliptic curve discrete logarithm problem, breaking ECDSA and BLS (Correct answer)
- Quantum computers eliminate the need for hashing entirely
- Grover's algorithm reduces hash output size to zero
Correct answer: Shor's algorithm on a sufficiently large quantum computer can solve the elliptic curve discrete logarithm problem, breaking ECDSA and BLS
Shor's algorithm efficiently solves the discrete logarithm problem, which underpins the security of both ECDSA and BLS signatures used in blockchain.
Question 7: What is 'proof of knowledge' versus 'proof of membership' in zero-knowledge proofs?
- Proof of knowledge proves set size; proof of membership proves value existence
- Proof of knowledge proves you know a secret witness; proof of membership proves an element belongs to a set without revealing the element (Correct answer)
- They are interchangeable terms in blockchain ZKP literature
- Proof of membership is used on-chain; proof of knowledge is always off-chain
Correct answer: Proof of knowledge proves you know a secret witness; proof of membership proves an element belongs to a set without revealing the element
A proof of knowledge demonstrates the prover holds a secret value (like a private key), while a proof of membership shows an element is in a set (like a Merkle inclusion proof) without revealing it.
What is a 'length extension attack' and which hash function family is vulnerable to it?