Bitcoin Forum
May 08, 2024, 09:32:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Not understanding security of private key  (Read 1412 times)
kingcrimson (OP)
Legendary
*
Offline Offline

Activity: 1025
Merit: 1000


View Profile
November 06, 2012, 03:57:49 AM
 #1

Can't someone luck out and jumble a bunch of numbers and letters, luck across a private key, and steal all the money off the paper wallet?
1715160754
Hero Member
*
Offline Offline

Posts: 1715160754

View Profile Personal Message (Offline)

Ignore
1715160754
Reply with quote  #2

1715160754
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715160754
Hero Member
*
Offline Offline

Posts: 1715160754

View Profile Personal Message (Offline)

Ignore
1715160754
Reply with quote  #2

1715160754
Report to moderator
1715160754
Hero Member
*
Offline Offline

Posts: 1715160754

View Profile Personal Message (Offline)

Ignore
1715160754
Reply with quote  #2

1715160754
Report to moderator
Jutarul
Donator
Legendary
*
Offline Offline

Activity: 994
Merit: 1000



View Profile
November 06, 2012, 04:09:39 AM
 #2

Can't someone luck out and jumble a bunch of numbers and letters, luck across a private key, and steal all the money off the paper wallet?
Depends on how the private key was generated. The official bitcoin client uses the openssl library to generate the keys, which is supposed to contain enough entropy that key generation is truly random. However, if you have an unsecure implementation for key generation, in principle someone could recreate the specific condition under which the key was generated and thus come across the same key, because key generation is a deterministic process.

The ASICMINER Project https://bitcointalk.org/index.php?topic=99497.0
"The way you solve things is by making it politically profitable for the wrong people to do the right thing.", Milton Friedman
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
November 06, 2012, 04:26:25 AM
 #3

Can't someone luck out and jumble a bunch of numbers and letters, luck across a private key, and steal all the money off the paper wallet?

If it's pure luck, the odds are so astronomically low as to be pretty much zero.

And by low, I don't mean "winning the lottery" low.  I don't mean winning the lottery while getting struck by lightning low.  I mean like, pretty much zero.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
Litecoin Gold Trust
Newbie
*
Offline Offline

Activity: 39
Merit: 0



View Profile
November 06, 2012, 05:12:07 AM
 #4

Can't someone luck out and jumble a bunch of numbers and letters, luck across a private key, and steal all the money off the paper wallet?

If it's pure luck, the odds are so astronomically low as to be pretty much zero.

And by low, I don't mean "winning the lottery" low.  I don't mean winning the lottery while getting struck by lightning low.  I mean like, pretty much zero.

Perhaps you mean winning the lottery while getting struck by lightning in the middle of taking a crap low.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
November 06, 2012, 02:28:06 PM
 #5

Can't someone luck out and . . .

. . .Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row. . .

also, this:
https://i.imgur.com/VjtG3.jpg
J-Norm
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
November 06, 2012, 03:49:59 PM
 #6

Yes you can. There is even a program to find the private key for a given public key. It is called "vanitygen".

You just type:

vanitygen <public key>

It will eventually come up with the matching private key. It is not fast though.
Jutarul
Donator
Legendary
*
Offline Offline

Activity: 994
Merit: 1000



View Profile
November 06, 2012, 04:07:25 PM
 #7

Can't someone luck out and . . .

. . .Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row. . .

also, this:
https://i.imgur.com/VjtG3.jpg
I didn't see any numbers. What energy efficiency is the guy basing the calculations on?

The ASICMINER Project https://bitcointalk.org/index.php?topic=99497.0
"The way you solve things is by making it politically profitable for the wrong people to do the right thing.", Milton Friedman
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
November 06, 2012, 04:13:37 PM
 #8

. . .What energy efficiency is the guy basing the calculations on?
I'm not certain, but I suspect that the originator of the concept is referring to Landauer's Principle.

http://en.wikipedia.org/wiki/Landauer%27s_principle
BlueTemplar
Full Member
***
Offline Offline

Activity: 164
Merit: 100

Gone for a minute now back again


View Profile
November 06, 2012, 04:17:24 PM
 #9

Can't someone luck out and . . .

. . .Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row. . .

