We have $$7^x = 166 \pmod{433}$$
I need to find $x$ using the Pohlig-Hellman algorithm.
We have $$7^x = 166 \pmod{433}$$
I need to find $x$ using the Pohlig-Hellman algorithm.
I will assume you have access to a better description of the algorithm than that web site. If not, refer to:
We are asked to use the Pohlig-Hellman algorithm to solve a Discrete Log Problem and find $x$ for:
$$7^x = 166 \pmod{433}$$
Using the notation:
$$g^x = h \pmod p$$
We have:
$$g = 7, h = 166, p = 433, N = p - 1 = \prod q_i^{e_i} = q_1^{e_1} \cdot q_2^{e_2} = 432 = 2^4 \cdot 3^3$$
We can summarize the necessary algorithm calculations in a handy table as:
$$\begin{array}{|c|c|c|c|c|} \hline \large q & \large e & \large g^{(p-1)/q^e} & \large h^{(p-1)/q^e} & \mbox{Solve}~ \large \left(g^{(p-1)/q^e} \right)^x = ~ \large h^{(p-1)/q^e}~ \mbox{for} ~ \large x \\ \hline 2 & 4 & 265 & 250 & \mbox{Calculation I = ?}\\ \hline 3 & 3 & 374 & 335 & \mbox{Calculation II = ?}\\ \hline \end{array}$$
Calculation I:
We want to solve:
$$x \equiv x_0 + x_1q + \ldots + x_{e-1}q^{e−1} \pmod {2^4} \equiv x_0 + 2x_1 + 4x_2 + 8x_3 \pmod {2^4}$$
Thus, our first result is:
$$x \equiv x_0 + 2x_1 + 4x_2 + 8x_3 \pmod {2^4} \equiv 1 + 2 + 4 + 8 \pmod {2^4} \equiv 15 \pmod {2^4}$$
Calculation II:
We want to solve:
$$x \equiv x_0 + x_1q + \ldots + x_{e-1}q^{e−1} \pmod {3^3} \equiv x_0 + 3x_1 + 9x_2 \pmod {3^3}$$
Thus, our second result is:
$$x \equiv x_0 + 3x_1 + 9x_2 \pmod {3^3} \equiv 2 + 0 + 9 \times 2 \pmod {3^3} \equiv 20 \pmod {3^3}$$
Next, we have to use the Chinese Remainder Theorem to solve the simultaneous congruences:
$$x \equiv 15 \pmod {2^4} , ~~ x \equiv 20\pmod {3^3}$$
This yields:
$$x = 47$$
We check our answer by computing:
$$7^{47} = 166 \pmod {433} ~~ \checkmark$$