Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Cryptographic algorithms are the mathematical backbone of digital securityโevery secure login, encrypted message, and verified transaction depends on the computational hardness of specific mathematical problems. You're being tested on understanding why these algorithms work, not just what they do. The core concepts include number-theoretic hardness assumptions (factoring, discrete logarithms), symmetric vs. asymmetric paradigms, and the tradeoffs between security strength, key size, and computational efficiency.
Don't just memorize algorithm names and key lengths. Know which mathematical problem each algorithm relies on, whether it's symmetric or asymmetric, and when you'd choose one over another. Exam questions often ask you to compare algorithms solving similar problems or explain why a particular hardness assumption provides security. Master the underlying mathematics, and you'll be able to reason through any cryptographic scenario they throw at you.
Asymmetric cryptography uses mathematically related key pairsโa public key anyone can use and a private key only the owner knows. The security relies on mathematical problems that are easy to compute in one direction but computationally infeasible to reverse.
Compare: RSA vs. ECCโboth provide asymmetric encryption, but RSA relies on factoring while ECC relies on the discrete logarithm problem on elliptic curves. ECC achieves equivalent security with dramatically smaller keys. If an FRQ asks about efficiency in resource-constrained environments, ECC is your go-to example.
Symmetric algorithms use the same secret key for encryption and decryption. They're faster than asymmetric methods but require secure key distribution. Security depends on key length and resistance to cryptanalytic attacks.
Compare: DES vs. AESโboth are symmetric block ciphers, but DES uses a 56-bit key (insecure) while AES uses 128-256 bit keys (secure). DES uses a Feistel network; AES uses a substitution-permutation network. Know this distinction for questions about algorithm evolution and security margins.
Compare: Blowfish vs. TwofishโBlowfish uses 64-bit blocks while Twofish uses 128-bit blocks. Twofish offers stronger security guarantees for modern applications, but Blowfish remains useful for legacy systems requiring fast encryption.
Key exchange algorithms solve the fundamental problem of establishing shared secrets over insecure channels. The mathematics ensures that eavesdroppers cannot compute the shared key even after observing all public communications.
Compare: Diffie-Hellman vs. ElGamalโboth rely on the discrete logarithm problem, but Diffie-Hellman is strictly for key exchange while ElGamal provides encryption and signatures. ElGamal essentially "encrypts with" a Diffie-Hellman shared secret.
Hash functions map arbitrary-length inputs to fixed-length outputs. A secure hash must be preimage-resistant (can't find input from output), second preimage-resistant (can't find different input with same hash), and collision-resistant (can't find any two inputs with same hash).
Digital signatures provide authentication, integrity, and non-repudiation. The signer uses a private key to create a signature that anyone can verify using the corresponding public key.
Compare: RSA signatures vs. DSAโRSA signatures rely on factoring hardness while DSA relies on discrete logarithms. RSA can use the same keys for encryption and signing; DSA is signature-only. Both require careful implementation to avoid side-channel attacks.
| Concept | Best Examples |
|---|---|
| Integer factorization hardness | RSA |
| Discrete logarithm hardness | Diffie-Hellman, DSA, ElGamal |
| Elliptic curve discrete log | ECC |
| Symmetric block ciphers (secure) | AES, Twofish |
| Symmetric block ciphers (legacy/broken) | DES, Blowfish (64-bit block limitation) |
| Feistel network structure | DES, Blowfish, Twofish |
| Substitution-permutation network | AES |
| Cryptographic hashing | SHA-256, SHA-3 |
Both RSA and ElGamal are asymmetric encryption schemes. What mathematical hardness assumption does each rely on, and how does this affect their key generation processes?
Compare AES and DES: What structural difference (beyond key length) distinguishes their internal operations, and why is AES considered more secure against modern cryptanalysis?
If you need to establish a shared secret over an insecure channel without any prior key exchange, which algorithm would you use? What additional mechanism would you need to prevent man-in-the-middle attacks?
ECC provides equivalent security to RSA with much smaller keys. Explain the mathematical reason for this efficiency advantage in terms of the best-known attacks against each hardness assumption.
FRQ-style: A system uses SHA-1 for digital signatures and DES for encrypting session keys. Identify two specific vulnerabilities in this design and recommend replacement algorithms with justification.