Function field sieve

In mathematics the Function Field Sieve is one of the most efficient algorithms to solve the Discrete Logarithm Problem (DLP) in a finite field. It has heuristic subexponential complexity. Leonard Adleman developed it in 1994 [1] and then elaborated it together with M. D. Huang in 1999.[2] Previous work includes the work of D. Coppersmith [3] about the DLP in fields of characteristic two.

The discrete logarithm problem in a finite field consists of solving the equation a x = b {\displaystyle a^{x}=b} for a , b F p n {\displaystyle a,b\in \mathbb {F} _{p^{n}}} , p {\displaystyle p} a prime number and n {\displaystyle n} an integer. The function f : F p n F p n , a a x {\displaystyle f:\mathbb {F} _{p^{n}}\to \mathbb {F} _{p^{n}},a\mapsto a^{x}} for a fixed x N {\displaystyle x\in \mathbb {N} } is a one-way function used in cryptography. Several cryptographic methods are based on the DLP such as the Diffie-Hellman key exchange, the El Gamal cryptosystem and the Digital Signature Algorithm.

Number theoretical background

Function Fields

Let C ( x , y ) {\displaystyle C(x,y)} be a polynomial defining an algebraic curve over a finite field F p {\displaystyle \mathbb {F} _{p}} . A function field may be viewed as the field of fractions of the affine coordinate ring F p [ x , y ] / ( C ( x , y ) ) {\displaystyle \mathbb {F} _{p}[x,y]/(C(x,y))} , where ( C ( x , y ) ) {\displaystyle (C(x,y))} denotes the ideal generated by C ( x , y ) {\displaystyle C(x,y)} . This is a special case of an algebraic function field. It is defined over the finite field F p {\displaystyle \mathbb {F} _{p}} and has transcendence degree one. The transcendent element will be denoted by x {\displaystyle x} .

There exist bijections between valuation rings in function fields and equivalence classes of places, as well as between valuation rings and equivalence classes of valuations.[4] This correspondence is frequently used in the Function Field Sieve algorithm.

Divisors

A discrete valuation of the function field K / F p {\displaystyle K/\mathbb {F} _{p}} , namely a discrete valuation ring F p O K {\displaystyle \mathbb {F} _{p}\subset O\subset K} , has a unique maximal ideal P {\displaystyle P} called a prime of the function field. The degree of P {\displaystyle P} is d e g ( P ) = [ O / P : F p ] {\displaystyle deg(P)=[O/P:\mathbb {F} _{p}]} and we also define f O = [ O / P : F p ] {\displaystyle f_{O}=[O/P:\mathbb {F} _{p}]} .

A divisor is a Z {\displaystyle \mathbb {Z} } -linear combination over all primes, so d = α P P {\textstyle d=\sum \alpha _{P}P} where α P Z {\displaystyle \alpha _{P}\in \mathbb {Z} } and only finitely many elements of the sum are non-zero. The divisor of an element x K {\displaystyle x\in K} is defined as div ( x ) = v P ( x ) P {\textstyle {\text{div}}(x)=\sum v_{P}(x)P} , where v P {\displaystyle v_{P}} is the valuation corresponding to the prime P {\displaystyle P} . The degree of a divisor is deg ( d ) = α P deg ( P ) {\textstyle \deg(d)=\sum \alpha _{P}\deg(P)} .

Method

The Function Field Sieve algorithm consists of a precomputation where the discrete logarithms of irreducible polynomials of small degree are found and a reduction step where they are combined to the logarithm of b {\displaystyle b} .

Functions that decompose into irreducible function of degree smaller than some bound B {\displaystyle B} are called B {\displaystyle B} -smooth. This is analogous to the definition of a smooth number and such functions are useful because their decomposition can be found relatively fast. The set of those functions S = { g ( x ) F p [ x ]  irreductible with  deg ( g ) < B } {\displaystyle S=\{g(x)\in \mathbb {F} _{p}[x]\mid {\text{ irreductible with }}\deg(g)<B\}} is called the factor base. A pair of functions ( r , s ) {\displaystyle (r,s)} is doubly-smooth if r m + s {\displaystyle rm+s} and N ( r y + s ) {\displaystyle N(ry+s)} are both smooth, where N ( , ) {\displaystyle N(\cdot ,\cdot )} is the norm of an element of K {\displaystyle K} over F p {\displaystyle \mathbb {F} _{p}} , m F p [ x ] {\displaystyle m\in \mathbb {F} _{p}[x]} is some parameter and r y + s {\displaystyle ry+s} is viewed as an element of the function field of C {\displaystyle C} .

