I'm attempting to implement multiplication and division in $GF(2^8)$ using log and exponential tables. I'm using the exponent of 3 as my generator, using instructions from here.
However I'm having trouble getting the expected answer for some of these trivial multiplications.
For $2 · 4$ this works:
$$ \begin{align*} \log_3(2) &= 25 \\ \log_3(4) &= 50 \\ 25 + 50 &= 75 \\ \exp_3(75) &= 8 \Rightarrow \text{ expected answer} \end{align*}$$
However for $7 · 11$ this breaks down:
$$\begin{align*} \log_3(7) &= 198 \\ \log_3(11) &= 104 \\ 198 + 104 &= 302. \\ \text{Mod it by 255, gives us 47.}\\ \exp_3(47) &= 49 \end{align*}$$ instead of the expected 77.
From what I understand, we use modulus 255 because the 3 generator 'wraps around' on the 255th power (so the pattern repeats after that) thus we only need 0~254. Even if I'm wrong in this, $302 \bmod 256$ still doesn't give us $70$, where $\exp_3(70) = 77$ (the expected answer)
My observation for both multiplication and division is that it works fine until the result of addition/subtraction goes out of range of 0~255.