Public Key Algorithms in Cryptography

Dulith Senanayake
2 min readJul 28, 2020

--

In my previous article I have briefly explained about the cryptography and secret key algorithms in cryptography. In this article I’ll demonstrate the public key algorithms in cryptography.

Asymmetric Key Algorithms

Asymmetric key algorithms are also known as public key algorithms. In asymmetric key algorithms, there are a set of keys both for the encryption and decryption systems. One is called the public key, and the other, the private key. When the message is encrypted with one key in the pair, then the message can only be decrypted with the pair’s other key. Asymmetric key algorithms aren’t as fast as symmetrical key algorithms. This is due in part to the fact that asymmetric key algorithms are more complicated in general, utilizing a more sophisticated set of functions.

Asymmetric key cryptography

In this article I’ll go through two common asymmetric key algorithms Diffie-Helman and RSA.

Diffie-Hellman

One of the earliest known asymmetric key implementations, was the Diffie-Hellman algorithm. Some use is made of the Diffie-Hellman algorithm for key exchange. Although symmetric key algorithms are fast and reliable, key exchange is always a problem. It requires a way to get the private key to all systems, and with Diffie-Hellman algorithm this can be done. The Diffie-Hellman algorithm is used to create a stable channel of communication. The devices use this mechanism for the exchange of a private key. This private key is then used to encrypt the two systems symmetrically.

Diffie-Hellman mechanism

RSA

RSA is the Rivest Shamir Adleman algorithm which wa sdeveloped in 1978. RSA was the first asymmetric algorithms that were commonly used for signing and encryption. It supports 768 and 1,024bit key lengths. The RSA algorithm uses a three part process. The first part is generation of keys. The keys used for the RSA algorithm are generated using prime-number based mathematical operations. The second part of the method consists of encryption. Such encryption is achieved with the use of one key in the key pair. The third part of the process is decryption. The decryption process is performed with the other key in the key pair.

RSA Algorithm

In this post I have demonstrated two common asymmetric key algorithms in cryptography. My next post is on digest functions in cryptography.

--

--

Dulith Senanayake
Dulith Senanayake

Written by Dulith Senanayake

Full Stack Developer | BSc. (Hons.) in Software Engineering | University of Kelaniya, Sri Lanka

No responses yet