Cryptocurrency Core Cryptographic Principles 2 — Questions and Answers
Question 1: Which property ensures that a hash function output cannot be used to determine the original input?
- Collision resistance
- Pre-image resistance (Correct answer)
- Avalanche effect
- Second pre-image resistance
Correct answer: Pre-image resistance
Pre-image resistance means it is computationally infeasible to reverse a hash and find the original input.
Question 2: What is the purpose of a nonce in cryptographic protocols?
- To encrypt private keys
- To ensure a value is used only once, preventing replay attacks (Correct answer)
- To generate public key pairs
- To validate digital signatures
Correct answer: To ensure a value is used only once, preventing replay attacks
A nonce (number used once) prevents replay attacks by ensuring each transaction or message is unique.
Question 3: In elliptic curve cryptography (ECC), what operation is considered the 'hard problem' that provides security?
- Integer factorization
- Elliptic curve discrete logarithm problem (Correct answer)
- Knapsack problem
- Lattice shortest vector problem
Correct answer: Elliptic curve discrete logarithm problem
ECC security relies on the difficulty of the elliptic curve discrete logarithm problem — deriving the scalar from a point multiplication.
Question 4: What distinguishes a MAC (Message Authentication Code) from a digital signature?
- MACs use asymmetric keys; signatures use symmetric keys
- MACs require a shared secret key; signatures use a public/private key pair (Correct answer)
- MACs provide non-repudiation; signatures do not
- MACs are slower to compute than digital signatures
Correct answer: MACs require a shared secret key; signatures use a public/private key pair
MACs authenticate messages using a shared secret, while digital signatures use asymmetric key pairs and provide non-repudiation.
Question 5: Which block cipher mode of operation converts a block cipher into a stream cipher?
- ECB (Electronic Codebook)
- CBC (Cipher Block Chaining)
- CTR (Counter Mode) (Correct answer)
- OFB (Output Feedback)
Correct answer: CTR (Counter Mode)
CTR mode generates a keystream by encrypting successive counter values, effectively turning a block cipher into a stream cipher.
Question 6: What is the 'birthday paradox' relevant to in cryptographic hash functions?
- It explains why longer keys are more secure
- It helps estimate the probability of finding two inputs with the same hash (Correct answer)
- It proves hash functions are irreversible
- It determines the optimal block size for encryption
Correct answer: It helps estimate the probability of finding two inputs with the same hash
The birthday paradox shows that collisions in a hash function can be found much faster than expected — roughly after 2^(n/2) attempts for an n-bit hash.
Question 7: In the context of Bitcoin, what cryptographic curve is used to generate key pairs?
- Curve25519
- secp256k1 (Correct answer)
- P-256 (secp256r1)
- Ed448
Correct answer: secp256k1
Bitcoin uses the secp256k1 elliptic curve, chosen by Satoshi Nakamoto for its specific mathematical properties.
Which property ensures that a hash function output cannot be used to determine the original input?