Symmetric encryption uses one secret key for both encryption and decryption, so both sides must already share that key; AES is the standard example, and it is fast enough to protect bulk data. Asymmetric encryption uses a key pair: a public key that anyone may have and a private key that only its owner keeps, as in RSA and elliptic-curve schemes. Asymmetric cryptography solves the problem of agreeing on a key with someone you have never met, and it makes digital signatures possible, but it is far slower and works on small inputs. Real systems combine the two. TLS uses asymmetric cryptography to authenticate the server and agree on a fresh session key, then encrypts all the traffic with fast symmetric encryption under that key.
Every HTTPS request you make uses two kinds of encryption. Here is why it needs both. Symmetric encryption uses one secret key. The same key locks the data and unlocks it. Ciphers like AES are fast enough to encrypt everything you send. The catch is getting that key to the other side. Send it across the network, and anyone listening has it too.
Asymmetric cryptography uses a key pair. The public key can go to anyone. Data locked with it only opens with the private key, which never leaves its owner. That solves key distribution. But it is far slower, and it only works on small inputs. Much too slow for the actual traffic.
So TLS uses both. In the handshake, the client and the server swap public key shares, and each one derives the same fresh session key. The server also signs the exchange, to prove who it is. From then on, every byte is encrypted with that symmetric key. Asymmetric to agree on a key and prove identity. Symmetric for the data.
| Aspect | Symmetric encryption | Asymmetric encryption |
|---|---|---|
| Keys | One shared secret | A public key and a private key |
| Speed | Fast, with hardware support on modern CPUs | Much slower per operation |
| Key distribution | Hard: the secret must reach both sides safely first | Easy: the public key can be published |
| Common algorithms | AES-GCM, ChaCha20-Poly1305 | RSA, elliptic-curve Diffie-Hellman (X25519), ECDSA and Ed25519 for signatures |
| What it provides | Confidentiality, plus integrity with authenticated modes | Key agreement, encryption of small payloads, digital signatures |
| Key size for similar strength | 128 or 256 bits | Thousands of bits for RSA; around 256 bits for elliptic curves |
| Typical uses | Bulk TLS traffic, disk and database encryption, backups | TLS handshakes, SSH keys, code signing, JWTs signed with RS256 or ES256 |
Use symmetric encryption for
Encrypting data itself: files, database fields, backups, network traffic after a handshake.
Use asymmetric cryptography for
Agreeing on a symmetric key with a party you have no shared secret with.
Encrypting large data directly with a master key held in a key management service would be slow and would send all the data to that service. Envelope encryption avoids both. Each object is encrypted locally with its own random data key using symmetric encryption, and only the small data key is encrypted by the master key in the KMS. The encrypted data key is stored next to the ciphertext.
Rotating the master key then means re-wrapping small data keys, not re-encrypting every object, and access to the master key can be audited and revoked centrally.
A JWT signed with HS256 uses a shared secret, so every service that verifies tokens could also mint them. With RS256 or ES256 the identity provider signs with a private key and services verify with the public key, so a compromised service cannot forge tokens. That is the same symmetric versus asymmetric trade-off applied to authentication instead of secrecy.
Hashing is a separate tool. A hash such as SHA-256 is one way and has no key to decrypt with. Passwords are stored with slow, salted password hashing functions such as bcrypt, scrypt or Argon2, not with encryption.
System design rounds rarely ask for the definitions directly. The topic appears when you cover security for payments, identity, file storage or messaging, and the interviewer wants to see that you know where each kind of key lives and who can read what.
“Traffic is TLS everywhere, including between services. At rest, each file is encrypted with its own data key using AES-GCM, and the data keys are wrapped by a master key in the KMS, so rotating the master key only re-wraps small keys. Login tokens are signed with the identity provider's private key, so services verify them with the public key and cannot mint their own.”
Both. The TLS handshake uses asymmetric cryptography to authenticate the server with its certificate and to agree on session keys. The data that follows is encrypted with symmetric ciphers such as AES-GCM or ChaCha20-Poly1305.
Asymmetric. RSA uses a public key and a private key and is used for signatures and, in older protocols, for encrypting a session key.
It is much slower and can only process inputs smaller than its key, so encrypting bulk data with it would be impractical. Systems use it to set up or protect a symmetric key and let symmetric encryption do the heavy work.
Neither is more secure in general. Security depends on the algorithm, key size, how keys are stored and whether the mode of operation is used correctly.
Block ciphers, authenticated modes and the mistakes that break them.
Key pairs, signatures and how certificates establish trust.
Data keys, master keys and rotation.
Both kinds of cryptography working together on every connection.
Token signing and mutual TLS between services.
Signing keys, token verification and rotation.
Protecting card and account data at rest and in transit.
Encrypting sensitive fields and controlling key access.
Encrypting stored files at scale.
What changes if messages are end-to-end encrypted.
Knowing the trade-off is half of it
Practise saying it under follow-up questions: a timed system design interview with an AI interviewer that probes your choices and grades against a rubric.