I would recommend looking at the GPG and PGP code for generating random numbers. I
believe you can pick how large the numbers are in the library call. They use Fermat for
the first phase which is very fast, and then something else in the second phase. It has
been a few years since I looked it up, but I was impressed when I ran it and examined the
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around