Asymmetric Encryption
As discussed earlier , the public-key cryptography has two keys. This mecha- nism is known as the asymmetric encryption technique. Figure. 1.1 shows the plain text encrypted by two different keys, such as public key and secret or private key. The public keys are excessive to the Internet. It verifies that the unauthenticated user is not able to access the keys. Those who have a public key can easily decrypt the message. Due to this reason, this approach uses two related keys that enhance the security. The data encrypted by the public key, which is freely available, is only decrypted using the private key. In the same way, the data encrypted by a private key is only decrypted using the public key. The Rivest–Shamir–Adleman (RSA) and Elliptic curve techniques (ECC) are famous asymmetric key encryption algorithms. We will discuss these algorithms in detail.
RSA (Rivest–Shamir–Adleman) Algorithm
There is the belief that there is no efficient technique to factor a huge number. RSA algorithm reduces the key and requires more computer processing power and time. The RSA algorithm uses four steps: key generation, distribution, encryption, and decryption. A general prin- ciple behind the RSA algorithm is monitoring three huge positive integers: p, q, and r. (ap)q ≡ a(modb)
In the equation mentioned above, once you have the value of a,p, and b, it is still challenging to identify the value of q. (aq)p ≡a(modb)
For some operations, it is the same as changing the value of p and q, respectively. In general, the information encrypted by the public key is only decrypted using the private key. In the above equation mentioned, the public key is depicted by b and p, whereas the private key is represented by q.
As mentioned earlier, RSA is a four-step process discussed as follows:
Key generation: The keys generated for the RSA algorithm includes the fol- lowing steps:
Select two discrete prime numbers such as x and y.
Calculate that numbers like b = xy, where b is the private- and public-key
modulus.
Use Carmichael’s totient function (σ ) to determine σ (n).
Select integer p.
Stimulate q using q = p−1.
Key distribution: Here, we consider one example where Jay wants to send a message to Raj. Jay must be aware of Raj’s public key to encrypt the information using the RSA algorithm. In contrast, Raj has to utilize his private key to decrypt the information sent by Jay. Jay sends its public key (b, p) to Raj using a reliable and secure way.
Encryption: Once Raj gets Jay’s public key, he can transmit data D to Jay. ct ≡ ap(modb)
where c is a ciphertext.
Decryption: In the same way, Jay recovers a from a to ct by utilizing his private key. ctq ≡ (ap)q ≡ a(modb)
Elliptic Curve Cryptography (ECC)
In asymmetric cryptography, ECC is the alter- nate method of RSA that is used to encrypt a message so that the malicious user can ot access it. It uses elliptic curves on finite fields that make it more secure than crack. ECC’s 256-bit key generated security same as RSA 3072-bit key. When a longer key is used in RSA, making the process slow, ECC mitigates this issue by providing a smaller key size and security. The ECC technique is divided into two parts, such as ECDSA algorithm that is used to sign messages and the Elliptic Curve Diffie–Hellman key exchange (ECDH) that is used to share symmetric keys for the encryption . Generally, blockchain uses the ECDSA technique for the signature that we had already discussed in the previous Sect. As ECC follows the elliptic curve, it uses the following equations: Y2=X3+mX+n
where ‘m’ is the co-efficient of X and ‘n’ is the equation’s constant. A plane curve over a finite field point satisfies the equation mentioned above, it can mirror any curve point over the X-axis, and the curve remains the same.
Last updated