0% found this document useful (0 votes)
37 views18 pages

First Two Units

Blockchain is a decentralized digital ledger that securely records transactions in linked blocks using cryptography, allowing for the transfer of assets without intermediaries. It ensures transparency, immutability, and security through consensus mechanisms and cryptographic hashing. Key applications include cryptocurrencies, supply chain management, and secure voting systems, while challenges include scalability and regulatory issues.

Uploaded by

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

First Two Units

Blockchain is a decentralized digital ledger that securely records transactions in linked blocks using cryptography, allowing for the transfer of assets without intermediaries. It ensures transparency, immutability, and security through consensus mechanisms and cryptographic hashing. Key applications include cryptocurrencies, supply chain management, and secure voting systems, while challenges include scalability and regulatory issues.

Uploaded by

marsmercury9999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Blockchain

A blockchain is a continuously growing list of records, called blocks,


which are linked and secured using cryptography

Blockchain is used for the secure transference of items like money,


contracts, property rights, stocks, and even networks without any
requirement of Third-Party Intermediaries like Governments, banks, etc.

[Link] :“hello everyone”


[Link] Hash:23432FRT123
[Link] :123FFRE342

BLOCKCHAIN
Blockchain

 Blockchain is simply a data structure where each block is


linked to another block in a time- stamped chronological order
 It is a distributed digital ledger of an immutable public record
of digital transactions.
 Every new record is validated across the distributed network
before it is stored in a block.
 All information once stored on the ledger is verifiable and
auditable but not editable
 Each block is identified by its cryptographic signature.
 The first block of the blockchain is known as Genesis block
Problems with the current system

 Banks and other third parties take fees for transferring money
 Mediating costs increases transaction costs
 Minimum practical transaction size is limited;
 Financial exchanges are slow. Checking and low cost wire
services take days to complete
 System is opaque and lacks transparency and fairness
 Also, central authority in control can overuse the power and
can create money as per their own will

UNIT-1

Question 1: What is blockchain technology?


Answer: Blockchain technology is a decentralized and distributed digital ledger that records
transactions across multiple computers in a secure and transparent manner. Each transaction
is added to a block, which is linked to the previous block, forming a chain of blocks.

Question 2: Can you provide an example of blockchain technology in action?

Answer: One prominent example is Bitcoin, the first cryptocurrency. Bitcoin's blockchain
records all transactions of its digital currency, allowing participants to send and receive funds
without the need for intermediaries like banks.

Question 3: What are some key use cases for blockchain technology?

Answer:

Cryptocurrencies: Apart from Bitcoin, there are various cryptocurrencies like Ethereum,
which utilize blockchain to enable decentralized applications and smart contracts.

Supply Chain Management: Blockchain can track the origin and movement of products,
enhancing transparency and reducing fraud.

Healthcare: Patient records can be securely stored on a blockchain, allowing authorized


parties access while ensuring data privacy.

Voting Systems: Blockchain can create tamper-proof voting systems, increasing trust in
elections.

Digital Identity: Blockchain can provide secure digital identities, reducing identity theft.

Cross-Border Payments: Blockchain can facilitate fast and low-cost cross-border transactions.

Real Estate: Property ownership and transactions can be recorded on a blockchain, reducing
paperwork and fraud.

Energy Trading: Peer-to-peer energy trading can be facilitated by blockchain, allowing


consumers to trade excess energy directly.

Supply Chain Finance: Blockchain can streamline the financing of supply chains by
providing transparent and secure records.

Intellectual Property: Blockchain can establish proof of ownership and authenticity for digital
content.

Question 4: How does blockchain ensure security and immutability?


Answer: Blockchain uses cryptographic hashing to link blocks and transactions. Once a block
is added to the chain, altering it would require changing all subsequent blocks, which is
computationally infeasible. Additionally, the decentralized nature of blockchain makes it
resilient to attacks.

Question 5: What are public and private keys in blockchain?

Answer: Public and private keys are cryptographic keys used in blockchain transactions. The
public key is like an address where others can send you cryptocurrency, and the private key is
a secret code that allows you to access and control the cryptocurrency associated with that
address.

Question 6: What is a smart contract? Provide an example.

Answer: A smart contract is a self-executing contract with predefined rules. An example is a


flight insurance smart contract. If a flight is delayed beyond a certain time, the smart contract
automatically triggers a payment to the insured passenger.

Question 7: How does blockchain address trust in transactions?

Answer: Blockchain achieves trust through decentralization and consensus mechanisms.


Transactions are validated by multiple nodes in the network, and once approved, they are
added to the blockchain, making it extremely difficult to alter the data.

