Encryption is the process of scrambling the contents of a file in order to hide its contents. In order to scramble (encrypt) a file’s contents one needs a key, or “cipher text”, so that the file can be unscrambled (decrypted) when necessary. Encryption is useful for ensuring information privacy and security between parties.
In symmetric encryption, two or more parties share one key to encrypt and decrypt a given file. The security of this system is contingent on a third party not having access to, or guessing the nature of the file’s encryption key. The main advantage of symmetric cryptography is that it is faster than asymmetric cryptography, though it is comparatively less secure. An example of symmetric encryption in practice is in payment application systems to cheaply anonymize payment transactions – described here.
In asymmetric encryption, also known as public-key encryption, parties use two different corresponding keys, public and private, to encrypt and decrypt a given file. Both keys are generated simultaneously using “trapdoor” functions, that are easy to compute but difficult to invert without a trapdoor (private key). Public keys are available to any party, often housed in open repositories or directories for encryption use, while private keys are held by intended parties exclusively for decryption. While asymmetric encryption is computationally expensive and time-consuming given the math involved in encrypting and decrypting, it is comparatively more secure than symmetric encryption. An example of asymmetric encryption in practice is the RSA security protocol, used to exchange symmetric key sessions for VPNs – described here and more generally here.
The following links provide more in depth definitions and use cases of symmetric and asymmetric encryption, including cases where both encryption types are used together: