Does $ \ (g^a Mod\ p)^b\, $ $\equiv$ $ \ (g^a)^b (Mod\ p)\, $ hold true?

757 Views Asked by At

Are these two equations: $$ \ (g^a Mod\ p)^b\, $$

$$ \ (g^a)^b (Mod\ p)\, $$ one and the same? If yes then how And if no then how to solve the first equation?