0% found this document useful (0 votes)
38 views13 pages

Blockchain Notes

This document contains a quiz on blockchain concepts with multiple choice questions and answers. It covers topics like what blockchain is, how mining and consensus algorithms like proof-of-work function, components of blockchain like nodes and miners, and cryptography techniques used in blockchain like encryption and hashing. Long answer questions define concepts like proof-of-work, proof-of-stake, elliptic curve cryptography, and explain the roles of encryption and components like nodes and chains in blockchain architecture.

Uploaded by

Sujeet Kumar
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)
38 views13 pages

Blockchain Notes

This document contains a quiz on blockchain concepts with multiple choice questions and answers. It covers topics like what blockchain is, how mining and consensus algorithms like proof-of-work function, components of blockchain like nodes and miners, and cryptography techniques used in blockchain like encryption and hashing. Long answer questions define concepts like proof-of-work, proof-of-stake, elliptic curve cryptography, and explain the roles of encryption and components like nodes and chains in blockchain architecture.

Uploaded by

Sujeet Kumar
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/ 13

1

Blockchain-2022
1.What is a blockchain?
(a) Centralized digital ledger consisting of records called blocks
(b) Decentralized, distributed, digital ledger consisting of records called blocks
(c) Digital database consisting of records called class (d) Chain of laptops
Ans- b
2.Which is not a part of asymmetric encryption?
(a) Mining (b) Confusion and diffusion
(c) Public key (d) Private key
Ans- a
3.P2P stands for
(a) Peer-to-peer (b) peer-to-private
(c) peer-to-public (d) peer-to-public/private
Ans- a
4. Bitcoin is created by
(a) Prince Kumar (Chhotka wala) (b) Santoshi Nakamoto
(c) Rohan and akash (d) Dr. Sudhir kushwaha
Ans- b (except)
5.Fork in blockchain means
(a) a child process (b) a background script
(c) a split (d) None of the above
Ans- c
6.A node in blockchain environment is
(a) a type of cryptocurrency (b) a blockchain
(c) a computer on a blockchain network (d) an exchange
Ans- c
7.A cryptocurrency is stored in
(a) bank account (b) floppy disk
(c) wallet (d) your pocket
2

Ans- c
8.A miner is
(a) a type of blockchain (b) a computer program that validates and process blockchain
transactions
(c) a fast calculator (d) an algorithm with high complexity
Ans- b
9.What is a genesis block?
(a) The first block (b) The last block
(c) The most valued block (d) Block just created after the fork
Ans- a
10._____ Characteristic makes blockchain tamper-proof
(a) Cryptocurrency (b) VPN
(c) Immutability (d) All of the above
Ans- c
11.Encryption is
(a) putting data into code making it difficult to read or understand (b) jumbling data
(c) a formal language (d) a secret way of writing programs
Ans- a
12.A computer program that validates and process blockchain transaction is
(a) an adder (b) a miner
(c) a mixer (d) a manager
Ans- b
13.A hot wallet is connected to the internet
(a) True (b) False
(c) Depends on connectivity (d) Internet is not an issue for using wallet
Ans- a
14.Hash functions are used in
(a) Cryptocurrency (b) Blockchain
(c) cryptography (d) All of the above
Ans- d
3

15. ____ is not a property of hash function


(a) pre-image resistance (b) compression
(c) fixed length output (d) None of the above
Ans- b
16. ____ is a principal of data security
(a) Confidentiality (b) Masquerading
(c) confusion (d) diffusion
Ans- a
17.The value of 351 mod 5 is
(a) 1 (b) 2
(c) 3 (d) 4
Ans- 3 (Not sure)
Long Answers
1.Write short notes
(a) Proof of Work (PoW): Proof of Work is a consensus mechanism used in blockchain networks,
particularly in cryptocurrencies like Bitcoin. Miners compete to solve complex mathematical puzzles,
and the first one to solve it gets the right to add the next block to the blockchain. This process
ensures the security of the network and validates transactions. PoW requires significant
computational power and energy consumption.

(b) Proof of Stake (PoS): Proof of Stake is an alternative consensus mechanism that doesn't rely on
solving complex puzzles. Instead, validators (stakers) are chosen to create new blocks and validate
transactions based on the number of cryptocurrency tokens they "stake" or hold. PoS is energy-
efficient compared to PoW and aims to achieve consensus by rewarding those with a significant
stake in the network.

