Unit 3: Basic Distributed Computing and Cryptography - Practice Quiz

CSC203 — Introduction To Blockchain 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the primary goal of a consensus algorithm in a distributed system like a blockchain?

Consensus Easy
A. To encrypt all communication between nodes.
B. To ensure all participants agree on a single, shared state of the ledger.
C. To reduce the amount of data stored on the chain.
D. To make the network run as fast as possible.

2 What does the term "Byzantine Fault" describe in a distributed network?

Byzantine models of fault tolerance Easy
A. A slow network connection between two nodes.
B. A node that has simply crashed and is offline.
C. A predictable software bug that affects all nodes equally.
D. A node that can behave arbitrarily, potentially sending malicious or conflicting information.

3 Which of the following is a fundamental property of a cryptographic hash function?

Hash functions Easy
A. It can be reversed to get the original input from the output hash.
B. It requires a key to encrypt the input.
C. It takes an input of any size and produces a fixed-size output.
D. It produces a longer output for a longer input.

4 In a digital signature scheme, which key is used to create the signature?

Digital signatures Easy
A. The signer's public key
B. The recipient's public key
C. A shared secret key
D. The signer's private key

5 Which key is used to verify a digital signature?

Digital signatures Easy
A. A randomly generated key
B. The signer's private key
C. The signer's public key
D. The verifier's private key

6 What does it mean for a hash function to be "collision-resistant"?

Collision resistant hash Easy
A. The function prevents network data packets from colliding.
B. It is impossible for two different inputs to ever have the same hash.
C. The hash output is resistant to physical damage.
D. It is computationally difficult to find two different inputs that produce the same hash output.

7 The "puzzle-friendly" property of a hash function is most directly related to which blockchain activity?

Puzzle friendly hash Easy
A. Proof-of-Work mining
B. Running a full node
C. Creating a wallet
D. Validating a transaction signature

8 What is the fundamental goal of a zero-knowledge proof (ZKP)?

Zero-knowledge systems Easy
A. To prove that a person has zero knowledge about a secret.
B. To encrypt a message so no one can read it.
C. To prove a statement is true without revealing the information that proves it.
D. To create a system with no cryptographic keys.

9 In distributed computing, what is the main guarantee of an atomic broadcast?

Atomic broadcast Easy
A. Only one message can be broadcast at a time.
B. Messages are delivered to all correct processes in the exact same order.
C. Messages are encrypted during broadcast.
D. Messages are delivered very quickly, but not necessarily in order.

10 What is the main purpose of a Verifiable Random Function (VRF)?

Verifiable random functions Easy
A. To create functions that are difficult to solve.
B. To verify that a function is truly random.
C. To generate a random number and a proof that the number was generated correctly.
D. To generate a random number known only to the creator.

11 If you hash the exact same input message one thousand times using SHA-256, what will you get?

Hash functions Easy
A. A different hash output every time.
B. The exact same hash output every time.
C. A slightly different hash each time.
D. An error after the first hash.

12 A Byzantine Fault Tolerant (BFT) consensus algorithm is designed to work correctly even if...

Byzantine models of fault tolerance Easy
A. The cryptographic hash function is broken.
B. A certain fraction of the nodes are malicious or faulty.
C. The entire network goes offline.
D. All nodes have slow internet connections.

13 What are the three main properties that a digital signature provides for a message or transaction?

Digital signatures Easy
A. Authenticity, non-repudiation, and integrity.
B. Confidentiality, privacy, and speed.
C. Encryption, compression, and storage.
D. Anonymity, decentralization, and scalability.

14 Why is collision resistance important for data integrity?

Collision resistant hash Easy
A. It prevents an attacker from swapping a valid file with a malicious one that has the same hash.
B. It makes the hash function faster to compute.
C. It allows the original file to be recovered from its hash.
D. It ensures that the hash output is always unique for every possible file.

15 The core idea behind a "puzzle-friendly" hash is that it's very hard to find an input x given...

Puzzle friendly hash Easy
A. The length of the input x.
B. A specific target output hash y.
C. A part of the output hash y.
D. Another input that is similar to x.

16 Which of the following is a good use case for zero-knowledge proofs in a blockchain?

