Unit 3 - Practice Quiz

CSC203 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 ensure all participants agree on a single, shared state of the ledger.
B. To make the network run as fast as possible.
C. To reduce the amount of data stored on the chain.
D. To encrypt all communication between nodes.

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

Byzantine models of fault tolerance Easy
A. A predictable software bug that affects all nodes equally.
B. A slow network connection between two nodes.
C. A node that has simply crashed and is offline.
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 takes an input of any size and produces a fixed-size output.
B. It can be reversed to get the original input from the output hash.
C. It produces a longer output for a longer input.
D. It requires a key to encrypt the input.

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

Digital signatures Easy
A. The recipient's public key
B. The signer's public key
C. The signer's private key
D. A shared secret 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 verifier's private key
D. The signer's public key

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

Collision resistant hash Easy
A. It is impossible for two different inputs to ever have the same hash.
B. The hash output is resistant to physical damage.
C. The function prevents network data packets from colliding.
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. Validating a transaction signature
D. Creating a wallet

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 create a system with no cryptographic keys.
C. To prove a statement is true without revealing the information that proves it.
D. To encrypt a message so no one can read it.

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

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

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

Verifiable random functions Easy
A. To verify that a function is truly random.
B. To generate a random number and a proof that the number was generated correctly.
C. To create functions that are difficult to solve.
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 slightly different hash each time.
B. A different hash output every time.
C. The exact same hash output every 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. A certain fraction of the nodes are malicious or faulty.
B. All nodes have slow internet connections.
C. The entire network goes offline.
D. The cryptographic hash function is broken.

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

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

14 Why is collision resistance important for data integrity?

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

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. A part of the output hash y.
B. The length of the input x.
C. A specific target 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 you have sufficient balance for a transaction without revealing your total balance.
B. Making the blockchain database smaller.
C. Proving your identity by showing your government-issued ID to the network.
D. Increasing the block size limit.

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

