0% found this document useful (0 votes)
17 views

week-2 mcqs

The document contains 50 multiple-choice questions and answers related to cryptography, blockchain, and distributed systems, along with detailed solutions for each question. Topics covered include confidentiality in cryptography, properties of hash functions, blockchain concepts like blocks and smart contracts, consensus mechanisms such as Proof of Work and Proof of Stake, and principles of distributed systems. Each question is designed to test knowledge and understanding of key concepts in these fields.

Uploaded by

Prabhav Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

week-2 mcqs

The document contains 50 multiple-choice questions and answers related to cryptography, blockchain, and distributed systems, along with detailed solutions for each question. Topics covered include confidentiality in cryptography, properties of hash functions, blockchain concepts like blocks and smart contracts, consensus mechanisms such as Proof of Work and Proof of Stake, and principles of distributed systems. Each question is designed to test knowledge and understanding of key concepts in these fields.

Uploaded by

Prabhav Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Okay, here are 50 multiple-choice questions similar to the ones you provided, covering concepts

related to cryptography, blockchain, and distributed systems, along with their answers and detailed
solutions:

Cryptography & Security

1. In the context of cryptography, what does confidentiality primarily aim to achieve?

a) Ensuring data integrity

b) Preventing unauthorized access to information

c) Verifying the sender's identity

d) Guaranteeing non-repudiation

Answer: (b)

Detailed solution: Confidentiality ensures that sensitive information is not disclosed to unauthorized
individuals or entities.

2. Which cryptographic primitive is primarily used to ensure the integrity of a message?

a) Encryption algorithms

b) Digital signatures

c) Hash functions

d) Key exchange protocols

Answer: (c)

Detailed solution: Hash functions produce a fixed-size digest of a message. Any alteration to the
message will result in a different hash, thus revealing tampering.

3. What is the main purpose of a digital signature?

a) To encrypt the content of a message

b) To verify the sender's identity and ensure message integrity

c) To hide the message from unauthorized parties

d) To speed up the transmission of messages

Answer: (b)

Detailed solution: A digital signature uses the sender's private key to sign a message, allowing the
recipient to verify the sender's identity using the corresponding public key and confirm that the
message hasn't been altered.

4. Which of the following is a property of a secure cryptographic hash function?

a) It is easy to reverse the hashing process to find the original input.

b) It always produces the same output for different inputs.

c) It is computationally infeasible to find a collision (two different inputs producing the same hash).
d) The output size is always smaller than the input size, and the reduction is significant.

Answer: (c)

Detailed solution: Collision resistance is a crucial property of secure hash functions, making it
extremely difficult to find two different messages that produce the same hash value.

5. In asymmetric cryptography, which key is used to encrypt a message for confidentiality?

a) The sender's private key

b) The sender's public key

c) The recipient's private key

d) The recipient's public key

Answer: (d)

Detailed solution: To ensure only the intended recipient can read the message, Alice encrypts it using
Bob's public key, which only Bob's private key can decrypt.

6. What is the purpose of the private key in an asymmetric key pair?

a) To be shared with anyone who wants to send you a secure message.

b) To decrypt messages encrypted with the corresponding public key and to create digital signatures.

c) To encrypt messages that only you can read.

d) To verify the authenticity of messages sent to you.

Answer: (b)

Detailed solution: The private key is kept secret and is used for decryption and signing, operations
that only the key holder should be able to perform.

7. What is a man-in-the-middle attack?

a) An attack that floods a system with excessive requests.

b) An attack where an unauthorized party intercepts and potentially alters communication between
two parties.

c) An attack that tries to guess a user's password through repeated attempts.

d) An attack that exploits vulnerabilities in software to gain unauthorized access.

Answer: (b)

Detailed solution: In a man-in-the-middle attack, the attacker secretly relays and possibly alters the
communications between two parties who believe they are directly communicating with each1
other.

8. Which of the following is a common application of hash functions in security?

a) Encrypting email communications

b) Storing passwords securely


c) Establishing secure network connections

d) Generating public and private key pairs

Answer: (b)

Detailed solution: Instead of storing passwords in plaintext, systems often store their hash values.
This way, even if the database is compromised, the actual passwords are not directly revealed.

9. What is the significance of the modulus 'n' in the RSA cryptosystem?

a) It is the encryption exponent.

b) It is the decryption exponent.

