Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore FOUNDATION OF BLOCKCHAIN_UNIT_II

FOUNDATION OF BLOCKCHAIN_UNIT_II

Published by Teamlease Edtech Ltd (Amita Chitroda), 2023-06-07 11:57:06

Description: FOUNDATION OF BLOCKCHAIN_UNIT_II

Keywords: FOUNDATION OF BLOCKCHAIN

Search

Read the Text Version

EXECUTIVE M. TECH IN BLOCKCHAIN AND BIG DATA FIRST SEMESTER FOUNDATION OF BLOCKCHAIN 1

Prefix 2

CONTENT UNIT - 2: Decentralization and Security in Blockchain......................................................4 3

UNIT - 2: DECENTRALIZATION AND SECURITY IN BLOCKCHAIN STRUCTURE 1.0 Learning Objectives 1.1 Introduction - Role of Cryptography in Blockchain 1.2 Technological and Cryptographic Elements in Blockchain Client Server Architectural pattern 1.2.1 Hashing 1.2.2 Digital Signatures 1.2.3 Consensus Mechanisms 1.2.4 Smart Contracts 1.2.5 Distributed Network 1.2.6 Public and Private Keys 1.3 Need for Distributed Ledger Systems 1.3.1 What is Distributed Ledger Systems? 1.3.2 Methods for creating Distributed Ledger systems 1.3.3 Benefits of Distributed Ledger System 1.3.4 Drawbacks of Distributed Ledger System 1.4 Advantages and Disadvantages of Centralized Trusted Parties 1.5 Trust and Coordination in Blockchain 1.6 Barriers to Blockchain Adoption 1.7 Summary 1.8 Keywords 1.9 Learning Activity 1.10 Unit End Questions 1.11 References 4

1.0 LEARNING OBJECTIVES After studying this unit, you will be able to: • Analyse the role of Cryptographic primitives in Blockchain • Identify the role of Need for a Decentralized Ledger System • State the Security, Integrity, and Privacy Issues of a Decentralized System 1.1 INTRODUCTION Role of Cryptography in Blockchain The security and integrity of blockchain technology depend on cryptography. Without encryption, a safe and decentralised blockchain network could not be built. Blockchain is only a distributed database that is kept up by a network of nodes, each of which holds a copy of the same information. Cryptography is used to create digital signatures and hash functions, which guarantee the security and immutability of the data stored in the blockchain. Digital signatures are used to verify the affiliations of the parties to a transaction and to guarantee that only persons with the proper authorization can view and modify the data. Every block in the blockchain is generated using a hash algorithm, making each one distinct and virtually impossible to edit. Additionally, cryptographic techniques like public-key encryption and symmetric-key encryption are used to protect sensitive information and ensure the privacy of blockchain transactions. This helps to prevent unauthorized access to the data and protect against fraud and other malicious activities. 1.2 TECHNOLOGICAL AND CRYPTOGRAPHIC ELEMENTS IN BLOCKCHAIN Blockchain is a distributed ledger technology that utilizes cryptography to ensure secure and transparent transactions. It consists of several technological and cryptographic elements that work together to enable its decentralized and tamper-proof nature. • Hashing: Hashing is a cryptographic function that converts an input of any length into a fixed-size output. Each block in a blockchain contains a unique hash that is 5

generated using a cryptographic hash function. This hash is used to ensure the integrity of the data stored in the block and to link it to the previous block in the chain. • Digital Signatures: Digital signatures are used to authenticate the identity of the parties involved in a transaction. They are created using a private key that is associated with a public key. The sender signs the transaction with their private key, and the recipient verifies the signature using the sender’s public key. • Consensus Mechanisms: Consensus mechanisms are used to ensure that all nodes in a blockchain network agree on the state of the ledger. There are several consensus mechanisms, including Proof of Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS). • Smart Contracts: Smart contracts are self-executing contracts with the terms of the agreement between buyer and seller being directly written into lines of code. They enable transactions to be automated and executed without the need for intermediaries. • Distributed Network: A blockchain is a distributed network that allows for multiple copies of the ledger to exist on different nodes in the network. This ensures that the ledger is resilient to attacks and is always available. • Public and Private Keys: Public and private keys are used in cryptography to ensure the confidentiality and integrity of data. The private key is used to decrypt encrypted data, while the public key is used to encrypt data. These elements work together to create a decentralized, secure, and transparent blockchain network. They ensure that transactions are tamper-proof and transparent while maintaining the privacy and security of the parties involved. 1.2.1 Digital Signatures A digital signature is a mathematical technique used in Blockchain to verify the authenticity and integrity of transactions. It is a cryptographic technique that uses public-key cryptography to provide a unique digital signature for each transaction. In Blockchain, each user has a public and private key. The private key is used to sign the transaction, while the public key is used to verify the signature. When a user creates a transaction, they use their private key to sign the transaction. This signature is unique to the transaction and cannot be forged. 6

