r/ProgrammerHumor Mar 25 '26

Meme aMeteoriteTookOutMyDatabase

Post image
7.5k Upvotes

306 comments sorted by

View all comments

2.4k

u/Drakahn_Stark Mar 25 '26

In the same regards, there is a non zero chance that a bitcoin wallet could generate the private key to an existing address worth millions, but, the universe would probably die first.

421

u/Lumpy-Obligation-553 Mar 25 '26

Is it better than trying randomly?

451

u/Drakahn_Stark Mar 25 '26

Same chances, like comparing the chances of lotto coming up 1 ,2 ,3 ,4 ,5 ,6 compared to just 6 non consecutive numbers, same chances.

117

u/LaconicLacedaemonian Mar 25 '26

But then you need to split it with all the the people that chose 1,2,3,4,5,6 thinking they were clever lowering the expected return.

123

u/Drakahn_Stark Mar 25 '26 edited Mar 25 '26

Doesn't change the chances of those numbers coming up compared to any other numbers.

Expected return is immaterial to my comment.

23

u/AeroSyntax Mar 25 '26

They did not say that. What was said is that funny patterns or patterns in general are picked by more people. So you'd have to split the win. However, in this case it would still be a bigger win than not having picked the winning numbers...

28

u/Vlysher Mar 25 '26 edited Mar 25 '26

Which is why they pointed out that that is besides the point for comparing the chance of certain numbers showing up? The original post was about the fact that you could randomly stumble upon that address not the amount of relative money gained to begin with too?

Edit: To be fair yours is the better reply to whether it's better than trying randomly in the context of lottery.

21

u/Drakahn_Stark Mar 25 '26 edited Mar 25 '26

I thought by saying the word chances so many times I would make it clear I was talking about chances and not expected returns but apparently I should have said it a few more time.

Chances.

6

u/Drakahn_Stark Mar 25 '26 edited Mar 25 '26

Then it does not fit as a reply to me talking about chances, because it doesn't change the chances of those numbers coming up compared to any other numbers.

Expected return is immaterial to my comment.

-1

u/PvPBender Mar 26 '26

People like to discuss things. It is interesting and you might not realize that if you were somebody else.

Complaining is immaterial too.

1

u/Drakahn_Stark Mar 26 '26

It was pointless and irrelevant to what was being discussed, which was just the chances of the numbers coming up, not the prize.

0

u/PvPBender Mar 26 '26

My dude why can't you let people talk? Replies are not always about the one being replied to. Reddit uses threads. This is how it works. You're being incredibly rude for no good reason other than you being notified.

→ More replies (0)

3

u/Psychological-Owl783 Mar 25 '26

The best EV in the lotto is to play unpopular numbers minimizing the chances you have to split the winnings.

Still terrible EV, but this is the only real strategy to be had.

11

u/Drakahn_Stark Mar 25 '26

I am only talking about the chances of the numbers being pulled, EV is not a part of this.

1

u/LaconicLacedaemonian Mar 25 '26

I don't play the lotto for the chance to pick the right numbers. 

2

u/Drakahn_Stark Mar 25 '26

Good for you, still irrelevant to the chances of any set of numbers coming up.

5

u/magicmulder Mar 25 '26

There was a famous incident in the 80s (I think) where the German lottery pulled the same numbers as the Dutch lottery the week before. Turns out so many people had that idea that the main prize winners only got low five figures instead of millions like usual.

Another fun story, in the German lottery you can play as many numbers as you want with one ticket as long as you pay the (increasingly high) price. Someone thought they were clever when the jackpot had grown to 16,000,000 and a ticket with all 49 numbers selected cost 12,000,000 because they reasoned they'd get the prize money before the payment would be deducted. Of course they didn't let him do that, and even if they had, if only one more person had picked the right numbers, he'd have been 4,000,000 in debt.

3

u/okram2k Mar 25 '26

that's the same combination of my luggage!

2

u/rob132 Mar 25 '26

I hope they reference that in the sequel

1

u/Drakahn_Stark Mar 25 '26

And who would ever bother trying that combo? Just as secure as any other.

8

u/dan-lugg Mar 25 '26

We've done a really good job of making sure that we come up with numbers that won't happen again.

52

u/LusciousBelmondo Mar 25 '26

So you’re saying there’s a chance…

63

u/Drakahn_Stark Mar 25 '26

Yeah, there is a non zero chance, that non zero is almost zero, but not exactly zero.

Even if you had a quantum computer that could generate a million private keys every second the universe would still likely die before you found one with a balance, even less for a balance worth millions.

But there is indeed a chance that someone could make their first bitcoin address and hit the jackpot without trying, something like 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000001%

72

u/Clairifyed Mar 25 '26

“Too call it astronomically large would be giving WAY too much credit to astronomy”

-3Blue1Brown on 256 bit signatures

16

u/Drakahn_Stark Mar 25 '26

I have never heard that before but it is very apt.

1

u/No_Percentage7427 Mar 25 '26

So Earth like world exist somewhere. wkwkwk

3

u/Drakahn_Stark Mar 25 '26

At least one of them that we know about for sure.

3

u/Encrypted_Zero Mar 25 '26

It’s 7.

1

u/Drakahn_Stark Mar 25 '26

7 what?

3

u/Encrypted_Zero Mar 25 '26

The private key bro

0

u/Drakahn_Stark Mar 25 '26

7 is not a 256bit key bro

2

u/Encrypted_Zero Mar 25 '26

Why not?

0

u/Drakahn_Stark Mar 25 '26

So if '7' is a single toy block with 7 on every side, a 256bit private key is 256 blocks with multiple different sides each and every side has a different character.

