Implementation of a correlation alogrithm
Probably should be moved, but I would tell you what I know.

As far as I know, the correlation is by definition the convolution between two signals, that in the frequency domain becomes the product of the transforms. For the same reason, the auto-correlation is the convolution of the signal with himself, or the square of the Fourier transform.

So, it should be the product of the transforms, and not the transform of the products.