Profesiones (Zawody)
Profesiones (Zawody)
Profesiones (Zawody)
2(32), 2003
Abstract
The problem of a computationally feasible method of find-
ing the discrete logarithm in a (large) finite field is discussed,
presenting the main algorithms in this direction. Some crypto-
graphic schemes based on the discrete logarithm are presented.
Finally, the theory of linear recurring sequences is outlined, in
relation to its applications in cryptology.
Keywords: finite field, discrete logarithm, encryption, sig-
nature.
Fqm ⊆ Fqn
150
Finite fields and cryptology
151
E. Cortellini
The formula is valid for any q = pt with q ≥ 3 and any a ∈ Fq∗ . But
the ways (if any) to apply this formula to an efficient computation of
logb (a) for large q are unknown.
152
Finite fields and cryptology
153
E. Cortellini
Step 2. Sort the pairs (g mj , j), j = 0, ..., m−1 by the first coordinate
and store them in a list GS.
Step 3. Compute ag −i for i = 0, ..., m − 1. When doing this, for
every i check if ag −i = 1. If this is the case, set x = i and stop.
Otherwise, we end up with a table BS (the ”baby steps”) with entries
(ag −i , i), i = 0, ..., m − 1.
Step 4: Sort the list BS by the first coordinate.
Step 5: Find a pair in each list with the same first coordinate, i.e.,
(y, j) in BS and (y, i) in GS. So we have y = g mj = ag −i , i.e. a = g mj+i .
Step 6: Set r = mj + i.
There certainly is a match in step 5, since the list BS contains m
consecutive powers of g and GS contains all powers of g that have
exponent a multiple of m.
Observe that steps 1 and 2 are independent of a so they can be
regarded as a precomputation. Alternatively, one can begin with steps
3 (and 4 if necessary) and proceed with step 1, checking for every j if
there is some i such that (g mj , i) belongs to the list BS (easily done if
BS is ordered). This avoids storing the list GS, but the computation
of the g mj ’s has to be done again for every input a.
If r ≥ n, the algorithm uses one inversion and m+[n/m]+O(log2 m)
multiplications. It uses m (or 2m if GS is precomputed) locations for
storing group elements and [n/m] table look-ups in a table of size m.
Some variants of the baby-step giant-step method have been pro-
posed, based on a dynamic increase of the giant step size (so the giant
steps cannot be performed before the baby steps, as they depend dy-
namically on them). In Adleman [1], the step size is doubled at certain
intervals. In Terr [34], the method increases the giant step size af-
ter each baby step and is based on a representation of integers using
triangle numbers.
Although (in √ theory) in this method the running time is reduced
by a factor of 2, in practice it performs equally well as the original
method. Also, in a worst case scenario (i.e. r is close to n), the original
method requires less group operations than the modified versions. For
a discussion of the efficiency of various baby step - giant step methods,
depending on the probability distribution for the solution r on the set
154
Finite fields and cryptology
where eij and fi are integers. These identities are equivalent to the
following system of congruences mod q − 1:
k
X
eij logb (aj ) ≡ fi (mod q − 1) , 1 ≤ i ≤ m.
j=1
The eij should be chosen such that the system above (with the un-
knowns logb (aj)) has a unique solution mod q − 1 and thus logb (aj ) can
be found.
With the a1 , ..., ak and their discrete logarithms prepared as above
(this is done only once for the given field Fq ), the method computes
the discrete logarithm logb (a) by constructing an identity of the form:
k
Y hj
aj = abf . (2)
j=1
155
E. Cortellini
156
Finite fields and cryptology
the preperiod of yk ). The name rho method comes from the fact that,
when drawing the succesive terms of yk starting from the bottom of
the paper, the terms yk with k < µ are arranged in a vertical line and
the terms yk with k ≥ µ form a cycle; thus one gets a picture similar
to the Greek letter ρ (rho).
Since the Pohlig and Hellman method allows the reduction to the
prime power order, we may suppose that |G| = p, a prime integer. Here
is the rho method of solving the DLP in G, described using the original
Pollard iterating function. Let g be a generator of G and h ∈ H; we
want to find x = logg h.
Pollard’s original iterating function ϕ (adapted to this case) is de-
fined as follows: divide G into 3 pairwise disjoint sets T1 , T2 , T3 of about
the same size and define, for any y ∈ G:
g ∗ y,y ∈ T1
ϕ (y) = y2 ,
y ∈ T2
h ∗ y, y ∈ T
3
α0 = α; β0 = 0;
αj − αi = x(βj − βi ).
157
E. Cortellini
158
Finite fields and cryptology
So, after receiving the ciphertext (y1 , y2 ), A can recover the message
m as:
m = (y1−1 )a y2 .
gm = y r rs .
159
E. Cortellini
Since g has order q in Fp∗ , g k is well defined in Fp∗ . The pair (γ, δ)
is then appended to the message m. The receiver of the message can
now verify the authenticity of the message m by checking that
−1
γ = (g m · bγ )δ (mod q)
160
Finite fields and cryptology
161
E. Cortellini
162
Finite fields and cryptology
sn = s0 An , ∀n ≥ 0.
163
E. Cortellini
References
[1] L. M. Adleman, A subexponential algorithm for the discrete loga-
rithm problem with applications to cryptography, Proc. 20th IEEE
Found. Comp. Sci. Symp., pp. 55–60, 1979.
164
Finite fields and cryptology
165
E. Cortellini
166
Finite fields and cryptology
[32] V. Shoup, Lower bounds for discrete logarithms and related prob-
lems, in Proc. Eurocrypt ’97, pp. 256–266, 1997.
[33] D. R. Stinson, Cryptography in theory and practice, CRC Press,
1995.
[34] D.C. Terr, A modification of Shanks’ baby-step giant-step algo-
rithm, Math. of Computation, 69: pp. 767–773, 2000.
[35] E. Teske, Square-root algorithms for the discrete logarithm problem
(a survey), Technical Report, University of Waterloo, 2001.
[36] E. Teske, Speeding up Pollard’s rho method for computing discrete
logarithms, in Algorithmic Number Theory Seminar ANTS-III,
volume 1423 of Lecture Notes in Computer Science, pp. 541–554,
Springer-Verlag, 1998.
[37] E. Teske, On random walks for Pollard’s rho method, Mathematics
of Computation, (to appear in print), 2001.
[38] E. Teske, Computing discrete logarithms with the parallelized kan-
garoo method, Research Report CORR 01-01, Department of Com-
binatorics and Optimization, University of Waterloo, Waterloo,
Ontario, Canada, 2001. 18 pages.
[39] P. K. S. Wah and M. Z. Wang, Realization and application of the
Massey-Omura lock, pp. 175–182, in Proc. Intern. Zurich Seminar,
March 6–8, 1984.
[40] A. E. Western and J. C. P. Miller, Tables of Indices and Primi-
tive Roots, Royal Society Mathematical Tables, vol. 9, Cambridge
Univ. Press, 1968.
Ennio Cortellini, Received May 6, 2003
MET Department,
University of Teramo, Italy
E–mail: [email protected]
167