When the transaction is broadcasted to the network, the nodes in the network use the sender's public key to verify the signature. If the signature is valid, the transaction is added to the Blockchain. If the signature is invalid, the transaction is rejected. Digital signatures in Blockchain provide several benefits, including: • Security: Digital signatures ensure that only the authorized users can create transactions and prevent unauthorized parties from tampering with the transactions. • Non-repudiation: Digital signatures provide proof that the sender of a transaction cannot deny sending it. • Immutability: Once a transaction is signed and added to the Blockchain, it cannot be altered or deleted. 1.2.2 Consensus Mechanisms Consensus mechanisms are used in distributed computing systems, such as blockchain networks, to achieve agreement among nodes about the state of the network. They are critical to maintaining the integrity of the network and ensuring that all transactions are valid. Here are some commonly used consensus mechanisms: • Proof of Work (PoW): This is the consensus mechanism used in the Bitcoin blockchain. It requires nodes (known as miners) to solve a complex mathematical problem to validate transactions and create new blocks. The miner who solves the problem first gets to add the block to the blockchain and is rewarded with cryptocurrency. • Proof of Stake (PoS): This consensus mechanism is used in Ethereum and other cryptocurrencies. It requires nodes to hold a certain amount of cryptocurrency as a stake to validate transactions and create new blocks. The node with the highest stake has a better chance of being chosen to validate the next block. • Delegated Proof of Stake (DPoS): This is a variation of PoS used in some blockchains, such as EOS. Instead of all nodes holding a stake, token holders vote to elect a certain number of nodes (called delegates) to validate transactions and create new blocks. • Byzantine Fault Tolerance (BFT): This consensus mechanism is used in some permissioned blockchain networks. It allows nodes to reach consensus even if some nodes are faulty or malicious. It requires a certain percentage of nodes to agree on the state of the network before a transaction can be validated. 7

• Practical Byzantine Fault Tolerance (PBFT): This is a variation of BFT used in some permissioned blockchain networks. It allows for faster transaction validation by requiring fewer nodes to agree on the state of the network. These are just a few examples of consensus mechanisms, and there are many more in use or under development. The choice of consensus mechanism depends on the specific needs and goals of the blockchain network. 1.2.3 Smart contracts Smart Contracts are self-executing contracts with the terms of the agreement directly written into code. They run on blockchain technology and automatically enforce the rules and regulations defined in the code, which means they do not require intermediaries such as lawyers, banks, or governments to oversee them. The concept of smart contracts was first proposed by computer scientist Nick Szabo in 1994, and they have since gained widespread attention as a potentially transformative technology for industries such as finance, insurance, and real estate. Smart contracts can facilitate secure and transparent transactions, automate complex processes, and reduce costs and inefficiencies. One of the most popular blockchain platforms for developing and deploying smart contracts is Ethereum, which has its programming language called Solidity. Smart contracts can be used for a variety of purposes, including decentralized finance (DeFi), supply chain management, and voting systems. 1.2.4 Distributed Network In a blockchain network, a distributed network refers to a system where multiple nodes or computers are connected to each other and work together to maintain and validate the blockchain ledger. In a typical blockchain network, each node has a copy of the entire blockchain ledger, and any transaction that occurs on the network must be validated by a consensus mechanism that involves a majority of the nodes on the network. This distributed network architecture is what makes blockchain technology so secure and transparent, as it eliminates the need for a centralized authority or intermediary to validate transactions or manage the network. Each node on the network has a unique identifier, and any transaction or data that is added to the blockchain is broadcasted to all the nodes on the network. This ensures that the ledger is always up-to-date and that all the nodes have a synchronized copy of the blockchain. 8

