Types of Encryption
Lets talk about encryption foundational topic in system design. Encryption involves converting human-readable plaintext into incomprehensible text, which is known as ciphertext and decrypting it back to plaintext again.
Let's talk about encryption foundational topic in system design. Encryption involves converting human-readable plaintext into incomprehensible text, which is known as cipher text and decrypting it back to plaintext again.
There are two classes of encryption, but until 1976 symmetric key encryption was the only show in town. It involves a shared key used to encrypt and decrypt messages.
The main problem with symmetric key encryption is sharing the shared key securely. Since a third party with the key could also decrypt the message if they got hold of the shared key.
Commonly used symmetric encryption algorithms include:
AES
3-DES
SNOW
Asymmetric encryption uses a mathematically related pair of keys for encryption and decryption: a public key and a private key.
You can encrypt data with either key, but only its pair can decrypt it. The main benefit of this type of encryption is that you can keep your private key entirely private and publicly share the public key, which people can use to encrypt data for you.
Commonly used asymmetric encryption algorithms include:
RSA
Elliptic curve cryptography
Here is the original paper that introduced public key encryption. Called New Directions in Cryptography by Whitfield Diffie and Martin Hellman.