(c) Mining Incentive: Mining incentive refers to the reward miners receive for participating in the
process of validating transactions and adding new blocks to the blockchain. This incentive usually
consists of newly minted cryptocurrency coins, along with transaction fees paid by users. Mining
incentives play a crucial role in motivating miners to secure the network and maintain the
blockchain.

(d) Elliptic Curve: Elliptic curve cryptography (ECC) is a cryptographic technique that uses the
mathematics of elliptic curves to provide secure communication and digital signatures. It's widely
used in blockchain networks for creating public and private key pairs, ensuring data integrity, and
enabling secure transactions.

(e) Proof of Burn: Proof of Burn is a lesser-known consensus mechanism where participants
intentionally "burn" or destroy a certain amount of cryptocurrency tokens to demonstrate their
commitment to the network. This can give them the right to mine or validate transactions. Proof of
Burn aims to align incentives by requiring participants to invest in the network.
4

(f) Mining Pool vs. Mining Difficulty: A mining pool is a group of miners who combine their
computational power to increase the chances of solving blocks and receiving rewards. Mining
difficulty is a measure of how hard it is to find a valid block. As more miners join the network, the
difficulty increases to maintain a consistent block time.

(g) RAFT: RAFT is a consensus algorithm used in distributed systems to ensure consistency and fault
tolerance. It's not specific to blockchain but is relevant in discussions about consensus mechanisms
and network reliability.

(h) Supply-Chain Financing: Supply-chain financing is a financial arrangement where a third-party


(often a financial institution) provides financing to suppliers within a supply chain ecosystem. This
helps suppliers manage their cash flow and working capital while ensuring the smooth functioning of
the supply chain.

2.What is encryption? What is its role in blockchain?


Ans- Encryption is the process of converting information (data) into a secure and coded
form using cryptographic techniques. The primary purpose of encryption is to ensure the
confidentiality and integrity of data by making it difficult for unauthorized parties to access
or understand the original information. Encryption uses algorithms and keys to transform
data into ciphertext, which can only be reversed and understood by those who possess the
corresponding decryption key.

Encryption is used in blockchain to secure the data stored on the blockchain. The
data on the blockchain is encrypted using a variety of techniques, including
symmetric encryption, asymmetric encryption, and hashing.

• Symmetric encryption uses the same key to encrypt and decrypt the data.
This is a simple and efficient encryption technique, but it requires that both
parties have the same key.
• Asymmetric encryption uses two keys, a public key and a private key. The
public key is used to encrypt the data, and the private key is used to decrypt
the data. This is a more secure encryption technique than symmetric
encryption, but it is also more complex.
• Hashing is a technique that converts data into a unique value called a hash.
The hash cannot be reversed, so it cannot be used to decrypt the data.
Hashing is used in blockchain to secure the data by creating a hash of each
block and storing the hash in the next block. This creates a chain of hashes,
and if any data in a block is changed, the hash of the block will change. This
makes it very difficult to tamper with the data on the blockchain.

Encryption plays a critical role in blockchain security. It helps to protect the data
stored on the blockchain from unauthorized access, modification, and disclosure.

Here are some of the benefits of using encryption in blockchain:

• It can protect sensitive data from unauthorized access.


5

• It can be used to verify the authenticity of data.


• It can be used to create digital signatures.
• It can be used to create secure communications channels.
3. Name two consensus algorithms, and explain their work in brief.

Ans- Here are two consensus algorithms and a brief explanation of how they work:

• Proof of work (PoW) is a consensus mechanism that uses miners to validate


transactions and add new blocks to the blockchain. In PoW, miners compete
to solve a computationally difficult puzzle. The first miner to solve the puzzle is
rewarded with cryptocurrency and is allowed to add the next block to the
blockchain.

• Proof of stake (PoS) is a consensus mechanism that uses validators to


validate transactions and add new blocks to the blockchain. In PoS, validators
are chosen based on the amount of cryptocurrency they stake. The more
cryptocurrency a validator stakes, the more likely they are to be chosen to
validate the next block.

4. Explain the following components in blockchain architecture.

(a) Node

A node is a computer that is connected to a blockchain network. Nodes are


responsible for storing and validating the blockchain data. They also participate in
the consensus mechanism to ensure that all nodes agree on the state of the
blockchain.

