Tuesday 6 November 2018

Public key Cryptography

For blockchains validation and verification, two techniques are used predominantly.
These are Hashing and Asymmetric key Encryption.

Blockchain security domain, 4 topics:
  1. Public key cryptography
  2. Secure Hashing
  3. Transaction Integrity
  4. Block Integrity

We will describe the concept of asymmetric key encryption.
Then hashing and what hashing algorithms are used by Blockchain. Then explain Techniques which use these algorithms to manage the integrity of the transaction and blockchain

Public Key Cryptography

Blockchain participants are not known to each other. Participants can join and leave the chain as they wish. They cannot be identified with conventional means like Driver's License.  In this context, how do you identify the participants?
How do you authorize the transactions? How do you detect the forged or faulty transactions?

This can be accomplished using public key cryptography algorithm.
Let us first understand simple key encryption. The same key is used for encryption and decryption, therefore it is called simple key encryption.
For example: Caesar Encryption
Alphabets in a message are shifted by a fixed number of positions. This number is called a key.
Consider the message: I AM GOING
Encrypted: G CO IQGPI
Letters shifted by 2 positions. Hence the key is 2.

Drawbacks: 1. Even the encryption key or mechanism is much more complex, it is easier to derive the secret key from the encrypted data.
  1. The key distribution to other participants is a challenge.
These challenges grow in magnitude in case of blockchains where participants are unknown to each other.


Solution to these issues: Public key encryption
  1. Two keys instead of a single key. These keys form a public key and private key pair.
  2. Public keys are published. Private keys are kept safe and secret using a passphrase.
  3. When a data is encrypted with a private key, it can be decrypted by a corresponding public key and vice versa.

Example of public key encryption: Popular implementation: RSA algorithm (Rivest Shamir Adelman)
It is used in an application for password less user authentication like in Amazon Virtual machine access.

But Blockchains need more secure algorithms. So it uses  Elliptic Curve Cryptography (ECC). Both Bitcoin and Ethereum use these algorithms to generate the blockchain. ECC is stronger than RSA.
256 bits ECC key pair is ~ (equivalent in strength) to 3072 bits RSA key pair


No comments:

Post a Comment