did i just break RSA?

Started by
26 comments, last by vaneger 20 years, 8 months ago
up to 13 my function appears to be slightly faster than beer hunters modified algorithm, will some one with a large number library pls test these out?
Advertisement
Here is a arbitrary sized integer library so you may try yourself.

http://www.swox.com/gmp/
ASCII stupid question, get a stupid ANSI
Run a test on both functions with N up to 65535 for correctness and speed.

I would be afraid your verison will begin to choke(huge number processing overhead) on the size of the factorials rather quickly around(n=100-200).

So please post back with the results.
Well. You WOULD have broken RSA except for the fact you used a goto. And because of that, you fail.

while (temp>1)
{
temp--;
n = n * temp ;
}
return n;

Ben


[ IcarusIndie.com | recycledrussianbrides.com ]


Will post for food.
well it would appear this is the fastest possible way to find prime numbers , if you can find a number library that will work with it.
The reason we bashed you is because you posted this:

(n-1)! +1 / n == 0

instead of this

(n-1)! +1 % n == 0

quote:Original post by vaneger
well it would appear this is the fastest possible way to find prime numbers , if you can find a number library that will work with it.
It isn''t — it runs in exponential time. The fastest known deterministic-time algorithm is described here. It runs in polynomial time.
The GMP has a factorial operator! And you can test its speed on their site. Just some interesting stuff to play around with.

(65534!+1)%65535

This topic is closed to new replies.

Advertisement