Blockchain Developer Fundamentals and Cryptography 2 — Questions and Answers
Question 1: What property of a cryptographic hash function ensures that finding two different inputs producing the same output is computationally infeasible?
- Collision resistance (Correct answer)
- Determinism
- Reversibility
- Compression
Correct answer: Collision resistance
Collision resistance means it is infeasible to find two distinct inputs that hash to the same value.
Question 2: Which hashing algorithm does Bitcoin use for its proof-of-work and block hashing?
- MD5
- SHA-256 (Correct answer)
- Keccak-256
- RIPEMD-128
Correct answer: SHA-256
Bitcoin relies on SHA-256 for block hashing and mining.
Question 3: In a Merkle tree, what is stored at the root?
- The first transaction only
- A single hash representing all leaf data (Correct answer)
- The block timestamp
- A list of all transaction IDs
Correct answer: A single hash representing all leaf data
The Merkle root is a single hash that cryptographically commits to every leaf in the tree.
Question 4: What does an asymmetric key pair consist of?
- Two identical secret keys
- A public key and a private key (Correct answer)
- A nonce and a salt
- A hash and a signature
Correct answer: A public key and a private key
Asymmetric cryptography uses a mathematically linked public and private key pair.
Question 5: Which curve is most commonly used for Bitcoin and Ethereum digital signatures?
- Curve25519
- secp256k1 (Correct answer)
- P-384
- brainpoolP256r1
Correct answer: secp256k1
Both Bitcoin and Ethereum use the secp256k1 elliptic curve for ECDSA signatures.
Question 6: What is the primary purpose of a digital signature in a blockchain transaction?
- To compress the transaction
- To prove authorization and integrity without revealing the private key (Correct answer)
- To encrypt the transaction amount
- To set the gas price
Correct answer: To prove authorization and integrity without revealing the private key
A digital signature proves the sender authorized the transaction and that it was not altered, without exposing the private key.
Question 7: Why is a small change in the input of a hash function expected to drastically change the output?
- Because of the avalanche effect (Correct answer)
- Because hashes are encrypted
- Because of key stretching
- Because of padding
Correct answer: Because of the avalanche effect
The avalanche effect causes even a single-bit input change to produce a completely different hash.
What property of a cryptographic hash function ensures that finding two different inputs producing the same output is computationally infeasible?