Birthday attack
An attack that finds two inputs with the same hash by exploiting the birthday paradox: for an n-bit digest, a collision is expected after about 2^(n/2) attempts rather than 2^n.
A birthday attack is a method of finding a collision, two different inputs that produce the same output, in a hash function. It takes its name from the birthday paradox: in a group of 23 people, the chance that some pair shares a birthday exceeds one half. For an n-bit hash, an attacker can expect a collision after about 2^(n/2) attempts, far fewer than the 2^n needed to match one particular digest.
The distinction is between finding any collision and matching a given value. Finding an input for a specific digest still costs about 2^n work; the birthday attack is cheaper because the attacker chooses both inputs. That is enough to threaten digital signatures: an attacker who prepares a harmless and a harmful document with the same digest can have the first signed and substitute the second. The defence is digest length, which is why collision resistance is commonly rated at half the digest size, and why functions with practical collisions, MD5 and SHA-1, are no longer trusted for signatures while SHA-2 and SHA-3 remain in use.
Exam relevance: a scenario about two different messages sharing one hash, or about why a longer digest is needed, is likely to point to a birthday attack. Candidates are expected to link it to collision resistance rather than key search.