Compare
Cheat sheets, side by side
Quick-reference tables for when you already know the material and just need the numbers — each one links back to the full module for the reasoning behind it.
RSA vs. Diffie-Hellman vs. ECCAES modes of operationHash functionsSymmetric vs. asymmetric encryptionPassword hashing / KDFs
RSA vs. Diffie-Hellman vs. ECC
The three classical public-key families covered in this catalog, and the hard problem each one rests on.
| RSA | Diffie-Hellman | ECC / ECDSA | |
|---|---|---|---|
| Hard problem | Integer factorization | Discrete logarithm (mod p) | Elliptic curve discrete log |
| Key size for ~128-bit security | 3072 bits | 3072 bits | 256 bits |
| What it's used for | Encryption & signatures | Key exchange only | Key exchange (ECDH) & signatures (ECDSA) |
| Speed at equivalent security | Slower — large keys | Slower — large keys | Fast — small keys |
| Broken by Shor's algorithm? | Yes | Yes | Yes |
AES modes of operation
The same block cipher, arranged four different ways — with very different security properties.
| ECB | CBC | CTR | GCM | |
|---|---|---|---|---|
| Authenticated (integrity)? | No | No — needs a separate MAC | No — needs a separate MAC | Yes, built in |
| Needs a unique IV/nonce? | N/A | Yes | Yes | Yes — reuse breaks security |
| Parallelizable? | Yes | No (decrypt only) | Yes | Yes |
| Identical plaintext blocks look identical? | Yes — a known flaw | No | No | No |
| Recommended today? | Never | Legacy only, with HMAC | Rarely used alone | Yes — default choice |
Hash functions
Output size alone doesn't tell the whole story — construction and real-world break history matter just as much.
| MD5 | SHA-1 | SHA-256 | SHA-3-256 | |
|---|---|---|---|---|
| Output size | 128 bits | 160 bits | 256 bits | 256 bits |
| Construction | Merkle-Damgård | Merkle-Damgård | Merkle-Damgård | Sponge |
| Collision resistance | Broken | Broken | ~128-bit | ~128-bit |
| Vulnerable to length extension? | Yes | Yes | Yes (use HMAC) | No |
| Status | Do not use | Do not use | Current standard | Current standard |
Symmetric vs. asymmetric encryption
Why real systems (like TLS) almost always use both, each for what it's good at.
| Symmetric (AES) | Asymmetric (RSA / ECC) | |
|---|---|---|
| Keys involved | One shared secret key | A public/private key pair |
| Speed | Fast — used for bulk data | Slow — key exchange/signatures only |
| Key distribution problem? | Yes — both sides need the secret in advance | No — the public key can be shared openly |
| Typical role in TLS | Encrypts the actual traffic | Establishes the key, or signs the handshake |
Password hashing / KDFs
All four deliberately slow down password checking — they just spend the extra cost differently.
| PBKDF2 | bcrypt | scrypt | Argon2id | |
|---|---|---|---|---|
| Introduced | 2000 | 1999 | 2009 | 2015 |
| Memory-hard? | No | No | Yes | Yes |
| Tunable cost | Iteration count | Cost factor | Cost, block size, parallelism | Time, memory, parallelism |
| GPU/ASIC resistance | Low | Moderate | High | Highest — current pick |