Brute Force Attack

Trying every possible secret until one works. Only viable when the secret space is small or the password guessable.

Basically

A brute force attack tries every possible combination until it finds the right password or key. It can crack weak secrets, but not a properly generated Bitcoin private key.

Key Takeaways

  • A brute force attack tries every possible input until it finds the correct one. Its success depends entirely on the size of the search space, which the target's entropy determines.
  • Bitcoin's 256-bit private key space contains approximately 1.16 × 10^77 valid keys. Brute force is computationally infeasible even with all the world's computing power combined.
  • Brute force remains practical against weak passwords, short PINs, and poorly generated seed phrases. Key stretching and key derivation functions slow attackers by making each guess computationally expensive.

What Is a Brute Force Attack?

A brute force attack defeats a cryptographic scheme or authentication system by systematically trying every possible combination until it finds the correct one. Unlike more sophisticated attacks, it does not exploit weaknesses in algorithms or protocols and requires no mathematical insight. It treats the target as a black box and tests inputs one by one.

The approach works like trying every combination on a padlock: start at 0000, then 0001, then 0002, and continue until the lock opens. The method is guaranteed to succeed eventually, but the time required depends on how many combinations exist. A 4-digit PIN has 10,000 possibilities, while a 256-bit cryptographic key has more possibilities than atoms in the observable universe.

A cipher or hash function is considered secure when the most efficient known attack against it costs roughly the same as exhaustive search. Any shortcut that beats brute force means the system is considered weakened or broken.

How It Works

A brute force attack follows a simple loop: generate a candidate input, test it against the target, and repeat until a match is found. The attacker automates this process with specialised software or hardware.

The Maths Behind Key Spaces

The size of the key space determines whether a brute force attack is feasible. Each additional bit of entropy doubles the number of possibilities:

The jump from 128 to 256 bits does not double the difficulty: it squares it. This exponential scaling makes brute force futile against modern cryptographic key sizes.

Why Bitcoin's Key Space Is Immune

A Bitcoin private key is a 256-bit number on the secp256k1 elliptic curve. The number of valid keys equals the curve's group order minus one: approximately 1.16 × 10^77. The estimated number of atoms in the observable universe is roughly 10^80.

Even at an extraordinarily optimistic 10^18 guesses per second, roughly a billion times faster than the current fastest single machines, sweeping the full key space would take approximately 3.7 × 10^51 years. The universe is about 1.4 × 10^10 years old, so this would require roughly 10^41 universe lifetimes. No foreseeable improvement in classical computing changes this conclusion.

Where Brute Force Attacks Succeed

Brute-forcing a Bitcoin private key is impossible, but brute force attacks remain highly effective against targets with low entropy. The attack method is old, but it still works when the search space is small enough.

Weak Passwords and Short PINs

A 4-digit PIN has only 10,000 possible combinations, and a 6-character lowercase password has roughly 308 million combinations (26^6). Modern hardware can exhaust these spaces in seconds. Even an 8-character password using mixed case, digits, and symbols (~6.6 quadrillion combinations) can be cracked in hours to days with GPU-accelerated tools, depending on the hashing algorithm used.

Password cracking tools like Hashcat and John the Ripper can test billions of candidates per second against fast hash functions like MD5 or SHA-256. Against memory-hard functions like Argon2, the rate drops to thousands per second, which is exactly the point of using them.

Low-Entropy Seed Phrases

A properly generated 12-word BIP-39 seed phrase carries 128 bits of entropy, yielding roughly 3.4 × 10^38 possible combinations. A 24-word phrase carries 256 bits. Both are far beyond brute force.

The danger arises when you generate phrases improperly, as with a brain wallet where you pick words from memory, such as common words, song lyrics, or quotes; these typically have far fewer than 128 bits of effective entropy. Attackers maintain dictionaries of known phrases and can sweep common patterns quickly. Every documented case of seed phrase compromise traces back to weak generation, not to brute-forcing a properly random phrase.

Bitcoin Seed Phrase Entropy and Security Analysis provides a deeper analysis of seed phrase security. It covers the role of entropy in keeping your phrase secure.

Key Stretching

Key stretching deliberately makes each guess expensive by running the input through a key derivation function thousands or millions of times. If a single hash takes 0.001 seconds but the KDF applies 100,000 iterations, each guess now takes 100 seconds. This transforms a search that would take hours into one that would take centuries.

Common key derivation functions are used for this purpose. They make every candidate more expensive to test.

Rate Limiting and Lockouts

For online systems such as login forms, APIs, and authentication endpoints, rate limiting caps how often an attacker can submit guesses. A policy of five attempts per minute per IP address makes even a small key space practically uncrackable through the front door.

Account lockouts after repeated failures add another layer, but they create a tradeoff: an attacker can lock out legitimate users as a denial-of-service vector. Two-factor authentication provides a stronger defence by requiring something the attacker cannot brute force remotely: a physical device or biometric.

Hardware Security Modules

A hardware security module (HSM) stores cryptographic keys in tamper-resistant hardware. Even if an attacker gains access to the system, they cannot extract the key to run an offline brute force attack. The HSM limits guesses to its own processing speed, which is typically far slower than what a GPU cluster can achieve, and it can enforce lockout policies at the hardware level.

For Bitcoin custody, hardware wallets serve a similar purpose: the private key never leaves the device, so there is no hash or ciphertext for the attacker to attack offline. See Bitcoin Hardware Wallet Attack Vectors for a detailed analysis of the security boundaries.

Entropy and Brute Force Resistance

Entropy measures the randomness in a key, password, or seed phrase, expressed in bits. Each bit doubles the search space an attacker must cover. The relationship is direct: a system with n bits of entropy requires on average 2^(n − 1) guesses to crack via brute force.

Entropy comes from the size of the character pool and the length of the secret. Together, these set the number of possible secrets.

The practical threshold for brute force resistance with modern hardware is generally considered to be around 80 bits for most applications, and 128 bits for long-term cryptographic security. Bitcoin's 256-bit keys provide an enormous margin beyond both thresholds.

Why It Matters for Bitcoin Security

Brute force attacks show where Bitcoin's real vulnerabilities lie: not in the cryptography itself, but in the human and software layers around it. The secp256k1 curve and SHA-256 hashing used by Bitcoin are immune to brute force with classical computers. The risks are elsewhere:

Self-custody solutions like Spark address these risks by handling key generation and management programmatically. Their approach ensures that cryptographic randomness meets the entropy requirements that make brute force attacks impossible.

Quantum computing poses a different class of threat further ahead. Post-quantum cryptography research aims to develop algorithms resistant to quantum attacks, which use fundamentally different techniques than classical brute force. For more on this topic, see Post-Quantum Cryptography and the Bitcoin Threat.

Risks and Considerations

Brute force is the simplest attack in cryptography, but its implications are nuanced. Overestimating its threat leads to unnecessarily complex security measures. Underestimating it in specific contexts, such as password protection and PIN-based authentication, leads to breaches.

This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms