Algorithm Search⌘K

Proofs: Parallel collision search

These are the human proofs of Parallel collision search, at full length.

Correctness of parallel collision search full

This proof shows: correctness, termination.

Let pp be prime, g∈(Z/pZ)∗g \in (\mathbb{Z}/p\mathbb{Z})^* of order nn, h∈(Z/pZ)∗h \in (\mathbb{Z}/p\mathbb{Z})^*, and N≥1N \ge 1. The group (Z/pZ)∗(\mathbb{Z}/p\mathbb{Z})^* is cyclic of order p−1p - 1, so for each divisor nn of p−1p - 1 it has exactly one subgroup of order nn, namely {y:yn=1}\{y : y^n = 1\}, and this subgroup is ⟨g⟩\langle g \rangle. For termination we treat the random choices of lines L4, L6 and L17 as independent and uniform.

Lemma 1 (membership). Line L1 returns NONE exactly when h∉⟨g⟩h \notin \langle g \rangle.

Proof. h∈⟨g⟩h \in \langle g \rangle if and only if hn=1h^n = 1, by the description of the unique subgroup of order nn. □\square

From now on h=gx∗h = g^{x^*} with 0≤x∗<n0 \le x^* < n; x∗x^* is unique in this range because gg has order nn. If h=1h = 1 then x∗=0x^* = 0 and line L2 is correct, so assume h≠1h \ne 1, which forces n≥2n \ge 2.

Lemma 2 (labels). At every moment of an epoch, each client satisfies xi=gaihbix_i = g^{a_i} h^{b_i}, and every entry T[x]=(a,b)T[x] = (a, b) satisfies x=gahbx = g^a h^b.

Proof. Line L6 and line L17 set xix_i from (ai,bi)(a_i, b_i) by that formula. Line L18 multiplies xix_i by Mj=gujhvjM_j = g^{u_j} h^{v_j} and adds uju_j to aia_i and vjv_j to bib_i, which keeps the relation since exponents of gg and hh only matter modulo nn. Line L16 is the only line that writes to TT, and it writes the current point and label of a client. Line L5 empties TT at the start of each epoch. □\square

Lemma 3 (soundness). Any value returned at line L15 equals x∗x^*.

Proof. At line L10 the client has xi=gaihbix_i = g^{a_i} h^{b_i} and the table has xi=ga′hb′x_i = g^{a'} h^{b'}, by Lemma 2. Then gai−a′=hb′−bi=gx∗(b′−bi)g^{a_i - a'} = h^{b' - b_i} = g^{x^*(b' - b_i)}, so (bi−b′)x∗≡a′−ai(modn)(b_i - b') x^* \equiv a' - a_i \pmod n, that is, sx∗≡a′−ai(modn)s x^* \equiv a' - a_i \pmod n with ss from line L12. If s≠0s \ne 0 and d=gcd⁡(s,n)d = \gcd(s, n), then dd divides a′−aia' - a_i because dd divides sx∗s x^* and nn, and the solutions of the congruence modulo nn are y+tn/dy + t n/d for 0≤t<d0 \le t < d with yy from line L13. All of these lie in [0,n)[0, n). Line L15 returns a candidate zz only if gz=hg^z = h, and x∗x^* is the only element of [0,n)[0, n) with that property, so z=x∗z = x^*. □\square

So every value the algorithm returns is correct, and by Lemma 1 it returns NONE exactly when there is no solution. It remains to show that, for h∈⟨g⟩h \in \langle g \rangle with h≠1h \ne 1, the algorithm stops with probability 11.

Lemma 4 (one epoch succeeds with positive probability). There is a q>0q > 0, depending only on pp, nn and NN, such that each epoch returns with probability at least qq, whatever happened in earlier epochs.

Proof. Consider client 1 in the first two rounds of an epoch. Let x1=ga1hb1x_1 = g^{a_1} h^{b_1} be its start from line L6 and let (a1′,b1′)(a_1', b_1') be its first restart label from line L17, giving x1′=ga1′hb1′x_1' = g^{a_1'} h^{b_1'}. Consider the event EE that

  1. x1∈Dx_1 \in D, and
  2. b1′≡b1+1(modn)b_1' \equiv b_1 + 1 \pmod n and a1′≡a1−x∗(modn)a_1' \equiv a_1 - x^* \pmod n.

Part 2 gives x1′=ga1−x∗hb1+1=ga1hb1=x1x_1' = g^{a_1 - x^*} h^{b_1 + 1} = g^{a_1} h^{b_1} = x_1. The labels of line L17 are uniform on (Z/nZ)2(\mathbb{Z}/n\mathbb{Z})^2 and independent of everything else, so part 2 has probability 1/n21/n^2. In the implementation, x∈Dx \in D means that xκ mod px \kappa \bmod p is divisible by 1/θ1/\theta, for a key κ\kappa uniform on {1,…,p−1}\{1, \dots, p - 1\} drawn at line L4; for fixed x≠0x \ne 0 the value xκ mod px \kappa \bmod p is then uniform on {1,…,p−1}\{1, \dots, p - 1\}, so part 1 has probability ⌊(p−1)θ⌋/(p−1)\lfloor (p - 1)\theta \rfloor / (p - 1), which is positive because 1/θ≤n≤p−11/\theta \le \sqrt n \le p - 1. The two parts are independent, so Pr⁡[E]=q>0\Pr[E] = q > 0.

Suppose EE holds. In round 1 client 1 is processed first, the table is empty, and since x1∈Dx_1 \in D line L16 stores T[x1]=(a1,b1)T[x_1] = (a_1, b_1) and line L17 restarts client 1 at x1′x_1' with label (a1′,b1′)(a_1', b_1'). The other clients in round 1 either return, which by Lemma 3 is a correct answer, or leave the entry T[x1]T[x_1] unchanged, since line L16 writes only to points not in TT. In round 2, which exists because B≥16B \ge 16, client 1 stands at x1′=x1∈Dx_1' = x_1 \in D, line L10 finds T[x1]=(a1,b1)T[x_1] = (a_1, b_1), and line L12 computes s=b1′−b1≡1s = b_1' - b_1 \equiv 1, so d=1d = 1. Lines L13 to L15 then test the single candidate, which is x∗x^* by Lemma 3, and return it. □\square

Termination. Each epoch is a finite computation of at most BB rounds of NN clients, and each client action costs at most O(log⁡n+n)O(\log n + \sqrt n) group operations, so each epoch ends. The random choices of different epochs are independent, so by Lemma 4 the probability that the first ee epochs all fail is at most (1−q)e(1 - q)^e, which tends to 00. Hence the algorithm stops with probability 11, and the expected number of epochs is at most 1/q1/q. The heuristic analysis, under which an epoch fails with small probability, is not part of this proof.

Conclusion. By Lemmas 1 and 3, when the algorithm returns, it returns x∗x^* if h∈⟨g⟩h \in \langle g \rangle and NONE otherwise, and by Lemma 4 it returns with probability 11. ■\blacksquare

Back to Parallel collision search