For odd prime $p$, I have been given a group $\mathbb{Z}_p^*$ of all invertible elements from $\mathbb{Z}_p$. Basically, $\mathbb{Z}_p^* = \{1,2,\ldots , p-1 \}$. I also have $a$ and $b$, which are two generators of $\mathbb{Z}_p^*$. My question is, by what modulo calculations with the discrete logarithm are performed for $\mathbb{Z}_p^*$? Or in other words, does it hold: $$ a^k \equiv b \pmod p$$ $$k \equiv \log_a b \pmod{p}$$ Or does it hold: $$ a^k \equiv b \pmod{p-1}$$ $$k \equiv \log_a b \pmod{p-1}$$
And also, a followed up question:
If $\mathbb{Z}_p^*$, $a$ and $b$ are as described above, does it holds, that if $k=\log_a b$ then $k\in \mathbb{Z}_p^*$?