Let us begin by understanding what cryptography is.
It is a technique of writing in a secret code which is in an unreadable format to the third parties. Plaintext indicates the data which is in the readable format and also which is not encrypted.
The plaintext is converted into cipher text which is in the format of unreadable with the help of the encryption and again it is to be converted into plaintext with the help of the decryption. Both the encryption and the decryption are done with the help of the scheme of the cryptography.
The functions of cryptography are as follows −
The symmetric algorithm is explained below in stepwise manner −
Step 1 − Symmetric algorithm is referred to as a secret key algorithm. For encrypting and decrypting data, the same key is used on both sides which results in a faster and simpler one.
Step 2 − Both the sender and the receiver must use the same key for encryption and decryption. That is, with the help of the public key the plain text is converted into cipher text and it has been sent to the destination from the source, and with the help of the same key, which has been used by the sender, must be used by the receiver for decrypting the cipher text into the plaintext.
Step 3 − So for decrypting and encrypting data, both the sender and the receiver must know about the public key which is referred to as a secret key.
Step 4 − Stream Ciphers always work on one bit at a time. For encrypting data the same key is used in stream cipher.
Step 5 − Block Ciphers always work on one block at a time. In stream cipher, for encrypting a block of data a different key is used.
The public key algorithm is explained below in stepwise manner −
Step 1 − In the Public key algorithm, for data encryption and data decryption separate keys have been used which results in complex.
Step 2 − It normally uses one key for data encryption from the plaintext and sent to the destination.
Step 3 − At the receiver side, the receiver uses another key separately for decrypting the encrypted data to the plaintext. So, here two has been separated by both the source and destination which cannot be identified by the parties.
It is an electronic document, which provides the authority certification which contains the digital signature. It helps in verifying a person's identity with the help of the public key. One way hash value is to be created for the digital signature and for encrypting the hash value a private key is used which results in unique value. Hence, the combination of hash value which is encrypted, and the hashing algorithm together create a Digital Signature, where the functions of cryptography are settled.
RSA − It refers to Rivest-Shamir-Adleman algorithm, which is being embedded with the SSL protocol for providing the secured communication over the network, in which the public key has been generated from the product of two large prime numbers which is 1024 or 2048 bit long.
Elliptic Curve Cryptography (ECC) − It is used as an alteration to the RSA algorithm in implementing the public key which results in small keys and it has been generated with the equation of the elliptic curve. It is more complex in breaking ECC because formulating the ECC algorithm is more complex than factoring the prime numbers and also the key size is small.