This algorithm performs an exhaustive search for the desired exponent
.
The DL problem can be stated as finding
such that

Using the fact that a can be expressed as jm+i, where
, and
,
[3] Eq(19) can be rewritten as

If two lists of ordered pairs
and
, ordered by their second components are built, then it is
possible to find one pair from each list that have equal second components.
Then we define
, where i
and j are the first elements of the matching pairs.[6]