Skip to main content

Symmetric and Asymmetric Encryption

In symmetric encryption, the same key is used for both encryption and decryption. The key remains secret and is shared between the parties involved in the communication.

In asymmetric encryption, two keys are used: a public key and a private key. The public key is shared openly, while the private key is kept secret. Data encrypted with the public key can only be decrypted with the private key, and vice versa.

Useful examples

Symmetric - used in disk encryption, file encryption, etc. Asymmetric - in digital signatures, SSL session establishment, etc.

It's also a good way to see that all handshakes happen via asymmetric encryption, and then the data transfer happens via symmetric encryption.