Let $a$ and $x$ be Gaussian integers.
How can I calculate the value of $x$ so that $x^2 \equiv a \pmod p$ where $p$ is a regular integer prime and $p \equiv 3 \pmod 4$ ?
Example:
$a = 2 + 5i$
$p = 7$
One possible value for $x$ is
$x = 2 + 3i$
which yields
$x^2 = (2 + 3i)^2 = -5 + 12i \equiv 2 + 5i \pmod 7$,
but this value I calculated manually. How can I compute $x$ for larger values of $a$ and $p$? Is it even possible to compute this value efficiently?
With regular big integers I can just use the method described here but so far I've failed to figure out how to adapt it to work for gaussian integers.
A little help would be much appreciated.