c) It is the product of the two large prime numbers used for key generation.

d) It is the totient of the product of the two large prime numbers.

Answer: (c)

Detailed solution: The modulus 'n' in RSA is calculated as the product of two large prime numbers (p
and q), and it is part of both the public and private keys.

10. What is the Euler's totient function, φ(n), used for in RSA?

a) To determine the size of the ciphertext.

b) To encrypt the message.

c) To calculate the decryption exponent (d).

d) To generate the prime numbers p and q.

Answer: (c)

Detailed solution: The Euler's totient function, φ(n) = (p-1)(q-1), is crucial for finding the modular
inverse of the encryption exponent (e), which gives the decryption exponent (d).

Blockchain Technology

11. What is a blockchain?

a) A centralized database managed by a single authority.

b) A distributed, immutable ledger of transactions grouped into blocks.

c) An encryption algorithm used to secure data.

d) A type of cryptocurrency.

Answer: (b)

Detailed solution: A blockchain is characterized by its distributed nature, where data is replicated
across many nodes, and its immutability, where once a block is added, it cannot be easily altered.

12. What is a block in the context of blockchain?

a) A single transaction recorded on the ledger.


b) A container that holds a batch of validated transactions.

c) A cryptographic key used to secure the network.

d) A participant in the blockchain network.

Answer: (b)

Detailed solution: Blocks are the fundamental building units of a blockchain, bundling multiple
verified transactions together.

13. What is the role of the "nonce" in a Proof-of-Work (PoW) blockchain?

a) To encrypt the transactions within a block.

b) To find a hash value that meets the network's difficulty target.

c) To identify the miner who created the block.

d) To link the current block to the previous one.

Answer: (b)

Detailed solution: Miners in a PoW system iteratively try different nonce values until they find one
that, when combined with the block's data and hashed, produces a hash that starts with a certain
number of leading zeros (determined by the difficulty).

14. What is a Merkle Tree used for in blockchain technology?

a) To encrypt the block header.

b) To efficiently verify the integrity of transactions within a block.

c) To determine the order of blocks in the blockchain.

d) To manage the network's peer-to-peer connections.

Answer: (b)

Detailed solution: A Merkle Tree is a tree-like structure where each leaf node is the hash of a
transaction, and each non-leaf node is the hash of its children. The root hash (Merkle root) provides
a cryptographic summary of all transactions in the block, allowing for efficient verification of
transaction inclusion.

15. What does the "51% attack" refer to in the context of blockchain?

a) An attack that aims to double-spend cryptocurrency by controlling a majority of the network's


computing power (in PoW) or stake (in PoS).

b) An attack that floods the network with a large number of invalid transactions.

c) An attempt to steal the private keys of multiple users.

d) An attack that tries to disrupt the network by taking down a significant number of nodes.

Answer: (a)
Detailed solution: A 51% attack occurs when a single entity or group controls more than half of the
network's mining power or staked tokens, potentially allowing them to manipulate the blockchain
and double-spend their cryptocurrency.

16. What is a smart contract in the context of blockchain?

a) A legal agreement stored on the blockchain.

b) Self-executing code with the terms of an agreement directly written into it.

c) A type of cryptocurrency designed for specific purposes.

d) A mechanism for encrypting transactions on the blockchain.

Answer: (b)

Detailed solution: Smart contracts are programs stored on the blockchain that automatically execute
predefined actions when specific conditions are met, without the need for intermediaries.

17. What is the purpose of a block explorer?

a) To mine new blocks on the blockchain.

b) To view detailed information about transactions, blocks, and addresses on a blockchain.

c) To create and manage cryptocurrency wallets.

d) To participate in the network's consensus mechanism.

Answer: (b)

Detailed solution: A block explorer is a web-based tool that allows users to publicly view and search
the history of transactions and other data on a blockchain.

18. What is the difference between a public blockchain and a private blockchain?

a) Public blockchains use encryption, while private blockchains do not.

b) Public blockchains are permissionless, while private blockchains are permissioned.

c) Public blockchains are faster than private blockchains.

d) Public blockchains are controlled by a single organization, while private blockchains are
decentralized.

Answer: (b)

Detailed solution: In a public blockchain, anyone can participate in the network (read, write, and
audit). In a private blockchain, access and participation are restricted to authorized entities.

19. What is a hard fork in a blockchain?

a) A temporary disruption of the network.