Question 8: What is a fork in blockchain technology?

Answer: A fork in blockchain occurs when there's a split in the blockchain's protocol,
resulting in two separate paths. This can be intentional, like a software upgrade, or
unintentional due to disagreements among participants.

Question 9: What are the challenges of blockchain adoption?

Answer: Challenges include regulatory uncertainty, scalability issues, energy consumption (in
some cases), complexity for non-technical users, and interoperability between different
blockchains.

Question 10: Can you provide an example of a consortium blockchain?

Answer: The "IBM Food Trust" is a consortium blockchain involving multiple companies,
including Walmart and Nestlé. It tracks the provenance of food products to enhance
transparency and food safety.
More Questions:

Question 1: What is a blockchain?

Answer: A blockchain is a decentralized and distributed digital ledger that records


transactions across multiple computers in a secure and transparent manner. It consists of a
chain of blocks, each containing a set of transactions, linked together using cryptographic
hashes.

Question 2: How do cryptographically secure hash functions relate to the origin of


blockchain?

Answer: Cryptographically secure hash functions, developed in the 1970s, form the basis of
blockchain's security. They transform data into fixed-size hash values, ensuring data integrity.
The concept of using these functions to create a chain of blocks was popularized by Satoshi
Nakamoto's Bitcoin whitepaper in 2008.

Question 3: What is the role of Merkle trees in the foundation of blockchain?

Answer: Merkle trees, named after Ralph Merkle, are a fundamental component of
blockchain's architecture. They efficiently verify the integrity of large datasets. Data blocks
are combined using cryptographic hash functions to create a single root hash, allowing
efficient verification of specific data without needing the entire dataset.

Question 4: What are the main components of a blockchain?

Answer: The main components of a blockchain include:

1. Transactions: Individual actions or events recorded on the blockchain.

2. Blocks: Containers holding sets of transactions and references to the previous block.

3. Chain: Linked sequence of blocks, creating a chronological order.

4. Nodes: Computers participating in the blockchain network, maintaining copies of the


ledger.

5. Consensus Mechanism: Protocol ensuring agreement on transaction validity.


6. Cryptographic Hashing: Algorithms ensuring data integrity through hash values.

7. Smart Contracts: Self-executing contracts with predefined rules.

Question 5: Describe the structure of a block within a blockchain.

Answer: A block in a blockchain consists of:

 A set of transactions.

 A timestamp indicating when the block was created.

 A reference to the previous block's hash, forming the chain.

 A nonce, a random number used in the mining process. The block's hash is determined by
its content and position within the chain.

Question 6: What are the types of blockchains? Explain each type.

Answer:

 Public Blockchain: Open and decentralized, accessible to anyone. Examples include


Bitcoin and Ethereum. Allows anyone to participate, verify, and record transactions.

 Private Blockchain: Restricted access, controlled by a single entity. Used for internal
applications requiring privacy and efficiency.

 Consortium Blockchain: Shared among a group of organizations, allowing controlled


decentralization. Used in collaborative industries.

Question 7: How does a consensus protocol work in a blockchain network?

Answer: A consensus protocol ensures agreement among nodes on the validity of


transactions. Different protocols like Proof of Work, Proof of Stake, and Practical Byzantine
Fault Tolerance use varying mechanisms to achieve consensus, preventing fraudulent
transactions.

Question 8: What are some limitations and challenges of blockchain technology?


Answer: Limitations and challenges include:

1. Scalability: Difficulty in handling high transaction volumes.

2. Energy Consumption: Proof of Work can be energy-intensive.

3. Speed and Latency: Public blockchains may have slow confirmation times.

4. Regulation and Compliance: Legal challenges due to lack of clear regulations.

5. Interoperability: Difficulty in connecting different blockchains.

6. Security: Vulnerabilities in implementation or smart contracts.

7. User Experience: Complex interfaces for non-technical users.

Indirect Question:

Question 1: Imagine a scenario where a group of companies wants to collaborate on a


blockchain project while maintaining some level of control. What type of blockchain
might they choose, and why?

Answer: In this scenario, a consortium blockchain could be chosen. Consortium blockchains


offer shared control among a group of organizations, allowing them to collaborate while still
maintaining a certain level of decentralization. This type of blockchain suits collaborations
where participants trust each other but want to avoid the openness of a public blockchain.

Question 2: Consider the concept of a smart contract. How does it differ from a
traditional contract, and what benefits does it offer?

