Brute force attacks
What Are Brute Force Attacks?
Brute force attacks, also written as brute-force attacks, are cryptanalytic and authentication attacks that succeed by trying candidate secrets one after another until the correct one is found. They make no use of structural weakness in an algorithm and require no mathematical insight, which is exactly what makes them the baseline against which every cipher and every authentication scheme is measured. A cryptographic primitive is considered secure only if the cheapest known attack against it costs about as much as exhaustive search, and a system is considered broken when some shortcut beats that cost.
Because the attack itself is trivial to describe, the interesting engineering lies entirely in cost. Designers choose parameters so that the expected work exceeds any plausible adversary's budget, and attackers look for ways to reduce that work through parallelism, specialized hardware, precomputation, or a smarter ordering of guesses.
Exhaustive Key Search
Against a symmetric cipher with an n-bit key, exhaustive search examines up to 2^n keys and succeeds after 2^(n-1) attempts on average. This gives an unambiguous unit of account, the security strength, expressed in bits. The practical significance of key length was settled publicly in 1998, when the Electronic Frontier Foundation built a custom machine from a personal computer and a large array of dedicated chips for under 250,000 dollars. The EFF DES Cracker recovered a 56-bit Data Encryption Standard key in 56 hours while testing more than 88 billion keys per second, ending the argument that DES remained adequate.
Its successor, specified in FIPS 197, offers 128, 192, and 256-bit keys. Guidance in NIST Special Publication 800-57 Part 1 treats 80-bit strength as obsolete and sets a floor of 128 bits, a level for which the energy required to enumerate the keyspace exceeds what any conceivable machine could supply. Grover's quantum search algorithm reduces the search cost quadratically, which is why 256-bit symmetric keys are recommended where long-term quantum resistance is wanted.
Password and Credential Guessing
Human-chosen secrets have far less entropy than random keys, so attacks on them rarely enumerate the full space. Offline attacks, in which an adversary has stolen a password hash database, run dictionary lists, mangling rules, and Markov models on graphics processors or field-programmable gate arrays that evaluate billions of candidate hashes per second. Defenses raise the per-guess cost rather than the guess count: unique per-user salts defeat precomputed rainbow tables, and deliberately slow key derivation functions such as PBKDF2, bcrypt, scrypt, and Argon2 impose iteration counts and memory requirements that penalize parallel hardware. Online attacks against a live service face different economics and are countered by throttling, account lockout, and multi-factor authentication. NIST Special Publication 800-63B-4 limits consecutive failed attempts on an account to 100 and recommends escalating delays after each failure. Credential stuffing, which replays username and password pairs breached elsewhere, is a variant that needs very few guesses per account and therefore evades naive rate limits.
Variants and Cost Modeling
Several attack families sit between pure enumeration and true cryptanalysis. Meet-in-the-middle attacks trade memory for time and reduce double encryption from twice the key length to only slightly more than a single key search, which is why double DES was never adopted and Triple DES was specified instead. Time-memory tradeoffs precompute chains that shift work from the attack phase to a one-time setup. Brute force also appears outside cryptography, in exhaustive enumeration of personal identification numbers, in hardware security where satisfiability solvers attack logic locking schemes, and in protocol fuzzing. Modeling these attacks realistically means accounting for hardware amortization, energy, and the attacker's tolerance for partial success rather than counting operations alone.
Applications
Brute force analysis informs practice across a range of domains, including:
- Cryptographic algorithm and key length selection
- Authentication system and password policy design
- Penetration testing and red team assessment
- Intrusion detection and anomaly-based account protection
- Hardware security module and smart card evaluation
- Post-quantum cryptography parameter selection