Quiz: Cryptographic Foundations
20 multiple-choice questions · Click an option to check your answer
Question 1
A payment processor stores a SHA-256 hash of every incoming transaction record. A junior auditor asks: "Why not just store the records themselves?" Which answer best explains the purpose of hashing in this context?
- (A) Hashing compresses the records to save storage space
- (B) Hashing speeds up database queries by replacing text with numbers
- (C) Hashing creates a fixed-size fingerprint that detects any
- (D) Hashing encrypts the records so unauthorized users cannot read them
Question 2
A blockchain developer tells a client: "SHA-256 is a one-way function." The client asks what "one-way" means. Which explanation is most accurate?
- (A) The hash output always has fewer characters than the input
- (B) The hash can only be computed on one specific type of hardware
- (C) Given the hash output
- (D) The function can only be called once per input
Question 3
An intern hashes the string "Transfer $500 to Alice" and then hashes "Transfer $500 to alice" (lowercase 'a'). The two hashes are completely different. Which property of cryptographic hash functions does this demonstrate?
- (A) Collision resistance
- (B) Second pre-image resistance
- (C) Pre-image resistance
- (D) The avalanche effect
Question 4
A compliance officer needs to verify that a regulatory filing has not been altered since it was submitted. She compares the hash she computed today with the hash recorded at submission. Which property of hash functions makes this verification trustworthy?
- (A) Determinism — the same input always produces the same output
- (B) Collision resistance — it is infeasible that a different document
- (C) The avalanche effect — any change would flip output bits
- (D) Pre-image resistance — the original cannot be derived from the hash
Question 5
A blockchain contains 1,024 transactions organized in a Merkle tree. A lightweight mobile wallet needs to verify that a specific transaction is included in the block. How many sibling hashes must the network provide in the inclusion proof?
- (A) 512
- (B) 5
- (C) 1,024
- (D) 10
Question 6
You are constructing a Merkle tree from four transactions: T1, T2, T3, T4. You compute H1 = Hash(T1) through H4 = Hash(T4). What is the next step?
- (A) Hash all four leaf hashes together in one operation to get the Merkle root
- (B) XOR all four hashes to produce the root
- (C) Sort the hashes alphabetically, then hash the sorted list
- (D) Concatenate H1 || H2 and hash them; concatenate H3 || H4 and hash them
Question 7
Alice wants to send Bob an encrypted message using public-key cryptography. She has Bob's public key and her own key pair. Which key does she use to encrypt the message?
- (A) Her own private key
- (B) Her own public key
- (C) Bob's private key
- (D) Bob's public key
Question 8
A cryptocurrency wallet shows a user the following signing process: (1) hash the transaction data, (2) sign the hash with the private key, (3) broadcast the transaction + signature. Why is the hash signed rather than the raw transaction data?
- (A) Hashing first converts the variable-length transaction into
- (B) The hash adds an extra layer of encryption to the signature
- (C) Signing the hash hides the transaction details from the network
- (D) Signing the raw data would reveal the private key
Question 9
A bank implements a commitment scheme for sealed-bid auctions: each bidder submits Hash(bid || nonce) before the deadline, then reveals the bid and nonce afterward. Which hash property ensures a bidder cannot change their bid after submission?
- (A) Pre-image resistance — the auctioneer cannot reverse-engineer the bid
- (B) Determinism — the same bid always produces the same hash
- (C) Collision resistance — the bidder cannot find a different bid
- (D) The avalanche effect — changing the bid changes the hash
Question 10
An exchange publishes a Merkle tree of all customer balances for a proof-of-reserves audit. Customer X wants to verify that their balance of 2.5 BTC is included. What information does Customer X need from the exchange?
- (A) Their leaf hash plus the sibling hashes
- (B) Only the Merkle root
- (C) The complete list of all customer balances
- (D) The private key used to construct the tree
Question 11
A node on the Bitcoin network receives a transaction claiming to transfer 0.5 BTC from address 1A3x... to address 1B7y.... The transaction includes an ECDSA signature. What does the node verify first?
- (A) That the recipient address
1B7y...exists on the blockchain - (B) That the sender has sufficient balance (0.5 BTC or more)
- (C) That the signature was produced by the private key corresponding to
1A3x... - (D) That the transaction amount is below the network maximum
Question 12
ECDSA uses 256-bit keys while RSA requires 3,072-bit keys for equivalent security. A mobile banking app is choosing between the two. What is the primary practical advantage of ECDSA in this context?
- (A) ECDSA does not require a private key, simplifying key management
- (B) ECDSA signatures are impossible to forge, while RSA signatures can be
- (C) ECDSA is a symmetric algorithm, which is always faster
- (D) ECDSA's smaller keys mean less storage, bandwidth
Question 13
An attacker modifies transaction T3 in a Merkle tree of 8 transactions. Which of the following hashes in the tree will change as a result?
- (A) The leaf hash of T3 and all hashes on the path from T3 to the root
- (B) Only the leaf hash of T3
- (C) Only the Merkle root
- (D) Every hash in the entire tree
Question 14
A digital signature provides three guarantees: authentication, integrity, and non-repudiation. A disgruntled employee signs a fraudulent transaction and later claims they did not authorize it. Which property of digital signatures directly refutes this claim?
- (A) Non-repudiation — the signer cannot deny having signed
- (B) Integrity — the transaction has not been modified
- (C) Confidentiality — the transaction was encrypted during transmission
- (D) Authentication — the signature proves the identity of the signer
Question 15
Alice signs a transaction "Pay Bob 1 BTC" and broadcasts it. An attacker intercepts the signed transaction and changes it to "Pay Eve 1 BTC." Will the attack succeed?
- (A) No — but only because the network rejects all transactions from intercepted broadcasts
- (B) No — modifying the transaction invalidates the signature because the hash
- (C) Yes — the attacker can modify the transaction and reuse Alice's signature
- (D) Yes — the attacker can compute Alice's private key from the signature
Question 16
In the double-spend problem, Alice sends 1 BTC to Bob and simultaneously sends the same 1 BTC to Charlie. Both transactions have valid digital signatures. Why does cryptography alone fail to prevent this?
- (A) Public-key encryption prevents nodes from seeing both transactions
- (B) Hash functions cannot detect duplicate transactions
- (C) Cryptography ensures each signature is valid but cannot determine
- (D) Digital signatures cannot verify the sender's identity
Question 17
A startup proposes using MD5 (128-bit output) instead of SHA-256 (256-bit output) for their blockchain to "save storage space." An advisor warns against this. What is the strongest technical argument against MD5?
- (A) MD5 produces output that is too short to be displayed in a user interface
- (B) MD5's collision resistance is broken — practical collisions have been
- (C) MD5 is slower to compute than SHA-256
- (D) MD5 is not supported by modern programming languages
Question 18
A user loses their private key but still has their public key and blockchain address. Which of the following is true?
- (A) They can still receive funds but can never spend them
- (B) They can contact the blockchain's central authority to reset their key
- (C) They can use their public key to sign transactions temporarily
- (D) They can derive the private key from the public key using elliptic curve math
Question 19
A government regulator proposes requiring all cryptocurrency users to register their public keys with a central authority, which would hold backup copies of private keys. Evaluate this proposal from a cryptographic security perspective. Which concern is most critical?
- (A) The registration process would slow down transaction processing
- (B) A single breach of the central authority would compromise every
- (C) The public keys would become visible to everyone, reducing privacy
- (D) The central authority would need too much storage for all the keys
Question 20
A financial institution currently uses a trusted third party (a bank) to prevent double-spending. A consultant proposes replacing this with a system using only cryptographic hash functions, Merkle trees, and digital signatures — but no consensus mechanism. Is this system viable?
- (A) Yes — Merkle trees can detect conflicting transactions and automatically reject the second one
- (B) No — without a consensus mechanism
- (C) No — hash functions are too slow for real-time transaction processing
- (D) Yes — digital signatures alone can prevent double-spending because they prove ownership