CBCP Cryptography and Hashing 2 — Questions and Answers
Question 1: Which property of a cryptographic hash function ensures that two different inputs cannot produce the same hash output?
- Preimage resistance
- Collision resistance (Correct answer)
- Avalanche effect
- Second preimage resistance
Correct answer: Collision resistance
Collision resistance guarantees that it is computationally infeasible to find two distinct inputs that hash to the same output.
Question 2: In elliptic curve cryptography (ECC), what mathematical operation forms the basis of the discrete logarithm problem?
- Modular exponentiation
- Polynomial division
- Point multiplication on a curve (Correct answer)
- Integer factorization
Correct answer: Point multiplication on a curve
ECC security relies on the difficulty of reversing point multiplication (repeated point addition) on an elliptic curve.
Question 3: What is the primary role of a nonce in a Proof-of-Work blockchain hash puzzle?
- To encrypt the block data
- To sign the miner's identity
- To vary the input so miners can find a valid hash (Correct answer)
- To compress the transaction list
Correct answer: To vary the input so miners can find a valid hash
Miners iterate the nonce value to change the block header input until the resulting hash meets the network's difficulty target.
Question 4: Which hashing algorithm does Bitcoin use to produce its block header hash?
- SHA-3-256
- RIPEMD-160
- SHA-256 applied twice (SHA-256d) (Correct answer)
- Keccak-512
Correct answer: SHA-256 applied twice (SHA-256d)
Bitcoin applies SHA-256 twice (double SHA-256) to block headers, which provides an additional layer of security against length-extension attacks.
Question 5: What does a Merkle root in a blockchain block represent?
- The hash of the previous block header
- A single hash summarizing all transactions in the block (Correct answer)
- The miner's public key hash
- The target difficulty encoded as a hash
Correct answer: A single hash summarizing all transactions in the block
The Merkle root is the top hash of a Merkle tree built from all transaction hashes, allowing efficient and tamper-evident verification.
Question 6: Which cryptographic primitive is used in HMAC to ensure message integrity and authenticity?
- Asymmetric encryption
- A shared secret key combined with a hash function (Correct answer)
- A digital certificate
- Zero-knowledge proof
Correct answer: A shared secret key combined with a hash function
HMAC (Hash-based Message Authentication Code) combines a secret key with a hash function to produce an authentication tag tied to both the key and message.
Question 7: In the context of blockchain wallets, what does BIP-32 define?
- A new hashing algorithm for addresses
- A standard for hierarchical deterministic (HD) wallet key derivation (Correct answer)
- The elliptic curve parameters for secp256k1
- A threshold signature scheme
Correct answer: A standard for hierarchical deterministic (HD) wallet key derivation
BIP-32 specifies how a single master seed can deterministically derive a tree of child public and private keys for HD wallets.
Which property of a cryptographic hash function ensures that two different inputs cannot produce the same hash output?