We know that for primes $\displaystyle p \equiv 1 mod(4)$, there exists a pair of integers $\displaystyle (x,y)$ such that $\displaystyle x^2 + y^2 = p$.

Is there a sufficiently fast method for finding this pair, or is the problem of writing $\displaystyle p$ as a sum of squares considered to be a hard problem like "Integer Factorization"?