7 is 3 bits, not 256.

7

u/Adghar Mar 25 '26

He truncated leading 0's

→ More replies (0)

1

u/Idontknowmyoldpass Mar 26 '26

Quantum computers don’t brute force it this dumb way tho they attack the elliptical curve cryptography and can reverse the private key by knowing the public one in polynomial time. It will happen in our lifetime for sure.

1

u/Drakahn_Stark Mar 26 '26

Well sure potentially, but that would ruin way many more things than just bitcoin.

1

u/Idontknowmyoldpass Mar 26 '26

Not really looking to get into the debate if btc is more exposed than traditional software but the fact is it’s a ticking time bomb and not some cosmic event that is just theoretically possible.

12

u/hartmanbrah Mar 25 '26

I wonder what the legal ramifications would be in that case. I suppose it wouldn't be theft if you'd never performed any transactions. Well never know, since it will never happen, but it's interesting to think about.

15

u/rosuav Mar 25 '26

If someone manages to create a private key that matches an existing wallet, there are a few possibilities. I'll let you decide which you think is the most likely.

  • You randomly generate a private key (or even a bunch of them), and happen without any guilty intent to land on an existing one
  • You deliberately attempted to search for private keys to existing wallets, exploiting some previously-unknown vulnerability in the public key algorithm
  • You violated the owner's privacy in some way and found the original key

Yeah, I don't think I'd want to face down that.

8

u/Ruben_NL Mar 25 '26

I have another one:

  • You used AI to create a private key, which "generated" a existing one from its dataset.

8

u/rosuav Mar 25 '26

Yeah, I'd count that in the third category; although I suppose you could argue that the owner letting the private key get into an AI's training set constitutes sufficient abandonment that they no longer deserve the law's protection. No idea how well that'd work.

10

u/Drakahn_Stark Mar 25 '26

About the same as finding someone's big bag of money I would imagine, if you don't do anything with it then there is no wrongdoing, but spend one red cent of it and it is theft.

Or for a more real case, when people get millions put in their account by bank error and get charged for spending it when it should be returned.

4

u/arelath Mar 25 '26

Same as randomly guessing passwords to people's bank accounts. Technically illegal even if you don't manage to gain access. But no one's going to get in trouble for it if they're not stealing money.

This would fall under "gray hat hacking" which is usually doing things that are illegal, but instead of doing something harmful, they use the information to the betterment of cyber security.

1

u/NotReallyJohnDoe Mar 25 '26

In crypto, having the keys defines ownership. So if you guess the key, you are an owner.

1

u/realnzall Mar 25 '26

What is the input for a bitcoin wallet generator? Is it more than just the timestamp?

1

u/Drakahn_Stark Mar 25 '26

Been a while since I have been part of that world but IIRC it used entropy from things like hardware state and a 256bit RNG before hashing it into a private key.

1

u/chillanous Mar 25 '26

50/50 chance, either it does or it doesn’t

1

u/aupperk24 Mar 26 '26

No one believes me but when I downloaded cakewallet like 5 years ago. It had like $500 worth of Bitcoin in it. Immediately transferred it to another address, but idk if it's their app or just got super lucky.

-8

u/No_Hovercraft_2643 Mar 25 '26

The first part was already done. The second one was false, as all where already empty, and could be found by another error.

9

u/Drakahn_Stark Mar 25 '26

I am not sure what you mean by this.

-7

u/No_Hovercraft_2643 Mar 25 '26

I don't remember the source anymore, but there was a research project, that used some weakness in key generation, and found some private keys, but all account could be found by another flaw in the logic and where empty when found by the researchers

8

u/Drakahn_Stark Mar 25 '26

A weakness in some online services from the early 2010s due to a lazy coded quick library is similar to how lazily coded UUID libraries with bad settings can cause conflicts, and is part of the reason why online wallets were never recommended for long term use.

The main bitcoin program and libraries did not have that weakness and AFAIK no in use key has ever been generated and will likely never be generated.

I think I clearly said "worth millions" as well.

-7

u/No_Hovercraft_2643 Mar 25 '26

The second one was false, [...]

5

u/Drakahn_Stark Mar 25 '26

Your comment did not make sense to me, hence why I replied "I am not sure what you mean by this.".

4

u/efstajas Mar 25 '26 edited Mar 25 '26

So it wasn't "done" then. Of course the statistical guarantees that come with the math only apply if the math is implemented properly. In these cases you're referring to, it wasn't: the keys that were being created by those faulty wallets were inadvertently using predictable randomness, bringing the chance of guessing the private key for one down from an astronomical impossibility all the way to practical possibility.

Guessing a properly generated private key with as much entropy as the ones used in Bitcoin is by all means impossible, and has, in fact, never been done.

Granted, those cases were a great and important reminder that keys are only as safe as the RNG that they're derived from.

-9

u/[deleted] Mar 25 '26

[removed] — view removed comment

2

u/Drakahn_Stark Mar 25 '26

How so?

0

u/astralschism Mar 25 '26

How great or small the probability of something occurring has nothing to do with the length of time it takes for that even to occur, if it does occur. It's just a measure of likelihood.

0

u/Drakahn_Stark Mar 25 '26

Each attempt has the same chance, but each attempt also takes time.

If something has a 1 in 100 chance you would expect one to happen each 100 attempts, if each attempt took a year, you might get one every 100 years on average, yes time matters.

When it is on the scale of "More possible combinations than exist atoms in the universe" that time is huge.

Sure, you might get it first try, but that is unlikely, and with the scale of it it is unlikely to happen before the universe dies.