![]() |
![]() |
#1 |
May 2013
11002 Posts |
![]()
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 ;) |
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#3 |
May 2013
22·3 Posts |
![]()
No need to explain more :D
thank you ;) my idea was bad :D |
![]() |
![]() |
![]() |
#4 |
"Curtis"
Feb 2005
Riverside, CA
149D16 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.
|
![]() |
![]() |
![]() |
#5 |
May 2013
148 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 |
![]() |
![]() |
![]() |
#6 |
Mar 2019
1000001012 Posts |
![]()
CADO-NFS can factor a 155 digit / 512 bit number in a few days, and that's only on a dual 8 core system: https://cado-nfs.gitlabpages.inria.fr/
If you have a 64-core machine (or a few) you can probably get that down to under a day. |
![]() |
![]() |
![]() |
#7 |
Sep 2009
22×7×83 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 re-read how the software works for clues how to recover the key. |
![]() |
![]() |
![]() |
#8 | |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
22×3×941 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. |
|
![]() |
![]() |
![]() |
#9 |
May 2013
22·3 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 2022-01-12 at 22:42 Reason: added e |
![]() |
![]() |
![]() |
#10 |
Sep 2009
22×7×83 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 | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Where can I find a Reverse and Add program? I can't find any! | Stargate38 | Programming | 18 | 2015-07-10 06:08 |
What kind of Halloween you run and how long does it take to find a zombie | topcat | Hardware | 17 | 2014-10-21 19:26 |
Using long long's in Mingw with 32-bit Windows XP | grandpascorpion | Programming | 7 | 2009-10-04 12:13 |
I think it's gonna be a long, long time | panic | Hardware | 9 | 2009-09-11 05:11 |
How long is too long? | schickel | Lounge | 2 | 2009-02-22 12:31 |