Zero-knowledge systems Easy
A. Proving your identity by showing your government-issued ID to the network.
B. Increasing the block size limit.
C. Proving you have sufficient balance for a transaction without revealing your total balance.
D. Making the blockchain database smaller.

17 In the context of blockchain, what problem does consensus solve?

Consensus Easy
A. The double-spending problem.
B. The problem of user anonymity.
C. The problem of data storage.
D. The problem of slow transaction speeds.

18 The "all-or-nothing" delivery guarantee in an atomic broadcast is known as:

Atomic broadcast Easy
A. Atomicity
B. Validity
C. Ordering
D. Termination

19 In a Proof-of-Stake blockchain, a VRF can be used to fairly select block producers without...

Verifiable random functions Easy
A. Knowing their public keys.
B. Revealing the winner to everyone else before the selection is final.
C. Paying them a reward.
D. Requiring them to solve a computational puzzle.

20 The property of a hash function where a small change in the input causes a drastic and unpredictable change in the output is called the:

Hash functions Easy
A. Avalanche Effect
B. Butterfly Effect
C. Domino Effect
D. Doppler Effect

21 In a distributed database system, several replicas need to apply a series of transactions. If one replica applies transaction A then B, while another applies B then A, it leads to an inconsistent state. Which property of atomic broadcast is specifically designed to prevent this type of inconsistency?

Atomic broadcast Medium
A. Liveness
B. Validity
C. Total Order
D. Integrity

22 A development team is building a system that requires all nodes to process messages in the same order. They are considering implementing an atomic broadcast protocol. How does solving the atomic broadcast problem relate to solving the consensus problem?

Atomic broadcast Medium
A. They are completely unrelated problems.
B. Solving consensus is a trivial sub-problem of atomic broadcast.
C. Atomic broadcast only ensures message delivery, not ordering, which is handled by consensus.
D. Solving atomic broadcast is equivalent to solving consensus repeatedly for each message to be ordered.