1.2.6. Private and Public Keys In blockchain technology, private and public keys are used to secure transactions and ensure the authenticity and integrity of the data stored on the blockchain. A private key is a unique, secret code that is generated by a user's wallet software or hardware device. This key is used to sign transactions and prove ownership of digital assets on the blockchain. It should be kept secret and protected at all times because anyone with access to it can control the associated funds. A public key, on the other hand, is a code that is derived from the private key using a mathematical algorithm. It can be shared freely and is used to receive cryptocurrency or other digital assets on the blockchain. When a user wants to send cryptocurrency or other digital assets to another user, they sign the transaction with their private key, which creates a digital signature. This signature is verified using the user's public key, which ensures that the transaction is legitimate and that the user has the necessary funds to complete the transaction. 1.3 NEED FOR DISTRIBUTED LEDGER SYSTEMS 1.3.1 What is Distributed Ledger Systems Distributed ledger systems are a type of database that is decentralized and distributed across a network of computers. Each computer in the network, known as a node, contains a copy of the ledger, which is updated in real-time and verified by the other nodes in the network. The ledger contains a record of all the transactions that have taken place in the network, and each transaction is cryptographically secured to ensure that it is tamper-proof. The most well-known example of a distributed ledger system is the blockchain, which is used in cryptocurrencies such as Bitcoin and Ethereum. However, distributed ledger systems have applications beyond cryptocurrency and can be used in a variety of industries, including finance, supply chain management, and healthcare. Distributed ledger systems offer several benefits over traditional databases. First, they are more secure because the data is stored across a network of computers, rather than a single centralized database that is vulnerable to hacking and data breaches. Second, they are transparent because all participants in the network can view the data, making it difficult to manipulate or falsify records. Third, they are more efficient because they eliminate the need for intermediaries and enable real-time, peer-to-peer transactions. 9

1.3.2 Benefits of Distributed Ledger Systems Distributed ledger systems, also known as blockchain technology, provide numerous benefits across various industries. Some of the key benefits of distributed ledger systems are: • Decentralization: One of the most significant benefits of distributed ledger systems is their decentralized nature. Unlike traditional systems, where data is stored on a central server, distributed ledger systems store data across a network of computers, making them less vulnerable to cyber-attacks and data breaches. • Transparency: Distributed ledger systems are transparent, meaning that all participants in the network can view the data, and any changes made to the data are visible to all parties. This transparency can increase trust among network participants and prevent fraud. • Security: Distributed ledger systems use cryptographic algorithms to secure the data stored on the network. Each transaction on the network is encrypted and verified by other participants in the network before being added to the ledger, making it extremely difficult to tamper with the data. • Efficiency: Distributed ledger systems are more efficient than traditional systems because they eliminate the need for intermediaries. Transactions can be processed more quickly and with lower fees, which can save time and money for businesses and individuals. • Traceability: Distributed ledger systems enable the tracking of products and assets across a supply chain. This can be particularly valuable in industries such as healthcare, where tracking the origin and movement of pharmaceuticals is critical. • Programmability: Distributed ledger systems allow for programmable money, meaning that rules can be set for how money is used or transferred. This programmability can enable the automation of financial transactions and reduce the need for intermediaries. Distributed ledger systems offer a range of benefits that can improve efficiency, security, and transparency across various industries. As the technology continues to evolve, it is likely that even more benefits will emerge. 1.3.3 Drawbacks of distributed ledger system While distributed ledger systems offer many benefits, there are also several drawbacks to consider. Some of the drawbacks of distributed ledger systems include: 10

• Scalability: One of the biggest challenges facing distributed ledger systems is scalability. As the number of users in the network grows, the size of the ledger and the number of transactions that need to be processed can quickly become overwhelming. This can lead to slower transaction times and higher fees, which can limit the usefulness of the network. • Energy consumption: Many distributed ledger systems, such as Bitcoin, require a significant amount of energy to operate. This is because they use a consensus mechanism called Proof of Work, which requires nodes to perform complex mathematical calculations in order to verify transactions. The energy consumption required for this process can be a significant environmental concern. • Security concerns: While distributed ledger systems are generally considered to be more secure than traditional databases, they are not immune to security vulnerabilities. For example, attacks such as 51% attacks, where a single entity gains control of the majority of the network's computing power, can compromise the security of the network. • Regulation: The decentralized and anonymous nature of distributed ledger systems can make them difficult to regulate. This can create challenges for governments and regulatory bodies, who may struggle to enforce laws and prevent illegal activities such as money laundering or terrorist financing. • Complexity: Distributed ledger systems can be complex and difficult to understand, especially for those who are not familiar with the technology. This can create a barrier to adoption and limit the usefulness of the network. While distributed ledger systems offer many benefits, they are not without their challenges. As the technology continues to evolve, it is likely that some of these challenges will be addressed, but for now, they are important factors to consider when evaluating the usefulness of a distributed ledger system. 1.3.4 Methods for creating Distributed Ledger Systems There are several methods for creating distributed ledger systems, including: • Blockchain: This is perhaps the most well-known method for creating distributed ledger systems. A blockchain is a decentralized database that records transactions in a secure and transparent manner. It is composed of a series of blocks that are linked together in 11