b) A radical change to the blockchain's protocol that creates a new, separate blockchain.

c) A minor update to the blockchain's software that is backward-compatible.

d) An attack on the blockchain network.


Answer: (b)

Detailed solution: A hard fork is a significant protocol upgrade that is not backward-compatible.
Nodes running the old software will not be able to validate transactions on the new chain, leading to
a split in the blockchain.

20. What is a soft fork in a blockchain?

a) A radical change to the blockchain's protocol that creates a new, separate blockchain.

b) A temporary disruption of the network.

c) A backward-compatible software upgrade to the blockchain protocol.

d) An attack on the blockchain network.

Answer: (c)

Detailed solution: A soft fork is a change to the blockchain's protocol that is backward-compatible.
Nodes that have not upgraded can still validate transactions on the new version of the blockchain.

Consensus Mechanisms

21. What is the primary goal of a consensus mechanism in a blockchain network?

a) To speed up transaction processing times.

b) To achieve agreement among distributed nodes on the state of the blockchain.

c) To reduce the energy consumption of the network.

d) To encrypt the data stored on the blockchain.

Answer: (b)

Detailed solution: Consensus mechanisms ensure that all participants in a decentralized network
agree on which transactions are valid and the order in which they are added to the blockchain.

22. In Proof of Stake (PoS), how are validators typically chosen to create new blocks?

a) Based on their computational power.

b) Based on the amount of cryptocurrency they have staked.

c) Based on how quickly they can solve cryptographic puzzles.

d) Chosen randomly by the network.

Answer: (b)

Detailed solution: In PoS, validators are selected to propose and validate new blocks based on the
amount of cryptocurrency they have locked up as stake.

23. What is "slashing" in the context of Proof of Stake (PoS)?

a) The process of combining multiple small transactions into a larger one.

b) The penalty for validators who act maliciously or fail to properly validate transactions, resulting in
the loss of a portion of their staked cryptocurrency.
c) A technique used to increase the transaction throughput of a blockchain.

d) The reward given to validators for successfully proposing a new block.

Answer: (b)

Detailed solution: Slashing is a security mechanism in PoS that discourages dishonest behavior by
penalizing validators who violate the network's rules.

24. Which of the following is a key advantage of Proof of Stake (PoS) over Proof of Work (PoW)?

a) Higher transaction throughput.

b) Lower energy consumption.

c) Increased anonymity for participants.

d) More complex cryptographic security.

Answer: (b)

Detailed solution: PoS is generally much more energy-efficient than PoW because it doesn't require
massive computational power for mining.

25. What is a "Byzantine Fault" in the context of distributed systems and consensus?

a) A temporary network outage.

b) A condition where a component in a distributed system can fail in arbitrary ways, including
producing incorrect or conflicting information to different nodes.

c) A situation where too many transactions are being processed simultaneously.

d) A type of cryptographic attack.

Answer: (b)

Detailed solution: Byzantine Faults are the most difficult type of failure to handle in distributed
systems because faulty nodes can behave unpredictably.

26. Which consensus mechanism is known for its high transaction throughput and low latency,
often used in permissioned blockchains?

a) Proof of Work (PoW)

b) Proof of Stake (PoS)

c) Practical Byzantine Fault Tolerance (PBFT)

d) Delegated Proof of Stake (DPoS)

Answer: (c)

Detailed solution: PBFT is a consensus algorithm designed to tolerate Byzantine faults and is often
used in environments where participants are known and trusted to some extent, allowing for higher
performance.

27. In Delegated Proof of Stake (DPoS), how are block producers (validators) selected?
a) Directly proportional to the amount of cryptocurrency they stake.

b) By solving complex cryptographic puzzles.

c) By a voting process where token holders elect delegates.

d) Randomly by the network protocol.

Answer: (c)

Detailed solution: DPoS relies on a system where token holders vote for a set of delegates who are
then responsible for validating transactions and creating new blocks.

28. What is the "nothing-at-stake" problem associated with some Proof of Stake (PoS) systems?

a) The risk of validators losing all their staked cryptocurrency due to network failures.

b) The potential for validators to vote on multiple conflicting versions of the blockchain without any
significant economic risk.

c) The difficulty in attracting a sufficient number of validators to secure the network.

d) The increased computational resources required to run a PoS node compared to a PoW node.

Answer: (b)