23 In the context of blockchain consensus, 'probabilistic finality' (like in Bitcoin's Nakamoto Consensus) differs from 'absolute finality' (like in some BFT-based PoS protocols). What is the key implication of probabilistic finality?

Consensus Medium
A. The network can process a higher number of transactions per second.
B. A transaction is confirmed instantly and can never be reversed.
C. The probability of a confirmed transaction being reversed decreases as more blocks are added after it, but never reaches zero.
D. Only a designated set of validators can confirm transactions.

24 In distributed systems, consensus protocols are often analyzed based on two key properties: Safety and Liveness. A protocol that guarantees that nothing bad will ever happen (e.g., two different values are agreed upon) prioritizes which property?

Consensus Medium
A. Finality
B. Liveness
C. Throughput
D. Safety

25 A permissioned blockchain network is being designed to withstand Byzantine failures. The network consists of 13 nodes. To guarantee that the system can reach consensus, what is the maximum number of nodes that can be simultaneously malicious or faulty?

Byzantine models of fault tolerance Medium
A. 7
B. 6
C. 4
D. 3

26 The Practical Byzantine Fault Tolerance (pBFT) algorithm is designed for systems like permissioned blockchains. What is a key assumption it makes about the underlying network communication?

Byzantine models of fault tolerance Medium
A. The network is primarily asynchronous but assumes that messages between non-faulty nodes are eventually delivered (a weak synchrony model).
B. The network can be fully asynchronous, and messages may be lost indefinitely without affecting consensus.
C. The network communication must be encrypted by default.
D. The network is fully synchronous, with fixed upper bounds on message delay.

27 In a BFT system with total nodes that is designed to tolerate Byzantine nodes, consensus can be guaranteed if . What is the most likely outcome if the number of actual faulty nodes becomes ?

Byzantine models of fault tolerance Medium
A. The system's security is compromised, and faulty nodes can cause honest nodes to accept an invalid state or halt progress entirely.
B. The system will alert the network administrator but will not halt or produce incorrect results.
C. The system will automatically remove the extra faulty node and return to a stable state.
D. The system will continue to function correctly but at a slightly slower speed.

28 A developer stores user passwords as hashes in a database. An attacker gains access to the hash H(password). They now want to find the original password. Which fundamental property of a cryptographic hash function makes this task computationally infeasible?

Hash functions Medium
A. Pre-image Resistance
B. Fixed-Length Output
C. Collision Resistance
D. Determinism

29 A single bit is flipped in the input to a secure hash function like SHA-256. What is the most likely outcome for the output hash, due to the avalanche effect?

Hash functions Medium
A. The new output will be numerically very close to the original output.
B. The new output will be the bitwise inverse of the original output.
C. The new output will be identical to the first, except for a single bit.
D. The new output will be completely different, with approximately 50% of its bits flipped compared to the original output.

30 In Bitcoin's Proof-of-Work, miners try to find a nonce such that the hash of a block header is below a certain target value. This process is essentially a search problem. Which property of the hash function ensures that there is no better strategy to solve this problem than random guessing?

Puzzle friendly hash Medium
A. Determinism
B. Puzzle-friendliness
C. Pre-image Resistance
D. Collision Resistance

31 A key requirement for a puzzle-friendly hash function used in mining is that for any target set , it is difficult to find an such that . How does this relate to the distribution of its outputs?

Puzzle friendly hash Medium
A. The outputs must be heavily skewed towards lower numerical values.
B. The function's output must behave like a random variable uniformly distributed over the output range.
C. The output must be directly correlated with the numerical value of the input nonce.
D. The function must only produce a small, fixed number of possible outputs.

32 An auditor uses a cryptographic hash function to create a digital fingerprint of a large financial contract to ensure its integrity. An adversary wants to create a fraudulent, but different, contract that produces the exact same hash value. Which property of the hash function is specifically designed to prevent this attack?

Collision resistant hash Medium
A. Collision Resistance
B. The Avalanche Effect
C. Second Pre-image Resistance
D. Pre-image Resistance

33 Due to the 'Birthday Attack', a hash function with an -bit output is generally considered to have a security level of approximately bits against collision attacks. Why is this the case?

Collision resistant hash Medium
A. The attack works by finding two inputs that hash to the same first bits.
B. The attack requires exactly attempts to guarantee a collision.
C. The attack cuts the effective key length of the hash function's internal algorithm in half.
D. The probability of finding a collision after hashing approximately random inputs becomes significantly high (around 50%).

34 Alice wants to send a digitally signed message to Bob. She first computes the hash of the message and then performs a cryptographic operation on the hash. Which key does she use for this operation, and which key does Bob use to verify the signature?

Digital signatures Medium
A. She signs with her public key; Bob verifies with her private key.
B. She signs with a shared secret key; Bob verifies with the same shared key.
C. She signs with Bob's public key; Bob verifies with his private key.
D. She signs with her private key; Bob verifies with her public key.

35 A standard digital signature scheme provides several important security guarantees. Which of the following security properties is NOT an inherent feature of a digital signature itself?

Digital signatures Medium
A. Non-repudiation (the sender cannot deny sending the message)
B. Authenticity (proof of origin)
C. Integrity (proof the message wasn't altered)
D. Confidentiality (the message content is kept secret)

36 In a Proof-of-Stake blockchain, a Verifiable Random Function (VRF) is often used for leader election. How does a VRF's output fundamentally differ from the output of a standard hash function like SHA-256 for this purpose?

Verifiable random functions Medium
A. A VRF produces a random output along with a cryptographic proof that the output was generated correctly by a specific private key.
B. A VRF's output is always a smaller number than a SHA-256 output.
C. A VRF's output is not deterministic, while SHA-256's is.
D. A VRF is much faster to compute than SHA-256, making it suitable for leader election.

37 A decentralized application (DApp) is running a lottery where a smart contract must select a winner randomly. Why would using a VRF be a more secure method for generating the random number than using a future block hash?

Verifiable random functions Medium
A. Block hashes are not random and follow a predictable pattern.
B. A VRF is easier to implement in a smart contract.
C. VRFs are the only way to generate random numbers on a blockchain.
D. Miners can influence a block hash by including or excluding transactions, potentially biasing the lottery outcome in their favor. A VRF's output is determined by a pre-committed secret key.

38 In a Zero-Knowledge Proof (ZKP) system, a Prover wants to convince a Verifier of a statement without revealing the secret information that makes the statement true. Which of the following scenarios best illustrates the 'zero-knowledge' property?

Zero-knowledge systems Medium
A. The Verifier learns nothing more than the fact that the Prover's statement is true. The proof itself reveals no information about the underlying secret.
B. The Prover and Verifier engage in a multi-round protocol where small, partial pieces of the secret are revealed until the Verifier is convinced.
C. The Prover sends the secret information to a trusted third party, who then confirms the statement's validity to the Verifier.
D. The Prover encrypts the secret information and sends it to the Verifier, who can decrypt it with a special key.

39 ZK-SNARKs and ZK-STARKs are two popular types of zero-knowledge proof systems. A significant practical difference between them is the requirement for a 'trusted setup.' What is the implication of a ZKP system requiring a trusted setup?

Zero-knowledge systems Medium
A. It requires more computational power from the Verifier.
B. The system requires a centralized server to operate, defeating the purpose of decentralization.
C. A secret parameter ('toxic waste') must be generated in a secure ceremony; if this secret is compromised, the entire system's soundness is broken.
D. The proofs generated are much larger and more expensive to verify on-chain.

40 Imagine a distributed network where a set of nodes must agree on a single value (e.g., the next block in a blockchain). Due to network latency, some nodes propose value X while others propose value Y. What is the primary goal of a consensus algorithm in this scenario?

Consensus Medium
A. To ensure the fastest node's value is chosen.
B. To ensure that both X and Y are eventually accepted by all nodes.
C. To elect a leader who will decide the value unilaterally.
D. To ensure all non-faulty nodes eventually agree on the same single value.

41 In a distributed system implementing state machine replication, which property of Atomic Broadcast is essential for ensuring all non-faulty replicas process transactions in the same order, thereby preventing state divergence, even when compared to a protocol that only guarantees Reliable Broadcast?

Atomic broadcast Hard
A. Validity: If a correct process broadcasts a message, it is eventually delivered by every correct process.
B. Integrity: No message is delivered more than once, and only if it was broadcast by some process.
C. Agreement: If any correct process delivers a message m, then all other correct processes eventually deliver m.
D. Total Order: If correct processes p and q both deliver messages m1 and m2, then p delivers m1 before m2 if and only if q delivers m1 before m2.

42 The FLP Impossibility Proof states that in a fully asynchronous system with even one potential crash failure, no deterministic consensus algorithm can simultaneously guarantee both Safety and Liveness. How do practical Byzantine Fault Tolerant (BFT) protocols like PBFT achieve consensus despite this theoretical limitation?

Consensus Hard
A. They rely on a trusted third-party coordinator to order transactions, thus centralizing the consensus process.
B. They introduce weak synchrony assumptions, such as bounded message delay, which violates the fully asynchronous model of the FLP proof.
C. They use randomized algorithms, which are not subject to the FLP impossibility result.
D. They sacrifice the Safety property during periods of network instability to maintain Liveness.

43 In a classic BFT system requiring nodes to tolerate Byzantine failures, what is the fundamental reason for this threshold? Specifically, why is insufficient?

Byzantine models of fault tolerance Hard
A. With , a malicious primary can be identified and replaced by the remaining nodes.
B. With , a malicious primary could partition the network by sending conflicting messages to two disjoint sets of correct nodes, making it impossible for either set to distinguish the other from the faulty nodes.
C. With , a quorum of nodes for agreement cannot be formed if nodes are unresponsive.
D. With , the system cannot guarantee liveness because view changes would require all non-faulty nodes to agree, which is not guaranteed.

44 The definition of a puzzle-friendly hash function states that for any target and a key chosen from a high min-entropy distribution, it is infeasible to find such that in time much less than . Why is the inclusion of the high min-entropy key critical for this property's application in cryptocurrency mining?

Puzzle friendly hash Hard
A. The key ensures the output of the hash function is uniformly distributed, which is required for difficulty adjustments.
B. The key prevents miners from pre-computing a lookup table of nonce-to-hash values for future blocks.
C. The key ensures that the hash function is collision-resistant, which is the primary requirement for mining.
D. The key is the nonce that miners are actually trying to find.

45 In the Elliptic Curve Digital Signature Algorithm (ECDSA), if a signer uses the same secret random value to sign two different messages, and , with the same private key , an attacker who obtains both signatures and can compute the signer's private key. Given the signature equations and , how is the private key derived?

Digital signatures Hard
A. It's impossible to derive without also knowing the curve's generator point .
B. By computing through a brute-force search and then deriving .
C. By computing
D. By first recovering and then solving for .

46 In pairing-based zk-SNARKs like Groth16, a trusted setup ceremony generates a Common Reference String (CRS), which includes 'toxic waste' (e.g., the scalar used to generate powers). What is the direct security consequence if an attacker compromises this toxic waste?

Zero-knowledge systems Hard
A. The attacker can prevent any further valid proofs from being generated, effectively halting the system.
B. The attacker can decrypt all transactions on the blockchain that use the zk-SNARK.
C. The attacker can create valid-looking proofs for false statements, allowing them to, for example, create money out of thin air.
D. The attacker can derive the private keys of all users who have previously submitted proofs.

47 A Verifiable Random Function (VRF) is used in a Proof-of-Stake system for leader election. A user computes , where is the random output and is the proof. The user wins if is below a certain threshold. Why is the verifiability provided by crucial to prevent a 'grinding' attack?

Verifiable random functions Hard
A. The proof prevents other users from computing the user's VRF output ahead of time.
B. The proof ensures the output is truly random and not biased by the user.
C. The proof forces the user to commit to a single output for a given seed, preventing them from selectively revealing outputs or trying different inputs to get a favorable outcome.
D. The proof encrypts the output , so only the user knows if they have won until they choose to reveal it.

48 An attacker finds a practical collision for a hash function , meaning they have two different files, a benign contract.pdf and a malicious malware.exe, such that . The attacker's goal is to get a CEO to digitally sign the malicious file. How can they exploit this collision to achieve this?

Collision resistant hash Hard
A. The attacker asks the CEO to sign the hash of malware.exe. Since it's just a hash, the CEO agrees.
B. This attack is not possible because digital signature algorithms sign the file itself, not the hash.
C. The attacker modifies the CEO's signing software to replace contract.pdf with malware.exe just before signing.
D. The attacker presents contract.pdf to the CEO for review. The CEO's software calculates the hash and signs it. The attacker then attaches this signature to malware.exe.

49 An attacker discovers a flaw in a hash function used in a blockchain's Merkle tree construction. The flaw is not a collision or a preimage resistance break. Instead, the attacker can craft a message that has a specific, structured relationship with an existing message (e.g., is with a specific suffix appended) such that they can compute from without knowing . This vulnerability is known as a length extension attack. Which popular hash algorithm family is well-known to be vulnerable to this?

Hash functions Hard
A. RIPEMD-160
B. SHA-1 and SHA-2 (SHA-256, SHA-512)
C. BLAKE2
D. SHA-3 (Keccak)

50 How does the Dolev-Strong protocol achieve consensus in the presence of Byzantine failures with only nodes, a lower bound than Lamport's requirement, and what is the critical trade-off it makes?

Byzantine models of fault tolerance Hard
A. It requires a synchronous network model and assumes authenticated (unforgeable) messages, but requires a polynomial number of rounds.
B. It assumes only crash faults, not Byzantine faults, allowing for a lower node count.
C. It sacrifices safety, allowing for the possibility of two different values being committed under certain network conditions.
D. It uses a randomized leader election process, which circumvents the lower bound for deterministic protocols.

51 Comparing zk-SNARKs and zk-STARKs, a primary advantage of STARKs is the lack of a trusted setup. This is achieved by relying on a different cryptographic foundation. What is the core cryptographic primitive that underlies the security of zk-STARKs?

Zero-knowledge systems Hard
A. The hardness of the discrete logarithm problem
B. Bilinear pairings on elliptic curves
C. The RSA assumption (hardness of integer factorization)
D. Collision-resistant hash functions

52 Schnorr signatures possess a key linearity property that makes them ideal for multi-signature and aggregation schemes. If you have two public keys and and two signatures and on the same message , how can they be aggregated into a single valid signature for the aggregate public key ?

Digital signatures Hard
A. and
B. The signatures cannot be aggregated; only the public keys can.
C. and
D. and

53 Consider a permissioned blockchain using an atomic broadcast protocol that guarantees safety and liveness for nodes assuming at most Byzantine nodes. If, due to a coordinated attack, 4 nodes become Byzantine, what is the most severe security failure that can occur?

Atomic broadcast Hard
A. The 4 Byzantine nodes can censor transactions from specific users but cannot break agreement.
B. The system may experience a 'split-brain' scenario, where two different sets of correct nodes commit two conflicting blocks for the same height, violating safety.
C. The system will halt (lose liveness) but will not commit conflicting transactions (maintains safety).
D. The system will continue to operate normally, as the threshold is only a theoretical minimum.

54 In the context of the CAP theorem, which states that a distributed system can only provide two of Consistency, Availability, and Partition Tolerance, how would you classify Bitcoin's Nakamoto Consensus during a major network partition (e.g., the Great Firewall partitioning miners)?

Consensus Hard
A. It prioritizes Availability and Partition Tolerance over Consistency (AP).
B. It prioritizes Consistency and Availability over Partition Tolerance (CA).
C. It successfully achieves all three properties (CAP) through proof-of-work.
D. It prioritizes Consistency and Partition Tolerance over Availability (CP).

55 A new cryptocurrency proposes a mining puzzle where miners must find an input such that the number of set bits (Hamming weight) in is less than a target . Which cryptographic property of an ideal hash function is most directly challenged by this puzzle design?

Puzzle friendly hash Hard
A. Preimage Resistance
B. Second Preimage Resistance
C. The assumption that every output bit is an independent pseudo-random function of the input
D. Collision Resistance

56 What is the primary difference between finding a 'collision' and finding a 'second preimage' for a hash function , and which is generally considered a more difficult problem for a secure -bit hash function?

Collision resistant hash Hard
A. Collision involves finding an input for a given output, while second preimage involves finding two inputs that map to the same, unknown output. Finding a collision is harder.
B. They are computationally equivalent problems; a solution to one immediately gives a solution to the other.
C. Collision: Given , find such that . Second Preimage: Find any with such that . Finding a collision is harder.
D. Collision: Find any with such that . Second Preimage: Given , find such that . Finding a second preimage is harder.

57 While a VRF provides a proof that is the correct output for a given key and input, what cryptographic property ensures that an adversary, even seeing many inputs and their corresponding pairs, cannot predict the output for a new, unseen input?

Verifiable random functions Hard
A. Collision-resistance
B. Verifiability
C. Uniqueness
D. Pseudorandomness

58 The Fiat-Shamir heuristic transforms a three-round interactive proof (Commit, Challenge, Respond) into a non-interactive proof. It does this by having the prover generate the 'random' challenge themselves. How is this accomplished without compromising soundness?

Zero-knowledge systems Hard
A. The prover computes the challenge as the output of a cryptographic hash function applied to the commitment message (and other public data).
B. The prover uses their private key to encrypt the commitment, which serves as the challenge.
C. The prover generates a truly random number using a hardware security module, which is trusted by the verifier.
D. The prover and verifier agree on a pre-shared list of challenges to be used in a specific order.

59 In the PBFT algorithm, a replica moves to the COMMITTED state for a request only after receiving PREPARE messages (forming a prepared certificate) and then COMMIT messages (forming a committed certificate). Why is the PREPARE phase necessary? Why can't replicas just move from PRE-PREPARE directly to COMMIT?

Byzantine models of fault tolerance Hard
A. The PREPARE phase is for liveness; it ensures that if one honest node prepares a request, all honest nodes will eventually prepare it.
B. The PREPARE phase is redundant and only included for compatibility with older BFT protocols.
C. The PREPARE phase is used to detect and handle crash faults, while the COMMIT phase handles Byzantine faults.
D. The PREPARE phase is for ordering; it ensures that requests are ordered identically across all correct replicas within the same view.

60 Consider a commitment scheme where a user commits to a value v by publishing h = H(v || r), where r is a secret random nonce. Later, they reveal v and r to open the commitment. Which two properties of the hash function H are critical for the security of this scheme?

Hash functions Hard
A. Collision Resistance and its resistance to length-extension attacks
B. Preimage Resistance (Hiding) and Collision Resistance (Binding)
C. Second Preimage Resistance and Puzzle-friendliness
D. Puzzle-friendliness and Collision Resistance