Answer: A smart contract differs from a traditional contract in that it's a self-executing
contract with predefined rules. It automatically executes when conditions are met, removing
the need for intermediaries. This not only speeds up the contract execution process but also
ensures accuracy and transparency, as actions are recorded on the blockchain.

Question 3: Picture a future where a country adopts blockchain for their voting system.
How could this technology address concerns related to transparency and tampering in
elections?

Answer: Adopting blockchain for a voting system could bring transparency by recording
encrypted votes on the blockchain. Each vote's hash would be linked to the previous one,
creating an immutable trail. This would make it incredibly difficult for any unauthorized
entity to alter votes, ensuring the integrity of the election process.

Question 4: In a world where supply chain management is plagued by counterfeit


products, how could blockchain technology provide a solution?

Answer: Blockchain could create a secure and transparent supply chain by recording each
step of a product's journey. Every time a product changes hands, its transaction would be
added to the blockchain, ensuring authenticity. This would help track the origin of products
and prevent counterfeiting.

Question 5: Imagine you're a business owner exploring blockchain for record-keeping.


What considerations might you have when choosing between a public and private
blockchain?

Answer: If data privacy is a priority and you want control over who can access your records,
a private blockchain might be suitable. On the other hand, if you're looking for transparency
and open participation, a public blockchain could provide a platform for anyone to verify
transactions.

Question 6: In a hypothetical scenario, a group of experts is working to improve


blockchain's scalability. How might they tackle the challenge of handling a high volume
of transactions per second?

Answer: The experts might explore alternative consensus mechanisms like Proof of Stake,
which consumes less energy and can process transactions faster. They could also experiment
with layer 2 solutions like the Lightning Network, which allows off-chain transactions while
still relying on the security of the main blockchain.

Question 7: Consider a scenario where blockchain is used to store and manage digital
identities. How could this technology enhance security while providing convenience to
users?

Answer: Blockchain's tamper-resistant nature ensures the security of digital identities. Each
user could have a unique digital identity stored on the blockchain, which can be verified
without revealing sensitive information. This enhances security by reducing the risk of
identity theft and simplifies user authentication processes.
Question 8: Imagine a world where blockchain-based real estate transactions are the
norm. How might this technology streamline the process of property ownership
transfer?

Answer: Blockchain could streamline real estate transactions by recording ownership changes
in a transparent and secure manner. Parties involved in the transaction would have access to
the same immutable record, reducing paperwork, minimizing fraud, and speeding up the
transfer process.

What Is A 51% Attack?


A 51% attack is an attack on a blockchain network where a single entity gains control of
more than half (51%) of its staking or computational power. This disproportionate control
allows them to implement substantial changes, contravening the decentralization principle
fundamental to the blockchain. In other words, a 51% attack gives the power to rewrite tx
history, prevent tx completion, stop rewards to validators, and double spend.

How Does A 51% Attack Work?

Diving deeper into the mechanics of a 51% attack, let’s explore the step-by-step process an
attacker follows to gain and exploit control over a blockchain network. While the exact
specifics of an attack can vary depending on several factors, here’s a simplified, general
sequence of events that typically characterizes such an attack:

1. Accumulate Power: The first step involves the attacker accumulating more than half
(51%) of the network’s computational or hashing power. This could be accomplished
by acquiring substantial hardware resources or convincing a large number of miners
to join a pool under the attacker’s control.

2. Partitioning: The attacker, now commanding a majority of the network’s hashing


power, effectively segregates their group from the main network while still
maintaining internal communication. Despite this separation, the hacking group
proceeds with mining operations but refrains from sharing their progress with the
primary network or receiving updates from it. Consequently, two parallel versions of
the blockchain start evolving independently.

3. Fast-Paced Mining: Due to their superior hashing power, the attacker’s group is able
to add blocks to their version of the blockchain faster than the rest of the network.
Over time, the difference in length between the two versions of the chain becomes
statistically proportional to the difference in hashing power between the two groups.

4. Reintegration and Dominance: Once the hacking group rejoins the network, the two
competing versions of the blockchain propagate through the entire network.
According to the consensus protocol’s rules, the nodes keep the longest blockchain,
and the shorter one is discarded. This means all the blocks added by the main network
during the separation period get orphaned, and their transactions are released back
into the Mempool.
5. Potential Threats: Upon successful execution, a 51% attack can open Pandora’s box
of threats that can significantly impact a blockchain network and its participants.
These threats range from financial fraud in the form of double-spending to outright
denial of service attacks that paralyze network functionality.

Blockchain – Proof of Work (PoW)

Purpose of PoW

