Question
What is the difference between cryptography and cryptanalysis?
Answer
Cryptography is about designing crypto algorithms; cryptanalysis is about breaking them.
Both fall under the umbrella of cryptology, which is the overarching science.
| Term | Focus |
|---|---|
| Cryptography | Designing and building secure ciphers, protocols, and systems |
| Cryptanalysis | Attacking and breaking those systems to find weaknesses |
| Cryptology | The full discipline encompassing both |
The word "cryptography" comes from the Greek words kryptos (hidden) and graphein (to write) — literally "secret writing."
Tip: Think of it like offense vs. defense — cryptography builds the lock, cryptanalysis tries to pick it.
Go deeper:
Cryptanalysis - the code-breaking counterpart to cryptography; the two halves of the cryptology umbrella.
Note saved — thanks!
Question
What are the main branches of cryptography based on key usage?
Answer
Cryptography divides into symmetric, asymmetric, and protocols — based on how keys are shared and used.
* Cryptography by key usage: symmetric, asymmetric, and protocols. *
The taxonomy:
Cryptography
├── Symmetric (shared secret key)
│ ├── Block ciphers (e.g., AES)
│ └── Stream ciphers
├── Asymmetric (public/private key pair)
│ ├── Based on factoring (e.g., RSA)
│ ├── Based on discrete log (e.g., Diffie-Hellman, Schnorr, DSA)
│ └── Based on elliptic curves (also a form of discrete log)
└── Protocols
Protocols here means cryptographic protocols — multi-step interactions that combine the primitives above to reach a goal no single cipher achieves on its own. Examples: key exchange (Diffie-Hellman), the TLS handshake, authentication schemes, and zero-knowledge proofs.
For RSA, the factoring problem is more precisely described as: "if you can factor $N$ into primes, then you can compute the $e$-th root $\bmod N$" — but the reverse has not been proven.
Go deeper:
Public Key Cryptography - Computerphile - why asymmetric keys exist and how they differ from a shared secret.
Public-key cryptography - the asymmetric branch of the taxonomy.
Symmetric-key algorithm - the same-key branch (block and stream ciphers).
Note saved — thanks!