Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I am trying to factor few integers that are each between 115 and 135 digits long. I have just, little over a month ago, began my study of Cryptography. I was wondering if anyone knew of any efficient methods or any programs that I could use to find the two primes $p$ and $q$ for $n=pq$. I was thinking of using quadratic sieve but I don't know if there is any other way. Plus I don't know how I would write the algorithm on any program.

Any input is much appreciated.

share|improve this question
Are you trying to learn how to factor these numbers, or find their factorisation? Try the General Number Field Sieve. Haven't tried any of them but google throws up some options. –  figlesquidge Nov 3 '13 at 10:33
A quick calculation in my head tells me that that would generate an $n$ between 770 and 900 bits in size... Is that feasible? –  Maarten Bodewes Nov 3 '13 at 11:39
A quick calculation not in my head gives an $n$ of from 382 to 448 bits (assuming that the "between 115 and 135 digits long" was referring to the size of $n$). Factoring numbers of this size is known to be feasible (if not easy). IIRC, quadratic sieve is about the optimal algorithm for numbers this size (assuming, of course, you know apriori that neither factor is small; if you don't know that, some time with ECM would be warranted). –  poncho Nov 3 '13 at 12:24
Oh, ok, I see where my thought process went wrong, with couple of big ints you don't mean $p$ and $q$ but a few $n$'s, in that case the numbers should be sufficiently small. @poncho yeah, that would be the exact half :) –  Maarten Bodewes Nov 3 '13 at 17:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.