(b) Chain

A chain is a series of blocks that are linked together. Each block contains a record of
transactions that have been verified by the nodes in the network. The blocks are
chained together using cryptography, which makes it very difficult to tamper with the
data in the blockchain.

(c) Miner

A miner is a node that is responsible for adding new blocks to the blockchain. Miners
do this by solving a computationally difficult puzzle. The first miner to solve the
puzzle is rewarded with cryptocurrency and is allowed to add the next block to the
blockchain.

(d) Transaction
6

A transaction is a record of an exchange of value between two parties. Transactions


are added to the blockchain by miners. Transactions are verified by the nodes in the
network to ensure that they are valid.

Here are some other components of blockchain architecture:

• Consensus mechanism: The consensus mechanism is a set of rules that are


used to ensure that all nodes in the network agree on the state of the
blockchain.
• Cryptography: Cryptography is used to secure the data in the blockchain.
Cryptography is used to encrypt the data, to generate random numbers, and
to create digital signatures.
• Wallet: A wallet is a software program that stores the private keys that are
used to access cryptocurrency.
• Smart contract: A smart contract is a computer program that is stored on the
blockchain. Smart contracts are used to automate transactions and to enforce
agreements.
5.Define blockchain ledger with its properties.
Ans- A blockchain ledger is a distributed and decentralized digital record-keeping system that uses
cryptography to secure and maintain a tamper-resistant history of transactions and data. It consists
of a series of blocks, each containing a set of transactions or other data, linked together in
chronological order through cryptographic hashes.

The properties of a blockchain ledger include:

• Immutability: Once data is added to the blockchain, it cannot be changed.


This is because each block in the blockchain contains a hash of the previous
block. If any data in a block is changed, the hash of the block will change.
This makes it very difficult to tamper with the data in the blockchain.
• Transparency: All transactions on the blockchain are public. This means that
anyone can view the ledger and see all of the transactions that have taken
place. This transparency can help to build trust and transparency in a system.
• Security: The blockchain is secured by cryptography. This means that the
data in the ledger is encrypted and cannot be accessed by unauthorized
parties.
• Scalability: The blockchain can be scaled to accommodate a large number of
transactions. This is because the blockchain is distributed across a network of
nodes.
• Decentralization: The blockchain is decentralized, which means that it is not
controlled by any single entity. This makes it more resistant to fraud and
censorship.
6.Explain how a blockchain ledger is different from an ordinary one.
7

Ans- some of the key differences between a blockchain ledger and an ordinary
ledger:

• Centralization: An ordinary ledger is typically centralized, meaning that it is


controlled by a single entity. A blockchain ledger is decentralized, meaning
that it is not controlled by any single entity.
• Transparency: An ordinary ledger is typically not transparent, meaning that
only authorized users can view the data. A blockchain ledger is transparent,
meaning that anyone can view the data.
• Immutability: An ordinary ledger can be changed, but a blockchain ledger is
immutable, meaning that it cannot be changed once data is added to it.
• Security: An ordinary ledger can be vulnerable to fraud and errors, but a
blockchain ledger is more secure because it is encrypted and distributed
across a network of nodes.
• Scalability: An ordinary ledger can be difficult to scale to accommodate a
large number of transactions, but a blockchain ledger can be scaled more
easily.
7.Explain what are smart contracts and why they are advantageous.

Ans- A smart contract is a computer program that is stored on a blockchain. It is used


to automate transactions and to enforce agreements. Smart contracts are
advantageous because they can:

• Automate transactions: Smart contracts can automate transactions, which can


save time and money. For example, a smart contract could be used to
automate the purchase of a house. Once the buyer and seller agree on the
terms of the sale, the smart contract would automatically execute the
transaction.
• Enforce agreements: Smart contracts can enforce agreements, which can
help to reduce fraud and errors. For example, a smart contract could be used
to enforce a loan agreement. If the borrower does not make their payments on
time, the smart contract could automatically trigger a default clause.
• Reduce intermediaries: Smart contracts can reduce the need for
intermediaries, which can save money. For example, a smart contract could
be used to facilitate a peer-to-peer transaction. This would eliminate the need
for a third party, such as a bank or a lawyer.
• Increase transparency: Smart contracts are transparent, which means that
anyone can view the code. This can help to build trust and transparency in a
system.
• Be tamper-proof: Smart contracts are tamper-proof, which means that they
cannot be changed once they are deployed. This makes them a more secure
way to store data and execute transactions.
8. Define encryption. Explain how encryption provides confidentiality.

