I have maybe a simple question but I haven't been able to find an answer through googling.
The question is as such:
Is $\ a × b^2 \bmod c $ the same as $\ (a \bmod c) × (b^2 \bmod c) $?
That's it. That's all I'm confused about.
Sorry if it seems a little simple...
answer:
$\ a × b^2 \bmod c = ((a \bmod c) × (b^2 \bmod c))\bmod c $
:)
Where does the second product even take place? If it is over the integers then definitely no. $$2 \times 3^2 \pmod 6$$ is zero but $$2 \pmod 6$$ and $$3 \pmod 6$$ are just two and three. Thus their product will be 6.
If the second product is not taken over the integers, and everything is modulo c in the end, then it does not matter if you reduce $a$ and $b^2$ before or after you multiply.