# An Efficient Collision Detection Method for Computing Discrete Logarithms with Pollard's Rho

Authors: Ping Wang; Fangguo Zhang
Journal: Journal of Applied Mathematics
 (2012)

---

## Abstract

Pollard's rho method and its parallelized variant are at present known as the best generic algorithms for computing discrete logarithms. However, when we compute discrete logarithms in cyclic groups of large orders using Pollard's rho method, collision detection is always a high time and space consumer. In this paper, we present a new efficient collision detection algorithm for Pollard's rho method. The new algorithm is more efficient than the previous
distinguished point method and can be easily adapted to other applications. However, the new algorithm does not work with the parallelized rho method, but it can be parallelized with Pollard's lambda method. Besides the theoretical analysis, we also compare the performances of the new algorithm with the distinguished point method in experiments with elliptic curve groups. The experiments show that the new algorithm can reduce the expected number of iterations before reaching a match from 1.309G to 1.295G under the same space requirements for the single rho method.


---

## Body

## 1. Introduction

One of the most important assumptions in modern cryptography is the hardness of the discrete logarithm problem (DLP). Many popular cryptosystems base their security on DLP. Such cryptosystems are, for example, the Diffie-Hellman key agreement protocol [1], the ElGamal signature and encryption schemes [2], the US Government Digital Signature Algorithm (DSA) [3], and the Schnorr signature scheme [4]. Originally, they worked with multiplicative groups of finite prime fields. Once elliptic curve cryptosystems were proposed by Koblitz [5] and Miller [6], analogous practical systems based on the DLP in groups of points of elliptic curves over finite fields were designed [7]. Recall the following two definitions.Definition 1.1 (discrete logarithm problem, DLP).
LetG be a cyclic group of prime order p, and let g∈G be generator of G. Given g,h∈G, determine the integer 0≤k<p such that h=gk.Definition 1.2 (elliptic curve discrete logarithm problem, ECDLP).
LetE be an elliptic curve defined over finite field 𝔽q. Let P∈E be a point of prime order n, and let G be the subgroup of E generated by P. Given Q∈G, determine the integer 0≤k<n such that Q=kP.For DLP on a multiplicative subgroupG of prime order p of finite field 𝔽q, the index calculus method determines the size of q, which is a subexponential time algorithm, while the size of p is set by Pollard's rho method [8].Furthermore, for ECDLP, Pollard's rho method and its modifications by Gallant et al. [9] and Wiener and Zuccherato [10] are to date known as the most efficient general algorithms. van Oorschot and Wiener [11] showed that the modified Pollard's rho method can be parallelized with linear speedup.Pollard's rho method is a randomized algorithm for computing discrete logarithms. Generally, an iteration functionF:G→G is used to define a pseudorandom sequence Yi by Yi+1=F(Yi) for i=0,1,2,…, with some initial value Y0. The sequence Y0,Y1,Y2,… represents a walk in the group G. The basic assumption is that the walk Yi behaves as a random walk. Because the order of the group is finite, the sequence will ultimately reach an element that has occurred before. This is called a collision or a match. The advantage of this method is that the space requirements are small if one uses a clever method of detecting a collision. The problem of efficient collision detection of a pseudo-random walk in Pollard's rho method is the central topic of this paper.There are several collision detection algorithms for a random walk in the groupG. These algorithms in general do not exploit the group structure of G. As a result, the algorithms discussed in this paper in fact apply to any set G on which an iterated function F is used to make random walks, and their utilization goes beyond discrete logarithm computation.A simple approach to detecting a collision with Pollard's rho method is to use Floyd's cycle-finding algorithm [8], which shows that it suffices to compare Yi and Y2i for all i to find a collision. Floyd's algorithm uses only a small constant amount of storage, but needs roughly three times more work than is necessary. Brent [12] improved this approach by using an auxiliary variable. Nivasch designed an algorithm [13] for detecting periodicity in sequences using a single pointer and a small stack. This stack algorithm halts at a uniformly random point in the second loop through the sequence's cycle.In finding DES collisions [14, 15], Quisquater and Delescaille took a different approach based on storing distinguished points, an idea noted earlier by Rivest to reduce the search time in Hellman time-memory tradeoff [16]. A distinguished point is one that has some easily checked property such as having a fixed number of leading zero bits. During the pseudo-random walk, points that satisfy the distinguishing property are stored. Collision can be detected when a distinguished point is encountered a second time. This technique can be efficiently applied to find collisions among multiple processors [11].In this paper, we describe a new efficient collision detection algorithm for computing discrete logarithm with Pollard's rho method. It is a probabilistic algorithm and more efficient than the previous methods. With this algorithm, we can significantly reduce the space requirements and provide a better time-space trade-off approach. We also compare their performances in experiments with elliptic curve groups, and our experimental results confirmed the theoretical analysis.The remainder of this paper is organized as follows. In Section2, we recall Pollard's rho method for discrete logarithm computation and discuss several previous methods for collision detection. We describe and analyze the new algorithm in Section 3 and discuss its applications in Section 4. We present our experiments in Section 5 and conclude the paper in Section 6.


## 2. Preliminary

In this section, we describe Pollard's rho method for discrete logarithm computation and then discuss several collision detection algorithms and their performances.


### 2.1. Pollard's Rho Method