The sieving step of the algorithm consists of finding doubly-smooth pairs of functions. In the subsequent step we use them to find linear relations including the logarithms of the functions in the decompositions. By solving a linear system we then calculate the logarithms. In the reduction step we express log a ( b ) {\displaystyle \log _{a}(b)} as a combination of the logarithm we found before and thus solve the DLP.

Precomputation

Parameter selection

The algorithm requires the following parameters: an irreducible function f {\displaystyle f} of degree n {\displaystyle n} , a function m F p [ x ] {\displaystyle m\in \mathbb {F} _{p}[x]} and a curve C ( x , y ) {\displaystyle C(x,y)} of given degree d {\displaystyle d} such that C ( x , m ) 0  mod  f {\displaystyle C(x,m)\equiv 0{\text{ mod }}f} . Here n {\displaystyle n} is the power in the order of the base field F p n {\displaystyle \mathbb {F} _{p^{n}}} . Let K {\displaystyle K} denote the function field defined by C {\displaystyle C} .

This leads to an isomorphism F p n F p [ x ] / f {\displaystyle \mathbb {F} _{p^{n}}\simeq \mathbb {F} _{p}[x]/f} and a homomorphism

ϕ : F p [ x , y ] / C F p [ x ] / f , y m . {\displaystyle \phi :\mathbb {F} _{p}[x,y]/C\to \mathbb {F} _{p}[x]/f,y\mapsto m.}
Using the isomorphism each element of F p n {\displaystyle \mathbb {F} _{p^{n}}} can be considered as a polynomial in F p [ x ] / f {\displaystyle \mathbb {F} _{p}[x]/f} .

One also needs to set a smoothness bound B {\displaystyle B} for the factor base S {\displaystyle S} .

Sieving

In this step doubly-smooth pairs of functions ( r , s ) F p [ x ] × F p [ x ] {\displaystyle (r,s)\in \mathbb {F} _{p}[x]\times \mathbb {F} _{p}[x]} are found.

One considers functions of the form f = ( r m + s ) N ( r y + s ) {\displaystyle f=(rm+s)N(ry+s)} , then divides f {\displaystyle f} by any g S {\displaystyle g\in S} as many times as possible. Any f {\displaystyle f} that is reduced to one in this process is B {\displaystyle B} -smooth. To implement this, Gray code can be used to efficiently step through multiples of a given polynomial.

This is completely analogous to the sieving step in other sieving algorithms such as the Number Field Sieve or the index calculus algorithm. Instead of numbers one sieves through functions in F p [ x ] {\displaystyle \mathbb {F} _{p}[x]} but those functions can be factored into irreducible polynomials just as numbers can be factored into primes.

Finding linear relations

This is the most difficult part of the algorithm, involving function fields, places and divisors as defined above. The goal is to use the doubly-smooth pairs of functions to find linear relations involving the discrete logarithms of elements in the factor base.

For each irreducible function in the factor base we find places v 1 , v 2 , . . . {\displaystyle v_{1},v_{2},...} of K {\displaystyle K} that lie over them and surrogate functions α 1 , α 2 , . . . {\displaystyle \alpha _{1},\alpha _{2},...} that correspond to the places. A surrogate function α i K {\displaystyle \alpha _{i}\in K} corresponding to a place v i {\displaystyle v_{i}} satisfies div ( α i ) = h ( v i f v i u ) {\displaystyle {\text{div}}(\alpha _{i})=h(v_{i}-f_{v_{i}}u)} where h {\displaystyle h} is the class number of K {\displaystyle K} and u {\displaystyle u} is any fixed discrete valuation with f u = 1 {\displaystyle f_{u}=1} . The function defined this way is unique up to a constant in F p {\displaystyle \mathbb {F} _{p}} .

By the definition of a divisor div ( r y + s ) = a i v i {\textstyle {\text{div}}(ry+s)=\sum a_{i}v_{i}} for a i = v i ( r y + s ) {\displaystyle a_{i}=v_{i}(ry+s)} . Using this and the fact that a i f v i = deg ( div ( r y + s ) ) = 0 {\textstyle \sum a_{i}f_{v_{i}}=\deg({\text{div}}(ry+s))=0} we get the following expression:

