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 (one shared secret key), asymmetric (a public/private key pair), and protocols that combine those primitives — and a complete key-usage split adds the unkeyed primitives, above all hash functions, which use no key at all.
* Cryptography by key usage: symmetric, asymmetric, unkeyed (hash functions), and the protocols built from them. *
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.
Where do hash functions go? They take no key, so by key usage they form a class of their own: unkeyed primitives (the classic textbook split is unkeyed / symmetric-key / public-key). Many overviews still fold them into the two keyed branches, because that is where they do their work — as the engine of a MAC such as HMAC (symmetric) and as the digest step of every digital signature (asymmetric). Either way: no key in, fixed-size fingerprint out.
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).
Cryptographic hash function - the unkeyed branch: no key in, fixed-size digest out.
Note saved — thanks!