Consensus Easy
A. The problem of data storage.
B. The double-spending problem.
C. The problem of user anonymity.
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. Validity
B. Ordering
C. Atomicity
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. Requiring them to solve a computational puzzle.
B. Revealing the winner to everyone else before the selection is final.
C. Paying them a reward.
D. Knowing their public keys.

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. Butterfly Effect
B. Doppler Effect
C. Domino Effect
D. Avalanche 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. Integrity
B. Total Order
C. Validity
D. Liveness

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

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. The probability of a confirmed transaction being reversed decreases as more blocks are added after it, but never reaches zero.
C. A transaction is confirmed instantly and can never be reversed.
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. Liveness
B. Finality
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. 3
B. 6
C. 4
D. 7

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 is fully synchronous, with fixed upper bounds on message delay.
C. The network can be fully asynchronous, and messages may be lost indefinitely without affecting consensus.
D. The network communication must be encrypted by default.

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 will continue to function correctly but at a slightly slower speed.
B. The system will automatically remove the extra faulty node and return to a stable state.
C. The system's security is compromised, and faulty nodes can cause honest nodes to accept an invalid state or halt progress entirely.
D. The system will alert the network administrator but will not halt or produce incorrect results.

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. Determinism
D. Collision Resistance

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 identical to the first, except for a single bit.
B. The new output will be the bitwise inverse of the original output.
C. The new output will be numerically very close to the original output.
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. Puzzle-friendliness
B. Determinism
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 function must only produce a small, fixed number of possible outputs.
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 outputs must be heavily skewed towards lower numerical values.

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. Pre-image Resistance
C. The Avalanche Effect
D. Second 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 probability of finding a collision after hashing approximately random inputs becomes significantly high (around 50%).
B. The attack works by finding two inputs that hash to the same first bits.
C. The attack requires exactly attempts to guarantee a collision.
D. The attack cuts the effective key length of the hash function's internal algorithm in half.

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 Bob's public key; Bob verifies with his private key.
B. She signs with a shared secret key; Bob verifies with the same shared key.
C. She signs with her private key; Bob verifies with her public key.
D. She signs with her public key; Bob verifies with her private 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. Confidentiality (the message content is kept secret)
C. Integrity (proof the message wasn't altered)
D. Authenticity (proof of origin)

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

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. 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.
B. Block hashes are not random and follow a predictable pattern.
C. A VRF is easier to implement in a smart contract.
D. VRFs are the only way to generate random numbers on a blockchain.

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 Prover and Verifier engage in a multi-round protocol where small, partial pieces of the secret are revealed until the Verifier is convinced.
B. 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.
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. The system requires a centralized server to operate, defeating the purpose of decentralization.
B. It requires more computational power from the Verifier.
C. The proofs generated are much larger and more expensive to verify on-chain.
D. A secret parameter ('toxic waste') must be generated in a secure ceremony; if this secret is compromised, the entire system's soundness is broken.

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 that both X and Y are eventually accepted by all nodes.
B. To ensure all non-faulty nodes eventually agree on the same single value.
C. To elect a leader who will decide the value unilaterally.
D. To ensure the fastest node's value is chosen.

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. Integrity: No message is delivered more than once, and only if it was broadcast by some process.
B. Agreement: If any correct process delivers a message m, then all other correct processes eventually deliver m.
C. Validity: If a correct process broadcasts a message, it is eventually delivered by every correct process.
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 introduce weak synchrony assumptions, such as bounded message delay, which violates the fully asynchronous model of the FLP proof.
B. They sacrifice the Safety property during periods of network instability to maintain Liveness.
C. They rely on a trusted third-party coordinator to order transactions, thus centralizing the consensus process.
D. They use randomized algorithms, which are not subject to the FLP impossibility result.

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 quorum of nodes for agreement cannot be formed if nodes are unresponsive.
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 malicious primary can be identified and replaced by the remaining nodes.
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 that the hash function is collision-resistant, which is the primary requirement for mining.
B. The key is the nonce that miners are actually trying to find.
C. The key ensures the output of the hash function is uniformly distributed, which is required for difficulty adjustments.
D. The key prevents miners from pre-computing a lookup table of nonce-to-hash values for future blocks.

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 create valid-looking proofs for false statements, allowing them to, for example, create money out of thin air.
B. The attacker can prevent any further valid proofs from being generated, effectively halting the system.
C. The attacker can decrypt all transactions on the blockchain that use the zk-SNARK.
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 ensures the output is truly random and not biased by the user.
B. The proof prevents other users from computing the user's VRF output ahead of time.
C. The proof encrypts the output , so only the user knows if they have won until they choose to reveal it.
D. 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.

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 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.
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 asks the CEO to sign the hash of malware.exe. Since it's just a hash, the CEO agrees.

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-3 (Keccak)
C. SHA-1 and SHA-2 (SHA-256, SHA-512)
D. BLAKE2

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 sacrifices safety, allowing for the possibility of two different values being committed under certain network conditions.
B. It requires a synchronous network model and assumes authenticated (unforgeable) messages, but requires a polynomial number of rounds.
C. It assumes only crash faults, not Byzantine faults, allowing for a lower node count.
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. The RSA assumption (hardness of integer factorization)
C. Collision-resistant hash functions
D. Bilinear pairings on elliptic curves

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. and
C. and
D. The signatures cannot be aggregated; only the public keys can.

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 continue to operate normally, as the threshold is only a theoretical minimum.
D. The system will halt (lose liveness) but will not commit conflicting transactions (maintains safety).

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 Consistency and Partition Tolerance over Availability (CP).
B. It successfully achieves all three properties (CAP) through proof-of-work.
C. It prioritizes Availability and Partition Tolerance over Consistency (AP).
D. It prioritizes Consistency and Availability over Partition Tolerance (CA).

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. Collision Resistance
D. The assumption that every output bit is an independent pseudo-random function of the input

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. They are computationally equivalent problems; a solution to one immediately gives a solution to the other.
B. Collision: Given , find such that . Second Preimage: Find any with such that . Finding a collision is harder.
C. 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.
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. Pseudorandomness
C. Uniqueness
D. Verifiability

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

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

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. Puzzle-friendliness and Collision Resistance
B. Collision Resistance and its resistance to length-extension attacks
C. Second Preimage Resistance and Puzzle-friendliness
D. Preimage Resistance (Hiding) and Collision Resistance (Binding)