Public key Algorithms in Cryptography

Rajitha Sandaruwan
3 min readJul 24, 2020

In present world, numerous algorithms are designed and developed to provide security to the information that is spread across globally through network. These algorithms can be mainly classified as Symmetric and Asymmetric algorithms. The important issue that differentiates them is usage of keys. In symmetric algorithms, only one key is used and it is termed as private key. In other words, symmetric algorithms are also termed as private key algorithms as they use private key both for encryption and decryption. Asymmetric key algorithm uses two keys, which can be defined as private key and public key. Private Key is used for encryption purpose whereas public key is used for decryption purposes. These algorithms are also called as public key algorithms. In advantage to private key, public key algorithms uses computational and complex mathematical methods.

figure1:symmetric and asymmetric encription

Asymmetric cryptography algorithms use two keys which can be referred as public key and private key. Public key is used for encryption purpose and private key is used for decryption purpose. These two keys are mathematically related, but it is very difficult to obtain one from the other unless one knows the transformation. The public key can be revealed without compromising the security of the system. The corresponding private key, however, must not be revealed to any party. Currently information is electronically processed and conveyed through public networks. The main objective of cryptography is, to conceal the content of messages transmitted through insecure channels such that it guarantees privacy and confidentiality in the communications to the authorized users. The different algorithms designed under this category are RSA, MD5 and SHA.

RIVEST, ADI SHAMIR, AND LEONARD ADLEMAN ALGORITHM

RSA is designed by Ron Rivest, Adi Shamir, and Leonard Adleman in 1978. It is one of the best known public key cryptosystems for key exchange or digital signatures or encryption of blocks of data. RSA uses a variable size encryption block and a variable size key, based on number theory, which is a block cipher system. It uses two prime numbers to generate the public and private keys. These two different keys are used for encryption and decryption purpose. Sender encrypts the message using Receiver public key and when the message gets transmit to receiver, then receiver can decrypt it using his own private key.

MESSAGE DIGEST ALGORITHM

The MD5 message-digest algorithm is a widely used cryptographic hash function producing a 128-bit (16-byte) hash value, typically expressed in text format as a 32 digit hexadecimal number. MD5 has been utilized in a wide variety of cryptographic applications, and is also commonly used to verify data integrity. Advantages of MD5: Utilizes a fast computation algorithm Provides collision resistance Is in widespread use Provides a one-way hash. MD5 is one in a series of message digest algorithms designed to be a secure replacement for MD4. But later Md5 was proved that it was vulnerable to Collision Resistant, Preimage Vulnerability and some other vulnerability. In addition it was also not applicable to SSL certificates and Digital certificates.it also contains security flaws and vulnerabilities. It is less secure than the SHA-1 algorithm.

figure2:MD5 algorithm structure

--

--