also, this:
https://i.imgur.com/VjtG3.jpg
Hmm, what about future quantum computers? Wouldn't they theoretically be able to brute-force 256-bit keys using not such ridiculous amounts of energy?
(Of course when such quantum computers are available, the global banking system will probably be in a much worse situation than bitcoin, but would be nice to know if bitcoin is at least somewhat "quantum-proof"...)
Gabi
Legendary
*
Offline Offline

Activity: 1148
Merit: 1008


If you want to walk on water, get out of the boat


View Profile
November 06, 2012, 04:34:03 PM
 #10

By luck? Then you better use that luck to find the private key of a bank or of a government or whatelse on this planet, since tons of people use sha-256  Cheesy

TangibleCryptography
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Tangible Cryptography LLC


View Profile WWW
November 06, 2012, 04:40:04 PM
Last edit: November 06, 2012, 05:15:02 PM by TangibleCryptography
 #11

I didn't see any numbers. What energy efficiency is the guy basing the calculations on?

Boltzman Constant

http://en.wikipedia.org/wiki/Boltzmann_constant

a) Efficiency of an ideal computer: 4.4×10^-16 ergs / bit (at the average ambient temp of space)
b) Annual energy output of our star: 1.21x10^41 ergs
c) Estimated life of our star: 5 billion years
d) Estimated potential energy of our star: 6.05x10^50 ergs (b*c)
e) Estimated potential bit changes using entire energy output of our star: 1.38x10^66 (d/a)

1.38x10^66 bits ~= count from 0 to ~2^220

(note it is actually less than that because the increment of some values involve changing more than one bit so that could be considered an upper limit).

To show how far away we are from even that.  Total human energy consumption in all forms for all activities in on the order of ~132,000 TWh (4.47x10^27) annually.  If all energy consumption of the human race was diverted to power an as of yet uninvented ideal computer and that computer loaded with a program to increment a counter we could increment that counter to only ~2^146 in a year (less than one quadrillionth of one quadrillionth of a one percent of 2^256).  
ercolinux
Legendary
*
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 06, 2012, 05:09:17 PM
 #12

Can't someone luck out and . . .

. . .Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row. . .

also, this:
https://i.imgur.com/VjtG3.jpg
Hmm, what about future quantum computers? Wouldn't they theoretically be able to brute-force 256-bit keys using not such ridiculous amounts of energy?
(Of course when such quantum computers are available, the global banking system will probably be in a much worse situation than bitcoin, but would be nice to know if bitcoin is at least somewhat "quantum-proof"...)

quantum computer are still in early projct status and no one knows exactly the efficiency in solve a cryptographic problem. But even if they are 10^20 more powerfull than the ipotetical computer they're still not able to brute-force the 256bit key in a usable lapse of time

Bitrated user: ercolinux.
BlueTemplar
Full Member
***
Offline Offline

Activity: 164
Merit: 100

Gone for a minute now back again


View Profile
November 06, 2012, 05:31:42 PM
Last edit: November 06, 2012, 05:53:31 PM by BlueTemplar
 #13

To answer my own question, it would seem that the speedup for a quantum computer would most likely be quadratic, effectively like halving the key length from 256 to 128.

And to count to 2^128 would require about 2 minutes of total world output using a perfect computer...
BlueTemplar
Full Member
***
Offline Offline

Activity: 164
Merit: 100

Gone for a minute now back again


View Profile
November 06, 2012, 05:47:09 PM
Last edit: November 07, 2012, 10:40:36 AM by BlueTemplar
 #14

(This is WRONG, look at my post lower!)

Another try at it : (all info taken from Wikipedia)
- Best time complexity to bruteforce SHA256 is at this moment 2^251.7 (NOT!) (or about 30 seconds of current world energy output using a perfect quantum computer that is quadratically better than a regular one).
- An Intel Core i7 Extreme Edition 3960X (Hex core) at 3.33 Ghz can do 178x10^9 instructions per second.
So, assuming instructions=time complexity (while actually AFAIK instructions<time complexity), this i7 would need about 3.3x10^64 seconds to do it, which is about 1 072 935 170 853 203 888 287 066 771 632 600 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 years. That's a tad high, isn't it?
J-Norm
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
November 07, 2012, 05:21:46 AM
 #15

Quantum computers don't count faster or search a keyspace faster. What they do is allow certain types of mathimatical problems like finding factors a linear problem instead of a logerithmic one.
BlueTemplar
Full Member
***
Offline Offline

Activity: 164
Merit: 100

Gone for a minute now back again


