Basics of cryptography
Classification of cryptographic algorithms

Cryptographic algorithms can be classified as:

Symmetric key or secret key algorithms where only one key is used for both encryption and decryption. The Advanced Encryption Standard (AES) is an example of a conventional cryptosystem widely employed.

Public key or asymmetric key algorithms where a pair of keys is used: a public key, which encrypts data, and a corresponding private, or secret, key for decryption. Although the two keys of the same pair are mathematically linked, it is computationally infeasible to derive the private key from the public key. A user or entity publishes their public key to the world while keeping their private key secret. Anyone who has a public key can encrypt information but cannot decrypt it. Only the person who has the corresponding private key can decrypt the information.

The primary benefit of public key cryptography, cryptographical systems (cryptosystems) based on asymmetric key algorithms, is that it allows entities (for instance, people), which (who) had no preexisting security arrangement, to exchange messages securely. The sender and the receiver do not need to share any secret keys via secure channels; all communications involve only public keys, and no private key is ever transmitted or shared.