Algorithm 2.1. This algorithm takes as input a smoothness bound B, a search bound T ,
an odd prime power divisor qe of p − 1, two number rings O1 and O2 which contain no
primitive qth roots of unity and for which there are maps φ1 and φ2 as described above,
a B-smooth element τ in O1 whose image t ∈ Fp is primitive, and a B-smooth element σ
in O1 or O2 whose image σ ∈ Fp is non-zero. The purpose of the algorithm is to compute
the residue of logt σ modulo qe, where σ as before denotes the image of σ in Fp. We note
that it is not difficult to determine the roots of unity in a number field (see [4]). Of course,
primitive qth roots of unity can easily be avoided by choosing fields whose discriminants
are prime to q.
Step 1. For i = 1, 2, let Si be the set of prime ideals q ⊂ Oi for which q ∩ Z is generated
by a rational prime B. Search for elements δ = (δ1, δ2) ∈ O1 ×O2 which are B-smooth
and which satisfy
φ1(δ1) = φ2(δ2).