View Profile
November 07, 2012, 10:38:26 AM
 #16

Quote
For some problems, quantum computers offer a polynomial speedup. The most well-known example of this is quantum database search, which can be solved by Grover's algorithm using quadratically fewer queries to the database than are required by classical algorithms. In this case the advantage is provable. Several other examples of provable quantum speedups for query problems have subsequently been discovered, such as for finding collisions in two-to-one functions and evaluating NAND trees.

Consider a problem that has these four properties:
-The only way to solve it is to guess answers repeatedly and check them,
-The number of possible answers to check is the same as the number of inputs,
-Every possible answer takes the same amount of time to check, and
-There are no clues about which answers might be better: generating possibilities randomly is just as good as checking them in some special order.

An example of this is a password cracker that attempts to guess the password for an encrypted file (assuming that the password has a maximum possible length).

For problems with all four properties, the time for a quantum computer to solve this will be proportional to the square root of the number of inputs. That can be a very large speedup, reducing some problems from years to seconds. It can be used to attack symmetric ciphers such as Triple DES and AES by attempting to guess the secret key.
This looks like exactly what someone bruteforcing SHA256 would need to do.
Aren't database search and keyspace search pretty similar?
Isn't "lucking out and coming across a private key" similar to "finding collisions to two-to-one functions"?

From SHA-256 page :
Quote
For a hash function for which L is the number of bits in the message digest, finding a message that corresponds to a given message digest can always be done using a brute force search in 2^L evaluations. This is called a preimage attack and may or may not be practical depending on L and the particular computing environment. The second criterion, finding two different messages that produce the same message digest, known as a collision, requires on average only 2^L/2 evaluations using a birthday attack.
Damn, so the fastest seems to be 2^128, 2^64 for a quantum computer...
Third time's a charm :
- Time complexity to find a collision for SHA256 using a classical computer : 2^128
- An Intel Core i7 Extreme Edition 3960X (Hex core) at 3.33 Ghz can do 178x10^9 instructions per second.
(Still assuming instructions=time complexity)
2x10^27 seconds or 60 billion billion years. Much less ridiculous, but still QUITE a lot!

Let's see for a quantum computer:
- Time complexity to find a collision for SHA256 using a quantum computer : 2^64 (assuming quadratic speedup)
That's still a LOT of operations, and if we could make a quantum computer manipulate qubits as fast as that i7 is manipulating bits, it would still need 10^8 seconds to execute that function, or about 120 days! (Or 6 days for a cluster of 20 of such computers and so on...)
So some day Bitcoin might have a problem with quantum computers, but it would require improvements in quantum computing greater than those which happened for classical computing since the time of the first mechanical computers! We're only able to manipulate a few qubits for now, even though that might change quickly with new breakthroughs :
http://newsroom.unsw.edu.au/news/technology/breakthrough-bid-create-first-quantum-computer
(With this breakthrough we might not need for quantum computers to like go all the way from the first mechanical computers to current ones, but jump right in at the start of the "silicon age".)
ercolinux
Legendary
*
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 09, 2012, 09:16:28 AM
 #17

Let's see for a quantum computer:
- Time complexity to find a collision for SHA256 using a quantum computer : 2^64 (assuming quadratic speedup)
That's still a LOT of operations, and if we could make a quantum computer manipulate qubits as fast as that i7 is manipulating bits, it would still need 10^8 seconds to execute that function, or about 120 days! (Or 6 days for a cluster of 20 of such computers and so on...)

I think that cluster of quantum computer are not so easy to build. Anyway I obtain more than 3 years: 10^8sec=1127days.
And we have made the assumption that 1 instruction=1 operation that is not true. You need at least 250 computer to find a collision in a little more than 6 days. Assuming that actual quantum computer have the requested power, and that there'll be an halving of prices/power ratio every 3 years it tooks at least 30 years to have such a cluster cost less than a milion dollar.
With the same investment of 3 quantum computer (30M$) today you can easily take over the whole bitcoin network (with FPGA you obtain more than 30THash, with ASIC you can build at least a 2-3000THash network) so I don't really worry about quantum computer for some years.

Bitrated user: ercolinux.
BlueTemplar
Full Member
***
Offline Offline

Activity: 164
Merit: 100

Gone for a minute now back again


View Profile
November 09, 2012, 09:57:04 AM
 #18

Yes, sorry, 1200 days, not 120, I misread my calculator...
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!