a chain. Each block contains a cryptographic hash of the previous block, which ensures the integrity of the chain. • Directed Acyclic Graph (DAG): This is an alternative to the blockchain method. DAGs are composed of a network of interconnected nodes, and each transaction is validated by multiple nodes in the network. This method is designed to be more scalable than the blockchain, as it can handle a larger number of transactions per second. • Hashgraph: This is another alternative to the blockchain method. Hashgraph is a consensus algorithm that uses a gossip protocol to achieve consensus among nodes in the network. It is designed to be fast, secure, and fair, and can handle a large number of transactions per second. • Byzantine Fault Tolerance (BFT): This is a method that is designed to prevent attacks on the distributed ledger system by malicious nodes. BFT algorithms ensure that the system can reach consensus even if some of the nodes in the network are compromised. • Proof of Stake (PoS): This is a method for achieving consensus in a distributed ledger system that is more energy-efficient than the Proof of Work (PoW) method used in blockchain. In PoS, validators are selected based on the amount of cryptocurrency they hold, rather than the computational power they contribute to the network. These are just a few of the methods for creating distributed ledger systems. There are many other approaches and variations, and the best method will depend on the specific use case and requirements of the system being built. 1.4 CENTRALIZED TRUSTED PARTIES 1.4 Advantages of Centralized trusted parties Centralized trusted parties refer to institutions or entities that act as intermediaries or third parties to facilitate trust and security in transactions. Here are some advantages and disadvantages of centralized trusted parties: Advantages: • Established trust: Centralized trusted parties are often established institutions with a proven track record of facilitating transactions and maintaining security. This can provide users with a sense of trust and confidence in the transactions they undertake. 12

• Accountability: Centralized trusted parties can be held accountable for any errors or mistakes that occur during a transaction. This can provide users with an added level of protection and help to ensure that disputes are resolved fairly. • Efficiency: Centralized trusted parties can often facilitate transactions more quickly and efficiently than decentralized systems. This is because they have dedicated resources and processes in place to manage transactions. 1.4.2. Disadvantages of Centralized Trust Parties • Single point of failure: Centralized trusted parties are vulnerable to single points of failure. If the institution or entity is compromised, the entire system can be affected, leading to potential data breaches and loss of trust. • Lack of transparency: Centralized trusted parties may lack transparency, making it difficult for users to fully understand the processes and protocols involved in transactions. • Limited control: Users may have limited control over the transaction process when using centralized trusted parties. This can lead to frustration and a lack of trust in the system. • Cost: Centralized trusted parties often charge fees for their services, which can make transactions more expensive for users. In summary, centralized trusted parties can provide established trust, accountability, and efficiency in transactions. However, they are vulnerable to single points of failure, lack transparency, and may limit user control. They can also be costly, which may make them unattractive for some users. 1.5 TRUST AND COORDINATION IN BLOCKCHAIN Trust and coordination are two critical factors in the functioning of blockchain systems. Blockchain technology is built on a decentralized network where multiple nodes work together to maintain a shared database or ledger. These nodes can be anonymous, and there is no central authority that controls the system. This decentralized architecture makes blockchain systems highly resistant to manipulation, hacking, and other malicious attacks. Trust is a vital component of blockchain because it ensures that the system functions correctly. Since there is no central authority in blockchain, trust is established through a 13

