Brute-Force Time
Time to try every key at a given guess rate.
Formula
Live Calculator
MembersVariables
Example
K=2^56, r=10^12/s: t ≈ 20 hours
How it works
This formula estimates how long a complete brute-force search would take if every possible key is tested one by one at a steady rate. It comes from the basic relationship time = total work / work rate: the total work is the size of the key space K, and the rate is the number of guesses per second r. It is most useful as a rough security estimate, because real-world searches may stop early, use parallel hardware, or be slowed by other bottlenecks.
When to use it
Use this when estimating how resistant a password, encryption key, or authentication secret is to exhaustive guessing. It is especially helpful for comparing how changing the key size or guess rate affects attack time.
Worked example, step by step
Suppose a 128-bit key has been reduced by some weakness to an effective key space of K = 2^64 possibilities, and an attacker can test r = 5 × 10^9 guesses per second. Step 1: Write the formula: t = K / r Step 2: Substitute values: t = 2^64 / (5 × 10^9) Step 3: Evaluate 2^64 ≈ 1.84 × 10^19, so t ≈ (1.84 × 10^19) / (5 × 10^9) Step 4: Divide: t ≈ 3.68 × 10^9 seconds Step 5: Convert to years: 3.68 × 10^9 / (3.15 × 10^7) ≈ 117 years Final answer: about 117 years to exhaust the key space at that guess rate.
Common mistakes to avoid
- Using the full key size in bits directly instead of converting it to the number of possibilities, such as 2^n
- Forgetting that the guess rate must be in guesses per second if the result is to come out in seconds
- Treating the result as exact even though real attacks often need only an expected half-search and may be limited by other practical factors
Did You Know?
56-bit DES fell to brute force in 1998; today's hardware would crack it in seconds — hence the move to AES.
Share this formula
More in Cryptography & Security
View allModular Exponentiation
IntermediateCore operation of RSA encryption — raise a message to a power, modulo n.
RSA Decryption
AdvancedRecovers the message using the private exponent d.
Euler's Totient
IntermediateCounts integers below n coprime to it, for n = pq — used to make RSA keys.
Shannon Entropy
AdvancedAverage information content — and the theoretical strength of a random source.
Password Entropy
IntermediateBits of security from password length and character-set size.
Key Space Size
IntermediateNumber of possible keys for a b-bit key.