Also known as the difference of squares method. It was first used by Fermat and improved by Gauss. Gauss looked for integers x and y satisfying y^2 congruent x^2 - N (mod E) for various moduli E. This allowed the exclusion of many potential factors. This method works best when factors are of approximately the same size, so it is sometimes better to attempt m N for some suitably chosen value of m.