Ans- Look Q2.


8

Encryption provides confidentiality by making the data unreadable to unauthorized


parties. This is because the data is scrambled using a mathematical algorithm, and
the decryption key is necessary to unscramble the data. Without the decryption key,
the data is essentially gibberish.

Here are some examples of how encryption is used to provide confidentiality:

• Banking: Encryption is used to protect financial data, such as credit card


numbers and bank account information.
• Government: Encryption is used to protect classified information, such as
military secrets and diplomatic cables.
• Healthcare: Encryption is used to protect patient data, such as medical
records and test results.
• Ecommerce: Encryption is used to protect credit card numbers and other
personal information when shopping online.
• Email: Encryption is used to protect email messages from being intercepted
by unauthorized parties.
9.Differentiate between plaintext, cleartext and ciphertext with diagrams.

Ans- Here are the differences between plaintext, cleartext, and ciphertext:

• Plaintext: Plaintext is the original form of data before it is encrypted. It is the


data that is readable and understandable by humans.
• Ciphertext: Ciphertext is the encrypted form of plaintext. It is the data that is
unreadable and unintelligible by humans without the decryption key.
• Cleartext: Cleartext is a term that is sometimes used interchangeably with
plaintext, but it can also refer to unencrypted data that is not intended to be
kept secret.

Here is a table that summarizes the differences between plaintext, cleartext, and
ciphertext:

Feature Plaintext Ciphertext Cleartext

Unencrypted data
Meaning Unencrypted data Encrypted data that is not intended to
be kept secret

Not human-
Readability Human-readable Human-readable
readable
9

Not intelligible
Intelligibility Intelligible to humans Intelligible to humans
to humans

Data that is intended Data that is Data that is not


Intended
to be read and intended to be intended to be kept
use
understood by humans kept secret secret

10.What do you mean by hashing? With the help of a neat diagram, explain SHA-256 algorithm.

Ans- In cryptography, hashing is a process that converts data of any size into a fixed-
size string of characters. The resulting string is called a hash value, or simply a hash.
Hashing is used to verify the authenticity and integrity of data, and to create digital
signatures.

The SHA-256 algorithm is a cryptographic hash function that produces a 256-bit


hash value. It is one of the most secure hash functions in use today, and it is used in
a variety of applications, including Bitcoin, Ethereum, and other cryptocurrencies.

The SHA-256 algorithm takes an input of any size and produces an output of 256
bits. The input is divided into blocks of 512 bits, and each block is processed through
a series of mathematical operations. The output of each operation is then used as
the input for the next operation. This process is repeated 64 times, and the final
output is the hash value.

The SHA-256 algorithm is a one-way function, which means that it is impossible to


reverse the process and recover the original input from the hash value. This makes it
very secure for verifying the authenticity and integrity of data.

Here are some of the properties of SHA-256:

• It is a one-way function, which means that it is impossible to reverse the


process and recover the original input from the hash value.
• It is collision-resistant, which means that it is extremely difficult to find two
inputs that produce the same hash value.
• It is preimage-resistant, which means that it is extremely difficult to find the
original input given the hash value.
10

The SHA-256 algorithm is a secure and versatile hash function that is used in a
variety of applications. It is a critical component of many security systems, and it is
likely to remain in use for many years to come.

11. Explain a bitcoin transaction with the help of flowchart.

Ans- A Bitcoin transaction is a transfer of bitcoins from one Bitcoin address to


another. A Bitcoin address is a string of characters that identifies a Bitcoin wallet.

A Bitcoin transaction is made up of the following components:

• Source address: The Bitcoin address that is sending the bitcoins.


• Destination address: The Bitcoin address that is receiving the bitcoins.
• Amount: The amount of bitcoins that are being transferred.
• Signature: A digital signature that is used to verify the authenticity of the
transaction.
• Nonce: A random number that is used to prevent double-spending.

The signature is created using the private key of the sender's Bitcoin wallet. The
nonce is used to ensure that the transaction is unique.

To send a Bitcoin transaction, the sender must first create a transaction object. The
transaction object contains the source address, destination address, amount,
signature, and nonce. The sender then broadcasts the transaction to the Bitcoin
network.