div ( ( r y + s ) h ) = h a i v i = h a i v i h a i f v i v + h v a i f v i = a i h ( v i f v i v ) ) = div ( α i a i ) {\displaystyle {\text{div}}((ry+s)^{h})=\sum ha_{i}v_{i}=\sum ha_{i}v_{i}-\sum ha_{i}f_{v_{i}}v+hv\sum a_{i}f_{v_{i}}=\sum a_{i}h(v_{i}-f_{v_{i}}v))={\text{div}}(\prod \alpha _{i}^{a_{i}})}

where v {\displaystyle v} is any valuation with f v = 1 {\displaystyle f_{v}=1} . Then, using the fact that the divisor of a surrogate function is unique up to a constant, one gets

( r y + s ) h = c α i a i  for some  c F p {\displaystyle (ry+s)^{h}=c\prod \alpha _{i}^{a_{i}}{\text{ for some }}c\in F_{p}^{*}}
ϕ ( ( r y + s ) h ) = ϕ ( c ) ϕ ( α i ) a i {\displaystyle \implies \phi ((ry+s)^{h})=\phi (c)\prod \phi (\alpha _{i})^{a_{i}}}

We now use the fact that ϕ ( r y + s ) = r m + s {\displaystyle \phi (ry+s)=rm+s} and the known decomposition of this expression into irreducible polynomials. Let e g {\displaystyle e_{g}} be the power of g S {\displaystyle g\in S} in this decomposition. Then

g S g h e g ϕ ( c ) ϕ ( α i ) a i  mod  f {\displaystyle \prod _{g\in S}g^{he_{g}}\equiv \phi (c)\prod \phi (\alpha _{i})^{a_{i}}{\text{ mod }}f}

Here we can take the discrete logarithm of the equation up to a unit. This is called the restricted discrete logarithm log ( x ) {\displaystyle \log _{*}(x)} . It is defined by the equation a log ( x ) = u x {\displaystyle a^{\log _{*}(x)}=ux} for some unit u F p {\displaystyle u\in \mathbb {F} _{p}} .

g S e g log g a i h 1 log ( ϕ ( α i ) )  mod  ( p n 1 ) / ( p 1 ) , {\displaystyle \sum _{g\in S}e_{g}\log _{*}g\equiv \sum a_{i}h_{1}\log _{*}(\phi (\alpha _{i})){\text{ mod }}(p^{n}-1)/(p-1),}

where h 1 {\displaystyle h_{1}} is the inverse of h {\displaystyle h} modulo ( p n 1 ) / ( p 1 ) {\displaystyle (p^{n}-1)/(p-1)} .

The expressions h 1 log ( ϕ ( α i ) ) {\displaystyle h_{1}\log _{*}(\phi (\alpha _{i}))} and the logarithms log ( g ) {\displaystyle \log _{*}(g)} are unknown. Once enough equations of this form are found, a linear system can be solved to find log ( g ) {\displaystyle \log _{*}(g)} for all g S {\displaystyle g\in S} . Taking the whole expression h 1 l o g ( ϕ ( α i ) ) {\displaystyle h_{1}log_{*}(\phi (\alpha _{i}))} as an unknown helps to gain time, since h {\displaystyle h} , h 1 {\displaystyle h_{1}} , α i {\displaystyle \alpha _{i}} or ϕ ( α i ) {\displaystyle \phi (\alpha _{i})} don't have to be computed. Eventually for each g S {\displaystyle g\in S} the unit corresponding to the restricted discrete logarithm can be calculated which then gives log a ( g ) = log ( g ) log a ( u ) {\displaystyle \log _{a}(g)=\log _{*}(g)-\log _{a}(u)} .

Reduction step

First a l b {\displaystyle a^{l}b} mod f {\displaystyle f} are computed for a random l < n {\displaystyle l<n} . With sufficiently high probability this is n B {\displaystyle {\sqrt {nB}}} -smooth, so one can factor it as a l b = b i {\displaystyle a^{l}b=\prod b_{i}} for b i F p [ x ] {\displaystyle b_{i}\in \mathbb {F} _{p}[x]} with deg ( b i ) < n B {\displaystyle \deg(b_{i})<{\sqrt {nB}}} . Each of these polynomials b i {\displaystyle b_{i}} can be reduced to polynomials of smaller degree using a generalization of the Coppersmith method.[2] We can reduce the degree until we get a product of B {\displaystyle B} -smooth polynomials. Then, taking the logarithm to the base a {\displaystyle a} , we can eventually compute

