Symmetric vs asymmetric encryption: the key differences
Symmetric vs asymmetric encryption: how each works, why their key lengths are not comparable, how TLS combines both, and what post-quantum standards change.
By MD-5 Updated 5 min read
Symmetric encryption uses one shared secret key to encrypt and decrypt. Asymmetric encryption uses a key pair: a public key anyone can have and a private key only its owner holds. Symmetric is fast and handles bulk data. Asymmetric solves the harder problem of agreeing on keys and proving identity between strangers. Almost every secure system, HTTPS included, uses both.
This article compares them: how each works, why their key lengths can’t be compared directly, how they fit together, and what the new post-quantum standards change.
Symmetric encryption
One key does both jobs. The sender encrypts with it; the recipient decrypts with the same key. Modern symmetric ciphers such as AES and ChaCha20 are extremely fast, often running in dedicated CPU instructions.
The weakness is logistics. Both sides must already share the key, and every pair of parties needs its own. For the details, see the beginner’s guide to symmetric encryption.
Asymmetric (public-key) cryptography
Public-key cryptography was published in 1976 by Whitfield Diffie and Martin Hellman (“New Directions in Cryptography”), followed by RSA (Rivest, Shamir and Adleman) in 1977. Documents declassified by the UK in 1997 showed GCHQ researchers James Ellis, Clifford Cocks and Malcolm Williamson had found equivalent ideas a few years earlier, in secret.
It covers three different jobs, and the algorithms differ for each:
| Job | What it does | Common algorithms |
|---|---|---|
| Key agreement | Two parties derive a shared secret over an open channel | ECDH (X25519), ML-KEM |
| Digital signatures | Prove who produced data and that it hasn’t changed | Ed25519, ECDSA, RSA-PSS, ML-DSA |
| Encryption | Encrypt small data (usually a key) to a public key | RSA-OAEP |
Signing is a separate operation, not “encrypting with the private key”, even though older explanations of RSA often describe it that way.
The trust problem
Public keys don’t need to be secret, but you do need to know a public key really belongs to who you think. If an attacker can substitute their own, they can read and relay everything: a man-in-the-middle attack. On the web, certificates solve this: a certificate authority signs a statement binding a public key to a domain, and your browser checks it. Asymmetric cryptography removes the need to share a secret, not the need to trust a key.
Side by side
| Symmetric | Asymmetric | |
|---|---|---|
| Keys | One shared secret | Public and private key pair |
| Speed | Very fast, suitable for bulk data | Orders of magnitude slower per operation |
| Key distribution | Must be shared securely in advance | Public key can be published |
| Keys needed for n parties | n(n-1)/2 | n pairs |
| Proves who sent a message | No (anyone with the key could have) | Yes, through signatures |
| Main use | Encrypting data | Agreeing keys, signing, identity |
Why key lengths aren’t comparable
A 128-bit symmetric key and a 128-bit RSA key are nowhere near equivalent, because they resist different attacks. Symmetric keys are attacked by trying keys; RSA keys are attacked by factoring, and elliptic-curve keys by solving discrete logarithms, both of which have shortcuts. NIST’s key-management guidance (SP 800-57 Part 1) (opens in a new tab) gives the equivalences:
| Security strength | Symmetric key | RSA key | Elliptic-curve key |
|---|---|---|---|
| 112 bits | 3DES (3 keys) | 2,048 bits | 224 to 255 bits |
| 128 bits | AES-128 | 3,072 bits | 256 to 383 bits |
| 192 bits | AES-192 | 7,680 bits | 384 to 511 bits |
| 256 bits | AES-256 | 15,360 bits | 512 bits or more |
This is why elliptic curves displaced RSA in most new designs: the same strength with far smaller keys and faster operations.
How HTTPS uses both
A TLS 1.3 connection (RFC 8446 (opens in a new tab)) works like this:
- Key agreement: browser and server exchange ephemeral ECDHE key shares (usually X25519) and each derive the same shared secret.
- Authentication: the server signs the handshake with the private key in its certificate; the browser checks the signature and the certificate chain.
- Bulk encryption: keys derived from the shared secret encrypt everything else with AES-GCM or ChaCha20-Poly1305.
TLS 1.3 removed the older option of sending the session key encrypted under the server’s RSA key, because it has no forward secrecy: anyone who later obtained the server’s private key could decrypt recorded traffic. With ephemeral key agreement, each session’s keys are discarded afterwards.
The same pattern appears everywhere: the Signal Protocol uses X25519 key agreement then AES for messages, PGP encrypts a random data key to the recipient’s public key, and code signing uses a signature over a hash of the file.
What quantum computing changes
A large, fault-tolerant quantum computer running Shor’s algorithm would break RSA and elliptic-curve cryptography outright. It would not break symmetric ciphers: Grover’s algorithm at best halves effective key strength, which AES-256 absorbs easily.
That’s why the migration effort is focused on the asymmetric side. In August 2024 NIST published its first post-quantum standards:
- FIPS 203 (ML-KEM) (opens in a new tab) for key agreement, based on CRYSTALS-Kyber.
- FIPS 204 (ML-DSA) (opens in a new tab) and FIPS 205 (SLH-DSA) (opens in a new tab) for digital signatures.
Major browsers and CDNs already negotiate a hybrid key exchange (X25519 combined with ML-KEM-768) for TLS, so recorded traffic is protected against “harvest now, decrypt later” even if one of the two algorithms fails. NIST’s transition draft, IR 8547 (opens in a new tab), proposes deprecating quantum-vulnerable public-key algorithms after 2030 and disallowing them after 2035.
Where it goes wrong in practice
The mathematics rarely fails. These do:
- Private keys in repositories, container images or shared drives.
- Certificate validation turned off “temporarily” in a mobile app or API client, which reopens man-in-the-middle attacks.
- One symmetric key shared across every customer, so compromising one tenant exposes all.
- Tokens signed with a weak shared secret, or verified without pinning the algorithm. The JWT security guide covers these.
These are the issues a web application penetration test looks for.
Sources
- W. Diffie, M. Hellman, New directions in cryptography, IEEE Transactions on Information Theory, 1976.
- R. Rivest, A. Shamir, L. Adleman, A method for obtaining digital signatures and public-key cryptosystems, Communications of the ACM, 1978.
- NIST, SP 800-57 Part 1 Rev. 5: Recommendation for Key Management (opens in a new tab), Table 2.
- IETF, RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 (opens in a new tab).
- NIST, FIPS 203 (opens in a new tab), FIPS 204 (opens in a new tab) and FIPS 205 (opens in a new tab), August 2024.
- NIST, IR 8547 (initial public draft): Transition to Post-Quantum Cryptography Standards (opens in a new tab), 2024.
Published by
MD-5 · Certified cybersecurity services
Articles are researched and written in-house and link to their primary sources (standards, advisories, papers and public datasets) so you can check every claim. Spotted an error? Email contact@md-5.com and we’ll correct it.