Once the transaction is broadcast, it is added to a pool of pending transactions.


Miners then select transactions from the pool and add them to blocks. Blocks are
added to the blockchain, which is a public ledger of all Bitcoin transactions.

Once a transaction is added to a block, it is considered to be confirmed. Confirmed


transactions cannot be reversed.
11

12. Define the role of Merkle tree In blockchain.

Ans- A Merkle tree, also known as a hash tree, plays a crucial role in the structure and
security of a blockchain. It is a hierarchical data structure that is used to efficiently
organize and verify the integrity of large amounts of data, such as transactions,
within a blockchain. The Merkle tree is named after its inventor, Ralph Merkle.

The primary role of a Merkle tree in a blockchain is to provide a secure and efficient
way to verify the consistency and authenticity of data stored within a block. Here's
how it works:

1. Data Organization:
• In a blockchain, a block contains multiple transactions or data records.
• The transactions are grouped together in pairs, and the cryptographic
hash of each pair is computed.
2. Hash Pairing and Tree Structure:
• The computed hashes are then paired together and hashed again to
form a new set of hashes.
• This process is repeated iteratively until a single hash, known as the
"root hash" or "Merkle root," is obtained at the top of the tree.
3. Verification of Data Integrity:
• The Merkle root hash is included in the header of the block.
• When a user or node wants to verify the integrity of a specific
transaction, they only need to request and verify the relevant branches
12

of the Merkle tree, rather than downloading and verifying the entire
block.
• This optimization allows for efficient verification of data integrity.
4. Security and Tamper Detection:
• If any individual transaction is altered or tampered with, it would result
in a change in the hash value of the corresponding leaf node in the
Merkle tree.
• This change would propagate up the tree, affecting the hashes at
higher levels, including the Merkle root.
• As a result, any tampering can be quickly detected by comparing the
recalculated Merkle root with the one stored in the block's header.
5. Space Efficiency:
• The Merkle tree enables efficient storage of a large number of
transactions within a block.
• By using hashes, the tree reduces the amount of data that needs to be
stored, improving space efficiency.

13. Explain how a blockchain ledger works?

Ans- A blockchain ledger is a digital record-keeping system that operates through a


decentralized and distributed network of computers, known as nodes. It uses
cryptographic techniques and consensus mechanisms to ensure the security,
transparency, and immutability of recorded data. Here's how a blockchain ledger
works:

1. Decentralization and Nodes:


• A blockchain ledger is not controlled by a single entity. Instead, it is
maintained by a network of nodes, each of which has a copy of the
entire blockchain.
2. Data Structure:
• A blockchain consists of a chain of blocks, each containing a set of
transactions or data. Each block contains a unique cryptographic hash
of the previous block, creating a continuous, linked structure.
3. Transactions:
• Participants on the network initiate transactions, which involve the
transfer of digital assets or data. These transactions are grouped
together in a block.
4. Verification and Consensus:
• Transactions are verified by nodes on the network. Depending on the
consensus mechanism (e.g., Proof of Work or Proof of Stake), nodes
compete to solve cryptographic puzzles or reach agreement on the
validity of transactions.
5. Mining (Proof of Work):
13

• In Proof of Work (PoW) consensus, miners compete to solve complex


mathematical puzzles. The first miner to solve the puzzle adds the block
to the blockchain. This process involves significant computational
power and energy consumption.
6. Validation (Proof of Stake):
• In Proof of Stake (PoS) consensus, validators are chosen based on the
amount of cryptocurrency they "stake" as collateral. Validators verify
and add transactions to the blockchain without solving puzzles.
7. Block Addition and Linking:
• Once a block is verified, it is added to the blockchain. The new block's
hash is included in the subsequent block, forming a secure and tamper-
evident chain.
8. Immutability:
• Each block's hash is based on the data in the block and the hash of the
previous block. Changing any data in a block would require changing
subsequent blocks, making tampering practically impossible due to the
computational effort required.
9. Consensus Mechanism:
• Consensus mechanisms ensure that a majority of nodes agree on the
state of the blockchain. This prevents malicious actors from altering the
blockchain and maintains trust.
10. Transparency:
All participants can view the contents of the blockchain. This transparency
enhances accountability and trust among network members.

You might also like