An algorithm attack targets how something works rather than a simple coding mistake. The attacker feeds inputs that make the system behave in its worst case. That can make it slow down, run out of memory, or give the wrong result. Some attacks push general algorithms into extra work (complexity attacks). Others go after the maths behind security tools (cryptographic attacks). For example:
- A tiny file that expands to huge data when opened (a zip bomb).
- A tricky text pattern that makes a regular expression engine loop for ages.
- Many inputs that cause lots of hash collisions so lookups become very slow.
- Forcing a website to use weak encryption, or finding two files with the same hash.
In short, the attack abuses the rules of the method itself. It wins by making the system do too much work, or by breaking the trust you place in the algorithm.