Detailed solution: The nothing-at-stake problem arises because, in some naive PoS designs, validators
might have no incentive to vote honestly on only one chain, as they could potentially gain rewards on
multiple forks without losing their stake on any of them.

29. Which consensus mechanism is used by the Bitcoin network?

a) Proof of Stake (PoS)

b) Proof of Work (PoW)

c) Delegated Proof of Stake (DPoS)

d) Practical Byzantine Fault Tolerance (PBFT)

Answer: (b)

Detailed solution: Bitcoin was the first widely adopted cryptocurrency and utilizes the Proof of Work
consensus mechanism.

30. What is the "difficulty" in the context of Bitcoin's Proof of Work?

a) The amount of computational power a miner possesses.

b) A measure of how hard it is to find a new block hash that meets the target.

c) The number of transactions included in a block.

d) The reward a miner receives for successfully mining a block.

Answer: (b)

Detailed solution: The difficulty adjusts periodically to maintain a consistent block creation rate. It
determines the number of leading zeros required in the hash of a new block.
Distributed Systems & Blockchain Principles

31. What is a distributed ledger?

a) A central database replicated across multiple servers.

b) A database that is replicated and shared across a network of computers.

c) An encrypted file containing financial transactions.

d) A type of software used for managing digital assets.

Answer: (b)

Detailed solution: A distributed ledger is a database that is spread across multiple sites, regions, or
participants in a network, ensuring transparency and redundancy.

32. What does immutability refer to in the context of blockchain?

a) The ability to easily modify past transactions.

b) The property that once a transaction is recorded on the blockchain, it is extremely difficult to alter
or delete.

c) The high speed at which transactions are processed.

d) The transparent nature of all transactions being publicly viewable.

Answer: (b)

Detailed solution: Immutability is achieved through cryptographic hashing and the chaining of blocks.
Each block contains the hash of the previous block, making it computationally infeasible to change
past records without invalidating all subsequent blocks.

33. What is decentralization in the context of cryptocurrencies and blockchain?

a) Storing all data on a single, secure server.

b) Distributing control and decision-making away from a central authority to a network of


participants.

c) Encrypting all transaction data to ensure privacy.

d) Making all transaction records publicly accessible.

Answer: (b)

Detailed solution: Decentralization aims to eliminate single points of failure and censorship by
distributing power and data across a network.

RSA and Cryptography

Q1. In RSA, if e=7e = 7e=7, p=5p = 5p=5, and q=17q = 17q=17, what is the value of ddd?
a) 23 b) 47 c) 103 d) 143
Answer: a) 23
φ(n) = (5−1)(17−1) = 4×16 = 64. Find d such that ed≡1mod 64ed ≡ 1 \mod 64ed≡1mod64 → d=23d =
23d=23
Q2. Which of the following ensures integrity in a secure communication?
a) Encryption b) Hashing c) Key Exchange d) Public Key
Answer: b) Hashing

Q3. In public key encryption, which key is used for decryption?


a) Sender’s public key
b) Sender’s private key
c) Receiver’s public key
d) Receiver’s private key
Answer: d) Receiver’s private key

Digital Signatures & Non-Repudiation

Q4. A digital signature is created using:


a) Sender’s public key
b) Receiver’s private key
c) Sender’s private key
d) Receiver’s public key
Answer: c) Sender’s private key

Q5. Non-repudiation means:


a) Only the receiver can deny a transaction
b) Only the sender can deny a transaction
c) The sender cannot deny a transaction
d) Anyone can deny a transaction
Answer: c) The sender cannot deny a transaction

Q6. What is verified using the sender’s public key in digital signatures?
a) Encryption
b) Signature
c) Message
d) Key exchange
Answer: b) Signature

Blockchain & Hash Pointers

Q7. Each block in a blockchain contains:


a) Block height only
b) Transaction timestamp only
c) Hash of previous block
d) Next block’s hash
Answer: c) Hash of previous block

Q8. Hash pointers in blockchain ensure:


a) Block size control
b) Confidentiality
c) Data integrity and linking
d) Random access
Answer: c) Data integrity and linking

Q9. In a Merkle tree, the leaf nodes represent:


a) Previous block hashes
b) Timestamps
c) Transaction hashes
d) Nonce values
Answer: c) Transaction hashes

Merkle Trees

Q10. Which traversal is used to verify integrity in a Merkle Tree?


