Chance of Hash Collision
Estimate birthday-type collisions when hash values spread uniformly at random.
Your numbers
Approximate chance of collision
Dis model na only for independent hash wey every output get equal chance. For up to 10,000 hashes, we dey calculate di no-collision product inside log space; for higher counts, we dey use di birthday approximation. If hashes plenty pass di possible outputs, collision must happen. Dis no be proof of cryptographic security or model for collision wey attacker deliberately cause.
Compare scenarios
You fit keep up to three snapshots for this tab. Loading one go replace the present inputs.
Formula
n na di number of hashes and b na di width for bits. For n ≤ 10,000, P = 1 − ∏(1 − k/2^b), k = 0…n−1. Higher counts dey use P ≈ 1 − exp[−n(n−1)/(2×2^b)]. If n > 2^b, P = 1.
Estimate birthday-type collisions when hash values spread uniformly at random.
Example wey show the calculation
- Independent hashes wey system generate
- 1000000
- Number of bits for each hash (bits)
- 64
- Approximate chance of collision
- 2.7105027E-6 %
Where e fit work and limits
Dis model na only for independent hash wey every output get equal chance. For up to 10,000 hashes, we dey calculate di no-collision product inside log space; for higher counts, we dey use di birthday approximation. If hashes plenty pass di possible outputs, collision must happen. Dis no be proof of cryptographic security or model for collision wey attacker deliberately cause.
We check inputs for missing values and allowed ranges. Result wey pass the finite numeric range no go show. Rounding affect wetin display, while calculation use the model numeric precision.
Check your units and assumptions before you rely on result. Changing label no convert currency or physical unit.
Version of di formula: 769d59f888b0 · Example don get check: