20220111, 20:46  #1 
May 2013
C_{16} Posts 
How long to find RSA key ?
Hi :)
Just a simply (maybe) question. I have a plain data and encrypted by rsa512 bit key. How long it can take, to find (brute force, step one by one) key ? I have i9 10980XE(18c36t) Factorise of 512bit takes almost 3days, but i dont want to factorise anything, just want to find right key :) Thanks ;) 
20220111, 21:29  #2 
"Viliam Furรญk"
Jul 2018
Martin, Slovakia
3·251 Posts 
I am not sure exactly how RSA512 works, and I am not willing to research it for this topic, but from what I know, it uses 512 bits as output. Thus it has 2^512 different possible outputs, which have 2^512 different possible inputs. That is about 1.340781e+154.
If you could test 1,000,000,000,000,000 inputs (keys) per second, you would need about 4.251588e+131 YEARS to check them all. Assuming it would be randomly placed, you would most likely require about half of that or 2.125794e+131 YEARS. That would mean your poor CPU (and many other CPU slaves required for the total throughput of 1,000,000,000,000,000 inputs per second) would need to crunch for what is basically more than Googol of estimated ages of the universe (about 1.54043e+121 ages of the universe). 1.54043e+121 = 15,404,300,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000. This many ages of the universe. If its output is 512 bits in size, this should be about right. Otherwise, I am sorry, and I'll let others correct me. 
20220111, 21:56  #3 
May 2013
1100_{2} Posts 
No need to explain more :D
thank you ;) my idea was bad :D 
20220111, 22:24  #4 
"Curtis"
Feb 2005
Riverside, CA
5,279 Posts 
Factoring the number is sufficient to break the key. Your first idea was the time it takes your machine to crack the key; how to use the factors is a matter of understanding the RSA encryption method not too hard.

20220111, 22:35  #5 
May 2013
2^{2}·3 Posts 
I dont want to break/crack or factorise any key.
Just want to "know" the key. But the time how it takes, its to much for me :D 
20220111, 22:46  #6 
Mar 2019
3^{2}·29 Posts 
CADONFS can factor a 155 digit / 512 bit number in a few days, and that's only on a dual 8 core system: https://cadonfs.gitlabpages.inria.fr/
If you have a 64core machine (or a few) you can probably get that down to under a day. 
20220112, 16:33  #7 
Sep 2009
100100010111_{2} Posts 
I assume you know the 512 bit public key used to encrypt the data. To decrypt it you need the private key, which is the factors of (part of) the public key. That is a few days work on your PC.
If you don't know the public key but do know the plain text and the cypher text it was encrypted into then finding the key used to encrypt is will be another matter. You should start by reading up on how the software used to encrypt it works. It may have stored the public key in the enrypted file, which is the easy case. If not check where ever the encrypted file came from to see if the key is somewhere you can find. If not then reread how the software works for clues how to recover the key. 
20220112, 18:05  #8  
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
3^{2}×5×251 Posts 
Quote:
* That is currently the most computationally efficient way of finding the private key. Chequebook, rubberhose or blackbag attacks might be easier in practice. 

20220112, 22:21  #9 
May 2013
1100_{2} Posts 
chris2be8@ yes, i have only plain text (not all) and the cypher text. For example:
plain text: 0101010101....(512bit)...010101  not all bits i have cypher text: 5832412833...(512bit)...3231241 And yes, im looking private key, to decrypt cypher text. I cannot use GCD, beacouse i have only one example and its not full. The only thing what im sure is that is RSA PKCS v1. edit: and e is 65537 Last fiddled with by sega24 on 20220112 at 22:42 Reason: added e 
20220113, 16:35  #10 
Sep 2009
2327_{10} Posts 
Where did the plaintext and cyphertext come from? Do you know what software was used to encrypt the plaintext to generate the cyphertext? Or what it did if it's not a standard product? Is this a puzzle someone set you? Or homework on a course?
Start by reading up on RSA PKCS v1 in wikipedia etc. But you will need more details than that. Are the provided plaintext and cyphertext the same length? That would suggest it's been directly encrypted with 512 bit RSA (public key cryptography is much slower than symmetric cryptography so most programs would encrypt a file with something like AES256, then encrypt the secret key with the public key so the intended received can recover the secret key and decrypt the file. But the encrypted file would be a bit larger becasue of the encrypted key added as a header). 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Where can I find a Reverse and Add program? I can't find any!  Stargate38  Programming  18  20150710 06:08 
What kind of Halloween you run and how long does it take to find a zombie  topcat  Hardware  17  20141021 19:26 
Using long long's in Mingw with 32bit Windows XP  grandpascorpion  Programming  7  20091004 12:13 
I think it's gonna be a long, long time  panic  Hardware  9  20090911 05:11 
How long is too long?  schickel  Lounge  2  20090222 12:31 