Pollard [8] proposed an elegant algorithm for the discrete logarithms based on a Monte Carlo idea and called it the rho method. The rho method works by first defining a sequence of elements that will be periodically recurrent, then looking for a match in the sequence. The match will lead to a solution of the discrete logarithm problem with high probability. The two key ideas involved are the iteration function for generating the sequence and the cycle-finding algorithm for detecting a match.IfD is any finite set and F:D→D is a mapping and the sequence (Xi) in D is defined by the rule:
(2.1)X0∈D,Xi+1=F(Xi),
this sequence is ultimately periodic. Hence, there exist unique integers μ≥0 and λ≥1 such that X0,…,Xμ+λ-1 are all distinct, but Xi=Xi+λ for all i≥μ. A pair (Xi,Xj) of two elements of the sequence is called a match if Xi=Xj where, i≠j. For the expected values of μ and λ, we have the following theorem.Theorem 2.1 (see [17]).
Under the assumption that an iteration functionF:D→D behaves like a truly random mapping and the initial value X0 is a randomly chosen group element, the expected values for μ and λ are π|D|/8. The expected number of evaluations before a match appears is E(μ+λ)=π|D|/2≈1.25|D|.Now we explain how the rho method for computing discrete logarithms works. LetG be a cyclic group of prime order p, and let g∈G be generator of G and h∈G. The discrete logarithm problem is to compute x satisfying gx≡h. Pollard defined the iteration function F:G→G as follows:
(2.2)F(Y)={g⋅YY∈S1,Y2Y∈S2,h⋅YY∈S3.Let the initial valueY0=1. In each iteration of Yi+1=F(Yi), the function uses one of three rules depending on the value of Yi. The group G is partitioned into three subsets S1, S2, S3 of roughly equal size. Each Yi has the form gaihbi. The sequence (ai) (and similarly for (bi)) can be computed as follows:
(2.3)ai+1={ai+1(mod⁡p)Yi∈S1,2ai(mod⁡p)Yi∈S2,ai(mod⁡p)Yi∈S3.As soon as we have a match(Yi,Yj), we have the equation gai*hbi=gaj*hbj.Sinceh=gx, this gives (2.4)ai+bix≡aj+bjxmod⁡p.
Now, if gcd(bi-bj,p)=1, we get that x=(aj-ai)(bi-bj)-1modp. Due to the method of Pohlig and Hellman [18], in practice applications the group order p is prime, so that it is very unlikely that gcd(bi-bj,p)>1 if p is large.Theorem2.1 makes the assumption of true randomness. However, it has been shown empirically that this assumption does not hold exactly for Pollard's iteration function [19]. The actual performance is worse than the expected value given in Theorem 2.1.Teske [19] proposed better iteration functions by applying more arbitrary multipliers. Assume that we are using r partitions (multipliers). We generate 2r random numbers,(2.5)mi,ni∈R{0,1,…,p-1},fori=1,2,…,r.
Then we precompute r multipliers M1,M2,…,Mr, where Mi=gmi·hni, for i=1,2,…,r. Define a hash function,
(2.6)v:G⟶{1,2,…,r}.
Then the iteration function F:G→G defined as (2.7)F(Y)=Y⋅Mv(Y),wherev(Y)∈{1,2,…,r}.
The indices are update by (2.8)ai+1=ai+mv(Yi),bi+1=bi+nv(Yi).The difference in performance between Pollard's original walk and Teske’sr-adding walk has been studied in [19, 20]. We summarize the results as follows. In prime order subgroups of ℤp*, the value of E(μ+λ) for Pollard's original walk and Teske's r-adding walk is 1.55|G| and 1.27|G|, while in groups of points of elliptic curves over finite fields, the value is 1.60|G| and 1.29|G|, respectively.


### 2.2. Previous Methods for Collision Detection

To find the collision in the pseudo-random walk, it always needs much storage. In order to minimize the storage requirements, a collision detection algorithm can be applied with a small penalty in the running time.Floyd's Cycle-Finding Algorithm
In Pollard's paper, Floyd's algorithm is applied. To findYi=Yj, the algorithm calculates (Yi,ai,bi,Y2i,a2i,b2i) until Yi=Y2i. For each iteration, we compute Yi+1=F(Yi) and Y2(i+1)=F(F(Y2i)), which means that this algorithm requires negligible storage. Floyd's algorithm is based on the following idea.Theorem 2.2 (see [25]).
For a periodic sequenceY0,Y1,Y2,…, there exists an i>0 such that Yi=Y2i and the smallest such i lies in the range μ≤i≤μ+λ.The best running time requiresμ iterations and the worst takes μ+λ iterations. Under the assumption that F:G→G behaves like a truly random mapping, the expected number of iterations before reaching a match is π5|G|/288≈1.03|G| [20]. The key point for this algorithm is that we need three group operations and one comparison for each iteration, which makes it inefficient.Brent's Algorithm
Brent proposed an algorithm [12] which is generally 25% faster than Floyd's method. It uses an auxiliary variable, say w, which at each stage of the algorithm holds Yl(i)-1, where l(i)=2⌊logi⌋. w is compared with Yi for each iteration and is updated by w=Yi when i=2k-1 for k=1,2,…. The correctness of this algorithm depends on the following fact.Theorem 2.3 (see [20]).
For a periodic sequenceY0,Y1,Y2,…, there exists an i>0 such that Yi=Yl(i)-1 and l(i)≤i<2l(i). The smallest such i is 2⌈logmax(μ+1,λ)⌉+λ-1.Under the assumption thatF:G→G is a random mapping, with Brent's algorithm the first match is expected to occur after 1.98|G| iterations [12]. The algorithm needs one group operation and one comparison for each iteration, which makes it 25%–30% faster than Floyd's algorithm. Variations of Brent's algorithm requiring slightly more storage and comparisons but less iterations can be found in [21, 22].Stack Algorithm
In 2004, Nivasch proposed an interesting algorithm that uses logarithmic storage space and can be adapted with tradeoff for storage space versus speed. This algorithm requires that a total ordering < be defined on the setG, and it works as follows. Keep a stack of pairs (Yi,i), where, at all times, both the i's and the Yi's in the stack form strictly increasing sequences. The stack is initially empty. At each step j, pop from the stack all entries (Yi,i), where Yi>Yj. If a match Yi=Yj is found with an element in the stack, the algorithm terminates successfully. Otherwise, push (Yj,j) on top of the stack and continue. The stack algorithm depends on the following fact.Theorem 2.4 (see [13]).
The stack algorithm always halts on the smallest value of the sequence's cycle, at some time in[μ+λ,μ+2λ).Under the assumption thatF:G→G is a random mapping, the expected number of iterations before finding a match is 5/2π|G|/8≈1.57|G| [13]. The algorithm needs a little bit more than one group operation and one comparison for each iteration. Under the same assumption, Nivasch proves also that the expected size of the stack is ln h+O(1). Therefore, the algorithm only requires a logarithmic amount of memory.Distinguished Point
The idea of the distinguished point method is to search for amatch not among all terms of the sequence, but only among a small subset of terms that satisfy a certain distinguishing property. It works as follows. One defines a set D, a subset of G, that consists of all group elements that satisfy a certain distinguishing property. During the pseudo-random walk, points that satisfy the distinguishing property are stored. Collision can be detected when a distinguished point is encountered a second time.
Currently, the distinguished point method is the most efficient algorithm to detect collisions in pseudo-random walk when|G| is large. A popular way of defining D is to fix an integer k and to define that w∈D if and only if the k least significant bits in the representation of w as a binary string are zero. To break ECC2K-130, it [23] defines the distinguishing property as the Hamming weight of normal-basis representation of x-coordinate of the point less than or equal to 34. Notice that this kind of definitions allows a fast check for the distinguishing property to hold, and the size of D can be easily monitored as well. Obviously, we have the following theorem.Theorem 2.5 (see [11]).
Letθ be the proportion of points in G which satisfy the distinguishing property, that is, θ=|D|/|G|. Under the assumption that F:G→G is a random mapping and D is a uniform distribution in G, the expected number of iterations before finding a match is π|G|/2+1/θ.


## 2.1. Pollard's Rho Method

Pollard [8] proposed an elegant algorithm for the discrete logarithms based on a Monte Carlo idea and called it the rho method. The rho method works by first defining a sequence of elements that will be periodically recurrent, then looking for a match in the sequence. The match will lead to a solution of the discrete logarithm problem with high probability. The two key ideas involved are the iteration function for generating the sequence and the cycle-finding algorithm for detecting a match.IfD is any finite set and F:D→D is a mapping and the sequence (Xi) in D is defined by the rule:
(2.1)X0∈D,Xi+1=F(Xi),
this sequence is ultimately periodic. Hence, there exist unique integers μ≥0 and λ≥1 such that X0,…,Xμ+λ-1 are all distinct, but Xi=Xi+λ for all i≥μ. A pair (Xi,Xj) of two elements of the sequence is called a match if Xi=Xj where, i≠j. For the expected values of μ and λ, we have the following theorem.Theorem 2.1 (see [17]).
Under the assumption that an iteration functionF:D→D behaves like a truly random mapping and the initial value X0 is a randomly chosen group element, the expected values for μ and λ are π|D|/8. The expected number of evaluations before a match appears is E(μ+λ)=π|D|/2≈1.25|D|.Now we explain how the rho method for computing discrete logarithms works. LetG be a cyclic group of prime order p, and let g∈G be generator of G and h∈G. The discrete logarithm problem is to compute x satisfying gx≡h. Pollard defined the iteration function F:G→G as follows:
(2.2)F(Y)={g⋅YY∈S1,Y2Y∈S2,h⋅YY∈S3.Let the initial valueY0=1. In each iteration of Yi+1=F(Yi), the function uses one of three rules depending on the value of Yi. The group G is partitioned into three subsets S1, S2, S3 of roughly equal size. Each Yi has the form gaihbi. The sequence (ai) (and similarly for (bi)) can be computed as follows:
(2.3)ai+1={ai+1(mod⁡p)Yi∈S1,2ai(mod⁡p)Yi∈S2,ai(mod⁡p)Yi∈S3.As soon as we have a match(Yi,Yj), we have the equation gai*hbi=gaj*hbj.Sinceh=gx, this gives (2.4)ai+bix≡aj+bjxmod⁡p.
Now, if gcd(bi-bj,p)=1, we get that x=(aj-ai)(bi-bj)-1modp. Due to the method of Pohlig and Hellman [18], in practice applications the group order p is prime, so that it is very unlikely that gcd(bi-bj,p)>1 if p is large.Theorem2.1 makes the assumption of true randomness. However, it has been shown empirically that this assumption does not hold exactly for Pollard's iteration function [19]. The actual performance is worse than the expected value given in Theorem 2.1.Teske [19] proposed better iteration functions by applying more arbitrary multipliers. Assume that we are using r partitions (multipliers). We generate 2r random numbers,(2.5)mi,ni∈R{0,1,…,p-1},fori=1,2,…,r.
Then we precompute r multipliers M1,M2,…,Mr, where Mi=gmi·hni, for i=1,2,…,r. Define a hash function,
(2.6)v:G⟶{1,2,…,r}.
Then the iteration function F:G→G defined as (2.7)F(Y)=Y⋅Mv(Y),wherev(Y)∈{1,2,…,r}.
The indices are update by (2.8)ai+1=ai+mv(Yi),bi+1=bi+nv(Yi).The difference in performance between Pollard's original walk and Teske’sr-adding walk has been studied in [19, 20]. We summarize the results as follows. In prime order subgroups of ℤp*, the value of E(μ+λ) for Pollard's original walk and Teske's r-adding walk is 1.55|G| and 1.27|G|, while in groups of points of elliptic curves over finite fields, the value is 1.60|G| and 1.29|G|, respectively.


## 2.2. Previous Methods for Collision Detection

To find the collision in the pseudo-random walk, it always needs much storage. In order to minimize the storage requirements, a collision detection algorithm can be applied with a small penalty in the running time.Floyd's Cycle-Finding Algorithm
In Pollard's paper, Floyd's algorithm is applied. To findYi=Yj, the algorithm calculates (Yi,ai,bi,Y2i,a2i,b2i) until Yi=Y2i. For each iteration, we compute Yi+1=F(Yi) and Y2(i+1)=F(F(Y2i)), which means that this algorithm requires negligible storage. Floyd's algorithm is based on the following idea.Theorem 2.2 (see [25]).
For a periodic sequenceY0,Y1,Y2,…, there exists an i>0 such that Yi=Y2i and the smallest such i lies in the range μ≤i≤μ+λ.The best running time requiresμ iterations and the worst takes μ+λ iterations. Under the assumption that F:G→G behaves like a truly random mapping, the expected number of iterations before reaching a match is π5|G|/288≈1.03|G| [20]. The key point for this algorithm is that we need three group operations and one comparison for each iteration, which makes it inefficient.Brent's Algorithm
Brent proposed an algorithm [12] which is generally 25% faster than Floyd's method. It uses an auxiliary variable, say w, which at each stage of the algorithm holds Yl(i)-1, where l(i)=2⌊logi⌋. w is compared with Yi for each iteration and is updated by w=Yi when i=2k-1 for k=1,2,…. The correctness of this algorithm depends on the following fact.Theorem 2.3 (see [20]).
For a periodic sequenceY0,Y1,Y2,…, there exists an i>0 such that Yi=Yl(i)-1 and l(i)≤i<2l(i). The smallest such i is 2⌈logmax(μ+1,λ)⌉+λ-1.Under the assumption thatF:G→G is a random mapping, with Brent's algorithm the first match is expected to occur after 1.98|G| iterations [12]. The algorithm needs one group operation and one comparison for each iteration, which makes it 25%–30% faster than Floyd's algorithm. Variations of Brent's algorithm requiring slightly more storage and comparisons but less iterations can be found in [21, 22].Stack Algorithm
In 2004, Nivasch proposed an interesting algorithm that uses logarithmic storage space and can be adapted with tradeoff for storage space versus speed. This algorithm requires that a total ordering < be defined on the setG, and it works as follows. Keep a stack of pairs (Yi,i), where, at all times, both the i's and the Yi's in the stack form strictly increasing sequences. The stack is initially empty. At each step j, pop from the stack all entries (Yi,i), where Yi>Yj. If a match Yi=Yj is found with an element in the stack, the algorithm terminates successfully. Otherwise, push (Yj,j) on top of the stack and continue. The stack algorithm depends on the following fact.Theorem 2.4 (see [13]).
The stack algorithm always halts on the smallest value of the sequence's cycle, at some time in[μ+λ,μ+2λ).Under the assumption thatF:G→G is a random mapping, the expected number of iterations before finding a match is 5/2π|G|/8≈1.57|G| [13]. The algorithm needs a little bit more than one group operation and one comparison for each iteration. Under the same assumption, Nivasch proves also that the expected size of the stack is ln h+O(1). Therefore, the algorithm only requires a logarithmic amount of memory.Distinguished Point
The idea of the distinguished point method is to search for amatch not among all terms of the sequence, but only among a small subset of terms that satisfy a certain distinguishing property. It works as follows. One defines a set D, a subset of G, that consists of all group elements that satisfy a certain distinguishing property. During the pseudo-random walk, points that satisfy the distinguishing property are stored. Collision can be detected when a distinguished point is encountered a second time.
Currently, the distinguished point method is the most efficient algorithm to detect collisions in pseudo-random walk when|G| is large. A popular way of defining D is to fix an integer k and to define that w∈D if and only if the k least significant bits in the representation of w as a binary string are zero. To break ECC2K-130, it [23] defines the distinguishing property as the Hamming weight of normal-basis representation of x-coordinate of the point less than or equal to 34. Notice that this kind of definitions allows a fast check for the distinguishing property to hold, and the size of D can be easily monitored as well. Obviously, we have the following theorem.Theorem 2.5 (see [11]).
Letθ be the proportion of points in G which satisfy the distinguishing property, that is, θ=|D|/|G|. Under the assumption that F:G→G is a random mapping and D is a uniform distribution in G, the expected number of iterations before finding a match is π|G|/2+1/θ.


## 3. The New Algorithm

We are motivated by the fact that, in distinguished point method, the distinguished points may be not uniformly distributed in the pseudo-random walk, also the points in subsetD may be not uniformly distributed in G, which always results in more iteration requirements. We are trying to design an algorithm which leads to a uniform distribution and also to provide a better way for time-space tradeoff rather than distinguishing property.


### 3.1. The Basic Algorithm

To find a collision in pseudo-random walk, which is produced by the iteration functionF:G→G, assuming F is a random mapping on G, our basic algorithm works as follows. We fix an integer N and use an auxiliary variable, say w, which at each N iterations keep the minimum value of N successive values produced by the iteration function F. Once getting the minimum value w from N successive values, we check whether this value has occurred before in the stored sequence, if so, we find the match and we are done. Otherwise, store this value w to the sequence. Then continue to compute the next N new values and repeat the previous procedures. Choose the integer N properly, we will find the match among the newly generated minimum value and stored minimum values.More precisely, to find a collision in pseudo-random sequenceY0,Y1,Y2,…, which is produced by the iteration function F:G→G, we have Algorithm 1.Algorithm 1:The new algorithm for collision detection.
Input:Initial value Y0, iteration function F:G→G, fixed integer NOutput:m and n, such that Ym=Yn(1)w←Y0, m←0, n←0(2)fori=1 to ⌈|G|/N⌉  do(3)forj=(i-1)N+1 to iN-1  do(4)Yj←F(Yj-1)(5)ifYj<wthen(6)w←Yj, n←j(7)else ifYj=w  then(8)m←j(9)return  m, n(10)end if(11)end for(12)(13)fork=1 to i-1  do(14)ifuk=w  then(15)m←vk(16)return  m, n(17)end if(18)end for(19)ui←w, vi←n(20)w←F(YiN-1), n←iN(21)end forIt is obvious that the algorithm can be considered as two parts. In the first part, that is from step (3) to step (11), we seek the minimum valuew from N successive values in the pseudo-random walk. The operation is very simple; if the current value Yj is smaller than w, then just update w with the current value and continue the next iteration. Notice that steps (7), (8), and (9) can be omitted, since it is unlikely that there is a match within N iterations. Even if it happened, the algorithm ensures that we can find a match within the next N iterations. As a result, there is only one group operation and one comparison in the first part, which consist the main operations of the algorithm.In the second part, that is from step (13) to step (19), once we get a minimum valuew, we check whether w has appeared before in the previous stored values (uk), which is empty at the beginning. If this is the case, the algorithm will return the corresponding indices and we are done. Otherwise, save the value w to the sequence (uk) of the minimum values, and the second part is finished, continue the next N iterations. It is clear that the second part can be speeded up by using a hash table. And, more important, the second part can be independent to the first part, which means the stored sequence of minimum values can be off line; that is, the first part is response for generating minimum values along the random walk, while the second part searches the collision among stored minimum values independently.


### 3.2.  Analysis

For further analysis of the algorithm, we assume that the iteration functionF:G→G behaves like a truly random mapping. According to Theorem 2.1, the expected number of iterations before reaching a match is π|G|/2. Let us look at some simple cases for the new algorithm. For N=1, which means we store all the values in the sequence before reaching a match, and the match can be found once it appears. For N=2, we need to store half of the values in the sequence before reaching a match, and always the match can be found once it appears. Obviously, the bigger the integer N, the less values we need to store. As a result, with the integer N increasing, there is a probability that we cannot detect the collision immediately when it happens. So, the new algorithm is a probabilistic algorithm. However, with high probability, the algorithm will halt close to the beginning of the second loop. More precisely, we have the following theorem.Theorem 3.1.
Under the assumption that an iteration functionF:G→G behaves like a truly random mapping and the initial value Y0 is a randomly chosen group element, for Algorithm 1, the expected number of iterations before finding a match is π|G|/2+(k+1/2)N with probability 1-(2/3)(k-1)/2, where k=0,1,2,….Proof.
LetIi be the set that consists of the ith N successive values generated by iteration function F; that is,
(3.1)Ii={Yj∣iN≤j≤(i+1)N-1,j≥0},fori=0,1,2,…,⌈|G|/N⌉-1.
For finite group G, the sequence produced by F is eventually period; that is, for any fixed F and Y0, there exist certain integers m and n, such that
(3.2)Im⋂In≠∅,m<n,Ii⋂Ij=∅,for0≤i,j<n,i≠j,
and also
(3.3)Im+i⋂In+i≠∅,fori≥0.
To prove the theorem, we divide it into two cases, that is,k=0 and k=1,2,…. For k=0, let minm and minn be the minimum values of Im and In, then(3.4)Pr(min⁡m=min⁡n)=1N∑i=0N-1(1N+2N+⋯+N-iN)1N-i=N2+3N+34N2≈14,
that is, the probability of successfully detecting the collision within the first two intersection sets is 1/4.
For each ofk=1,2,…, we notice that, for two (intersected) sets Ii and Ij, let mini and minj be the minimum values of Ii and Ij, respectively, we have
(3.5)Pr(min⁡i=min⁡j)=|Ii⋂Ij|2N2,where|Ii⋂Ij|denotesthecardinalityofIi⋂Ij.
Therefore, we have
(3.6)Pr(min⁡m+k=min⁡n+k)=1N(1N2+22N2+⋯+(N-1)2N2)=2N2-3N+16N2≈13.
Under the assumption that the iteration function F:G→G is a random mapping, according to Theorem 2.1, the expected number of evaluations before a match appears is π|D|/2. Combining the above two cases, using Algorithm 1, the expected number of iterations before reaching a match among minimum values is π|G|/2+(k+1/2)N with probability 1-(2/3)(k-1)/2, where k=0,1,2,….Remark 3.2.
According to the above theorem, we need to storeπ|G|/2/N+k terms to find the match with the probability 1-(2/3)(k-1)/2, where k can be 0,1,2,…; that is, by setting parameter N, we can balance the expected number of iterations and the expected space requirements. Therefore, Algorithm 1 is a time-space trade-off algorithm.Remark 3.3.
Algorithm1 is a probabilistic algorithm. There is a probability that we cannot detect the collision immediately when it happens. However, with high probability, the algorithm will halt close to the beginning of the second loop. For example, the probability of successfully detecting the collision 1-(2/3)(k-1)/2 is 0.90 with k=5.Notice that, compared to the distinguished point method, the new algorithm has two advantages. First, the distinguished point method depends on the assumption that the distinguished points are uniformly distributed in the pseudo-random walk, and also the points in subsetD are uniformly distributed in G. However, in practice this may not be the case, which generally results in more iterations requirement, while, for the new algorithm, each stored minimum value represents N successive values and the performance of the new algorithm independent of such assumption. Because the distinguished point method is currently the most efficient algorithm, we compare the actual performances of the new algorithm with the distinguished point method under the same expected storage requirement in experiments with elliptic curve groups in Section 5.Second, using distinguished point method, it is possible for a random walk to fall into a loop which contains no distinguished point [11]. Then, the processor cannot find new distinguished point any more on the path. Left undetected, the processor would cease to contribute to the collision search. In this case, we can restart the random walk by choosing a different initial point. However, those points calculated by previous walk do not help for the collision search, while the new algorithm can avoid such problem, because it can always find the collision among minimum values whenever it falls into a loop.


## 3.1. The Basic Algorithm

To find a collision in pseudo-random walk, which is produced by the iteration functionF:G→G, assuming F is a random mapping on G, our basic algorithm works as follows. We fix an integer N and use an auxiliary variable, say w, which at each N iterations keep the minimum value of N successive values produced by the iteration function F. Once getting the minimum value w from N successive values, we check whether this value has occurred before in the stored sequence, if so, we find the match and we are done. Otherwise, store this value w to the sequence. Then continue to compute the next N new values and repeat the previous procedures. Choose the integer N properly, we will find the match among the newly generated minimum value and stored minimum values.More precisely, to find a collision in pseudo-random sequenceY0,Y1,Y2,…, which is produced by the iteration function F:G→G, we have Algorithm 1.Algorithm 1:The new algorithm for collision detection.
Input:Initial value Y0, iteration function F:G→G, fixed integer NOutput:m and n, such that Ym=Yn(1)w←Y0, m←0, n←0(2)fori=1 to ⌈|G|/N⌉  do(3)forj=(i-1)N+1 to iN-1  do(4)Yj←F(Yj-1)(5)ifYj<wthen(6)w←Yj, n←j(7)else ifYj=w  then(8)m←j(9)return  m, n(10)end if(11)end for(12)(13)fork=1 to i-1  do(14)ifuk=w  then(15)m←vk(16)return  m, n(17)end if(18)end for(19)ui←w, vi←n(20)w←F(YiN-1), n←iN(21)end forIt is obvious that the algorithm can be considered as two parts. In the first part, that is from step (3) to step (11), we seek the minimum valuew from N successive values in the pseudo-random walk. The operation is very simple; if the current value Yj is smaller than w, then just update w with the current value and continue the next iteration. Notice that steps (7), (8), and (9) can be omitted, since it is unlikely that there is a match within N iterations. Even if it happened, the algorithm ensures that we can find a match within the next N iterations. As a result, there is only one group operation and one comparison in the first part, which consist the main operations of the algorithm.In the second part, that is from step (13) to step (19), once we get a minimum valuew, we check whether w has appeared before in the previous stored values (uk), which is empty at the beginning. If this is the case, the algorithm will return the corresponding indices and we are done. Otherwise, save the value w to the sequence (uk) of the minimum values, and the second part is finished, continue the next N iterations. It is clear that the second part can be speeded up by using a hash table. And, more important, the second part can be independent to the first part, which means the stored sequence of minimum values can be off line; that is, the first part is response for generating minimum values along the random walk, while the second part searches the collision among stored minimum values independently.


## 3.2.  Analysis

For further analysis of the algorithm, we assume that the iteration functionF:G→G behaves like a truly random mapping. According to Theorem 2.1, the expected number of iterations before reaching a match is π|G|/2. Let us look at some simple cases for the new algorithm. For N=1, which means we store all the values in the sequence before reaching a match, and the match can be found once it appears. For N=2, we need to store half of the values in the sequence before reaching a match, and always the match can be found once it appears. Obviously, the bigger the integer N, the less values we need to store. As a result, with the integer N increasing, there is a probability that we cannot detect the collision immediately when it happens. So, the new algorithm is a probabilistic algorithm. However, with high probability, the algorithm will halt close to the beginning of the second loop. More precisely, we have the following theorem.Theorem 3.1.
Under the assumption that an iteration functionF:G→G behaves like a truly random mapping and the initial value Y0 is a randomly chosen group element, for Algorithm 1, the expected number of iterations before finding a match is π|G|/2+(k+1/2)N with probability 1-(2/3)(k-1)/2, where k=0,1,2,….Proof.
LetIi be the set that consists of the ith N successive values generated by iteration function F; that is,
(3.1)Ii={Yj∣iN≤j≤(i+1)N-1,j≥0},fori=0,1,2,…,⌈|G|/N⌉-1.
For finite group G, the sequence produced by F is eventually period; that is, for any fixed F and Y0, there exist certain integers m and n, such that
(3.2)Im⋂In≠∅,m<n,Ii⋂Ij=∅,for0≤i,j<n,i≠j,
and also
(3.3)Im+i⋂In+i≠∅,fori≥0.
To prove the theorem, we divide it into two cases, that is,k=0 and k=1,2,…. For k=0, let minm and minn be the minimum values of Im and In, then(3.4)Pr(min⁡m=min⁡n)=1N∑i=0N-1(1N+2N+⋯+N-iN)1N-i=N2+3N+34N2≈14,
that is, the probability of successfully detecting the collision within the first two intersection sets is 1/4.
For each ofk=1,2,…, we notice that, for two (intersected) sets Ii and Ij, let mini and minj be the minimum values of Ii and Ij, respectively, we have
(3.5)Pr(min⁡i=min⁡j)=|Ii⋂Ij|2N2,where|Ii⋂Ij|denotesthecardinalityofIi⋂Ij.
Therefore, we have
(3.6)Pr(min⁡m+k=min⁡n+k)=1N(1N2+22N2+⋯+(N-1)2N2)=2N2-3N+16N2≈13.
Under the assumption that the iteration function F:G→G is a random mapping, according to Theorem 2.1, the expected number of evaluations before a match appears is π|D|/2. Combining the above two cases, using Algorithm 1, the expected number of iterations before reaching a match among minimum values is π|G|/2+(k+1/2)N with probability 1-(2/3)(k-1)/2, where k=0,1,2,….Remark 3.2.
According to the above theorem, we need to storeπ|G|/2/N+k terms to find the match with the probability 1-(2/3)(k-1)/2, where k can be 0,1,2,…; that is, by setting parameter N, we can balance the expected number of iterations and the expected space requirements. Therefore, Algorithm 1 is a time-space trade-off algorithm.Remark 3.3.
Algorithm1 is a probabilistic algorithm. There is a probability that we cannot detect the collision immediately when it happens. However, with high probability, the algorithm will halt close to the beginning of the second loop. For example, the probability of successfully detecting the collision 1-(2/3)(k-1)/2 is 0.90 with k=5.Notice that, compared to the distinguished point method, the new algorithm has two advantages. First, the distinguished point method depends on the assumption that the distinguished points are uniformly distributed in the pseudo-random walk, and also the points in subsetD are uniformly distributed in G. However, in practice this may not be the case, which generally results in more iterations requirement, while, for the new algorithm, each stored minimum value represents N successive values and the performance of the new algorithm independent of such assumption. Because the distinguished point method is currently the most efficient algorithm, we compare the actual performances of the new algorithm with the distinguished point method under the same expected storage requirement in experiments with elliptic curve groups in Section 5.Second, using distinguished point method, it is possible for a random walk to fall into a loop which contains no distinguished point [11]. Then, the processor cannot find new distinguished point any more on the path. Left undetected, the processor would cease to contribute to the collision search. In this case, we can restart the random walk by choosing a different initial point. However, those points calculated by previous walk do not help for the collision search, while the new algorithm can avoid such problem, because it can always find the collision among minimum values whenever it falls into a loop.


## 4. Applications

The new algorithm can be combined with other algorithms, such as Pollard's lambda method, and can be adapted to a wide range of problems which can be reduced to finding collisions, such as in Pollard's rho method for factorization [24] and in studying the behavior of random number generators [25]. In this section, we will address some of these issues.


### 4.1. Pollard's Lambda Method

It is clear that the new algorithm can be applied to Pollard's lambda method (also called the kangaroo method). The lambda method computes a discrete logarithm in an arbitrary cyclic group, given that the value is known to lie in a certain interval, that is,h=gk, where k∈[a,b] but unknown.Generally, we have two kangaroos, one tame and one wild. Their positions are represented by group elements, the tame kangarooT with starting point t0=g⌊(a+b)/2⌋ and the wild kangaroo W with starting point w0=h, and they travel in the cyclic group G=〈g〉. In terms of the exponents of g, T starts at the middle of the interval [a,b], while W starts at x. Since we do not know k, we do not know the exact location of the wild kangaroo, and that is why it is called wild. The two kangaroos produce two different pseudo-random walks with the same walking rules. It is obvious that, at all times, the point of tame kangaroo has the form gi and the point of wild kangaroo has the form h*gj for some known integers i and j. The purpose is to provoke a collision between the tame and the wild kangaroos, from which we can deduce the wild kangaroo's starting point, that is, k=(i-j)mod|G|.Similar to the case of Pollard's rho method, the new algorithm can be applied in this case to efficiently detect the collision. The advantage of the new algorithm is that we can achieve uniform distributions of minimum values in the pseudo-random walks both for the tame kangaroos and the wild kangaroos. The different performances of the new algorithm and distinguished point method in this case can refer to the case of Pollard's rho method.


### 4.2. Parallelization

As we have mentioned above, during the random walk, finding the minimum value fromN iterations and comparing the minimum value w to all previously stored values can be separated. This feature makes the new algorithm suit for distributed computation.However, Pollard's rho method is inherently serial in nature; one must wait for the current iteration of the functionF to complete before the next can begin. Each value in the sequence totally depends on the previous value and the iteration rules. In discussing the rho method for factorization, Brent considered running many processors in parallel each producing an independent sequence and noted that “Unfortunately, parallel implementation of the “rho” method does not give linear speedup” [26]. Analogous comments apply to the rho method for computing logarithms and the generalized rho method for collision search. Notice that here each parallel processor is producing its own sequence of points independently of the others and each particular processor does not increase the probability of success of any other processor. For the corresponding picture, with high probability, each processor draws a different “rho” that never intersect with each other. There is a little chance that different processors may intersect with each other.van Oorschot and Wiener [11] showed that the expected speedup of the direct parallelization of Pollard's rho method, using m processors, is only a factor of m. This is a very inefficient use of parallelization. They provided a modified version of Pollard's rho method and claimed that it can be linearly parallelized with the distinguished point method; that is, the expected running time of the modified version, using m processors, is roughly π|G|/2/m group operations.In the modified version, to perform a parallel collision search each processor proceeds as follows. Select a random starting pointY0∈G, and produce the trail of points Yi+1=F(Yi), for i=0,1,2,…, until a distinguished point Yd is reached based on some easily testable distinguished property. Store distinguished point, and start producing a new trail from a new random starting point. Unfortunately, the new algorithm is not efficient for the parallelized modified version of Pollard's rho method. The key point is that there is a probability that the new algorithm fails to detect the collision while it actually happened, which cannot be efficiently solved like the serial version.However, for Pollard's lambda method, the new algorithm can be efficiently parallelized with linear speedup. We present here a modified version of parallelized Pollard's lambda method from [11]. Assume we have m processors with m even. Then, instead of one tame and one wild kangaroo, we work with two herds of kangaroos, one herd of m/2 tame kangaroos and one herd of m/2 wild kangaroos, with one kangaroo on each processor. Each kangaroo starts from a different point, stores a minimum value every N iterations, just like the serial version. A center server collects all the minimums, and tries to find a collision between the tame kangaroo minimums and the wild kangaroo minimums By choosing a reasonable integer N, the new algorithm provides an optimal time-space trade-off method for collision detection.


## 4.1. Pollard's Lambda Method

It is clear that the new algorithm can be applied to Pollard's lambda method (also called the kangaroo method). The lambda method computes a discrete logarithm in an arbitrary cyclic group, given that the value is known to lie in a certain interval, that is,h=gk, where k∈[a,b] but unknown.Generally, we have two kangaroos, one tame and one wild. Their positions are represented by group elements, the tame kangarooT with starting point t0=g⌊(a+b)/2⌋ and the wild kangaroo W with starting point w0=h, and they travel in the cyclic group G=〈g〉. In terms of the exponents of g, T starts at the middle of the interval [a,b], while W starts at x. Since we do not know k, we do not know the exact location of the wild kangaroo, and that is why it is called wild. The two kangaroos produce two different pseudo-random walks with the same walking rules. It is obvious that, at all times, the point of tame kangaroo has the form gi and the point of wild kangaroo has the form h*gj for some known integers i and j. The purpose is to provoke a collision between the tame and the wild kangaroos, from which we can deduce the wild kangaroo's starting point, that is, k=(i-j)mod|G|.Similar to the case of Pollard's rho method, the new algorithm can be applied in this case to efficiently detect the collision. The advantage of the new algorithm is that we can achieve uniform distributions of minimum values in the pseudo-random walks both for the tame kangaroos and the wild kangaroos. The different performances of the new algorithm and distinguished point method in this case can refer to the case of Pollard's rho method.


## 4.2. Parallelization

As we have mentioned above, during the random walk, finding the minimum value fromN iterations and comparing the minimum value w to all previously stored values can be separated. This feature makes the new algorithm suit for distributed computation.However, Pollard's rho method is inherently serial in nature; one must wait for the current iteration of the functionF to complete before the next can begin. Each value in the sequence totally depends on the previous value and the iteration rules. In discussing the rho method for factorization, Brent considered running many processors in parallel each producing an independent sequence and noted that “Unfortunately, parallel implementation of the “rho” method does not give linear speedup” [26]. Analogous comments apply to the rho method for computing logarithms and the generalized rho method for collision search. Notice that here each parallel processor is producing its own sequence of points independently of the others and each particular processor does not increase the probability of success of any other processor. For the corresponding picture, with high probability, each processor draws a different “rho” that never intersect with each other. There is a little chance that different processors may intersect with each other.van Oorschot and Wiener [11] showed that the expected speedup of the direct parallelization of Pollard's rho method, using m processors, is only a factor of m. This is a very inefficient use of parallelization. They provided a modified version of Pollard's rho method and claimed that it can be linearly parallelized with the distinguished point method; that is, the expected running time of the modified version, using m processors, is roughly π|G|/2/m group operations.In the modified version, to perform a parallel collision search each processor proceeds as follows. Select a random starting pointY0∈G, and produce the trail of points Yi+1=F(Yi), for i=0,1,2,…, until a distinguished point Yd is reached based on some easily testable distinguished property. Store distinguished point, and start producing a new trail from a new random starting point. Unfortunately, the new algorithm is not efficient for the parallelized modified version of Pollard's rho method. The key point is that there is a probability that the new algorithm fails to detect the collision while it actually happened, which cannot be efficiently solved like the serial version.However, for Pollard's lambda method, the new algorithm can be efficiently parallelized with linear speedup. We present here a modified version of parallelized Pollard's lambda method from [11]. Assume we have m processors with m even. Then, instead of one tame and one wild kangaroo, we work with two herds of kangaroos, one herd of m/2 tame kangaroos and one herd of m/2 wild kangaroos, with one kangaroo on each processor. Each kangaroo starts from a different point, stores a minimum value every N iterations, just like the serial version. A center server collects all the minimums, and tries to find a collision between the tame kangaroo minimums and the wild kangaroo minimums By choosing a reasonable integer N, the new algorithm provides an optimal time-space trade-off method for collision detection.


## 5. Experiments

We implemented Pollard's rho method with elliptic curve groups over prime fields using SAGE [27], which is an open source computer algebra software. Obviously, such experiments can also be done for DLP on a multiplicative subgroup G of finite field 𝔽q. We compared the different performances between distinguished point method and the new algorithm. In this section, we describe these experiments and analyse the results.For our experiments, we briefly introduce the elliptic curve groups over prime fields and the notation we use in the following. Letq be a prime, and let 𝔽q denote the field ℤq of integers modulo q. Let a,b∈𝔽q such that 4a3+27b2≠0. Then the elliptic curve Ea,b over 𝔽q is defined through the equation (5.1)Ea,b:y2=x3+ax+b.
The set of all solutions (x,y)∈𝔽q×𝔽q of this equation, together with the element 𝒪 called the “point at infinity,” forms a finite abelian group which we denote by Ea,b(𝔽q). Usually, this group is written additively. Let P∈Ea,b(𝔽q) be a point of prime order n, and let G denote the subgroup of E generated by P. Given Q∈G, determine the integer 0≤k<n such that Q=kP.For the iteration function, we use Teske'sr-adding walk and set r=20; that is, we divide the group G into 20 subsets: S1,S2,…,S20. Define the iteration function as follows:
(5.2)F(Y)=Y+(miP+niQ)forY∈Si,i∈[1,20],
where mi and ni randomly chosen from [0,n-1] and (miP+niQ) can be precomputed for i=1,2,…,20. This means it only needs one group operation for each iteration.LetW=(x,y) be any point of G; we define the partition of G into r subsets S1,S2,…,Sr as follows. First we compute a rational approximation A of the golden ratio (5-1)/2, with a precision of 2+⌊log10(qr)⌋ decimal places. Let
(5.3)u*:G⟶[0,1),(x,y)⟶{Ax-⌊Ax⌋ifW≠O,0ifW=O,
where Ax-⌊Ax⌋ is the nonnegative fraction part of Ax. Then let (5.4)u:G⟶{1,2,…,r},u(W)=⌊u*(W)⋅r⌋+1,Si={W∈G:u(W)=i}.
This method is originally from Knuth's multiplicative hash function [28] and suggested by Teske [29]. From the theory of multiplicative hash functions, we know that, among all numbers between 0 and 1, choosing A as a rational approximation of (5-1)/2 with a sufficiently large precision leads to the most uniformly distributed hash values, even for nonrandom inputs.The purpose of our experiments is to evaluate the expected numbers of steps until a match is found with different collision detection methods, that is, distinguished point method and the new algorithm, under the same expected space requirement. Generally, we randomly choose a big prime numberq, where q is in certain range. Then we randomly choose the parameters a and b, where a,b∈𝔽q, which determine the unique elliptic curve Ea,b over 𝔽q. We will check whether the order of group Ea,b(𝔽q) has large prime factor n in certain range. If not, repeat the above procedures until we get a prime order subgroup G of Ea,b(𝔽q). Then we set the generator P of G and choose a random point Q of G. When using Pollard's rho method to compute this discrete logarithm, we count the number of steps we performed until a match is found with different collision detection methods on the same case. Then we determine the ratio R of the number of steps and n. We repeat it a couple of times with the same P but several randomly chosen Q’s. Furthermore, for practical reasons, we do the above procedures with a couple of groups, where the group order p is between 231 and 236. We have Algorithm 2.Algorithm 2:Experiments for distinguished point method and the new algorithm.
Input:Iteration function F:G→GOutput:The average ratio (numberofsteps)/n:Ri1 and Ri2 for distinguished point method and the new algorithm, respectively(1)fori=31 to 36  do(2)forj=1 to 20  do(3)repeat(4)    Choose a random prime numberq∈[2i+1,2i+3](5)    Choose two random numbersa, b∈𝔽q, where 4a3+27b2≠0(6)n← the largest prime factor of #Ea,b(7)until2i≤n≤2i+1(8)   Choose a random pointW∈Ea,b, where the order of W equal to #Ea,b(9)P←(#Ea,b/n)*W (the generator of G)(10)forl=1 to 3200/2i-31  do(11)    Choose a random numberc∈[0,n-1], Q←c*P(12)    Choose a random point inG be the initial point Y0(13)k←1(14)repeat(15)Yk←F(Yk-1)(16)     Check whether the Hamming weight ofYk less than certain value(17)     Check whether thex-coordinate of Yk is a minimum value(18)ifthere is a match among distinguished points  then(19)k1←k(20)end if(21)ifthere is a match among minimum values  then(22)k2←k(23)end if(24)until  Both of two methods have found the match(25)Rl1←k1/n for distinguished point method(26)Rl2←k2/n for the new algorithm(27)end for(28)Rj1←(∑Rl1)/3200/2i-31 for distinguished point method(29)Rj2←(∑Rl2)/3200/2i-31 for the new algorithm(30)end for(31)Ri1←(∑Rj1)/20 for distinguished point method(32)Ri2←(∑Rj2)/20 for the new algorithm(33)end forMore precisely, for eachi∈[31,36], we generate 20 elliptic curves, where each of them has a subgroup G of prime order n, such that n∈[2i,2i+1]. Then for, each group G, we generate 100 to 3200 DLPs with the same generator P but randomly generated Q. The number of elliptic curves and instances of DLPs computed is given in Table 1. For each DLP, we use Teske's r-adding walk for iteration function and find the match using distinguished point method and the new algorithm simultaneously. Once reaching a match, we compute the ratio Rl as (the number of steps until match is found)/n. Then we compute the average ratio Rj of all DLPs over the same elliptic curve. Finally, we count the average ratio Ri of all DLPs with the same i, where i∈[31,36] and n∈[2i,2i+1].Table 1
Number of elliptic curves and instances of DLPs.
BitsNo. of elliptic curvesNo. of DLPs per curve31203200322016003320800342040035202003620100Now, let us explain the parameters for distinguishing property and the new algorithm in more detail. In our experiments, we compute the average ratio of(numberofstepsuntilmatchisfound)/n under the same space requirement. To do this, generally we first define the distinguishing property and then compute the expected storage requirements. With the same storage requirements, we can deduce the parameter N for the new algorithm.For example, ifi=36, which means n, the order of G is a 36-bit prime number. According to [19], we are expected to take 1.292n iterations before reaching a match. We define the distinguishing property as the Hamming weight of normal-basis representation of x-coordinate of the point less than or equal to 9. Each point has probability almost exactly ((369)+(368)+(367)+⋯)/236≈2-8.99 of being a distinguished point, that is, θ=2-8.99; that is, to find a collision it is expected to compute 1.292*2-8.99n distinguished points. To keep the same storage requirements, we set N=1/θ=28.99≈508 for the new algorithm.The experimental results are given in Table2. It shows that on average using the new algorithm for collision detection can reduce the number of iterations until a match is found from 1.309|G| to 1.295|G| under the same space requirements for the single rho method.Table 2
Different performance for distinguished point method and the new algorithm.
BitsNo. of DLPsRatio for distinguished pointRatio for the new algorithm31640001.3091.29532320001.3091.29533160001.3101.2963480001.3101.2973540001.3091.2953620001.3101.294Average1260001.3091.295Under the same expected storage requirements, the main reason for the different performances of the distinguished point method and the new algorithm is that the distinguished points may be not uniformly distributed in the pseudo-random walk, also the points in subsetD may be not uniformly distributed in G, which always results in more iterations requirement. while, for the new algorithm, each stored minimum value represents N successive values, which leads to an equal-interval distribution.


## 6. Conclusion

In this paper, we proposed an optimal time-space trade-off method for collision detection in the pseudo-random walk when computing discrete logarithms with Pollard's rho method. We discussed the new algorithm both in theoretical analysis and in practical experiments. By comparison to other methods, it shows that the new algorithm is more efficient than previous methods. Unfortunately, the only practical application of the new idea is with the parallelized lambda method and it does not work with the parallelized rho method. As a further work, we would like to explore the performances of the new algorithm in other applications.



---

*Source: 635909-2012-01-16.xml*