mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2022-01-11, 20:46   #1
sega24
 
sega24's Avatar
 
May 2013

C16 Posts
Default 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 ;)
sega24 is offline   Reply With Quote
Old 2022-01-11, 21:29   #2
Viliam Furik
 
Viliam Furik's Avatar
 
"Viliam Furรญk"
Jul 2018
Martin, Slovakia

3·251 Posts
Default

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.
Viliam Furik is offline   Reply With Quote
Old 2022-01-11, 21:56   #3
sega24
 
sega24's Avatar
 
May 2013

22·3 Posts
Default

No need to explain more :D
thank you ;)
my idea was bad :D
sega24 is offline   Reply With Quote
Old 2022-01-11, 22:24   #4
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

23·661 Posts
Default

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.
VBCurtis is offline   Reply With Quote
Old 2022-01-11, 22:35   #5
sega24
 
sega24's Avatar
 
May 2013

11002 Posts
Default

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
sega24 is offline   Reply With Quote
Old 2022-01-11, 22:46   #6
mathwiz
 
Mar 2019

1000001112 Posts
Default

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.
mathwiz is offline   Reply With Quote
Old 2022-01-12, 16:33   #7
chris2be8
 
chris2be8's Avatar
 
Sep 2009

2,333 Posts
Default

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.
chris2be8 is offline   Reply With Quote
Old 2022-01-12, 18:05   #8
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

260678 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
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.
Strictly speaking the private key is derived* from (not is the factors of) the factors of the public modulus.


* That is currently the most computationally efficient way of finding the private key. Chequebook, rubberhose or blackbag attacks might be easier in practice.
xilman is offline   Reply With Quote
Old 2022-01-12, 22:21   #9
sega24
 
sega24's Avatar
 
May 2013

1210 Posts
Default

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
sega24 is offline   Reply With Quote
Old 2022-01-13, 16:35   #10
chris2be8
 
chris2be8's Avatar
 
Sep 2009

2,333 Posts
Default

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).
chris2be8 is offline   Reply With Quote
Reply

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 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

All times are UTC. The time now is 06:29.


Fri May 27 06:29:45 UTC 2022 up 43 days, 4:31, 0 users, load averages: 0.94, 1.23, 1.17

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

โ‰  ยฑ โˆ“ รท ร— ยท โˆ’ โˆš โ€ฐ โŠ— โŠ• โŠ– โŠ˜ โŠ™ โ‰ค โ‰ฅ โ‰ฆ โ‰ง โ‰จ โ‰ฉ โ‰บ โ‰ป โ‰ผ โ‰ฝ โŠ โŠ โŠ‘ โŠ’ ยฒ ยณ ยฐ
โˆ  โˆŸ ยฐ โ‰… ~ โ€– โŸ‚ โซ›
โ‰ก โ‰œ โ‰ˆ โˆ โˆž โ‰ช โ‰ซ โŒŠโŒ‹ โŒˆโŒ‰ โˆ˜ โˆ โˆ โˆ‘ โˆง โˆจ โˆฉ โˆช โจ€ โŠ• โŠ— ๐–• ๐–– ๐–— โŠฒ โŠณ
โˆ… โˆ– โˆ โ†ฆ โ†ฃ โˆฉ โˆช โŠ† โŠ‚ โŠ„ โŠŠ โŠ‡ โŠƒ โŠ… โŠ‹ โŠ– โˆˆ โˆ‰ โˆ‹ โˆŒ โ„• โ„ค โ„š โ„ โ„‚ โ„ต โ„ถ โ„ท โ„ธ ๐“Ÿ
ยฌ โˆจ โˆง โŠ• โ†’ โ† โ‡’ โ‡ โ‡” โˆ€ โˆƒ โˆ„ โˆด โˆต โŠค โŠฅ โŠข โŠจ โซค โŠฃ โ€ฆ โ‹ฏ โ‹ฎ โ‹ฐ โ‹ฑ
โˆซ โˆฌ โˆญ โˆฎ โˆฏ โˆฐ โˆ‡ โˆ† ฮด โˆ‚ โ„ฑ โ„’ โ„“
๐›ข๐›ผ ๐›ฃ๐›ฝ ๐›ค๐›พ ๐›ฅ๐›ฟ ๐›ฆ๐œ€๐œ– ๐›ง๐œ ๐›จ๐œ‚ ๐›ฉ๐œƒ๐œ— ๐›ช๐œ„ ๐›ซ๐œ… ๐›ฌ๐œ† ๐›ญ๐œ‡ ๐›ฎ๐œˆ ๐›ฏ๐œ‰ ๐›ฐ๐œŠ ๐›ฑ๐œ‹ ๐›ฒ๐œŒ ๐›ด๐œŽ๐œ ๐›ต๐œ ๐›ถ๐œ ๐›ท๐œ™๐œ‘ ๐›ธ๐œ’ ๐›น๐œ“ ๐›บ๐œ”