According to Diophantine Equation--2nd Powers -- from Wolfram MathWorld, "Parametric solutions to the 2.2.2 equation $\displaystyle a^2+b^2=c^2+d^2$ are known (Dickson 2005; Guy 1994, p. 140). The number of solutions are given by the sum of squares function $\displaystyle r_2(n)$."

Both of the papers cited are textbooks that I would just as soon not buy. But I can't find any reference to this solution online, presumably because it is new and/or complicated. Does anyone own this book or know of a resource for seeing the proof?