Skip to main content
Calcimator

Birthday Attack Calculator

Calculate birthday attack parameters, collision probability, time to collision, and attack feasibility for hash functions.

Inputs

bits

Results

Birthday Bound

400,651,869,298,001,200,000,000,000,000,000,000,000

50% Probability Bound

400,651,869,298,001,200,000,000,000,000,000,000,000

Time to Collision

12,695,900,000,000,000,000,000 years

Storage Required11,940,356,174,051,796,000,000,000,000,000 GB
Estimated Cost$4,006,518,692,980,011,700,000,000,000,000.00
How to Use This Calculator
  1. Enter the hash function output size in bits.
  2. Set the number of hashes the attacker can compute per second.
  3. Review the number of hash computations needed for a 50% collision probability.
  4. Verify that your hash function output size is at least 2x the desired security level in bits.
  5. For 128-bit security, use SHA-256 or stronger -- MD5 and SHA-1 are vulnerable.

How the result changes with Hash Length

Hash LengthBirthday Bound50% Probability BoundTime to Collision
10929,995,941,092,603,16029,995,941,092,603,1600.95 years
2212,161,435,346,036,399,000,000,000,000,000,0002,161,435,346,036,399,000,000,000,000,000,00068,491,800,000,000,000 years
355318,971,557,281,626,400,000,000,000,000,000,000,000,000,000,000,000,000318,971,557,281,626,400,000,000,000,000,000,000,000,000,000,000,000,00010,107,600,000,000,000,000,000,000,000,000,000,000 years
46722,984,322,984,245,110,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,00022,984,322,984,245,110,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000728,329,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 years

What each input means

Hash Length
Hash output length in bits
Target Collision Probability
Desired probability of finding collision
Hash Operations per Second
Computational power available

How this is calculated

Formula

Birthday Bound ≈ √(2 × m × ln(1/(1-P)))

Worked example, using the default values

  1. Identify Input Parameters
    Hash Length = 256, Target Collision Probability = 50, Hash Operations per Second = 1000000000 = 3 input(s) provided
  2. Calculate Birthday Bound
    Birthday Bound
    4.006518692980012e+38 = 4.006518692980012e+38
  3. Calculate 50% Probability Bound
    50% Probability Bound
    4.006518692980012e+38 = 4.006518692980012e+38
  4. Calculate Time to Collision
    Time to Collision
    1.26959e+22 = 1.26959e+22
  5. Calculate Storage Required
    Storage Required
    1.1940356174051796e+31 = 1.1940356174051796e+31
  6. Calculate Estimated Cost
    Estimated Cost
    4.0065186929800117e+30 = $4,006,518,692,980,011,700,000,000,000,000

Engine last updated . Checked against 1 independently-derived test how we verify calculators.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Technology & Computing.