The forking lemma is any of a number of related lemmas in cryptography research. The lemma states that if an adversary, on inputs drawn from some distribution, produces an output that has some property with non-negligibleprobability, then with non-negligible probability, if the adversary is re-run on new inputs but with the same random tape, its second output will also have the property. This concept was first used by David Pointcheval and Jacques Stern in "Security proofs for signature schemes," published in the proceedings of Eurocrypt 1996. In their paper, the forking lemma is specified in terms of an adversary that attacks a digital signature scheme instantiated in the random oracle model. They show that if an adversary can forge a signature with non-negligible probability, then there is a non-negligible probability that the same adversary with the same random tape can create a second forgery in an attack with a different random oracle. The forking lemma was later generalized by Mihir Bellare and Gregory Neven. The forking lemma has been used and further generalized to prove the security of a variety of digital signature schemes and other random-oracle based cryptographic constructions.
Statement of the lemma
The generalized version of the lemma is stated as follows. Let A be a probabilistic algorithm, with inputs that outputs a pair, where r refers to the random tape of A. Suppose further that IG is a probability distribution from which x is drawn, and that H is a set of size h from which each of the hi values are drawn according to the uniform distribution. Let acc be the probability that on inputs distributed as described, the J output by A is greater than or equal to 1. We can then define a "forking algorithm" FA that proceeds as follows, on input x:
Pick a random tape r for A.
Pick h1,..., hq uniformly from H.
Run A on input to produce.
If J = 0, then return.
Pick h'J,..., h'q uniformly from H.
Run A on input to produce.
If J' = J and hJ ≠ h'J then return, otherwise, return.
Let frk be the probability that FA outputs a triple starting with 1, given an input x chosen randomly from IG. Then
Intuition
The idea here is to think of A as running two times in related executions, where the process "forks" at a certain point, when some but not all of the input has been examined. In the alternate version, the remaining inputs are re-generated but are generated in the normal way. The point at which the process forks may be something we only want to decide later, possibly based on the behavior of A the first time around: this is why the lemma statement chooses the branching point based on the output of A. The requirement that hJ ≠ h'J is a technical one required by many uses of the lemma.
Example
For example, let A be an algorithm for breaking a digital signature scheme in the random oracle model. Then x would be the public parameters A is attacking, and hi would be the output of the random oracle on its ith distinct input. The forking lemma is of use when it would be possible, given two different random signatures of the same message, to solve some underlying hard problem. An adversary that forges once, however, gives rise to one that forges twice on the same message with non-negligible probability through the forking lemma. When A attempts to forge on a message m, we consider the output of A to be where y is the forgery, and J is such that m was the Jth unique query to the random oracle. By the forking lemma, the probability of obtaining two good forgeries y and y' on the same message but with different random oracle outputs is non-negligible when acc is also non-negligible. This allows us to prove that if the underlying hard problem is indeed hard, then no adversary can forge signatures. This is the essence of the proof given by Pointcheval and Stern for a modified ElGamal signature scheme against an adaptive adversary.
Known issues with application of forking lemma
The reduction provided by the forking lemma is not a tight reduction. Pointcheval and Stern proposed security arguments for Digital Signatures and Blind Signature using Forking Lemma. Claus P. Schnorr provided an attack on blind Schnorr signatures schemes, which were argued to be secure by Pointcheval and Stern. Schnorr also suggested enhancements for securing blind signatures schemes based on discrete logarithm problem.