Cryptography is the mathematical foundation of confidentiality and integrity. You don't need to invent algorithms — you need to know which tool to use and how to use it correctly.
The same key encrypts and decrypts.
Plaintext ──[ AES + key K ]──▶ Ciphertext
Ciphertext ──[ AES + key K ]──▶ Plaintext
Avoid DES and 3DES (too weak/slow) and never use ECB mode — it leaks patterns. Prefer authenticated modes like AES-GCM.
Each party has a public key (shareable) and a private key (secret).
This is how HTTPS actually works:
You get the key-distribution benefit of asymmetric crypto and the speed of symmetric crypto.
| Algorithm | Recommended minimum |
|---|---|
| AES | 256-bit |
| RSA | 3072-bit (2048 acceptable short-term) |
| ECC | 256-bit (≈ RSA 3072) |
Don't roll your own crypto. Use well-reviewed libraries (libsodium, the platform's crypto API) and vetted standards. Homegrown encryption is almost always broken — the failures are subtle and catastrophic.
Large quantum computers could one day break RSA and ECC. Post-quantum cryptography (e.g., NIST's ML-KEM / Kyber) is being standardized now. You don't need to deploy it today, but know the term — "crypto-agility" (the ability to swap algorithms) is becoming a design requirement.