0% found this document useful (0 votes)
12 views5 pages

Cryptography in Blockchain

Cryptography is essential in blockchain for securing information and transactions, utilizing symmetric and asymmetric methods. Symmetric cryptography uses the same key for encryption and decryption, while asymmetric cryptography employs a public-private key pair. Digital signatures and cryptographic hash functions further enhance security by verifying sender identity and maintaining transaction integrity through a tamper-evident chain of blocks.

Uploaded by

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

Cryptography in Blockchain

Cryptography is essential in blockchain for securing information and transactions, utilizing symmetric and asymmetric methods. Symmetric cryptography uses the same key for encryption and decryption, while asymmetric cryptography employs a public-private key pair. Digital signatures and cryptographic hash functions further enhance security by verifying sender identity and maintaining transaction integrity through a tamper-evident chain of blocks.

Uploaded by

maramanusha2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Cryptography in Blockchain

Cryptography plays a vital role in securing


the information and transactions within a
blockchain. It involves the use of
mathematical techniques to protect data
from unauthorised access, ensure privacy,
and establish trust among participants in
the network.

Types of Cryptography
Cryptography can be broadly categorised into symmetric and asymmetric
cryptography.

1. Symmetric Cryptography:

In this type, the same key is used for both encryption and decryption. It's like
having a single key to lock and unlock a door. For example, the Advanced
Encryption Standard (AES) algorithm uses symmetric cryptography. When you
send a message encrypted with AES to someone, you use the same key to
encrypt and the recipient uses the same key to decrypt.

Plain Text Plain Text

XYZ……… XYZ………
……………… ………………
……………… ………………
…………….. ……………..

Alt text: A symmetric algorithm uses identical cryptographic keys

1|Page
2. Asymmetric Cryptography:

Asymmetric Cryptography, also known as public-key cryptography involves a


pair of keys - a public key and a private key. The public key is shared openly,
while the private key is kept secret. Messages encrypted with the public key
can only be decrypted with the corresponding private key, and vice versa. An
example is the RSA algorithm. If Alice wants to send a secure message to Bob,
she uses Bob's public key to encrypt the message. Only Bob, who holds the
corresponding private key, can decrypt and read the message.

Plain Text Plain Text

XYZ……… XYZ………
……………… ………………
……………… ………………
…………….. ……………..

Alt text: Asymmetric algorithm that uses the different cryptographic keys

Digital Signatures:
Digital signatures in cryptography are like electronic fingerprints. They verify two
things:

● Who sent the message?


● Has the message been altered or not?

Participants use their private keys to create digital signatures for transactions or
messages. Others can use the sender's public key to verify the digital signature
and confirm the sender's identity.

2|Page
Hash Function
Cryptographic hash functions are used to generate a fixed-size string of
characters (hash) from any input data. In blockchain, each block contains the
hash of the previous block, creating a chain. This ensures the integrity of the
entire transaction history.
Each block in a blockchain consists of the following:
● data/details of the transaction
● its hash
● the previous block’s hash
The first block is called the genesis block, and it is the only block that does not
contain the previous block's hash.

3|Page
BlockChain Block Hashing

How Hashing Works

SHA-256
49FCA16A2
271B340 66
DAA46492
C226C4...

Input Hash Function Hash Value


(Hashing Algorithm) (Output)

Let us now see the steps how hashing is applied on each block

1. Block Data Collection:

● Transactions are gathered and verified by network nodes.


● These transactions, along with other essential block header information (like
the previous block's hash and timestamp), are compiled into a block.

2. Hashing Function Application:

● The block data is passed through a cryptographic hashing algorithm, such


as SHA-256.

● SHA-256 is a popular Hashing algorithm developed by the National Security


Agency (NSA). Its full name is Secure Hash Algorithm 256-bit, and it is a part
of the SHA-2 family. This algorithm generates a unique, unpredictable, and
irreversible hash value, typically represented as a long string of letters and
numbers.

3. Hash Value as Block Identifier:

● The generated hash becomes a permanent part of the block's header,


acting as its unique identifier and digital seal.
● Any change to the block's data would result in a different hash, making
tampering evident.

4|Page
4. Chaining Blocks Together:

● Each block's header also includes the hash of the previous block in the
chain.

● This creates a chronological, tamper-evident chain of blocks, where any


alteration to a past block would break the link and be easily detected.

SHA256 (’blockchain’) SHA256 (’Blockchain’)

ef779713d3a75526946a3bcf00daec9 625da44e4eaf58d61cf048d168aa6f5e4
fc9c9c4d51ddc7cc5df888f74dd434d1 92dea166d8bb54ec06c30de07db57e1

5|Page

You might also like