# Public key Algorithms in Cryptography.

When the 2 parties communicate to every other to transfer the intelligible or sensible message, mentioned as plaintext, is converted into apparently random nonsense for security purpose mentioned as ciphertext.

The process of adjusting the plaintext into the ciphertext is mentioned as encryption.

The encryption process includes of an algorithm and a key. The key’s a worth independent of the plaintext.

Once the ciphertext is produced, it’s going to be transmitted.

The security of conventional encryption depends on the main** **two factors:

*The Encryption algorithm**Secrecy of the key*

The algorithm will produce a special output counting on the precise key getting used at the time. Modifying the key changes the output of the algorithm. Once the ciphertext is produced, it’s going to be transmitted. Upon reception, the ciphertext are often transformed back to the first plaintext by employing a decryption algorithm and therefore the same key that was used for encryption.

*Decryption:*

The process of adjusting the ciphertext to the plaintext that process is understood as decryption.

Asymmetric may be a kind of Cryptosystem during which encryption and decryption are carried out using different keys-Public key (known to everyone) and personal key (Secret key). This is often referred to as Public Key Encryption.

Characteristics of Public Encryption key:

- Public key Encryption is vital because it’s infeasible to work out the decryption key given only the knowledge of the cryptographic algorithm and encryption key.
- Either of the 2 key (Public and personal key) are often used for encryption with other key used for decryption.
- Due to Public key cryptosystem, public keys are frequently freely shared, allowing users a simple and advantageous method for encrypting content and verifying digital signatures, and personal keys are often kept secret, ensuring only the owners of the private keys can decrypt content and make digital signatures.
- The most generally used public-key cryptosystem is RSA (Rivest–Shamir–Adleman). the problem of finding the prime factors of a number is that the backbone of RSA.

*Example:*

Public keys of each user are present within the Public key Register. If B wants to send a confidential message to C, then B encrypt the message using C Public key. When C gets the message from B then C can decrypt it using its own Private key. No other receiver aside from C can decrypt the message because only C know C’s private key.

**Components of Public Key Encryption:**

This is the message which is readable or understandable. The message is stated to the Encryption algorithm as an input.*Plain Text:*The cipher text is constructed as an output of Encryption algorithm. We can’t simply understand this message.*Cipher Text:*The encryption algorithm is employed to convert plain text into cipher text.*Encryption Algorithm:*It accepts the cipher text as input and therefore the matching key (Private Key or Public key) and produces the first plain text.*Decryption Algorithm:*One key either Private key (Secret key) or Public Key (known to everyone) is employed for encryption and other is employed for decryption.*Public and personal Key:*

**Weakness of the general public Key Encryption:**

- Public key Encryption is susceptible to Brute-force attack.
- This algorithm also fails when the user lost his private key, then the general public key Encryption becomes the foremost vulnerable algorithm.
- Public Key Encryption is also weak towards man within the middle attack. during this attack a 3rd party can disrupt the general public key communication then modify the general public keys.
- If user private key used for certificate creation higher within the PKI(Public Key Infrastructure) server hierarchy is compromised, or accidentally disclosed, then a “man-in-the-middle attack” is additionally possible, making any subordinate certificate wholly insecure. this is often also the weakness of Public key Encryption.

**Applications:**

- Confidentiality are often achieved using Public Key Encryption. during this the Plain text is encrypted using receiver public key. this may ensures that nobody aside from receiver private key can decrypt the cipher text.
- Digital signature is for senders authentication purpose. during this sender encrypt the plain text using his own private key. This step will confirm the authentication of the sender because receiver can decrypt the cipher text using senders pubic key only.
- This algorithm can use in both Key-management and securely transmission of knowledge .