log a ( b ) = g i S log a ( g i ) l {\displaystyle \log _{a}(b)=\sum _{g_{i}\in S}\log _{a}(g_{i})-l} , which solves the DLP.

Complexity

The Function Field Sieve is thought to run in subexponential time in

exp ( ( 32 9 3 + o ( 1 ) ) ( ln p ) 1 3 ( ln ln p ) 2 3 ) = L p [ 1 3 , 32 9 3 ] {\displaystyle \exp \left(\left({\sqrt[{3}]{\frac {32}{9}}}+o(1)\right)(\ln p)^{\frac {1}{3}}(\ln \ln p)^{\frac {2}{3}}\right)=L_{p}\left[{\frac {1}{3}},{\sqrt[{3}]{\frac {32}{9}}}\right]}

using the L-notation. There is no rigorous proof of this complexity since it relies on some heuristic assumptions. For example in the sieving step we assume that numbers of the form ( r m + s ) N ( r y + s ) {\displaystyle (rm+s)N(ry+s)} behave like random numbers in a given range.

Comparison with other methods

There are two other well known algorithms that solve the discrete logarithm problem in sub-exponential time: the index calculus algorithm and a version of the Number Field Sieve.[5] In their easiest forms both solve the DLP in a finite field of prime order but they can be expanded to solve the DLP in F p n {\displaystyle \mathbb {F} _{p^{n}}} as well.

The Number Field Sieve for the DLP in F p n {\displaystyle \mathbb {F} _{p^{n}}} has a complexity of L p [ 1 / 3 , ( 64 / 9 ) 1 / 3 + o ( 1 ) ] {\displaystyle L_{p}[1/3,(64/9)^{1/3}+o(1)]} [6] and is therefore slightly slower than the best performance of the Function Field Sieve. However, it is faster than the Function Field Sieve when n << ( log ( p ) ) 1 / 2 {\displaystyle n<<(\log(p))^{1/2}} . It is not surprising that there exist two similar algorithms, one with number fields and the other one with function fields. In fact there is an extensive analogy between these two kinds of global fields.

The index calculus algorithm is much easier to state than the Function Field Sieve and the Number Field Sieve since it does not involve any advanced algebraic structures. It is asymptotically slower with a complexity of L p [ 1 / 2 , 2 ] {\displaystyle L_{p}[1/2,{\sqrt {2}}]} . The main reason why the Number Field Sieve and the Function Field Sieve are faster is that these algorithms can run with a smaller smoothness bound B {\displaystyle B} , so most of the computations can be done with smaller numbers.

See also

References

  1. ^ L. Adleman. "The function field sieve". In: Algorithmic Number Theory (ANTS-I). Lecture Notes in Computer Science. Springer (1994), pp.108-121.
  2. ^ a b L. Adleman, M.D. Huang. "Function Field Sieve Method for Discrete Logarithms over Finite Fields". In: Inf. Comput. 151 (May 1999), pp. 5-16. DOI: 10.1006/inco.1998.2761.
  3. ^ D. Coppersmith. (1984), "Fast evaluation of discrete logarithms in fields of characteristic two". In: IEEE Trans. Inform. Theory IT-39 (1984), pp. 587-594.
  4. ^ M. Fried and M. Jarden. In: "Field Arithmetic". vol. 11. (Jan. 2005). Chap. 2.1. DOI: 10.1007/b138352.
  5. ^ D. Gordon. "Discrete Logarithm in GF(P) Using the Number Field Sieve". In: Siam Journal on Discrete Mathematics - SIAMDM 6 (Feb. 1993), pp. 124-138. DOI: 10.1137/0406010.
  6. ^ R. Barbulescu, P. Gaudry, T. Kleinjung. "The Tower Number Field Sieve". In: Advances in Cryptology – Asiacrypt 2015. Vol. 9453. Springer, May 2015. pp. 31-58
  • v
  • t
  • e
Primality testsPrime-generatingInteger factorizationMultiplicationEuclidean divisionDiscrete logarithmGreatest common divisorModular square rootOther algorithms
  • Italics indicate that algorithm is for numbers of special forms