End-to-end encryption are the mostly used security protocol over every social media platform to protect the privacy of its user from the attack of hackers or any illegal malware,

This same concept when used in bitcoin transactions is known as Cryptography where the data are encrypted with such an encoding process that no one instead of its user can decode it.

And for storing this information as secret some private keys are required by the user, which is only accessed by it to decode the information and keep it preserved.

These keys which are used together under a process called asymmetric cryptography process where one key is used as encryption key while another is used as decryption key.

**The Two Types Of Keys And Their Features**

There are mainly two types of keys which are used as the medium for securing the messages and information in a bitcoin transaction are:

**Public Bitcoin Keys****Private Bitcoin Keys**

Navigation of Contents

**What is Public Key Cryptography?**

Public key cryptography is the medium for encrypting one’s information and messages which can be shared in public and can be accessed by anyone but every public key has its own pair of private keys which is used to receive the conveyed message and will only be decrypted by using the private key.

**Features of Public key:**

- Public keys are the composition of all large prime numbers which must be correlated with each other.
- Public keys are shareable and can be accessed by everyone.
- Public keys have their unique private key which is only owned by one person.
- Public keys are encrypted messages which are made to ensure the security protocol.

**What is Private Key Cryptography?**

Private key cryptography is the pair of public keys which is used for both encoding and decoding the data, this is accessed by both sender of the information and receiving person,

Whenever the message is received on the other end, this key decodes it to its real meaning and stores it within the original value.

**Features of Private key:**

- Private is also composed of prime numbers which share the same relation with public key elements.
- Private key is used for both encryption and decryption, which is why it is called a symmetric cryptography method.
- Private key has the fastest encrypting mechanism than public key
- Private key is not shareable and remains in the conscience of only one person.

**Generation Method Of Cryptographic Keys:**

Many important and highly calculative mathematical algorithms are used to generate the cryptographic keys, which have a high level of exponentiation and curving method involved in the key making process.

**DHA Method: (Diffie-Hellman Asymmetric Algorithm):**

- DH method uses the asymmetric means of encrypting and decrypting the data, these data are altered into something more unique than the previously send data, for example if a sender sends an encrypted public key to his receiver,
- Then in return the key is sent by the receiver back to the sender, here at the second time the sender will generate a temporary public key while using the DHA method.
- And with this, it will create a secret number key called as session key to encrypt the message which is written in Ciphertext message and then will again send it back to receiver along with temporary public key,
- Which will finally derive the message mathematically with help of session key and temporary public key.

**RSA Method: (Rivet-Shamir-Adelman): **

- The RSA method is the mostly used and old key generating method, which is used to create both the types of keys, its basic concept uses the prime number composition as the building elements of keys, the process uses the symmetric cryptography where the data after sending and receiving are further converted with new structure.

**ECC Method (Elliptical Curve Cryptography):**

It is a asymmetric mathematical algorithm based on curving method, it is used to encode large number of data which uses the coordinate plane rule based on ‘x’ and ‘y’ axis, these axes are intersected to form numbers of parabolic curves which on adding together make public and private keys.

- Sender and receiver uses these types of keys on the basis of the shape of the curve it will be forming after encryption or decryption.

**Bottomline:**

Public and private keys have become a very important part of security protocol to securely send and receive the message without any attack of illegal means and adversary, these keys ensure confidentiality and integrity of data and messages shared within the blockchain. Furthermore, getting into bitcoin is a blessing so I suggest that you invest now.