Blockchain Technology Cryptography in Blockchain 4 — Questions and Answers
Question 1: What is a commitment scheme in cryptography, and how is it used in blockchain protocols?
- A legal agreement between miners
- A method to bind a value secretly, then reveal it later without being able to change it (Correct answer)
- A technique to batch-sign multiple transactions
- A way to compress the blockchain state
Correct answer: A method to bind a value secretly, then reveal it later without being able to change it
A commitment scheme allows a party to commit to a value (hiding it) and later open (reveal) it, with the guarantee it cannot be altered after committing.
Question 2: Which attack does the 'avalanche effect' in hash functions help defend against?
- Replay attacks
- Length-extension attacks
- Differential cryptanalysis and pattern detection (Correct answer)
- Sybil attacks
Correct answer: Differential cryptanalysis and pattern detection
The avalanche effect ensures a single-bit change in input causes roughly half the output bits to flip, making differential analysis impractical.
Question 3: In SNARKs (Succinct Non-interactive Arguments of Knowledge), what is the 'trusted setup' and why is it controversial?
- A mining pool initialization ceremony
- A one-time parameter generation where secret 'toxic waste' must be destroyed to ensure soundness (Correct answer)
- The deployment of a new smart contract to mainnet
- The handshake between two nodes establishing a TLS session
Correct answer: A one-time parameter generation where secret 'toxic waste' must be destroyed to ensure soundness
The trusted setup generates public parameters; if the secret randomness ('toxic waste') is not destroyed, it could allow forging false proofs.
Question 4: Which of the following describes a 'birthday attack' against a hash function?
- Attacking the hash function on its anniversary date to exploit weaker entropy
- Finding two arbitrary inputs that collide by exploiting the birthday paradox's probability threshold (Correct answer)
- Injecting malicious data into hash inputs on each new block
- Using brute force to reverse a hash to its original input
Correct answer: Finding two arbitrary inputs that collide by exploiting the birthday paradox's probability threshold
The birthday paradox shows that collisions become likely after approximately √(2^n) attempts for an n-bit hash, far fewer than brute-forcing a specific pre-image.
Question 5: What is a Pedersen commitment and how does it differ from a simple hash commitment?
- A Pedersen commitment is faster because it uses SHA-256 internally
- A Pedersen commitment is homomorphic, allowing mathematical operations on committed values without revealing them (Correct answer)
- A Pedersen commitment stores the value in plaintext on-chain
- A Pedersen commitment requires a trusted third party to verify
Correct answer: A Pedersen commitment is homomorphic, allowing mathematical operations on committed values without revealing them
Pedersen commitments are additively homomorphic, meaning commitments to values can be added together in a way that corresponds to adding the underlying values.
Question 6: In the context of ring signatures (used in Monero), what anonymity property do they provide?
- They hide the transaction amount completely
- They allow a signer to sign on behalf of a group, making it impossible to identify which member signed (Correct answer)
- They prevent the recipient address from appearing on-chain
- They encrypt the block header so miners cannot read it
Correct answer: They allow a signer to sign on behalf of a group, making it impossible to identify which member signed
A ring signature proves that one member of a defined group signed the message, but reveals nothing about which specific member did so.
Question 7: What is the difference between a 'hot wallet' and a 'cold wallet' from a cryptographic key management perspective?
- Hot wallets use faster elliptic curves; cold wallets use RSA
- Hot wallets keep private keys on internet-connected devices; cold wallets store keys offline to reduce exposure (Correct answer)
- Hot wallets require multi-signature approval; cold wallets do not
- Hot wallets use symmetric keys; cold wallets use asymmetric keys
Correct answer: Hot wallets keep private keys on internet-connected devices; cold wallets store keys offline to reduce exposure
The critical distinction is network exposure: hot wallet private keys are accessible online (higher risk), while cold wallet keys are kept offline (air-gapped).
What is a commitment scheme in cryptography, and how is it used in blockchain protocols?