Blockchain Unit3
Blockchain Unit3
Bitcoin protocol
The Bitcoin protocol is the set of rules that govern the functioning of Bitcoin. Its key components and
principles are: a peer-to-peer decentralized network with no central oversight;
the blockchain technology, a public ledger that records all Bitcoin transactions; mining and proof of
work, the process to create new bitcoins and verify transactions; and cryptographic security.
Users broadcast cryptographically signed messages to the network using Bitcoin cryptocurrency
wallet software. These messages are proposed transactions, changes to be made in the ledger. Each
node has a copy of the ledger's entire transaction history. If a transaction violates the rules of the
Bitcoin protocol, it is ignored, as transactions only occur when the entire network reaches a consensus
that they should take place. This "full network consensus" is achieved when each node on the network
verifies the results of a proof-of-work operation called mining. Mining packages groups of transactions
into blocks, and produces a hash code that follows the rules of the Bitcoin protocol. Creating this hash
requires expensive energy, but a network node can verify the hash is valid using very little energy. If a
miner proposes a block to the network, and its hash is valid, the block and its ledger changes are added
to the blockchain, and the network moves on to yet unprocessed transactions. In case there is a
dispute, then the longest chain is considered to be correct. A new block is created every 10 minutes, on
average.
Changes to the Bitcoin protocol require consensus among the network participants. The Bitcoin
protocol has inspired the creation of numerous other digital currencies and blockchain-based
technologies, making it a foundational technology in the field of cryptocurrencies.
10 Blockchain Protocols to Know
For ease and comfort, our experts have researched the top ten blockchain protocols you need to know.
Below is a list of the blockchain protocols we have gathered from the best crypto education
resources worldwide.
1. Smart Contract & Ethereum
Ethereum is the second largest cryptocurrency according to world market capitalization, and we often
refer to it as the “world computer.” The Ethereum network is designed as a decentralized platform for
building and running applications, focusing on smart contracts.
A smart contract is a self-executing system that helps to settle agreements between buyer and seller
available in lines of code. This scene means the contract can automatically execute when the platform
meets certain conditions without intermediaries.
Ethereum has several features that make it an attractive platform for developers. For example, it has a
built-in programming language called Solidity, making it easy for developers to write smart contracts.
Additionally, the designs of the Ethereum network are scalable. It can handle many transactions per
second, making it ideal for decentralized applications requiring large amounts of data.
Bitcoin is the largest crypto available according to market capitalization and is often considered the
“gold standard” of cryptocurrencies. The Bitcoin network is a decentralized digital currency and peer-
to-peer payment system that allows users to send and receive payments without intermediaries.
One of the critical features of the Bitcoin network is its decentralized nature, which means that any
single entity does not control it. This offer provides a high level of security and makes it difficult for
governments or other organizations to interfere with transactions. Additionally, the Bitcoin network
uses a proof-of-work consensus mechanism, which requires participants to contribute computational
power to validate transactions and secure the network.
3. Proof-of-stake Consensus Mechanism in Binance Smart Chain
Binance Smart Chain (BSC) is a high-performance blockchain network launched by Binance, one of the
largest cryptocurrency exchanges in the world. The Binance Smart Chain is designed for decentralized
applications and enables fast and low-cost transactions.
One of the critical features of the Binance Smart Chain is its scalability, which allows it to handle a
large number of transactions within a short period of time. This system makes it an ideal platform for
decentralized applications requiring a high volume of data. Additionally, Binance Smart Chain uses a
proof-of-stake consensus mechanism. However, this system makes the network more energy-efficient
than the usual proof-of-work mechanism used by Bitcoin.
One of the critical features of Cardano is its focus on sustainability, which means that it is designed to
be energy-efficient and have a low carbon footprint. Additionally, Cardano uses a modular architecture
that allows it to be upgraded and improved over time, making it a future-proof platform for
decentralized applications.
Polkadot is a multi-chain network that enables interoperability between different blockchain systems.
This network means that developers can build decentralized applications to communicate and transfer
data between other blockchains, making it possible to create more complex and interconnected
applications. In addition, Polkadot enables the transfer of assets and information between different
blockchains and provides a shared security model for all connected chains.
Solana is a fast and scalable blockchain protocol designed for decentralized finance applications.
Solana uses a unique consensus algorithm, Solana Proof of Stake (PoS), which enables it to process
thousands of transactions per second. Solana strongly focuses on developer adoption and provides
several tools and resources to help developers build on the platform.
Chainlink is a Bitcoin-like oracle network that is capable of supplying real-world data to smart
contracts. Chainlink enables smart contracts to access data from external sources, such as stock prices,
weather data, etc. This link allows the creation of decentralized applications that can interact with the
real world, making it possible to create a wide range of new decentralized applications.
Cosmos is a decentralized network with independent blockchains that enables the transfer of assets
and information between different blockchains. Cosmos provides a shared security model for all
connected chains and offers fast and secure transactions. Cosmos strongly focuses on scalability and
interoperability, making it a popular choice for decentralized exchanges and DeFi projects.
TRON is a decentralized platform that enables the creation of smart contracts and decentralized
applications. TRON has its cryptocurrency, TRONix (TRX), used to pay transaction fees and
computational services within the network.
TRON’s strong focus on the entertainment industry provides a platform for content creators to publish,
store, and monetize their digital content. TRON also has a large and active community, and it has
partnerships with several well-known companies in the entertainment industry.
10. Proof of Stake & Hive (HIVE)
Hive is a blockchain protocol with designs similar to decentralized social media applications. Hive
provides fast and secure transactions and has a large and active community of content creators and
curators. Hive is known for its focus on society and a strong culture of collaboration and engagement.
Finally, these top ten recommended blockchain protocols represent a diverse range of use cases and
technologies, impacting the world of decentralized systems. Each protocol has unique strengths and
weaknesses, and it is up to developers and users to determine which protocols best suit their need
Symmetric-key cryptography
Cryptography in Blockchain
Cryptography
Cryptography is a technique or a set of protocols that secure information from any third party during
a process of communication. It is also made up of two Greek terms, Kryptos term meaning “hidden”
and Graphein, a term meaning “to write”. Some terminologies related to Cryptography:
Encryption: Conversion of normal text to a random sequence of bits.
Key: Some amount of information is required to get the information of the cryptographic
algorithm.
Decryption: The inverse process of encryption, conversion of a Random sequence of bits to
plaintext.
Cipher: The mathematical function, i.e. a cryptographic algorithm which is used to convert
plaintext to ciphertext(Random sequence of bits).
Types of Cryptography
Symmetric Cryptography
2. Asymmetric-key Encryption : This cryptographic method uses different keys for the encryption
and decryption process. This encryption method uses public and private key methods. This public
key method help completely unknown parties to share information between them like email id.
private key helps to decrypt the messages and it also helps in the verification of the digital signature.
The mathematical relation between the keys is that the private key cannot be derived from the
public key, but the public key can be derived from the private key. Example: ECC,DSS etc.
Features:
It is also known as Public-key cryptography.
It is often used for sharing secret keys of symmetric cryptography.
It requires a long processing time for execution.
Plays a significant role in website server authenticity.
Asymmetric Cryptography
Blockchain technology is one of the greatest innovations of the 21st century. In this article, we will
focus on the concept of cryptography i.e. public-key cryptography or Asymmetric key cryptography.
Most of the time blockchain uses public-key cryptography, also known as asymmetric-key
cryptography. Public key cryptography uses both public key and private key in order to encrypt and
decrypt data. The public key can be distributed commonly but the private key can not be shared with
anyone. It is commonly used for two users or two servers in a secure way.
Public Key: Public keys are designed to be public. They can be freely given to everyone or posted on
the internet. By using the public key, one can encrypt the plain text message into the cipher text. It is
also used to verify the sender authentication. In simple words, one can say that a public key is used
for closing the lock.
Private Key: The private key is totally opposite of the public key. The private key is always kept
secret and never shared. Using this key we decrypt cipher text messages into plain text. In simple
words, one can say that the private key is used for opening the lock.
In symmetric-key cryptography, a single key is used to encrypt and decrypt the message. Here,
the possibility of data loss or unauthorized access to data is high. To overcome the unauthorized
access of data and data sent securely without any loss, we use public-key cryptography.
Public-key cryptography is more secure than symmetric-key cryptography because the public
key uses two keys to encrypt and decrypt the data
Public-key cryptography allows users to hide the data that they want to send. The sender
encrypts the data and the receiver decrypts the data. The encrypted message is not understood
by unauthorized users.
Suppose, the sender wants to send some important message to the receiver.
The sender first creates a message in the form of plain text which is in a readable format.
The sender knows the public key of the receiver but doesn’t know the private key of the receiver
because the receiver keeps secret his private key. With the help of the public key of the receiver
and the private key of the sender, the sender generates the encrypted message i.e. called cipher
text. Cipher text is in an unreadable format. In this step, plain text converts into cipher text.
Now, cipher text reaches the receiver end. The receiver knows its own private key, and with the
help of the private key receiver converts the cipher text into readable format i.e. plain text.
The below example shows the working of public-key cryptography.
Let us try to under the working of public-key cryptography with an example. Suppose Sachin is the
sender who wants to send a message to Anurag. Here Anurag is the receiver.
Sachin uses Anurag’s public key to encrypt the message and Anurag uses his own private key to
decrypt the message.
First Sachin creates plain text. Sachin has access to Anurag’s private key and cipher text. Using
Anurag’s public key and his own public key,
Sachin will generate an encrypted message i.e. cipher text which is in an unreadable format. After
applying the encryption process plain text converts into cipher text.
Now, Anurag receives a cipher text. First Anurag will decrypt the cipher text message into a
readable format. For decrypting Anurag will use the private key. Now cipher text converts into
plain text and is readable by the receiver. Because Sachin keeps his private key, Anurag knows
that this message couldn’t have come from anyone else. This is also called a digital signature.
Authentication: It ensures to the receiver that the data received has been sent by the only
verified sender.
Data integrity: It ensures that the information and program are changed only in a specific and
authorized manner.
Data confidentiality: It ensures that private message is not made available to an unauthorized
user. It is referred to as privacy or secrecy.
Non-repudiation: It is an assurance that the original creator of the data cannot deny the
transmission of the said data to a third party.
Key management: Public-key cryptography allows for secure key management, as the private
keys are never transmitted or shared. This eliminates the need for a secure channel to transmit
the private key, as is required in symmetric key cryptography.
Digital signatures: Public-key cryptography allows for the creation of digital signatures, which
provide non-repudiation and can be used to verify the authenticity and integrity of data.
Key exchange: Public-key cryptography enables secure key exchange between two parties,
without the need for a pre-shared secret key. This allows for secure communication even if the
parties have never communicated before.
Secure communication: Public-key cryptography enables secure communication over an
insecure channel, such as the internet, by encrypting the data with the public key of the recipient,
which can only be decrypted by the recipient’s private key.
Versatility: Public-key cryptography can be used for a variety of purposes, such as secure
communication, digital signatures, and authentication, making it a versatile tool for securing data
and communications.
One can encrypt and decrypt the fixed size of messages or data. If there is an attempt to encrypt
or decrypt a large size of the message then the algorithm demands high computational power.
The main disadvantage of this algorithm is that if the receiver losses its private key then
data/message will be lost forever.
If someone has access private key then all data will be in the wrong hand.
There are many secret-key which is faster than public-key cryptography.
Key distribution: The process of securely distributing public keys to all authorized parties can
be difficult and time-consuming, especially in large networks.
Performance: Public-key cryptography is generally slower than symmetric-key cryptography
due to its more complex algorithms, making it less suitable for applications that require fast
processing speeds.
Security assumptions: Public-key cryptography relies on mathematical assumptions about the
difficulty of certain problems, such as factoring large numbers, which may not hold true in the
future. As a result, public-key cryptography is vulnerable to future advancements in computing
power and algorithmic breakthroughs.
Susceptibility to man-in-the-middle attacks: Public-key cryptography is vulnerable to man-in-
the-middle attacks where an attacker intercepts and alters the public key before it reaches the
intended recipient. This can result in the attacker being able to decrypt the message or
impersonate the sender.
Complexity: Public-key cryptography can be more complex to understand and implement than
symmetric-key cryptography, requiring specialized knowledge and expertise.
A digital signature is a mathematical scheme that is used to verify the integrity and authenticity of
digital messages and documents. It may be considered as a digital version of the handwritten
signature or stamped seal. The digital signatures use asymmetric cryptography i.e. also known as
public key cryptography.
A low-trust society is defined as one in which interpersonal trust is relatively low, and which do not have
shared ethical values.[1] Conversely, a high-trust society is one where interpersonal trust is relatively high, and
where ethical values are strongly shared.
Institutions and mechanisms[edit]
According to researchers, low-trust societies are typically kinship-based;[1] outcomes of low-trust societies can
include difficulty in forming and maintaining corporate structures.[2] Mechanisms and institutions that are
corrupted, dysfunctional, or absent in low-trust societies include respect for private property rights, a trusted civil
court system, democratic voting and acceptance of electoral outcomes, and voluntary tax payment. [3] Research
has identified a correlation between linear-active cultures (i.e. following a daily schedule with a single task at a
time)[4] with high-trust societies, and multi-active cultures (flexible schedules with many tasks at once, often in an
unplanned order) with low-trust cultures.[5]
Self-governance[edit]
High-trust societies display a high degree of mutual trust not imposed by outside "contractual, legal or
hierarchical regulation", but instead are based upon "prior moral consensus". [1] Much writing on the subject refers
to Francis Fukuyama's 1995 book, Trust: Social Virtues and Creation of Prosperity, in which he describes "the
ability of various peoples to organize effectively for commercial purposes without relying on blood ties or
government intervention".[6]
In the last article, we defined trust through the lens of Vitalik Buterin and
learned the factors to consider in assessing the level of degree of trust that a
protocol or application offers. We will review the trust models themselves for
this part and then apply them to Layer 2's.
For a visual reference, Vitalik shows a trust map that projects the number of
people needed to make a system work or the effort needed to make sure
everyone is acting accordingly vs the rest if they don’t, and the implications
faced* explained much more in detail below. The more green, the better.
Here is the breakdown of the Type of Trust Models to keep in mind before
looking at the Trust Map:
1of N model shown (ZK Proofs) with N/2 of N (How most blockchains work)
2. N/2 of N - This is how most blockchains operate, with the majority of actors
(such as miners or validators) being relied upon to act honestly. However,
this paradigm has limitations since a dominating majority can jeopardize the
system
Number of actors needed to behave correctly vs the rest of the actors in the system to
prevent failure
A critical point here: All these models, apart from "0 of N", involve trust, but
they are very different from each other! Trusting one person vastly differs
from trusting anyone anywhere will act appropriately.
Also, we have to consider how the system fails if trust is violated. In a
blockchain, failures are primarily of two types - liveness failures (you
can't do what you want to temporarily) and safety failures (when
something happens that the system should have prevented).
Now let’s apply these to Layer 2 Solutions to understand it better. Layer 2
solutions have been designed to scale blockchains without compromising
their security.
They are secondary protocols built on top of a primary blockchain (Layer 1),
and they serve as an essential component in the blockchain ecosystem,
especially when it comes to scaling and interoperability.
NOTE: "Small N" below is used to refer to the set of participants of the layer
2 system itself, and "Big N" refers to the participants of the blockchain; the
assumption is always that the layer 2 protocol has a smaller community than
the blockchain itself.
Trust Model: 1 of 1
Liveness: The trust model assumes that both parties participating in the
transaction will act truthfully. If the counterparty decides to act maliciously,
they might produce a liveness failure by freezing your funds briefly.
Peers refer to the nodes or computers that perform the same tasks and have the same power within a
blockchain network. Blockchain is a P2P network that acts as a decentralized ledger for one or more
digital assets, which refers to a decentralized peer-to-peer system where each computer keeps a
complete copy of the ledger and verifies its authenticity with other nodes to guarantee the data is
accurate. In contrast, transactions at a bank are kept secret and are only overseen by the bank.
The security of the underlying consensus algorithms and the privacy of transactions are all closely tied
to its implementation, making the P2P network a crucial component of blockchains. However, no
common P2P protocol for blockchains has been suggested. Instead, different cryptocurrencies have
developed and adapted their own peer-to-peer protocols.
Each node on the network must serve as both a client and a server to other nodes in a P2P network,
making it distinct from a traditional client-server setup. There is always a central server in a client-
server configuration from which the client downloads files.
On the contrary, in a decentralized setup, each node acts as a server that can download files and share
them with other nodes. A node may perform both the sharing and receiving functions concurrently,
which accounts for the P2P network’s speed, security and efficiency. The measures listed below can
help to ensure the security of your P2P networking systems:
Furthermore, in order for new peers joining the network to readily locate other peers to connect to, P2P
architecture functions best when there are many active peers in a blockchain network. It is important to
note that there are still enough peers left in the network to pick up the slack if a significant number of
peers leave.
However, there are fewer resources accessible overall when there are few peers. For instance, with a
P2P file-sharing application, a file might be downloaded more quickly if it is popular, which indicates that
many peers are sharing it.
In this type of network, nodes interact based on an organized structure, enabling nodes to precisely
search for files, even if the content is unavailable. However, due to an organized system, some sort of
centralization exists in structured P2P networks. Unlike unstructured peer-to-peer networks, structured
peer-to-peer networks are challenging to set up, although they provide simple data access.
Unstructured peer-to-peer networks
There is no set structure for the nodes in this kind of network, allowing network participants to join or
leave the network as they desire. Also, due to a lack of definite structure, participants converse with one
another at random. However, unstructured P2P networks require all nodes to remain active to power a
high number of transactions, mandating huge CPU power to ensure that the network runs properly.
This type of P2P network mixes some P2P design aspects with the traditional client-server approach. For
example, it makes it possible to locate a node using the central server. A distributed network application
framework called the client-server architecture assigns tasks to servers and clients in the same system
that connect via a computer network or the Internet.
In addition, P2P networks are cost-effective because they do not require a network operating system,
thus reducing costs. Furthermore, peer-to-peer networks are remarkably resilient to changes in peer
composition — the network can readily accommodate an increase in load if many new peers join it at
once. Also, the loss of a single peer has little effect on the network as a whole.
Various use cases of P2P blockchain networks include sharing software and games through file-sharing
networks. Cryptocurrencies also use P2P networks to allow users to conduct transactions in a
decentralized setup. Other than the Bitcoin network, Skype and BitTorrent are P2P network examples.
Additionally, anyone can create parallel networks called a hard fork of the blockchain if they want,
implying that the software needs to be updated to comply with the new guidelines. For instance,
following the Ethereum Merge, proof-of-work Ethereum (ETHW) was created by a Chinese miner.
P2P networks frequently have a sizable number of users who consume the resources shared by other
nodes while keeping their own resources to themselves. Such free-riding nodes are called “leechers”
that may support unethical and immoral behavior.
No involvement of the third party, zero transaction costs and flexible prices make P2P crypto trading
attractive to cryptocurrency traders. However, many nations aim to outlaw the trading and transaction
of cryptocurrencies in response to governments worldwide trying to control the cash flow surrounding
digital currencies and influence the crypto markets.
Since P2P crypto marketplaces trade on a worldwide market while remaining local, they can get around
these cryptocurrencies-related regulations. Additionally, all transactions on a peer-to-peer network are
protected by escrow smart contracts, preventing fraud against either party involved in P2P trades.
Tokens are transferred to the escrow, a third-party smart contract, before a transaction is made. Until
the necessary payment conditions are met, the escrow retains the tokens that have been deposited.
However, the parties to the transaction must ensure that the agreed-upon good or service is provided
and that money is received.
Despite such safety measures, P2P trading is not entirely safe. For instance, using the chargeback
feature (return of money to the payer) of P2P payment platforms, scammers may request the payment
back. Therefore, conducting due diligence on P2P marketplaces may protect you against peer-to-peer
trading scams
That said, watch out for unusual behavior and avoid canceling the trade after paying because the
cryptocurrency will be freed from the escrow service and returned to the seller’s wallet. Instead,
designate the transaction as paid and use the proof of payment to claim any money back.
PEER-TO PEER TRUST MODEL IN CRYPTOGRAPHY
Peer-to-peer (P2P) trust models in cryptography are designed to facilitate secure interactions and transactions
directly between parties without the need for intermediaries. These models aim to establish trust between
peers in a decentralized manner. Here are some common elements of P2P trust models in cryptography:
1. Decentralization: P2P trust models eliminate the need for central authorities or intermediaries by allowing
participants to interact directly with each other. This decentralization ensures that control and decision-
making are distributed across the network.
2. Cryptographic Authentication: P2P trust models often rely on cryptographic techniques such as digital
signatures and public-key cryptography to authenticate the identities of participants and ensure the integrity
and confidentiality of communications.
3. Trust Metrics: P2P networks may use trust metrics or reputation systems to assess the reliability and
trustworthiness of participants. These metrics can be based on factors such as past behavior, history of
successful transactions, and endorsements from other peers.
4. Consensus Mechanisms: P2P networks require mechanisms for achieving consensus among participants to
validate transactions and maintain the integrity of the ledger. Consensus mechanisms such as Proof of Work
(PoW), Proof of Stake (PoS), or variations thereof may be employed depending on the specific requirements
of the network.
5. Incentive Mechanisms: P2P networks may incorporate incentive mechanisms such as rewards or penalties
to encourage desired behavior and discourage malicious activities. These incentives can help align the
interests of participants with the overall goals of the network.
6. Transparency: P2P trust models often prioritize transparency by making transaction records and network
rules publicly accessible and verifiable. This transparency enhances trust among participants by providing
visibility into the inner workings of the network.
7. Resilience to Attacks: P2P trust models are designed to be resilient to various types of attacks, including
Sybil attacks, double-spending attacks, and censorship attempts. This resilience is achieved through a
combination of cryptographic techniques, consensus mechanisms, and network architecture.
Overall, P2P trust models in cryptography enable secure, decentralized, and permissionless interactions
between peers, making them well-suited for applications such as cryptocurrencies, decentralized finance
(DeFi), peer-to-peer lending, and distributed file sharing.
Leviathan IN CRYPTOGRAPHY
In cryptography, "Leviathan" could refer to different things depending on context. Here are a couple of
possibilities:
1. Leviathan Encryption Algorithm: There isn't a widely recognized encryption algorithm known as
Leviathan in the field of cryptography. However, it's possible that it could be a proprietary or lesser-known
algorithm developed by a specific organization or individual.
2. Leviathan Protocol or Project: Leviathan could also be the name of a cryptographic protocol, project, or
initiative focused on security, privacy, or decentralized systems. Cryptographic protocols often have names
that evoke strength, security, or mythical creatures, so Leviathan might fit into this category.
Without more context, it's challenging to provide a specific explanation of what Leviathan refers to in the
context of cryptography. If you have additional details or context, feel free to share them, and I can provide a
more tailored response.
Intermediary TYPES IN CRYPTOGRAPHY
1. Certificate Authorities (CAs): CAs are trusted third parties that issue digital certificates used to verify the
authenticity of public keys. They play a crucial role in establishing trust in public key infrastructure (PKI) by
verifying the identity of certificate holders before issuing certificates.
2. Key Management Services: Key management services provide infrastructure and tools for securely
generating, storing, and distributing cryptographic keys. They help ensure the confidentiality, integrity, and
availability of keys used in cryptographic operations.
3. Secure Multi-Party Computation (SMPC) Providers: SMPC providers enable multiple parties to jointly
compute a function over their private inputs without revealing those inputs to each other. They facilitate
secure collaboration and data analysis while preserving privacy and confidentiality.
4. Secure Hardware Modules: Secure hardware modules, such as hardware security modules (HSMs) or
trusted execution environments (TEEs), provide a secure environment for performing cryptographic
operations and storing sensitive keys. They protect against various attacks, including tampering and side-
channel attacks.
5. Oracles: Oracles are trusted data sources that provide external information to smart contracts or
decentralized applications (DApps) on blockchain networks. They bridge the gap between blockchains and
the real world by supplying off-chain data in a secure and reliable manner.
6. Trusted Third Parties (TTPs): TTPs are entities that act as intermediaries in cryptographic protocols or
systems to facilitate trust between parties. They may provide services such as escrow, dispute resolution, or
identity verification in online transactions.
7. Privacy Enhancing Technologies (PETs): PETs are cryptographic techniques and tools designed to
enhance privacy and anonymity in digital communications and transactions. Examples include zero-
knowledge proofs, mix networks, and anonymous credentials.
8. Tokenization Services: Tokenization services convert sensitive data into tokens, which are non-sensitive
representations that can be used in cryptographic operations without revealing the original data. Tokenization
helps protect sensitive information such as payment card data and personal identifiers.
These are just a few examples of intermediaries in cryptography. Depending on the specific application or
context, there may be other types of intermediaries involved in cryptographic systems.