The purpose of a consensus mechanism is to bring all the nodes in agreement, that is, trust
one another, in an environment where the nodes don’t trust each other.

 All the transactions in the new block are then validated and the new block is then
added to the blockchain.

 The block will get added to the chain which has the longest block height

 Miners(special computers on the network) perform computation work in solving a


complex mathematical problem to add the block to the network, hence named, Proof-
of-Work.

 With time, the mathematical problem becomes more complex.

Features of PoW

There are mainly two features that have contributed to the wide popularity of this
consensus protocol and they are:

 It is hard to find a solution to a mathematical problem.

 It is easy to verify the correctness of that solution.

How Does PoW Work?

The PoW consensus algorithm involves verifying a transaction through the mining process.
This section focuses on discussing the mining process and resource consumption during the
mining process.

Mining:

The Proof of Work consensus algorithm involves solving a computationally challenging


puzzle in order to create new blocks in the Bitcoin blockchain. The process is known as
‘mining’, and the nodes in the network that engages in mining are known as ‘miners’.
 The incentive for mining transactions lies in economic payoffs, where competing
miners are rewarded with 6.25 bitcoins and a small transaction fee.

 This reward will get reduced by half its current value with time.

Energy and Time consumption in Mining:

The process of verifying the transactions in the block to be added, organizing these
transactions in chronological order in the block, and announcing the newly mined block to
the entire network does not take much energy and time.

 The energy-consuming part is solving the ‘hard mathematical problem’ to link the
new block to the last block in the valid blockchain.

 When a miner finally finds the right solution, the node broadcasts it to the whole
network at the same time, receiving a cryptocurrency prize (the reward) provided by
the PoW protocol.

Operation of Cryptographic Hash Functions

In computing systems, hash functions are frequently used data structures for tasks like
information authentication and message integrity checks. They are not easily decipherable,
but because they can be solved in polynomial time, they are regarded as cryptographically
"weak".

Typical hash functions have been improved with security characteristics by cryptographic
hash functions, which make it more challenging to decipher message contents or recipient
and sender information.

Specifically, cryptographic hash functions display the following three characteristics −

 The hash function are called as "collision-free." As a result, no two input hashes
should be equal to the same output hash.
 They are hidden. A hash function's output should make it difficult to figure out the
input value from it.
 They should to be friendly to puzzles. The selection of an input that generates a
predetermined result needs to be difficult. As such, the input needs to be taken from
as wide as possible.
Properties of hash functions

To be a reliable cryptographic tool, the hash function should have the following
properties −

Pre-Image Resistance

 According to this feature, reversing a hash function should be computationally


difficult.

 In other words, if a hash function h generates a hash value z, it should be difficult to


identify an input value x that hashes to z.

 This feature defends against an attacker attempting to locate the input with just the
hash value.

Second Pre-Image Resistance

 This property says that given an input and its hash, it should be difficult to find
another input with the same hash.

 In other words, it should be challenging to find another input value y such that h(y)
equals h(x) if a hash function h for an input x returns the hash value h(x).

 This feature of the hash function protects against an attacker who wants to replace a
new value for the original input value and hash, but only holds the input value and its
hash.

Collision Resistance

 This feature says that it should be difficult to identify two different inputs of any
length that produce the same hash. This characteristic is also known as a collision-free
hash function.

 In other words, for a hash function h, it is difficult to identify two distinct inputs x and
y such that h(x)=h(y).

 A hash function cannot be free of collisions because it is a compression function with


a set hash length. The collision-free condition simply indicates that these collisions
should be difficult to locate.
 This characteristic makes it very hard for an attacker to identify two input values that
have the same hash.

 Furthermore, a hash function is second pre-image resistant if it is collision-resistant.

Efficiency of Operation

 Computation of h(x) for any hash function h given input x can be an easy process.

 Hash functions are computationally considerably faster than symmetric encryption.

Fixed Output Size

Hashing generates an output of a specific length, regardless of the input size, and
helps to make an output of the same size from different input sizes.

Deterministic

For a given input, the hash function consistently produces the same output, like a
recipe that always yields the same dish when followed precisely.

Fast Computation

Hashing operations occur rapidly, even for large amounts of data sets.

Types of tokens

The additional functionality of tokens is limited only by the imagination. So far,


tokens can be classified in several broad categories of use. As crypto evolves, it’s safe
to say that there will be innovative uses no one has considered. Here are some
common uses of tokens currently:

1. Utility Tokens: These tokens provide access to products or services within a specific
blockchain platform or decentralized application (DApp). For example, users may
need to acquire utility tokens to access storage space on a decentralized cloud storage
platform or to participate in decentralized finance (DeFi) services.

