Birthday attack
From Wikipedia, the free encyclopedia
|
A birthday attack is a type of cryptographic attack, so named because it exploits the mathematics behind the birthday paradox. Given a function f, the goal of the attack is to find two inputs Failed to parse (Missing texvc executable; please see math/README to configure.): x_1,x_2 such that Failed to parse (Missing texvc executable; please see math/README to configure.): f(x_1)=f(x_2) . Such a pair Failed to parse (Missing texvc executable; please see math/README to configure.): x_1,x_2 is called a collision. The method used to find a collision is to simply evaluate the function f for different input values that may be chosen randomly or pseudorandomly until the same result is found more than once. Because of the birthday paradox this method can be rather efficient. Specifically, if a function Failed to parse (Missing texvc executable; please see math/README to configure.): f(x) yields any of Failed to parse (Missing texvc executable; please see math/README to configure.): H different outputs with equal probability and Failed to parse (Missing texvc executable; please see math/README to configure.): H is sufficiently large, then we expect to obtain a pair of different arguments Failed to parse (Missing texvc executable; please see math/README to configure.): x_1 and Failed to parse (Missing texvc executable; please see math/README to configure.): x_2 with Failed to parse (Missing texvc executable; please see math/README to configure.): f(x_1) = f(x_2) after evaluating the function for about Failed to parse (Missing texvc executable; please see math/README to configure.): 1.25 \cdot \sqrt H different arguments on average.
The mathematicsWe consider the following experiment. From a set of Failed to parse (Missing texvc executable; please see math/README to configure.): H values we choose Failed to parse (Missing texvc executable; please see math/README to configure.): n values uniformly at random thereby allowing repetitions. Let Failed to parse (Missing texvc executable; please see math/README to configure.): p(n;H) be the probability that during this experiment at least one value is chosen more than once. This probability can be approximated as
be the smallest number of values we have to choose, such that the expected probability for finding a collision is at least Failed to parse (Missing texvc executable; please see math/README to configure.): p . By inverting this expression above, we find the following approximation
. Let Failed to parse (Missing texvc executable; please see math/README to configure.): Q(H) be the expected number of values we have to choose before finding the first collision. This number can be approximated by
It is easy to see that if the outputs of the function are distributed unevenly, then a collision can be found even faster. The notion of 'balance' of a hash function quantifies the resistance of the function to birthday attacks and allows the vulnerability of popular hashes such as MD and SHA to be estimated (Bellare and Kohno, 2004). Digital signatures can be susceptible to a birthday attack. A message Failed to parse (Missing texvc executable; please see math/README to configure.): m is typically signed by first computing Failed to parse (Missing texvc executable; please see math/README to configure.): f(m) , where Failed to parse (Missing texvc executable; please see math/README to configure.): f is a cryptographic hash function, and then using some secret key to sign Failed to parse (Missing texvc executable; please see math/README to configure.): f(m) . Suppose Alice wants to trick Bob into signing a fraudulent contract. Alice prepares a fair contract Failed to parse (Missing texvc executable; please see math/README to configure.): m and a fraudulent one Failed to parse (Missing texvc executable; please see math/README to configure.): m' . She then finds a number of positions where Failed to parse (Missing texvc executable; please see math/README to configure.): m can be changed without changing the meaning, such as inserting commas, empty lines, one versus two spaces after a sentence, replacing synonyms, etc. By combining these changes, she can create a huge number of variations on Failed to parse (Missing texvc executable; please see math/README to configure.): m which are all fair contracts. In a similar manner, she also creates a huge number of variations on the fraudulent contract Failed to parse (Missing texvc executable; please see math/README to configure.): m' . She then applies the hash function to all these variations until she finds a version of the fair contract and a version of the fraudulent contract which have the same hash value, Failed to parse (Missing texvc executable; please see math/README to configure.): f(m) = f(m') . She presents the fair version to Bob for signing. After Bob has signed, Alice takes the signature and attaches it to the fraudulent contract. This signature then "proves" that Bob signed the fraudulent contract. This differs slightly from the original birthday problem, as Alice gains nothing by finding two fair or two fraudulent contracts with the same hash. Alice's optimum strategy is to generate "pairs" of one fair and one fraudulent contract. Then Alice compares each freshly-generated pair to all other pairs; that is, she compares the new fair hash to all previous fraudulent hashes, and the new fraudulent contract to all previous fair hashes (but doesn't bother comparing fair hashes to fair or fraudulent to fraudulent). The birthday problem equations apply where "n" is the number of pairs. (The number of hashes Alice actually generates is 2n.) To avoid this attack, the output length of the hash function used for a signature scheme can be chosen large enough so that the birthday attack becomes computationally infeasible, i.e. about twice as many bits as are needed to prevent an ordinary brute force attack. Pollard's rho algorithm for logarithms is an example for an algorithm using a birthday attack for the computation of discrete logarithms. See alsoReferences
Notes and references
External links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


