Cryptocurrency Cryptography and Hashing 2 — Questions and Answers
Question 1: What property of a cryptographic hash function ensures that even a tiny change in input produces a completely different hash output?
- Collision resistance
- Avalanche effect (Correct answer)
- Pre-image resistance
- Determinism
Correct answer: Avalanche effect
The avalanche effect means a single-bit change in input dramatically alters the output hash, preventing partial-match attacks.
Question 2: Which elliptic curve does Bitcoin use for its public-key cryptography?
- Curve25519
- secp256k1 (Correct answer)
- P-256 (secp256r1)
- Ed448
Correct answer: secp256k1
Bitcoin uses the secp256k1 elliptic curve, defined over a 256-bit prime field, to generate key pairs.
Question 3: What is a 'Merkle root' in the context of a Bitcoin block?
- The hash of the block header
- A single hash summarizing all transactions in a block (Correct answer)
- The first transaction in a block
- The hash linking to the previous block
Correct answer: A single hash summarizing all transactions in a block
The Merkle root is a single hash derived by repeatedly hashing pairs of transaction hashes until one root hash remains.
Question 4: In asymmetric cryptography, which key is used to encrypt data intended for a specific recipient?
- The recipient's private key
- The sender's private key
- The recipient's public key (Correct answer)
- A shared symmetric key
Correct answer: The recipient's public key
Data is encrypted with the recipient's public key, and only the recipient's matching private key can decrypt it.
Question 5: What does 'SHA' stand for in the context of Bitcoin's SHA-256 algorithm?
- Secure Hash Algorithm (Correct answer)
- Standard Hashing Architecture
- Sequential Hash Application
- Symmetric Hashing Array
Correct answer: Secure Hash Algorithm
SHA stands for Secure Hash Algorithm, a family of cryptographic hash functions published by NIST.
Question 6: Which attack attempts to find two different inputs that produce the same hash output?
- Pre-image attack
- Side-channel attack
- Collision attack (Correct answer)
- Length extension attack
Correct answer: Collision attack
A collision attack seeks two distinct messages M1 ≠ M2 such that hash(M1) = hash(M2).
Question 7: What is the output size of SHA-256 in bits?
- 128 bits
- 160 bits
- 256 bits (Correct answer)
- 512 bits
Correct answer: 256 bits
SHA-256 always produces a fixed 256-bit (32-byte) digest regardless of input size.
What property of a cryptographic hash function ensures that even a tiny change in input produces a completely different hash output?