Showing posts with label rsa. Show all posts
Showing posts with label rsa. Show all posts

Friday, October 16, 2009

Officially a blog slug...


Having been through a three major surgeries in the family, kids' week off from school, a few illnesses and several impending work deadlines - I have completely neglected this poor haven of strange ideas... yup, I'm a slug...

My RSA adventures have lead to some interesting shortening of attack vectors, but nothing of true value as of yet - though I thought I had it licked at one point! Still, some great insight for me.

I've learned a LOT on approaching impossible problems - analysis saves a lot of development work, but only if you're willing to identify and gather real data. Also, you need to analyze sets, not just points on a graph. Knowing your functional, set values and computational limitations beforehand gives you an enormous edge in quickly performing tests - but you must be careful not to be boxed into your own boundaries.

For instance, here's the boundaries for all RSA factors, taken as a percentage of distance from the square root. This trend holds for all magnitudes of prime and presents a rather reduced attack space than I first anticipated. The blue line is the running minimum "center point," the green space represents all possible distances between one the real factor and the square root of the quotient, and the blue space represents all possible distances between the one real factor and the center point (p + q / 2)

In laymen's terms - this means that there's no need to go outside of this space to look for possible p factors for the quotient pq - thus reducing the attack surface. In practical terms, the distance between the square root and one of the factors is AT MOST 2.5%!!! And though the distance may increase to 10% - it is a known search space of much reduced size. Yes, that is still a large area when dealing with 300 digit numbers - but VASTLY smaller than I originally anticipated. Perhaps this is well known among mathematicians - but it was an eye opener for me!

I definitely have gained much even though I have yet to solve this beast!

Sunday, August 09, 2009

A new approach to cracking RSA...

I've spent 10 years tinkering with RSA factoring algorithms. Everybody needs a hobby, eh? I've tried many, many different approaches in solving the problem more efficiently than is currently practiced.

RSA factoring is plain stupidly simply. Find two prime numbers that are the factors of one very large number.

For example,

16347336458092538484431338838650908598417836700330923121
81110852389333100104508151212118167511579

× 19008712816648221131268515739354139754718967899685154936
66638539088027103802104498957191261465571

= 31074182404900437213507500358885679300373460228427275457
20161948823206440518081504556346829671723286782437916272
83803341547107310850191954852900733772482278352574238645
4014691736602477652346609


So far I've explored Russian Peasant division, bit multiplication shortcutting, bit reversal with vector unit multiplication, and traditional sieving and plain bruteforce. A few years back I happened across a new method - but it was only reliable in some cases. The fantastic news is that it when it did work - it was incredibly fast. I was able to factor 384 bit numbers in a few minutes, rather than hours.

I've lost the code, but I finally remembered the basic algorithm. And it occurred to me that perhaps it was simply a rounding error in my path decision algorithm.

Anyway - my "project rotation" is upon me again, and hopefully this time I will finally succeed.