Speeding up the Pollard's Rho Algorithm

Speeding up the Pollard's Rho Algorithm

1 Speeding up the Pollard’s Rho algorithm Silje Christensen [email protected] & Simen Johnsrud [email protected] Abstract—In order to understand the threat model of elliptical curve cryptographic schemes it is important to have the knowledge of how you can attack it. Pollard’s Rho algorithm is one possible way to solve the elliptic curve discrete logarithm problem (ECDLP)[1]. The algo- rithm was introduced in 1978 [2], and during the past four decades there have been several modifications to the original implementation to reduce the time and storage complexity. In our paper we aim to give the reader an overview of the Pollard’s Rho algorithm in order to understand how we can speed it up. We will start by looking at the basic [1] concepts of it, and then study the existing methods which Fig. 1. Rho shape of the sequence Xi in Pollard’s Rho algorithm. can be applied to reduce the complexity. Keywords—Pollard’s Rho algorithm, speeding up, elliptic curve discrete logarithm problem, cycle-finding algorithm, A. Context Brent. Recall that when we want to solve the elliptic curve discrete logarithm problem (ECDLP), we have an elliptic curve (E) defined over a finite field (Fq), I. OVERVIEW a point P of order n, a point Q which is one of the The Pollard’s rho algorithm was introduced by the points in P , and an integer l in the range [0; n − 1] British mathematician John Pollard[3]. The origin of such that Q = lP . The integer l is called the discrete the name ”Pollard’s Rho” is based on the similarity logarithm of Q to the base P , denoted l = logP Q. [1] in appearance between the Greek letter ρ (rho) and the sequence that the algorithm creates, as shown in Figure 1. The tail length (t) is the amount of steps B. Core idea (s) before we enter a cycle, and the cycle length is Pollards rho algorithm finds distinct pairs (c0; d0) the length from the start of the cycle until we get a and (c00; d00) of integers modulo n such that collision. The input to the algorithm is the points P of the c0P + d0Q = c00P + d00Q elliptic curve over the field . These points are di- Fq which gives us vided into L sets, called branches, of approximately the same size, by using a partition function f. If f is (c0 − c00)P = (d00 − d0)Q = (d00 − d0)lP a random function, we can make some assumptions about how long time it will take before we start the and then cycle, i.e. the tail length t and the expected cycle (c0 − c00) ≡ (d00 − d0)l(mod(n)) length s. We have that t ≈ p πn terms and s ≈ p πn 2 8 and from there we can find l = log Q by [1], where n is the modulo. The output is the discrete p computing algorithm l = logpQ, which we will describe in the next sections. l = (c0 − c00)(d00 − d0)−1(mod(n)) 2 The algorithm finds the pairs (c0; d0) and (c00; d00) Algorithm 1 Pollard’s rho algorithm for the ECDLP by defining an iterative function. When a point on a single processor cP + dQ occurs for the second time, we have a so 1: procedure POLARD’S RHO called collision, and the pair has been found. A col- 2: Select the number L of branches (e.g., L=16 lision can be found by using Floyd’s cycle-finding or L=32) algorithm, also called the ”tortoise and hare” cycle 3: Select a partition function H : hP i ! detection. This pointer algorithm uses two pointers f1; 2; :::; Lg which move through the sequence at different speed 4: for j from 1 to L do to find the first two points in the sequence with the 5: Select aj, bj ÎR [0; n − 1]. same value[4]. 6: Compute Rj = ajP +bjQ. 7: end for 0 0 0 8: Select c , d ÎR [0; n−1] and compute X = II. COMPLEXITY c0P + d0Q 9: X00 X0 c00 c0 d00 d0 The time complexityp of Pollard’s rho is originally Set , , . approximately n, where n is the modulo, in terms 10: while X0 6= X00 do 0 0 0 of the input size in bits O(2k=2).[9] 11: Compute j = H(X ). Set X X +Rj, 0 0 0 0 c c + aj mod n, d d + bj mod n. 12: for i from 1 to 2 do III. ALGORITHM 13: Compute j = H(X0). Set X00 00 00 00 00 00 Algorithm 1 is a pseuducode of the Pollard’s Rho X + Rj, c c + aj mod n, d d + bj algorithm for the ECDLP on a single processor[1], mod n. and should give the reader a better insight of how 14: end for the algorithm works. 15: end while 16: If d0 = d00 then return (”failure”) 17: Else compute l = (c0 − c00)(d00 − d0)−1 mod IV. SPEEDING UP n and return (l) The original algorithm created by Pollard has 18: end procedure been modified several times in order to speed up the time complexity. We will take a look at some of the major improvements on the algorithm. B. Parallelized Pollard’s Rho Another way to speed up the algorithm is to run A. Brent’s cycle finding method it on multiple processors. The na¨ıve way to speed In 1980 Richard P. Brent made a variant of up Pollard’s Rho when you got M processors is to the cycle-finding algorithm. In this version we are run the algorithm independently on each processor i searching for the smallest power of two (2 ) that is with different randomly chosen starting points X0 larger than both t and s, were i = 0; 1; 2; ::. The idea until one of the processors finds a solution. The is to compare 2i−1 with each following value up to expected number of elliptic curve operations per- 2i until a collision occurs, i.e. the hare and tortoise formed by each processor before one terminates is have the same value. about 3pn=M, where n is the modulo. As a result By doing this he gained two advantages compared of thisp observation the expected speedup is a factor to the initial Floyd’s cyclic finding algorithm. First, of M. [1] it finds the correct length of the cycle length (s) This can be improved to a factor of M by letting directly, and each step includes only one evaluation the sequences generated by the different processors of the function that maps the set, rather than three collide with each other. To be more specific, the M evaluations.[5] If the cost of doing comparisons processors choose it’s own independently starting are low, the algorithm may actually improve the point X0, but they all share the same iterating time complexity of the cycle finding algorithm by function f to compute the next Xi points. As a result 30%.[6]. According to Brent, this would speed up of this, if two sequences from different processors the Pollard’s rho algorithm by 24%. collide then the two sequences will be identical from 3 that point on. calculate gcd(z; n) where z is the product of every jx − yj - ending up with a huge performance gain. C. Automorphism However, this may cause the algorithm to fail due to a repeated factor which may be introduced if n has By creating a group automorphism, which loosely a certain value, e.g. if n is squared. If the algorithm speaking is the symmetry group of the object, we turns into a repetitive cycle, the algorithm should can make further improvement to the Pollard’s Rho go back to the last computed gcd and do the initial algorithm. In other words, this is a way of mapping formula. [7] the object to itself while preserving all of its struc- ture. It is defined by Ψ : hP i ! hP i, where P Î B. Faster cycle finding algorithm E(Fq). The equivalence class [R], where R Î P , will There are a number of possible algorithms to j consist of all of the points satisfying R1 = Ψ (R2) use in order to find the cycle. Some of these will where j is an integer in the range [0; t − 1]. Here, t decrease the time complexity, but as a drawback in- is the order of the group and hence, the size of the crease the memory usage. In general, these methods equivalence class. store computed sequence values, and validates with How will this affect the algorithm? The idea is a hash function whether or not the new value equals to find a function that runs over the equivalence one of the previous ones. Sedgewick, Szymanski classes rather then the points one by one, and replace and Yao provided one that can guarantee a number it in the Pollard’s Rho algorithm. Since Ψ is a of function evaluations, while Nivasch on the other automorphism group, Ψ(R) = λ(R) for all points hand came up with one that does not use a fixed R in hP i, where λ is an integer between zero amount of memory. However, these time improved and n − 1. For each equivalence class we create a methods usually cannot be implemented into the unique representation [R], and then we can define Pollard’s rho algorithm.[4] the iteration function g such that g(R) = f(R). This function could then be used in the parallelized VI.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us