2. Security Tokens: These represent ownership in an underlying asset, such as shares in


a company, real estate, or other forms of investments. Security tokens are subject to
regulatory requirements and can provide investors with rights to dividends, voting, or
profit-sharing.
3. Governance Tokens: They allow holders to participate in decision-making processes
for a particular project or platform. Governance token holders can propose, discuss,
and vote on various aspects of the project, such as protocol upgrades or changes to the
platform's fee structure.

4. Non-Fungible Tokens (NFTs): Unlike other tokens, NFTs are unique and indivisible.
Each NFT represents a one-of-a-kind digital asset, such as artwork, collectibles, or
virtual real estate. NFTs have gained popularity due to their ability to provide proof of
ownership and provenance for digital assets.

Use cases for tokens

Crypto tokens open up a world of possibilities in various sectors, including but not
limited to:

1. Finance: Tokens can be used to create decentralized financial systems, such as


lending platforms, insurance services, or asset management solutions. These platforms
can offer increased efficiency, transparency, and accessibility compared to traditional
financial services.

2. Supply Chain Management: Crypto tokens can be used to track and verify the
provenance and authenticity of goods in a supply chain, ensuring transparency and
reducing the risk of counterfeit products.

3. Voting and Governance: Crypto tokens can enable secure, transparent, and
decentralized voting systems for organizations, communities, or even entire countries.

4. Entertainment: NFTs, in particular, have opened up new avenues for creators and
collectors in the world of art, music, and gaming. NFTs allow artists to sell and
monetize their work directly, while collectors can securely store, display, and trade
unique digital assets.

Hot and Cold Wallets


Internet connectivity defines a wallet in terms of hot or cold. Hot wallets are connected to the
Internet and thus are less secure and pose more risks but are user-friendly. Cold wallets, on
the other hand, are stored offline and don’t require internet connectivity. Thus, improving
security and less risk. When compared to a safe or a vault, more substantial sums of money
can be stored than that in a carry-around wallet. Hot wallets are more likely to be used for
daily transactions, and cold wallets for more long-term holdings. Hot wallets are easy to set
up, and the funds are quickly accessible. Traders conveniently use them. Cold wallets are
hack resistant, and thus the cold storage is suitable for HODLers. As a protection method,
only a small percent is stored in hot wallets while being able to trade directly from their cold
storage devices..
Hardware wallets
Hardware wallets are hardware devices that individually handle public addresses and keys. It
looks like a USB with an OLED screen and side buttons. It is a battery-less device and can be
connected to a PC and accessed by native desktop apps. It costs up to 70-150 dollars, but it is
worth it. They have received a mixed response. They are more secure than hot wallets and
user-friendlier than paper wallets but less than web and desktop wallets. They are available in
different forms and offer reasonable amounts of control. They are difficult for beginners to
use when the investment is significant. The Most popular hardware wallets are Ledger Nano
S and Trezor.
Paper Wallets
It is a physically printed QR coded form wallet. Some wallets allow downloading the code to
generate new addresses offline. They are not prone to hacks, but the number of flaws has
made them dangerous. A major flaw is not being able to send partial funds. Thus, it can’t be
reused. They used to be very popular for cold storage, but not after hardware wallets came
onto the scene. All in all, if stringent security precautions are taken, then paper wallets can be
set up.
Desktop Wallets
These are installable software packs available for operating systems and are becoming serious
with time. Anti-virus is required because a system connected to the Internet poses
fundamental security issues. Instead of keeping cryptos on an exchange, desktop wallets for
bitcoins should be used. They are the third most secure way to store cryptocurrencies and the
best method for cold storage in a completely clean system. They are easy to use, give privacy
and anonymity, and involve no third party. Regular backing up of the computer is needed.
Popular desktop wallets are Exodus, Bitcoin core, Electrum, etc.
Mobile Wallets
Mobile wallets are just like desktop wallets made for smartphones. They are quite convenient
as it uses QR codes for transactions. They are suitable for daily operations but are vulnerable
to malware infection. Encryption of mobile wallets is necessary. They are practical and can
be used on the go but open to viruses. Some mobile wallets are Coinomi and Mycelium..
Web Wallets
As the name suggests, these wallets are accessed by internet browsers. The private keys are
held in some web wallets and are prone to DDOS attacks. They can be hosted or non-hosted.
Non-hosted is preferred as funds are always in control. They are the least secure wallets.
They are not the same as hot wallets. They are ideal for small investments and allow quick
transactions. Some of these are MetaMask and Coinbase.

You might also like