consensus mechanism. In a consensus mechanism, all nodes in the network agree on the validity of transactions and changes to the database. This agreement is reached through a complex process of cryptographic algorithms and mathematical calculations that ensure the integrity of the system. Coordination is also essential in blockchain systems. Because there is no central authority to enforce rules or regulations, coordination is necessary to ensure that all nodes in the network are following the same rules. Coordination is achieved through the use of smart contracts, which are self-executing programs that are stored on the blockchain. Smart contracts contain rules and regulations that govern how transactions are processed, verified, and recorded on the blockchain. They help to ensure that all nodes in the network are following the same rules and that transactions are executed in a transparent and secure manner. In addition to smart contracts, blockchain systems also use other mechanisms to facilitate coordination and trust. For example, many blockchain systems use reputation systems that allow nodes to build reputations based on their behavior and contributions to the network. Reputation systems can help to promote cooperation among nodes and discourage bad actors from participating in the network. 1.6 BARRIERS TO BLOCKCHAIN ADOPTION Several obstacles still exist despite blockchain's huge potential for the Circular Economy (CE) shift. • Technological Immaturity The innovation's lifecycle stage is typically crucial for its adoption and diffusion. Although product traceability, assurance, and incentivization offered by blockchain technology can help the CE develop into a mature ecosystem, the technology's relative youth and the lack of available commercial applications may make it difficult for the CE to adopt blockchain. • Scalability Issues The capacity of an information system to maintain its equilibrium state with increased storage volume is referred to as scalability. One of the biggest obstacles to utilising the technology in the context of CE is blockchain scalability. The growing volume of transactions and the inadequacies of consensus protocols are the root causes of this problem. 14

• Security Risk Blockchain can support the move to CE by enabling continuous and precise product tracing. However, given that blockchain holds and handles a lot of sensitive company data, security concerns exist. • Privacy Risk Blockchain technology offers a decentralised platform, increases supply chain transparency, and equips businesses to move towards a CE. Although blockchain technology is currently promoting the anonymity of user identities through digital signatures, transactional confidentiality via cryptography is still difficult to achieve. • Interoperability Issues The capacity of different information systems, applications, and devices to link in an integrated way both inside and outside of firm borders in order to access, share, and cooperatively utilise data among stakeholders is known as interoperability. • High Costs of Energy The high cost required to power blockchain is one drawback of its implementation. Existing blockchain technologies are computationally demanding by nature. Electricity is a precious resource for blockchain technology. • Conversion to a new system The involvement of employees and supply chain partners in novel processes and organisational structures that may include adopting the technology is a challenging issue businesses face when they embrace blockchain in the CE. Businesses may need to modify their business strategies and re-evaluate how they sell goods and services in order to integrate blockchain into the CE. • Cost of Investment There are various stages to the use of blockchain technology, including design, development, implementation, migration, and maintenance. Despite blockchain's long-term advantages, investment costs may deter businesses from adopting circular digital technology. 15

1.7 SUMMARY Trust and coordination are crucial components of blockchain technology. They help to ensure that blockchain systems function correctly and that all nodes in the network are following the same rules. By establishing trust and promoting coordination, blockchain technology can enable secure and transparent transactions without the need for a central authority. Blockchain technology has great potential, but there are still significant barriers to its adoption. Addressing these barriers will be critical to realizing the full potential of blockchain technology. 1.8 KEYWORD Consensus Mechanisms - Consensus mechanisms are used to ensure that all nodes in a blockchain network agree on the state of the ledger. There are several consensus mechanisms, including Proof of Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS Distributed Ledger Systems - Distributed ledger systems are a type of database that is decentralized and distributed across a network of computers. 1.9 LEARNING ACTIVITY 1. Define Smart Contracts ___________________________________________________________________________ ___________________________________________________________________________ 2. List the Several obstacles exist despite blockchain's huge potential for the Circular Economy (CE) shift. ___________________________________________________________________________ ___________________________________________________________________________ 1.10 UNIT END QUESTIONS A. Descriptive Questions Short Questions 1. Narrate the advantages and disadvantages of centralised Trusted Parties Long Questions 1. What is Distributed Ledger Systems? Discuss in detail the need of distributed ledger systems. 16

2. How does Trust and Coordination are the two critical factors for the functioning of the Blockchain Systems. 1.11 REFERENCES TEXT BOOKS: 1. Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller and Steven Goldfeder, Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction, Princeton University Press, July 2016. 2. Imran Bashir, “Mastering Blockchain: Distributed Ledger Technology, decentralization, and smart contracts explained”, 2nd Edition, Packt Publishing Ltd, March 2018. 3. Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction by Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Steven Goldfeder, Princeton University Press, 2016, ISBN 9780691171692. 17


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook