Improvements in Computing Discrete Logarithms in Finite Fields
Total Page:16
File Type:pdf, Size:1020Kb
ISSN (Print): 2476-8316 ISSN (Online): 2635-3490 Dutse Journal of Pure and Applied Sciences (DUJOPAS), Vol. 5 No. 1a June 2019 Improvements in Computing Discrete Logarithms in Finite Fields 1*Ali Maianguwa Shuaibu, 2Sunday Babuba & 3James Andrawus 1, 2,3 Department of Mathematics, Federal University Dutse, Jigawa State Email: [email protected] Abstract The discrete logarithm problem forms the basis of numerous cryptographic systems. The most efficient attack on the discrete logarithm problem in the multiplicative group of a finite field is via the index calculus. In this paper, we examined a non-generic algorithm that uses index calculus. If α is a generator × × for 퐹푝 then the discrete logarithm of 훽 ∈ 퐹푝 with respect to 훼 is also called the index of 훽 (with respect to 훼), whence the term index calculus. This algorithm depends critically on the distribution of smooth numbers (integers with small prime factors), which naturally leads to a discussion of two algorithms for factoring integers that also depend on smooth numbers: the Pollard 푝 − 1method and the elliptic curve method. In conclusion, we suggest improved elliptic curve as well as hyperelliptic curve cryptography methods as fertile ground for further research. Keywords: Elliptic curve, Index calculus, Multiplicative group, Smooth numbers Introduction 푥 It is known that the logarithm 푙표푔푏 푎 is a number x such that 푏 = 푎, for given numbers a and b. Similarly, in any group G, powers 푏푘 can be defined for all integers 푘, and 푘 the discrete logarithm푙표푔푏 푎 is an integer k such that 푏 = 푎. In number theory,푥 = 푥 푖푛푑푟푎(푚표푑 푚) is read as the index of 푎 to the base r modulo m which is equivalent to 푟 = 푎(푚표푑 푚) if r is the primitive root of m and greatest common divisor, 푔푐푑( 푎, 푚) = 1. Discrete logarithms are easily computable in some special cases. However, no efficient method is known for computing them in general. Several important algorithms in public-key cryptography base their security on the assumption that the discrete logarithm problem over carefully chosen groups has no efficient solution. × One of the simplest settings for discrete logarithms is the group(훧푝) . This is the group of multiplication modulo the prime 푝. Its elements are congruence classes modulo p, and the group product of two elements may be obtained by ordinary integer multiplication of the elements followed by reduction modulo p. *Author for Correspondence Shuaibu A. M., Babuba S., Andrawus J., DUJOPAS 5 (1a): 225-234, 2019 225 Improvements in Computing Discrete Logarithms in Finite Fields The 푘th power of one of the numbers in this group may be computed by finding its kth power as an integer and then finding the remainder after division by p. When the numbers involved are large, it is more efficient to reduce modulo p multiple times during the computation. Regardless of the specific algorithm used, this operation is called modular exponentiation. For example, consider (Z17)×. To compute 34 in this group, compute 34 = 81, and then divide 81 by 17, obtaining a remainder of 13. Thus 34 = 13 in the group (Z17)×. The discrete logarithm is just the inverse operation. For example, consider the equation 3k ≡ 13 (mod 17) for k. From the example above, one solution is k = 4, but it is not the only solution. Since by Fermat’s little theorem 316 ≡ 1 (mod 17), it also follows that if n is an integer then 34+16n ≡ 34 × (316)n ≡ 13 × 1n ≡ 13 (mod 17). Hence the equation has infinitely many solutions of the form 4 + 16n. Moreover, because 16 is the smallest positive integer m satisfying 3m ≡ 1 (mod 17), these are the only solutions. Equivalently, the set of all possible solutions can be expressed by the constraint that k ≡ 4 (mod 16). The discrete logarithm problem is considered to be computationally intractable. That is, no efficient classical algorithm is known for computing discrete logarithms in general. A general algorithm for computing 푙표푔푏 푎 in finite groups G is to raise b to larger and larger powers k until the desired 푎 is found. This algorithm is referred to as trial multiplication. It requires running time linear in the size of the group G and thus exponential in the number of digits in the size of the group. Therefore, it is an exponential-time algorithm, practical only for small groups G. More sophisticated algorithms exist, usually inspired by similar algorithms for integer factorization. These algorithms run faster than the naïve algorithm, some of them linear in the square root of the size of the group, and thus exponential in half the number of digits in the size of the group. However, none of them run in polynomial time in consideration of the number of digits in the size of the group. In the following sections, Index calculus, Pollard 푝 − 1 and elliptic curve factorization methods for computing discrete logarithms are critically examined. Index calculus Index calculus is a method for computing discrete logarithms in the multiplicative group of a finite field. It might not seem directly relevant to the elliptic curve discrete logarithm problem, but when we discuss pairing-based cryptography, these two problems are easily unrelated (Sutherland, 2017). Moreover, the same approach can be applied to elliptic curves over nonprime finite fields, as well as abelian varieties of higher dimension (Enge, 2008; Gaudry, 2009). Here, our attention is restricted to the simplest case which involve a finite field of prime order 푝. Let us consider퐹푃 ≃ ℤ/ 푝 ℤ with our usual choice of representatives for ℤ/ 푝 ℤ, integers in the interval [0, 푁], with 푁 = 푝 − 1. This simple statement is precisely what will allow us to do something that a generic algorithm cannot. It enables us lift elements of 퐹푝 ≃ ℤ/ 푝 ℤ to the ring ℤ and consider their prime factorizations, something that makes no sense in a multiplicative group in which every element is a unit, and is not available to a generic algorithm. The reduction map ℤ → ℤ/ 푝 ℤ allows us to use these prime factorizations to obtain × relations between the discrete logarithms of various elements of 퐹푝 . × Let us fix a generator 훼 for 퐹푝 , and let 훽 ∈ ⟨훼⟩ be the element whose discrete logarithm we wish to compute. For any integer 푒, we may consider the prime factorization of the integer 푒 −1 훼 훽 ∈ [1, 푁] ⊆ ℤ. When 푒 = 푙표푔훼 훽 this prime factorization will be trivial, but in general it gives 푒푖 푒 −1 ∏ 푝푖 = 훼 훽 (2) Shuaibu A. M., Babuba S., Andrawus J., DUJOPAS 5 (1a): 225-234 2019 226 Improvements in Computing Discrete Logarithms in Finite Fields where the 푝푖 vary over primes and the exponents 푒푖 are nonnegative integers. Multiplying both sides by β and taking discrete logarithms with respect to α yields ∑ 푒푖 푙표푔훼 푝푖 + 푙표푔훼 훽 = 푒 (3) which determines 푙표푔훼 훽 as a linear expression in the discrete logarithms푙표푔훼 푝푖. Note that × × the푝푖are viewed both as primes in ℤ and elements of 퐹푝 ≃ (ℤ/ 푝 ℤ) ). This does not immediately give us the desired result, since we do not know the values of 푙표푔훼 푝푖. However, if we repeat this procedure using many different values of 푒, we may obtain a system of linear equations that we can then solve for 푙표푔훼 훽. In order to make this feasible, we need to restrict the set of primes 푝푖 that we are going to work with. Thus, we fix a smoothness bound, say B, and define the factor base 푃퐵 = {푝: 푝 ≤ 퐵 푖푠 푝푟푖푚푒 {}{푝1, 푝2, . , 푝푏}}, (4) where 푏 = 휋(퐵) is the number of primes up to B (of which there are approximately 퐵/ 푙표푔 퐵, by the prime number theorem). Not all choices of 푒 will yield an integer 훼푒퐵−1 ∈ [1, 푁] ⊆ ℤ that we can write as a product of primes in our factor base 푃퐵, in fact most would not. But some choices will work, and for those that do we obtain a linear equation of the form 푒1 푙표푔훼 푝1 + 푒2 푙표푔훼 푝2 +. +푒푏 푙표푔훼 푝푏 = 푒, (5) Many of the 푒푖 may be zero. We do not yet know any of the discrete logarithms on the left hand side, but we can view 푒1푥1 + 푒2푥2+. +푒푏푥푏 + 푥푏+1 = 푒 (6) as a linear equation in 푏 + 1variables 푥1, 푥2, . , 푥푏+1 over the ring ℤ/ 푁 ℤ. This equation has a solution, namely,푥푖 = 푙표푔훼 푝푖, for1 ≤ 푖 ≤ 푏, and 푥푏+1 = 푙표푔훼 훽. If we collect 푏 + 1 such equations by choosing random values of 푒and discarding those for which 훼푒훽−1 is not B- smooth, the resulting linear system may determine a unique value 푥푏+1, which represent the discrete logarithm we wish to compute. This system will typically be under-determined; indeed, some variables 푥푖 may not appear in any of our equations. But it is quite likely that the value of 푥푏+1, which is present in every equation, will be uniquely determined. We will not attempt to prove this, because to give a rigorous proof one really needs more than 푏 + 1 equations, say, on the order of 푏 푙표푔 푏, but it is empirically true (Sutherland, 2017). Sutherland (2017) suggests the following algorithm to compute 푙표푔훼 훽. Algorithm 1 (Index calculus in a prime field 퐹푝). 1. Pick a smoothness bound B and construct the factor base 푃퐵 = {푝1, 푝2, . , 푝푏}. 2. Generate 푏 + 1 random relations 푅푖 = (푒푖,1, 푒푖,2, . , 푒푖,푏, 1, 푒푖) by picking 푒 ∈ [1, 푁] at 푒 −1 random and attempting to factor 훼 훽 ∈ [1, 푁] over the factor base 푃퐵.