I have the following equation:
$$ n \equiv M^k\pmod b $$
where $n, k, b$ are integers, and $M$ is an unknown integer. How can I solve this equation to find $M$? Here $k$ and $b$ are public keys of the RSA algorithm and $n$ is the result of encryption. I need to find the encrypted message.