Cryptocurrency Core Cryptographic Principles 4 — Questions and Answers
Question 1: What is a zero-knowledge proof (ZKP) used for in cryptocurrency?
- Proving a transaction is valid without revealing any underlying private data (Correct answer)
- Generating cryptographic keys with zero entropy
- Encrypting blockchain data so miners cannot read it
- Validating wallet addresses without connecting to the network
Correct answer: Proving a transaction is valid without revealing any underlying private data
ZKPs allow one party to prove knowledge of a secret (e.g., a valid transaction) to another party without revealing the secret itself.
Question 2: What is the significance of using a cryptographically secure pseudo-random number generator (CSPRNG) in wallets?
- It speeds up transaction signing
- It ensures private keys are generated with sufficient entropy and cannot be predicted (Correct answer)
- It reduces the size of public keys on the blockchain
- It eliminates the need for seed phrases
Correct answer: It ensures private keys are generated with sufficient entropy and cannot be predicted
A CSPRNG provides unpredictable, high-entropy randomness essential for generating private keys that cannot be guessed or reproduced by attackers.
Question 3: In HMAC (Hash-based Message Authentication Code), what role does the key play?
- It replaces the hash function with a symmetric cipher
- It is mixed with the message before hashing to bind authentication to a specific secret (Correct answer)
- It signs the hash output using asymmetric cryptography
- It determines the output length of the hash function
Correct answer: It is mixed with the message before hashing to bind authentication to a specific secret
HMAC XORs the key with padding constants and uses it in two nested hash operations, ensuring only parties with the secret key can verify or produce the MAC.
Question 4: Which of the following correctly describes the difference between confusion and diffusion in block ciphers?
- Confusion spreads plaintext bits; diffusion substitutes bits using a key
- Confusion obscures the relationship between key and ciphertext; diffusion spreads plaintext influence across the ciphertext (Correct answer)
- Confusion uses XOR operations; diffusion uses modular arithmetic
- Confusion applies to stream ciphers only; diffusion applies to block ciphers only
Correct answer: Confusion obscures the relationship between key and ciphertext; diffusion spreads plaintext influence across the ciphertext
Shannon defined confusion (obscuring key-ciphertext relationships, via substitution) and diffusion (spreading plaintext influence, via permutation) as the two core principles of secure ciphers.
Question 5: What is Shamir's Secret Sharing used for in cryptocurrency key management?
- Splitting a private key into multiple shares so a threshold number can reconstruct it (Correct answer)
- Distributing transaction fees among multiple signers
- Encrypting seed phrases using polynomial interpolation
- Creating multi-signature addresses on the Bitcoin network
Correct answer: Splitting a private key into multiple shares so a threshold number can reconstruct it
Shamir's Secret Sharing splits a secret into N shares where any K shares can reconstruct the secret, enabling threshold-based key custody without a single point of failure.
Question 6: What does it mean for an encryption scheme to be 'semantically secure'?
- The ciphertext is always shorter than the plaintext
- An attacker cannot learn any partial information about the plaintext from the ciphertext (Correct answer)
- The encryption algorithm is resistant to semantic (meaning-based) analysis
- The scheme uses natural language processing to enhance security
Correct answer: An attacker cannot learn any partial information about the plaintext from the ciphertext
Semantic security (IND-CPA) means a computationally bounded attacker gains no information about the plaintext by observing the ciphertext.
Question 7: Why is ECB (Electronic Codebook) mode considered insecure for encrypting structured data?
- ECB mode does not support block sizes larger than 64 bits
- Identical plaintext blocks always produce identical ciphertext blocks, revealing data patterns (Correct answer)
- ECB mode requires a new key for every block, making it impractical
- ECB mode uses a stream cipher internally, making it vulnerable to bit-flipping attacks
Correct answer: Identical plaintext blocks always produce identical ciphertext blocks, revealing data patterns
ECB encrypts each block independently, so repeated plaintext blocks produce repeated ciphertext blocks, leaking structural information (famously illustrated by the 'ECB penguin').
What is a zero-knowledge proof (ZKP) used for in cryptocurrency?