You may use this code in your projects (commercial or otherwise) subject to the understanding that you give appropriate credit to me in the documentation. And that you understand that there is no warranty whatsoever, implied or otherwise, on this software.

An example appropriate credit is: (note that it includes WHICH code is being referenced)

This product uses code for [WHATEVER] written by John Halleck, which is being used by his permission.

It would, as a matter of politeness, be nice to drop me a line and tell me what you have used it in.

- Integer Square Root
- Modular addition X + Y (mod n)
- Modular multiplication X * Y (mod n)
- Modular exponent X ^ Y (mod n)
- Greatest Common Denominator
- Extended Greatest Common Denominator

- Phi(n) overshoot
- Square root constraints
- Potential Function Methods
- Relation N = (S-A)*(S+B) [Halleck's method]
- Relation N = (Y-X)*(Y+X) [Fermat's method]
- relation N = (Q-2X)*Q [Han's method]
- relation N = (S-2*A)*(S+2*B) for some S between P and Q. [LeRoy's method]
- relation N = (S-A)*(S+A+C) [Bill's method]
- relation N = (S-A)*(S+A+2*D) [Nahaj's method]
- relation N = P*Q [John's method]
- relation 0 = XX-(D*D+2*S*D-R) [Finnish method]
- relation N = 2*Y*P-P*P [Anon's method]
- relation N = P*(P+2X) [Antihan's method]

This page is http://www.cc.utah.edu/~nahaj/factoring/code.html

This page was last modified on November 29th, 1999