BCT Unit 2
BCT Unit 2
HASHING:
Hashing is a fundamental concept in blockchain technology. It plays a crucial role in ensuring the
security and immutability of blockchain data. Blockchain technology is an intricate web of several
technological innovations working together. Among the most important pieces of the blockchain puzzle
is hashing. Hashing is a cryptographic function that converts a string of characters of any length into a
unique output, or hash, of fixed length. Here an explanation of how hashing is used in blockchain:
1. What is Hashing? Hashing is a one-way cryptographic function that takes an input (or message) and
returns a fixed-size string of characters, which is typically a hexadecimal number. The output, known as
the hash value or hash code, is unique to the input data. Even a small change in the input data will result
in a significantly different hash value.
2. Data Integrity: In a blockchain, data is stored in blocks. Each block contains a list of transactions or other
relevant information. To ensure the integrity of the data within each block, a hash is generated for the
entire block contents. This hash value is sometimes referred to as the block header
3. Linking Blocks: To create a chain of blocks, each block includes the hash value of the previous blocks
header. This forms a link between blocks in the chain. This linking of blocks is what gives a blockchain
its name and ensures that the data in previous blocks cannot be altered without changing the hash values
of all subsequent blocks.
4. Consensus Mechanism: Hashing is also a key component of many blockchain consensus mechanisms,
such as Proof of Work (PoW) used in Bitcoin. Miners in a PoW system compete to solve a cryptographic
puzzle by finding a nonce (a random number) that, when hashed along with the blocks data, results in a
hash value that meets certain criteria (e., starts with a certain number of leading zeros). This process is
computationally intensive and requires a lot of computational power, making it difficult for malicious
actors to manipulate the blockchain.
5. Security: Cryptographic hashing ensures that once data is added to a block and the block is added to the
blockchain, it becomes extremely difficult to alter any past data because doing so would require changing
the data in that block, which would in turn change its hash value. This change would cascade through all
subsequent blocks, making it computationally impractical and economically unfeasible.
6. Data Verification: Users of the blockchain can independently verify the integrity of data by recalculating
the hash values of blocks and comparing them to the stored values. If the hashes match, it means the data
has not been tampered with.
7. Authentication: It proves that the transaction was initiated by the owner of the private key associated
with the public key used in the transaction.
8. Integrity: It ensures that the transaction data has not been tampered with during transmission.
9. Transaction Verification: Other participants in the network can use the sender& public key to verify the
digital signature on a transaction. By doing so, they can confirm the transaction authenticity and integrity
without needing to know the sender private key.
10. Secure Ownership and Access Control: Public key cryptography allows for secure ownership of assets
(e., cryptocurrencies) on the blockchain. Only the holder of the private key can access and control those
assets. Access control to blockchain accounts and assets is established by controlling the corresponding
private keys. This means that the owner has full control over their funds and can transfer ownership only
by signing transactions with their private key.
11. Confidential Transactions: Some blockchains incorporate additional cryptographic techniques, such as
zero-knowledge proofs, to provide privacy for transaction amounts and other sensitive data. These
techniques allow participants to prove the validity of transactions without revealing specific details,
preserving confidentiality.
12. Encryption and Secure Communication: Public key cryptography can also be used for secure
communication within a blockchain network. Users can encrypt messages with the recipient public key,
ensuring that only the corresponding private key holder can decrypt and read the message.
13. Consensus Mechanisms: Public key cryptography is often integral to the consensus mechanisms used in
blockchains. For example, in Proof of Stake (PoS) blockchains, participants lock up a certain amount of
A public key cryptosystem: cryptocurrency as collateral, and their public keys are used to verify their
eligibility to create new blocks and validate transactions. In summary, public key cryptosystems are
foundational to blockchain technology, providing the means for secure transactions, user authentication,
and privacy features. They ensure that users can interact with the blockchain securely and have control
over their assets while maintaining the integrity and confidentiality of transactions and data.
A public key cryptosystem, also known as asymmetric cryptography, is a cryptographic system that uses
two different keys to encrypt and decrypt messages:
Public key
Anyone can use the public key to encrypt a message, but only the sender can read it. The sender shares
the public key with anyone who wants to communicate with them securely.
Cryptographic algorithms based on mathematical problems called one-way functions generate key pairs.
The security of public key cryptography relies on these mathematical challenges, which classical
computers have difficulty solving. However, quantum computers could potentially break the security of
public-key algorithms if they become powerful enough.
Public key cryptography is widely used, especially for TLS/SSL, which makes HTTPS possible. For
example, during an SSL/TLS handshake, the client and server decide on an encryption algorithm and a
shared secret key that's only used for that session. All messages exchanged between the client and server
are then encrypted using the key and algorithm, ensuring privacy even if malicious forces intercept the
messages.
PRIVATE, PUBLIC BLOCK CHAIN; USE CASES:
In this type of blockchain anyone can read, write and In this type of blockchain read and write is
participate in a blockchain. Hence, it is permissionless done upon invitation, hence it is a
1. Access – blockchain. It is public to everyone. permissioned blockchain.
Network Actors
2. – Don’t know each other Know each other
Decentralized
3. Vs Centralized – A public blockchain is decentralized. A private blockchain is more centralized.
9. Energy A public blockchain consumes more energy than a private Private blockchains consume a lot less
blockchain as it requires a significant amount of electrical
Consumption – resources to function and achieve network consensus. energy and power.
In a public blockchain, no one knows who each validator is In a private blockchain, there is no chance
and this increases the risk of potential collision or a 51% of minor collision. Each validator is
attack (a group of miners which control more than 50% of the known and they have the suitable
11. Attacks – network’s computing power.). credentials to be a part of the network.
Potential to disrupt current business models through Reduces transaction cost and data
disintermediation. There is lower infrastructure cost. No need redundancies and replace legacy systems,
to maintain servers or system admins radically. Hence simplifying documents handling and
reducing the cost of creating and running decentralized getting rid of semi manual compliance
12. Effects – application (dApps). mechanisms.
Bitcoin, Ethereum, Monero, Zcash, Dash, Litecoin, Stellar, R3 (Banks), EWF (Energy), B3i
13. Examples – Steemit etc. (Insurance), Corda.
Use Cases:
Cryptocurrencies: Public blockchains like Bitcoin and Ethereum serve as platforms for digital
currencies and tokens.
Consortium Blockchains: Multiple organizations in a consortium can use a private blockchain to
collaborate and share information securely while maintaining control
l. Financial Services: Private blockchains are used in financial institutions for settlements, clearing, and
asset tokenization. Healthcare: Medical records and patient data can be stored and shared securely within
a private blockchain network.
2. Government and Regulation: Some government agencies use private blockchains for secure record-
keeping and regulatory compliance. In summary, the choice between a private and public blockchain
depends on the specific use case and requirements.
Public blockchains provide openness and decentralization, while private blockchains offer controlled
access, privacy, and efficiency. Hybrid solutions also exist, combining aspects of both types to meet
specific needs.
HASHPUZZELS:
This also helps to maintain the rate at which transactions are appended in the blockchain at 10 minutes.
To solve the hash puzzle, miners will try to calculate the hash of a block by adding a nonce to the block
header repeatedly until the hash value yielded is less than the target.
1. Proof of Work (PoW): In blockchain, PoW is often referred to as apuzzle that miners need to solve.
Miners compete to find a specific nonce (a random number) that, when hashed along with the transaction
data and the previous block header, results in a hash value meeting certain criterion, such as having a
specified number of leading zeros. This process involves a lot of computational work and is sometimes
colloquially referred to as a hash puzzle
2. Cryptographic Puzzles: Blockchain networks use cryptographic hashing extensively for various purposes,
including data integrity, security, and consensus mechanisms. Cryptographic puzzles can be a general
term for the mathematical challenges and cryptographic operations involved in blockchain technology.
3. Security and Authentication: In some blockchain applications, hash puzzles could refer to cryptographic
challenges used for authentication and access control. Users may need to solve cryptographic puzzles to
gain access to certain resources or services on a blockchain platform.
4. Blockchain-Based Games and Applications: Some blockchain-based games and applications incorporate
puzzles and challenges as part of their gameplay or user interactions. These puzzles may involve
cryptographic operations or hash functions. If you have a specific context or use case in mind for
HashPuzzles providing more details could help in offering a more precise explanation. Blockchain
technology is versatile, and different projects and applications may use terminology in unique ways to
describe their specific features or mechanisms.