Asymmetric Encryption
In this tutorial, we are going to see What is Asymmetric Encryption in Computer Security?
The idea of asymmetric encryption (also called public key encryption) appeared in 1976 when Whitfield Diffie and Martin Hellman published a book on cryptography.
In an Asymmetric Cryptosystem (or public-key cryptosystem), keys exist in pairs (the term dual-key is usually used):
- A public key for encryption
- A secret key for decryption
Thus, in a public key encryption system, the users choose a random key known only to them (this is the private key). From this key, they each automatically deduce an algorithm (this is the public key). The users exchange this public key through an unsecured channel.
When a user wants to send a message to another user, he just has to encrypt the message to be sent with the recipient’s public key (which he will find for example in a key server such as an LDAP directory). The recipient will be able to decrypt the message using his private key ( which is known only to him).

Image source: https://commons.wikimedia.org/wiki/File:Orange_blue_public_key_cryptography_en.svg
This system is based on a function that is easy to calculate in one direction (called one-way trapdoor function) and mathematically very difficult to reverse without the private key (called trapdoor).
As an example, a user has to randomly create a small metal key (the private key), then make a large number of locks (public key) that he places in a box accessible to everyone (the box acts as an unsecured channel). To send him a document, each user can take a lock (open), close a box containing the document thanks to this lock, then send the box to the owner of the public key (the owner of the lock). Only the owner will then be able to open the case with his private key.
Advantages and disadvantages:
There is no longer the problem of communicating the decryption key to each other since public keys can be sent freely. Public key encryption allows people to exchange encrypted messages without having a common secret.
On the other hand, the challenge consists in (making sure) that the public key that is recovered is the one of the person to whom you want to send the encrypted information!