Blockchain – Public Key Cryptography

Blockchain - Public Key Cryptography
Blockchain - Public Key Cryptography

In this tutorial you will learn about Blockchain – Public Key Cryptography step by step. So without much to do let’s get started.

What is Blockchain?

A blockchain is a continuously developing ledger which continues a permanent record of all the transactions which have taken place in a secure, chronological, and immutable way.

Let’s breakdown the definition,

o Ledger: It is a record this is constantly growing.
O Permanent: It means once the transaction is going internal a blockchain, you can put up it completely within the ledger.

O Secure: Blockchain placed information in a secure way. It uses very advanced cryptography to ensure that the data is locked inside the blockchain.

O Chronological: Chronological means each transaction happens after the previous one.

O Immutable: It method as you construct all the transaction onto the blockchain, this ledger can never be changed.

A blockchain is a chain of blocks which include records. Each block records all of the latest transactions, and as soon as finished goes into the blockchain as a permanent database. Each time a block gets finished, a brand new block is generated.

Note: A blockchain may be used for the secure transfer of money, property, contracts, and so forth. Without requiring a third-party intermediary like bank or government. Blockchain is a software protocol, but it couldn’t be run without the Internet (like SMTP used in email).

Blockchain – Public Key Cryptography

Public Key Cryptography or in short PKI is likewise known as asymmetric cryptography. It uses of pairs of keys – public and private. A key is a some long binary number. The public key is distributed worldwide and is sincerely public as its name shows. The private key is to be strictly held private and one ought to never lose it.

In case of Bitcoin, if you ever lose the private key to your Bitcoin wallet, the entire contents of your wallets could be immediately prone to theft and earlier than you comprehend it, all of your money (the contents of your wallet) might be long past and not using a mechanism inside the system to trace out who stole it – this is the anonymity within the system that I referred to earlier.

The PKI accomplies two functions- authentication and the message privacy via encryption/decryption mechanism. We will now explain both these functions−


When the 2 parties exchange messages, it is crucial to establish a trust with among the sender and the receiver. Especially, the receiver must trust the source of message. Going to our earlier state of affairs (depicted in Figure 1) of Salman sending some money to muskan for purchasing of a few items from her, let us to see how the PKI builds this consider among Salman and muskan. Look at beneath picture −

In the first place, if Salman wants to send some money to muskan, he has to create a private/public key of its very own. Note that both keys are usually paired collectively and you can not mix the private and public keys of different individuals or different times.

Now, Salman says that he’s sending $10 to Muskan. So he creates a message (a simple-text message) containing Salman’s (sender) public key, Muskan’s (receiver) public key, and the quantity ($10).

The reason of this remittance consisting of “I want to buy pumpkin from you” is likewise added into the message. The entire message is now signed using Salman’s private key. When Lisa receives this message, she will use the signature verification algorithm of PKI and Salman’s public key to make certain that the message certainly originated from Salman. How the PKI works is beyond the scope of this tutorial. The fascinated reader is mentioned this website for a more detailed discussion on PKI. Now, let us look at the message privacy.

Message Privacy

Now, as Muskan has obtained her payment, she wants to send the link to her ebook which Salman wants to buy. So Muskan might create a message and send it to Salman as shown in picture −

The Muskan creates a message such as “Here is the link to my ebook which you had requested”, signs and symptoms it with Salman’s public key that she has received in Salman’s request message and additionally encrypts the message using some secret key that is shared among the 2 during HTTPS handshake.

Now, Muskan is sure that only Salman can decode the message using the private key that is held by Salman alone. Also, somebody intercepting the message would no longer be able to recover its contents due to the fact the contents are encrypted through a secret key held only through Salman and Muskan. This ensures to Muskan that access to to her ebook is granted only to Salman.

Having seen both the functions, Authentication and Message Privacy, implied by PKI, let us move in advance to see how Bitcoin uses PKI to secure the public ledger that I mentioned inside the chapter“What is Bitcoin?”.

For your knowledge − The most popular PKI algorithms are RSA and ECDSA, Bitcoin uses of the latter one.


Blockchain – Introduction

Bitcoin – Brief History

This is about Blockchain – Public Key Cryptography and we really hope that you have learned something from this tutorial and also share your opinion about this tutorial. What do you think about it and if you think that this tutorial will help some of your friends then do share this tutorial with them.

salman khan

Written by worldofitech

Leave a Reply

Blockchain - Double Spending

Blockchain – Double Spending

Blockchain - Hashing

Blockchain – Hashing