You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
No cryptographic system exists in isolation. Even mathematically strong algorithms can be vulnerable to implementation flaws, side-channel leakage, protocol weaknesses, and human error. Understanding how cryptographic systems are attacked is essential for building secure implementations.
| Category | Target | Examples |
|---|---|---|
| Brute force | The key space | Exhaustive key search |
| Mathematical | The algorithm itself | Factorisation, discrete log |
| Side channel | Physical implementation | Timing, power analysis, cache |
| Implementation | Software bugs | Padding oracle, nonce reuse |
| Protocol | The way crypto is used | Downgrade, replay, MITM |
| Social / operational | Key management and people | Stolen keys, weak passwords |
A brute force attack tries every possible key until the correct one is found:
| Key Size | Possible Keys | Time to Brute Force |
|---|---|---|
| 56 bits (DES) | 7.2 × 10^16 | Hours (specialised hardware) |
| 128 bits (AES-128) | 3.4 × 10^38 | Billions of years (current technology) |
| 256 bits (AES-256) | 1.2 × 10^77 | Physically impossible (exceeds energy of the sun) |
Key takeaway: Use a key size of 128 bits or more for symmetric encryption. AES-256 provides a massive security margin.
As covered in the Classical Ciphers lesson, frequency analysis exploits the statistical properties of language to break substitution ciphers:
The birthday attack exploits the birthday paradox to find hash collisions:
| Hash Output | Collision Resistance | Pre-image Resistance |
|---|---|---|
| 128 bits (MD5) | 2^64 (broken) | 2^128 |
| 160 bits (SHA-1) | 2^80 (broken) | 2^160 |
| 256 bits (SHA-256) | 2^128 (secure) | 2^256 |
Practical impact: This is why hash output sizes must be at least twice the desired security level.
Side-channel attacks extract secret information from the physical implementation of a cryptographic system, rather than the algorithm itself.
Mitigation: Use constant-time comparison functions.
Mitigation: Implement power-balancing techniques; use hardware countermeasures.
Mitigation: Use constant-time algorithms; implement cache-line isolation.
A padding oracle attack exploits error messages that reveal whether decrypted data has valid padding:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.