1What 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.
Correct Answer: To ensure all participants agree on a single, shared state of the ledger.
Explanation:
Consensus is the process by which a group of distributed nodes reaches an agreement on a single value or state. In blockchain, this is crucial for maintaining a consistent and valid shared ledger across the entire network.
Incorrect! Try again.
2What 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.
Correct Answer: A node that can behave arbitrarily, potentially sending malicious or conflicting information.
Explanation:
A Byzantine fault is the most severe type of fault, where a component can exhibit unpredictable and malicious behavior. A system that can withstand such faults is called Byzantine Fault Tolerant (BFT).
Incorrect! Try again.
3Which 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.
Correct Answer: It takes an input of any size and produces a fixed-size output.
Explanation:
The core purpose of a hash function is to map data of an arbitrary size to a fixed-size output, known as the hash value or digest. For example, SHA-256 always produces a 256-bit hash, regardless of the input size.
Incorrect! Try again.
4In 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
Correct Answer: The signer's private key
Explanation:
A digital signature is created using the signer's private key. This ensures that only the owner of that key could have produced the signature, providing authenticity and non-repudiation.
Incorrect! Try again.
5Which 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
Correct Answer: The signer's public key
Explanation:
Anyone can use the signer's corresponding public key to verify that the signature is authentic and was created by the owner of the private key, and that the signed message has not been altered.
Incorrect! Try again.
6What 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.
Correct Answer: It is computationally difficult to find two different inputs that produce the same hash output.
Explanation:
Collision resistance is a critical security property. While collisions must theoretically exist (due to infinite possible inputs mapping to a finite number of outputs), it should be infeasible for an attacker to find one.
Incorrect! Try again.
7The "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
Correct Answer: Proof-of-Work mining
Explanation:
Puzzle-friendliness means it's hard to find an input that results in a specific hash. This is the basis of Proof-of-Work mining, where miners expend computational effort to find a nonce that produces a hash below a certain target.
Incorrect! Try again.
8What 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.
Correct Answer: To prove a statement is true without revealing the information that proves it.
Explanation:
A ZKP allows a 'prover' to convince a 'verifier' of the truth of a statement without revealing any extra information beyond the fact that the statement is indeed true.
Incorrect! Try again.
9In 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.
Correct Answer: Messages are delivered to all correct processes in the exact same order.
Explanation:
Atomic broadcast, also known as total order broadcast, ensures two key properties: atomicity (all-or-nothing delivery) and total order (all recipients receive messages in the same sequence).
Incorrect! Try again.
10What 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.
Correct Answer: To generate a random number and a proof that the number was generated correctly.
Explanation:
A VRF outputs a pseudorandom value along with a proof. The proof allows anyone with the public key to verify that the output was correctly calculated from the input, without being able to predict the output beforehand.
Incorrect! Try again.
11If 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.
Correct Answer: The exact same hash output every time.
Explanation:
Cryptographic hash functions are deterministic. This means that a given input will always produce the exact same output, which is essential for verification purposes.
Incorrect! Try again.
12A 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.
Correct Answer: A certain fraction of the nodes are malicious or faulty.
Explanation:
The purpose of BFT is to ensure that a distributed network can reach consensus and continue to operate securely and correctly, despite a limited number of nodes behaving in arbitrary, malicious ways.
Incorrect! Try again.
13What 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.
Correct Answer: Authenticity, non-repudiation, and integrity.
Explanation:
A digital signature confirms the authenticity of the sender, ensures non-repudiation (the sender cannot deny signing it), and guarantees the integrity of the message (it has not been altered).
Incorrect! Try again.
14Why 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.
Correct Answer: It prevents an attacker from swapping a valid file with a malicious one that has the same hash.
Explanation:
If an attacker could easily find a collision, they could create a malicious contract or file that hashes to the same value as a legitimate one, thereby fooling systems that use hashes for verification.
Incorrect! Try again.
15The 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.
Correct Answer: A specific target output hash y.
Explanation:
Puzzle-friendliness means there is no better way to find an input x that produces a desired output y (or an output in a certain range) than to simply try random inputs. This makes the search process a "puzzle".
Incorrect! Try again.
16Which 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.
Correct Answer: Proving you have sufficient balance for a transaction without revealing your total balance.
Explanation:
This is a classic privacy-enhancing application of ZKPs. The proof can confirm that a financial rule is met (e.g., balance > transaction amount) without disclosing the specific sensitive numbers involved.
Incorrect! Try again.
17In 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.
Correct Answer: The double-spending problem.
Explanation:
By ensuring all nodes agree on a single, ordered history of transactions, consensus mechanisms prevent a user from spending the same digital currency more than once (double-spending).
Incorrect! Try again.
18The "all-or-nothing" delivery guarantee in an atomic broadcast is known as:
Atomic broadcast
Easy
A.Validity
B.Ordering
C.Atomicity
D.Termination
Correct Answer: Atomicity
Explanation:
Atomicity ensures that if a message is delivered to one correct process, it is eventually delivered to all correct processes. It prevents a state where some nodes have received a message and others haven't.
Incorrect! Try again.
19In 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.
Correct Answer: Revealing the winner to everyone else before the selection is final.
Explanation:
A VRF allows a potential block producer to determine if they've been selected and create a proof of it, without tipping off other participants. This prevents targeted attacks on the next block producer before they have a chance to create the block.
Incorrect! Try again.
20The 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
Correct Answer: Avalanche Effect
Explanation:
The avalanche effect is a desirable property of cryptographic hash functions. It means that even a one-bit change in the input will, on average, change about half of the bits in the output hash, making the new hash appear completely random and unrelated to the first.
Incorrect! Try again.
21In 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
Correct Answer: Total Order
Explanation:
Total Order is a crucial property of atomic broadcast that ensures all non-faulty nodes deliver messages in the exact same sequence. This prevents state inconsistencies that arise from different orderings of operations, such as in the transaction example.
Incorrect! Try again.
22A 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.
Correct Answer: Solving atomic broadcast is equivalent to solving consensus repeatedly for each message to be ordered.
Explanation:
Atomic broadcast can be reduced to a series of consensus instances. For each 'slot' in the message log, nodes can run a consensus algorithm to agree on which message goes into that slot, thereby creating a total order agreed upon by all participants.
Incorrect! Try again.
23In 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.
Correct Answer: The probability of a confirmed transaction being reversed decreases as more blocks are added after it, but never reaches zero.
Explanation:
Probabilistic finality means that the certainty of a transaction being immutable increases with each subsequent block (or 'confirmation'). While the chance of a fork reversing the transaction becomes astronomically small over time, it is never mathematically zero.
Incorrect! Try again.
24In 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
Correct Answer: Safety
Explanation:
Safety properties in consensus ensure that the system never enters an undesirable state. For consensus, this primarily means ensuring all non-faulty nodes agree on the same value (agreement) and that the agreed-upon value was proposed by some node (validity). Liveness, in contrast, ensures that something good eventually happens (e.g., a decision is eventually reached).
Incorrect! Try again.
25A 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
Correct Answer: 4
Explanation:
For a classical Byzantine Fault Tolerant system to reach consensus, it requires a minimum of total nodes, where is the maximum number of faulty nodes. In this case, . We solve for : . Therefore, the system can tolerate up to 4 faulty nodes.
Incorrect! Try again.
26The 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.
Correct Answer: The network is primarily asynchronous but assumes that messages between non-faulty nodes are eventually delivered (a weak synchrony model).
Explanation:
pBFT operates in what is effectively a partially synchronous or weakly synchronous model. It doesn't require hard real-time deadlines (fully synchronous), but it relies on timeouts and the assumption that messages aren't delayed forever, allowing the protocol to make progress and eventually reach consensus.
Incorrect! Try again.
27In 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.
Correct Answer: The system's security is compromised, and faulty nodes can cause honest nodes to accept an invalid state or halt progress entirely.
Explanation:
The condition is a strict requirement for safety and liveness. If the number of Byzantine nodes exceeds , the protocol's assumptions are violated. Malicious nodes can then potentially equivocate (send conflicting messages) in a way that partitions the network, preventing honest nodes from reaching consensus (violating liveness) or, worse, causing them to agree on a fraudulent state (violating safety).
Incorrect! Try again.
28A 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
Correct Answer: Pre-image Resistance
Explanation:
Pre-image resistance, also known as one-wayness, is the property that given a hash output , it is computationally infeasible to find an input such that . This is precisely what protects the original password from being discovered from its hash.
Incorrect! Try again.
29A 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.
Correct Answer: The new output will be completely different, with approximately 50% of its bits flipped compared to the original output.
Explanation:
The avalanche effect is a desirable property of cryptographic hash functions where a tiny change in the input (like flipping a single bit) results in a drastic and unpredictable change in the output. On average, about half of the output bits should change, making the new output appear uncorrelated with the original.
Incorrect! Try again.
30In 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
Correct Answer: Puzzle-friendliness
Explanation:
A hash function is puzzle-friendly if, for any desired -bit output value , it's infeasible to find an input in time significantly less than such that , where is chosen from a high-entropy distribution. This means there's no shortcut to finding a valid nonce; miners must iterate through possibilities in a brute-force search.
Incorrect! Try again.
31A 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.
Correct Answer: The function's output must behave like a random variable uniformly distributed over the output range.
Explanation:
The puzzle-friendly property relies on the hash function behaving like a random oracle. For any given input, the output should be pseudorandom and unpredictable. This requires the outputs to be uniformly distributed, ensuring that no part of the input search space is more likely to yield a "successful" hash than any other part. This forces a brute-force search.
Incorrect! Try again.
32An 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
Correct Answer: Collision Resistance
Explanation:
Collision resistance is the property that makes it computationally infeasible to find any two different inputs, and , such that . In this scenario, the adversary is trying to find a fraudulent contract () that collides with the hash of the original contract ().
Incorrect! Try again.
33Due 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.
Correct Answer: The probability of finding a collision after hashing approximately random inputs becomes significantly high (around 50%).
Explanation:
The birthday problem in probability shows that you don't need to check all possibilities to find a match. To find a collision for an -bit hash function (with possible outputs), one only needs to hash about inputs before the probability of a collision becomes substantial. Therefore, a 256-bit hash function offers about 128 bits of security against collision attacks.
Incorrect! Try again.
34Alice 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.
Correct Answer: She signs with her private key; Bob verifies with her public key.
Explanation:
To create a digital signature, the signer (Alice) uses her own private key on the message hash. This proves she is the originator, as only she has access to it. The verifier (Bob) then uses the signer's corresponding public key to validate the signature. If it's valid, it proves authenticity and integrity.
Incorrect! Try again.
35A 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)
Correct Answer: Confidentiality (the message content is kept secret)
Explanation:
A digital signature verifies the sender's identity and the message's integrity. However, it does not encrypt the message content itself. The message is typically sent in plaintext alongside the signature. To achieve confidentiality, the message must be separately encrypted, for example, using the recipient's public key.
Incorrect! Try again.
36In 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.
Correct Answer: A VRF produces a random output along with a cryptographic proof that the output was generated correctly by a specific private key.
Explanation:
A standard hash function's output is just the hash value. A VRF, on the other hand, takes a private key and an input to produce a pseudorandom output and a proof. Anyone with the corresponding public key can use the proof to verify that the output was generated correctly for that specific input, without needing to know the private key. This is crucial for provably fair and unpredictable leader election.
Incorrect! Try again.
37A 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.
Correct Answer: 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.
Explanation:
Using a future block hash for randomness is vulnerable to manipulation by miners. A miner could try to solve for a block hash that makes them win the lottery. A VRF solves this by having a user generate the random number using their private key. The result is pseudorandom and unpredictable to others, but the accompanying proof ensures it was generated honestly according to the protocol rules.
Incorrect! Try again.
38In 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.
Correct Answer: 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.
Explanation:
The core principle of 'zero-knowledge' is that the interaction (the proof) leaks no information about the secret (the 'witness') other than the truth of the statement being proven. The Verifier is convinced but gains no knowledge that would help them reconstruct the secret.
Incorrect! Try again.
39ZK-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.
Correct Answer: A secret parameter ('toxic waste') must be generated in a secure ceremony; if this secret is compromised, the entire system's soundness is broken.
Explanation:
Systems like ZK-SNARKs often require an initial trusted setup phase to generate public parameters. This process creates a secret byproduct, often called 'toxic waste.' If any participant in the setup ceremony retains this toxic waste, they can forge proofs for false statements, compromising the integrity of the system. ZK-STARKs are often favored for their lack of this requirement ('transparent' setup).
Incorrect! Try again.
40Imagine 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.
Correct Answer: To ensure all non-faulty nodes eventually agree on the same single value.
Explanation:
The core property of consensus is Agreement: all correct processes must agree on the same value. The specific value chosen (e.g., X or Y) depends on the algorithm's rules, but the essential goal is that all honest participants converge on one and only one of the proposed values.
Incorrect! Try again.
41In 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.
Correct Answer: 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.
Explanation:
While Validity, Integrity, and Agreement are properties of Reliable Broadcast, Total Order is the unique, defining guarantee of Atomic Broadcast. For state machine replication, it is not enough that all nodes receive the same set of messages (guaranteed by Reliable Broadcast); they must also process them in the exact same sequence to maintain identical states. Total Order ensures this sequential consistency across all correct replicas, which is the cornerstone of preventing state divergence in systems like blockchains.
Incorrect! Try again.
42The 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.
Correct Answer: They introduce weak synchrony assumptions, such as bounded message delay, which violates the fully asynchronous model of the FLP proof.
Explanation:
The FLP result applies strictly to fully asynchronous systems where messages can be delayed indefinitely. Practical BFT protocols like PBFT operate in a model that is mostly asynchronous but makes certain weak synchrony assumptions. For instance, they assume that messages between correct nodes will eventually be delivered within some unknown but finite time bound (). This assumption is used in mechanisms like view changes, which are triggered by timeouts, to ensure liveness. By stepping outside the strict constraints of the FLP model, they can provide guarantees of both safety and liveness.
Incorrect! Try again.
43In 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.
Correct Answer: 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.
Explanation:
The core problem with arises from the possibility of a network partition orchestrated by faulty nodes. Consider a system with nodes. If nodes are Byzantine (including the primary), they can send one message to a group of honest nodes and a conflicting message to the other honest nodes. From the perspective of the first group of honest nodes, they see their message plus faulty nodes and are waiting for a response from the other honest nodes, whom they cannot distinguish from the faulty ones. They cannot reach a quorum of to proceed. The same deadlock occurs in the second group. By having , any two quorums of size must intersect by at least nodes. Since at most can be faulty, this intersection is guaranteed to contain at least one honest node, ensuring that conflicting information cannot be committed.
Incorrect! Try again.
44The 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.
Correct Answer: The key prevents miners from pre-computing a lookup table of nonce-to-hash values for future blocks.
Explanation:
In Bitcoin mining, the block header (or parts of it, like the Merkle root and previous block hash) acts as the high min-entropy key . Because this k is different and unpredictable for every new mining attempt, miners cannot perform amortization attacks. An amortization attack would involve pre-computing a massive table of inputs that lead to desirable outputs (e.g., hashes with many leading zeros). Since the k changes for each block, any pre-computed work becomes useless. This forces miners to perform the full brute-force search for each new block, making the puzzle genuinely 'friendly' to parallel, real-time computation rather than pre-computation.
Incorrect! Try again.
45In 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 .
Correct Answer: By first recovering and then solving for .
Explanation:
The attacker can manipulate the two signature equations. From the equations, we have and . By setting them equal: . Rearranging this gives , which leads to . Once the secret value is recovered, the attacker can substitute it back into either of the original signature equations to solve for the private key : . This demonstrates the catastrophic failure caused by -reuse.
Incorrect! Try again.
46In 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.
Correct Answer: The attacker can create valid-looking proofs for false statements, allowing them to, for example, create money out of thin air.
Explanation:
The security of the zk-SNARK relies on the prover not knowing the underlying structure of the CRS, which is defined by the secret 'toxic waste' values. If an attacker knows these secrets, they can bypass the computational constraints that an honest prover must adhere to. This allows them to forge proofs for any statement, including false ones. For example, in a system like Zcash, they could create a proof for a transaction that creates new coins without a corresponding input, violating the system's conservation-of-value rule. This breaks the 'soundness' property of the proof system.
Incorrect! Try again.
47A 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.
Correct Answer: 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.
Explanation:
The core of a grinding attack is trying multiple inputs to 'grind' through possibilities until a favorable outcome is found. A VRF's verifiability property binds a specific public key (and its corresponding secret key) to a unique and deterministic output for a given public input (the seed). The proof allows anyone to verify that is the correct output for that specific key and seed. This means a user cannot try to influence the seed or their key and then generate a proof for a more favorable output; the proof would simply fail verification. It forces them to commit to the single output produced by their key, making the randomness fair and non-malleable.
Incorrect! Try again.
48An 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.
Correct Answer: 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.
Explanation:
Digital signature schemes are almost always implemented as 'hash-then-sign' for efficiency and security. The user signs the cryptographic hash of the message, not the entire message. In this scenario, the CEO sees and approves the benign contract.pdf. Their signing software computes and the CEO signs , producing a signature . Since , the same signature is also a valid signature for the hash of malware.exe. The attacker can now pair with malware.exe, and any verification process will confirm that the CEO signed it, as Verify(PK_CEO, malware.exe, \sigma) will compute and check the signature against it, which will succeed.
Incorrect! Try again.
49An 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
Correct Answer: SHA-1 and SHA-2 (SHA-256, SHA-512)
Explanation:
The length extension attack is a characteristic vulnerability of hash functions that use the Merkle-Damgård construction, which includes the widely used SHA-1 and SHA-2 families. The internal state of the hash function after processing a message is precisely the hash output . An attacker can use this output as the initialization vector (IV) to continue hashing additional data (the extension), effectively computing using only and the length of . Hash functions like SHA-3, which use a sponge construction, are not vulnerable to this attack.
Incorrect! Try again.
50How 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.
Correct Answer: It requires a synchronous network model and assumes authenticated (unforgeable) messages, but requires a polynomial number of rounds.
Explanation:
The original oral messages protocol by Lamport, requiring , assumed messages could be forged by Byzantine nodes pretending to be someone else. The Dolev-Strong protocol introduces the assumption of an 'authenticated broadcast' channel, practically implemented with digital signatures. With unforgeable messages, a Byzantine node cannot relay a message and change its content, nor can it forge a message from a correct node. This added security reduces the node requirement to . However, the classic Dolev-Strong protocol pays a significant performance penalty: it requires rounds of communication, which can be inefficient compared to the constant number of rounds in protocols like PBFT.
Incorrect! Try again.
51Comparing 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)
zk-STARKs (Scalable Transparent Arguments of Knowledge) build their security on much simpler and more battle-tested cryptographic assumptions. Their primary building block is the collision resistance of a hash function. The 'T' for 'Transparent' in STARK refers to the fact that the public parameters are generated in a deterministic way from a public string, requiring no secret 'toxic waste' and therefore no trust. This makes them quantum-resistant (assuming the hash function is). In contrast, many popular zk-SNARKs rely on more complex and less understood assumptions like bilinear pairings on elliptic curves, which are known to be vulnerable to quantum computers.
Incorrect! Try again.
52Schnorr 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.
Correct Answer: and
Explanation:
The linearity of Schnorr signatures allows for simple aggregation through elliptic curve point addition. A Schnorr signature is a pair where and . For two signatures on the same message , we have and . By simply adding the components, we get an aggregate public key , an aggregate nonce commitment , and an aggregate signature . The verification equation will hold for the aggregated values, making it a highly efficient method for multi-party signatures.
Incorrect! Try again.
53Consider 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).
Correct Answer: 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.
Explanation:
The requirement is a hard requirement for safety. With and , we have . This means the condition for intersecting quorums is no longer met. A malicious leader (one of the 4 Byzantine nodes) can propose Block A to 3 honest nodes and a conflicting Block B to the other 3 honest nodes. The Byzantine nodes can then provide the necessary supporting messages to each partition. The first set of 3 honest nodes + 3 Byzantine nodes (pretending to agree on A) form a quorum of 6. The second set of 3 honest nodes + 3 Byzantine nodes (pretending to agree on B) also form a quorum of 6. Each partition sees a valid quorum and commits its respective block, leading to a permanent fork or state divergence, which is a catastrophic safety failure.
Incorrect! Try again.
54In 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).
Correct Answer: It prioritizes Availability and Partition Tolerance over Consistency (AP).
Explanation:
During a network partition, Bitcoin does not halt. Both sides of the partition continue to mine and add blocks to their respective chains. This demonstrates that the system remains Available and is inherently Partition Tolerant. However, this comes at the cost of Consistency. The two partitions will have different versions of the ledger. Once the partition is resolved, the network follows the 'longest chain' rule to resolve the fork, and one of the chains is orphaned. This means that for a period, the system was inconsistent. Therefore, Nakamoto consensus is best described as an AP system that provides eventual consistency.
Incorrect! Try again.
55A 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
Correct Answer: The assumption that every output bit is an independent pseudo-random function of the input
Explanation:
An ideal cryptographic hash function should behave like a random oracle, where every output bit is a separate, unpredictable function of the input. This puzzle design, however, creates a potential vulnerability if there are subtle biases or correlations in the output bits. For example, if an attacker finds a way to slightly bias the output towards having more 0s than 1s, they gain an advantage in solving the puzzle. Standard puzzle-friendliness (finding an output with a certain prefix) relies on the infeasibility of finding an input for a specific output value. This new puzzle relies on a statistical property of the entire output, making it sensitive to non-randomness across the output bits, a property that is often assumed but harder to prove than basic resistance properties.
Incorrect! Try again.
56What 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.
Correct Answer: Collision: Find any with such that . Second Preimage: Given , find such that . Finding a second preimage is harder.
Explanation:
A collision attack gives the attacker freedom to choose both inputs ( and ). Due to the birthday paradox, the complexity of this attack is approximately . A second-preimage attack is more constrained: the attacker is given a specific input and must find a different input that produces the same hash. The best known attack for this is a brute-force search, which has a complexity of . Therefore, for a secure hash function, finding a second preimage is exponentially harder than finding a collision.
Incorrect! Try again.
57While 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
Correct Answer: Pseudorandomness
Explanation:
The pseudorandomness property of a VRF ensures that its output is computationally indistinguishable from a truly random value to anyone who does not possess the secret key. Even if an adversary has a large number of input-output pairs , they cannot gain any advantage in predicting the output for a new input . This is analogous to the security property of a standard Pseudorandom Function (PRF). The verifiability and uniqueness properties are distinct: verifiability allows for public checking, and uniqueness guarantees a single valid output per input, but pseudorandomness is what guarantees unpredictability.
Incorrect! Try again.
58The 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.
Correct Answer: The prover computes the challenge as the output of a cryptographic hash function applied to the commitment message (and other public data).
Explanation:
The Fiat-Shamir heuristic replaces the verifier's random challenge with a non-interactive, deterministic one. The prover first computes their commitment message (). Then, instead of waiting for the verifier, the prover computes the challenge as . The prover is now 'committed' to the value before knowing the challenge , because they cannot find a different commitment that would yield a favorable challenge without breaking the collision resistance of the hash function . This process models the behavior of a truly random oracle, and its security relies on the hash function behaving like one. The prover then computes the response based on and and publishes the tuple (commitment, response) as the non-interactive proof.
Incorrect! Try again.
59In 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.
Correct Answer: The PREPARE phase is for ordering; it ensures that requests are ordered identically across all correct replicas within the same view.
Explanation:
The PREPARE phase is critical for safety, specifically for achieving total order within a view. A malicious primary could send a PRE-PREPARE message for a request with sequence number seq to some replicas, and a different PRE-PREPARE for another request with the same seq to other replicas. Without the PREPARE phase, both sets of replicas might proceed to commit conflicting requests at the same sequence number. The PREPARE phase acts as a cross-check among replicas. By broadcasting PREPARE messages and waiting for a quorum of , each replica verifies that a sufficient number of other replicas agree on the same request for that specific sequence number before committing. This prevents conflicting requests from being committed at the same logical point in the sequence.
Incorrect! Try again.
60Consider 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)
Correct Answer: Preimage Resistance (Hiding) and Collision Resistance (Binding)
Explanation:
A commitment scheme must have two properties: Hiding and Binding.
Hiding means that given the commitment h, it is infeasible to determine the value v. This property relies on the preimage resistance of the hash function. Because of the secret nonce r, an attacker cannot simply guess v and check the hash; they would have to find a preimage for h, which is computationally infeasible.
Binding means that after committing to v, the user cannot later open the commitment to a different value v'. This relies on collision resistance. If the user could find a different (v', r') such that H(v || r) = H(v' || r'), they could break their commitment. Therefore, preimage resistance protects the secrecy of the value, and collision resistance binds the committer to their value.