Possible Duplicate:
Factor a large number efficiently with gmp
I know I already posted it, but people misunderstood what I meant, and until I fixed it the post died.
What I need is a way to efficiently factor(find prime factors of a number) large numbers(may get to 2048 bits) using C++ and GMP(Gnu Multiple Precession lib) or less preferably any other way.
The numbers are practically random so there is little chance it will be hard to factor, and even if the number is hard to factor, I can re-roll the number(can't choose though).
How do I do it?