a) In-order
b) Level-order
c) Post-order
d) Pre-order
Answer: c) Post-order

Q11. In Merkle Trees, hashes are:


a) Only at the root
b) Stored in leaf nodes
c) Stored at all internal and leaf nodes
d) Stored outside the tree
Answer: c) Stored at all internal and leaf nodes

Consensus & Proof-of-Work

Q12. Bitcoin’s consensus mechanism is:


a) PBFT b) Proof of Work c) Proof of Stake d) Hashgraph
Answer: b) Proof of Work

Q13. What is the main role of consensus in blockchain?


a) Increase transaction speed
b) Reduce size of the blockchain
c) Ensure agreement on a common state
d) Ensure faster encryption
Answer: c) Ensure agreement on a common state

Q14. What does a miner do in PoW consensus?


a) Stores blocks
b) Approves all users
c) Solves a computational puzzle
d) Signs smart contracts
Answer: c) Solves a computational puzzle

Q15. What motivates miners to participate in Bitcoin?


a) Free storage
b) Block reward and transaction fee
c) Government grant
d) Random bonus
Answer: b) Block reward and transaction fee

Q16. Safety in distributed consensus means:


a) All nodes have internet
b) No two nodes agree
c) No conflicting transactions occur
d) All nodes run at same speed
Answer: c) No conflicting transactions occur

Q17. Liveness in a consensus algorithm ensures:


a) Agreement on invalid transactions
b) System eventually progresses
c) Transaction speed is always constant
d) Same power to all nodes
Answer: b) System eventually progresses

Bitcoin Specific

Q18. What type of network does Bitcoin use?


a) Centralized
b) Peer-to-Peer
c) Tree-based
d) Star topology
Answer: b) Peer-to-Peer

Q19. Which of the following prevents double-spending in Bitcoin?


a) Timestamps
b) Signatures
c) Consensus mechanism
d) Network delay
Answer: c) Consensus mechanism

Q20. In Bitcoin, who verifies a block?


a) Banker
b) All users
c) Miner
d) Government node
Answer: c) Miner

Security and Trust

Q21. A blockchain network is tamper-resistant due to:


a) Peer reviews
b) Private cloud storage
c) Hash linking of blocks
d) Digital watermarks
Answer: c) Hash linking of blocks

Q22. What does a 51% attack compromise?


a) Network speed
b) Encryption standard
c) Consensus integrity
d) Node hardware
Answer: c) Consensus integrity

Q23. In blockchain, Sybil attack refers to:


a) Generating multiple fake identities
b) Encrypting messages
c) Exchanging keys
d) Random block validation
Answer: a) Generating multiple fake identities

Cryptocurrency Principles

Q24. Which of these is not a feature of blockchain?


a) Transparency
b) Immutability
c) Central authority
d) Decentralization
Answer: c) Central authority

Q25. The transparency of blockchain allows:


a) Everyone to change data
b) Hidden records
c) Public view of transactions
d) Fast encryption
Answer: c) Public view of transactions

Q26. In cryptocurrency, what helps reduce trust requirements among participants?


a) Email verification
b) Cryptographic proofs
c) Central administrators
d) Cloud backups
Answer: b) Cryptographic proofs

Hashing & Encryption

Q27. SHA-256 is primarily used for:


a) Key exchange
b) Symmetric encryption
c) Hashing data
d) Message broadcasting
Answer: c) Hashing data
Q28. Which property of a hash function prevents small input changes from producing similar
outputs?
a) Determinism
b) Collision resistance
c) Avalanche effect
d) Uniformity
Answer: c) Avalanche effect

Q29. Which encryption is used in Bitcoin addresses?


a) DES
b) AES
c) Base58Check encoding
d) Triple-DES
Answer: c) Base58Check encoding

Advanced Concepts

Q30. Which of the following best describes a soft fork?


a) Backward-incompatible upgrade
b) Miner removal
c) Hardcoded block size
d) Backward-compatible rule tightening
Answer: d) Backward-compatible rule tightening

Q31. What is the smallest unit of Bitcoin called?


a) Millibit
b) Satoshi
c) Bit
d) BTCi
Answer: b) Satoshi

Q32. Which of these can lead to blockchain forking?


a) High gas fees
b) Non-deterministic hashing
c) Simultaneous valid blocks
d) DNS errors
Answer: c) Simultaneous valid blocks

You might also like