-
The Birthday Problem
- The birthday problem describes the probabilistic ease with which certain weak cryptographic functions may be broken.
-
When an attacker's objective is broadened to find any exploit (a single matching pair) within a set:
- With 367 people, the probability that two people share the same birthday is 100%.
- With 70 people, the probability that any two people share the same birthday is 99.9%.
- With as few as 23 people, the probability that any two people share the same birthday is 50%.
-
Concepts
-
The birthday problem is based upon these well-known concepts within the fields of mathematics and probability:
-
Mutual Exclusivity (Disjoint):
-
If two outcomes to an event cannot both be true.
- P(A) + P(A') = 1
-
In this case, P(A) and P(A') are mutually exclusive. These events cannot both occur within the same set:
- "Two people in the set share a birthday"
- "Two people in the set do not share a birthday"
-
Conditional Probability:
-
The probability of an event A, given that another event B has occurred.
- P(A|B)
-
This can be rewritten as:
- P(A&B) / P(B)
- The probability that both events A and B occur, divided by the probability of event B.
- The probability of event B must not be 0.
-
The Pigeonhole Principle:
-
In mathematics, the pigeonhole principle states that:
- N items are put into M containers
- If N > M:
- At least one container must contain multiple items
-
Example:
- In any group of three gloves, there must be at least two left-hand gloves or at least two right-hand gloves.
- N = 3
- Number of Gloves
- M = 2
- Number of Glove Types
-
Birthday Attack
- An attack on a weak hash that attempts to cause a collision.
- Given a function f, the goal of the attack is to find two different inputs x_1, x_2 such that f(x_1) = f(x_2). This is called a collision.
- The method used to find a collision is simply to evaluate the function f for different input values randomly until the same result is found more than once. Because of the birthday problem, this method can be rather efficient.
-
Collision
- Two inputs to a hash function produce an identical output.
- An encryption or hashing function must be sufficiently complex that two inputs are very unlikely to produce the same output. This feature of cryptographic functions is called collision resistance.