Author

Topic: Collisions on private addresses? Balances? (Read 604 times)

legendary
Activity: 1624
Merit: 2594
Top Crypto Casino
July 15, 2022, 04:32:58 PM
#42
I think that if I did find one, no one would believe me anyway. Lol

It is unlikely that you will actually find one (very unlikely), but if you do, you will have a private key, so you can easily prove it by signing the address.
newbie
Activity: 28
Merit: 3
I think that if I did find one, no one would believe me anyway. Lol
legendary
Activity: 3276
Merit: 3537
Nec Recisa Recedit
I think you miss the point.

I'm not guessing one particular number. I generate an address and then compare that to 60000 known addresses with balances, thus increasing the chance by 60000 on every attempt.

The computer is on for other reasons 24hrs a day, so no extra electric being used.

250 million numbers which is compared to 60000 known addresses with balances every 24hrs!

So if it does get one, it's will have a balance.

I believe bitcrack does exactly this but uses a GPU card.

Still a bit of fun.

LOL Grin
It's a nice exercise but a complete waste of time and resource.
Just to give an idea of what number you're searching for...

If you consider all "grain of sand" of the earth is one private address ... and for each of this "grain of sand" you consider another earth with all "grain of sand" you have the idea of a really big number that is much much lower of the total number of bitcoin address!

Please see below some "bitcoin address" that I left in my pocket Wink after my last tour in a desert Grin Roll Eyes



hero member
Activity: 1659
Merit: 687
LoyceV on the road. Or couch.
I'm not guessing one particular number. I generate an address and then compare that to 60000 known addresses with balances, thus increasing the chance by 60000 on every attempt.
Why limit yourself to only a few addresses, while you can easily use all 40 ish million Bitcoin address with a balance?

Not that it matters, you won't find anything anyway.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
The computer is on for other reasons 24hrs a day, so no extra electric being used.
If the processor had been running @10% load all day before, it'll increase its power consumption if your brute-force software bumped it to 90~100%.

I believe bitcrack does exactly this but uses a GPU card.
I believe Bitcrack is designed to bruteforce the puzzle transaction with outputs' addresses derived from private keys of limited range.
If you want to use your CPU to something more viable, I'd suggest you to bruteforce the puzzle's unspent outputs' keys instead and limit your search space depending on the puzzle's output.

Good Luck!
newbie
Activity: 28
Merit: 3
I think you miss the point.

I'm not guessing one particular number. I generate an address and then compare that to 60000 known addresses with balances, thus increasing the chance by 60000 on every attempt.

The computer is on for other reasons 24hrs a day, so no extra electric being used.

250 million numbers which is compared to 60000 known addresses with balances every 24hrs!

So if it does get one, it's will have a balance.

I believe bitcrack does exactly this but uses a GPU card.

Still a bit of fun.
hero member
Activity: 2702
Merit: 716
Nothing lasts forever
As far as I know, it's almost impossible to find out a public address which has some BTC balance on it.
Generating a private address and then it's public key and then it's public address takes some computational power.
Current computing powers would take it years before you find some address with balance on it.
Super computers might help in this case but then who would give us that access to a super computer.
Even a super computer would take ample amount of time to find an address with a balance on it.
hero member
Activity: 1659
Merit: 687
LoyceV on the road. Or couch.
3yrs long time wow. I guess it's a bit like playing a free lottery.
Except that the lottery isn't free, you pay per second (mostly electricity). And the chance of winning is practically zero.

Why don't you start by guessing my creditcard number and phone number? It's much more likely to be found!

It's easier to get jackpot on lottery though. For example, jackpot odds on Powerball is 1:292.201.338 or approximately 1:2^28.12.
Even without buying a ticket, the chances of winning after finding someone's lost ticket are still larger than the chance of finding a funded Bitcoin address.
legendary
Activity: 2436
Merit: 1362
Is it true if that were to happen, all I need is the private key to spend the funds?
Private keys are the means by which transactions are signed from corresponding addresses on the blockchain which were generated from they xpriv key. So, with the private keys you will be able to spend funds from that address.

If it were possible to generate private keys and public keys which has a balance on it, then it would not have been worth it, as the network would haveko value.

Of course, the network isnt as fragile or hackable as some people think and if anyone
could achieve what the OP proposes the BTC they steal would be worthless.


If I wrote a computer program that generates private btc addresses and then generated the public address, if that public address has a balance, and if I then imported that private address into a wallet, could I claim the money on that wallet?
You don't need a special program to generate private and public keys, any bitcoin wallet can do the trick. The odds of you accidentally finding a private key with a balance are extremely slim, but no one can stop you from trying. However, keep in mind that stealing someone else's coins is to be considered a crime in most jurisdictions.

Erm I dont get how someone would publicaly ask how to steal someone elses property?
and think its ok.

Obviously the OP has given it plenty of thought as have others, if you have the knowledge
why not use that to benefit the community?
newbie
Activity: 28
Merit: 3
Not sure if I'm allowed to post a YouTube video, if not, moderator please delete it.

https://m.youtube.com/watch?v=QPJ_pGaJZlw

Video of the address guesser in action.

That's cool, man. You get 100 style points for using VB6!

I wouldn't spend much more time on this, however.

Even if you upgrade to C/C++ or start experimenting with GPU acceleration, you'll still just be wasting power (average reward per spent energy unit is pitiful, solo mining on a 486 would be more profitable).

Also, the "reward" is immoral, no? What if, by some miracle, you actually find an address with balance? Are you going to keep it? Help yourself to a finder's fee? What if it's someone's life savings?

If I were you, I'd take what I'd learned so far (finite fields, elliptic curves, hashing, etc.) and move on to a more worthwhile project.

Just some unsolicited advice from a fellow programmer, feel free to ignore Smiley


I know it's astronomically unreal, but so is the playing of the lottery, however people do win. Morally would I take someone's life savings, I don't think so, I'm really just interested in the subject.
I read up on bitcrack, so will probably take a dabble in that, as purchase of lowend GPU card is about 150$, in theory it would boost my little vb6 attempt of 2.4k per second to supposedly 25 M per sec if using bitcrack.

The whole point of this is a learning thing. I have a pc which is turned on the all time anyway, so why not run something on it, and as for the zero balances, I have chosen balances with 1000 dollars in them and upwards.

Again morally, would I take the balance?? Well I will be completely honest, I don't know, I guess it's down to how much is the balance. Again for me, it's a free lottery. Lol
hero member
Activity: 510
Merit: 4005
Not sure if I'm allowed to post a YouTube video, if not, moderator please delete it.

https://m.youtube.com/watch?v=QPJ_pGaJZlw

Video of the address guesser in action.

That's cool, man. You get 100 style points for using VB6!

I wouldn't spend much more time on this, however.

Even if you upgrade to C/C++ or start experimenting with GPU acceleration, you'll still just be wasting power (average reward per spent energy unit is pitiful, solo mining on a 486 would be more profitable).

Also, the "reward" is immoral, no? What if, by some miracle, you actually find an address with balance? Are you going to keep it? Help yourself to a finder's fee? What if it's someone's life savings?

If I were you, I'd take what I'd learned so far (finite fields, elliptic curves, hashing, etc.) and move on to a more worthwhile project.

Just some unsolicited advice from a fellow programmer, feel free to ignore Smiley
copper member
Activity: 37
Merit: 18
@marksanchez5544
I guess you know that possibility of finding an address with non-zero balance via brute-forcing has low probability, but I believe you don't understand how astronomically low the chances are.

hero member
Activity: 510
Merit: 4005
[This search could take you up to 2 octillion years] -> "Meh. Imma try anyway!"

[Someone else has been doing this for 3 years already] -> "Wow. long time."

Just pointing out something funny about humans, don't take too seriously Grin
newbie
Activity: 28
Merit: 3
3yrs long time wow. I guess it's a bit like playing a free lottery.
sr. member
Activity: 1192
Merit: 260
Tryig to survive in this harsh world
Search for LBC the Large Bitcoin Collider and you'll find they have been doing it for years now with very little results compared to what is spent in ressources.
hero member
Activity: 510
Merit: 4005
After reading more carefully about LBC (thanks ETFbitcoin) I now realize that finding private keys by brute-force is a lot less hopeless than I originally thought it was. Their reasoning1 about why the search space is actually much smaller than 2^256 seems pretty solid to me.

[1] https://lbc.cryptoguru.org/man/theory
newbie
Activity: 28
Merit: 3
Not sure if I'm allowed to post a YouTube video, if not, moderator please delete it.

https://m.youtube.com/watch?v=QPJ_pGaJZlw

Video of the address guesser in action.
newbie
Activity: 28
Merit: 3
It's so easy and quick to use, for scratch code it's perfect.
hero member
Activity: 510
Merit: 4005
Would u believe this is built with vb6, as I can't find the right c code yet.

Man, that really warms my heart. VB6 was great back in the day! I'm so happy someone out there is still using it! I really miss that era (Windows 95/98/2000, VB6, VC++6, etc.)
newbie
Activity: 28
Merit: 3
107 Million keys per second, wow incredible performance.

I am now where near it. I am around 2400 keys per second, as I have now had time to let the app settle down, and as above the naive guess is about right.

I am not targeting any specific address, just generating an address, and then matching against random addresses, from a dBASE of 60000.

If I were to match against one specific address then the speed goes up.

Because I use a binary sorted search, matching against 1 or 60000 addresses does not really decrease the speed, so matching against a large database improves my chances of success.

I will put up a link to a video so u can see this running. Would u believe this is built with vb6, as I can't find the right c code yet.
hero member
Activity: 510
Merit: 4005
So my computations are now 500 million * 60000 per 24hrs.

I would double-check your numbers though, they seem a little high for a core i5...

Actually i find it's quite slow.

I suppose it's difficult to say without knowing anything about his implementation. He's saying he's doing 500 million * 60000 address comparisons per day. If his implementation is naive (checking each generated key against each address in the "database") that works out to ~350 million key comparisons per second. If his implementation is less naive (using a hash table for the 60000 "known" addresses) then that works out to nearly 6000 keys generated and compared per second.

If he's doing it the first (naive) way, then I think he's probably made a mistake somewhere without realizing it, because that number (350 million comparisons per second) seems obviously out-of-range for an i5 (to me, anyway).

If he's doing it the second (less naive) way, then assuming it's "homebrew" that's been quickly slapped together in 3 days, it's still suspiciously fast, IMHO.

Maybe I've misread/misunderstood something or calculated incorrectly. I'm always happy to be corrected Smiley
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
Lol.
Ok so started to build the app. First got 12 million computations per day as a test, this generates the private key, and public key etc. I now compare that to a database of 60000 known public keys and balances.

Day 3, improved the code somewhat. Now the same app is running at 500 million computations per 24 hrs, comparing the generated output against a dBASE of 60000 known balances addresses

So my computations are now 500 million * 60000 per 24hrs. The numbers is to big to calculate.
This is running on a Windows 7 pc icore 5.

Let's see what it comes up with in a day, a week, a year.

I know the numbers are huge.

FYI, you're not the first people trying to generate all private keys. Have you checked LBC? According to them, their pool performance currently is 107.85 million keys/second[2]. Some people don't like LBC though since it use closed source software and there's speculation they targeting specific address.

--snip--

I would double-check your numbers though, they seem a little high for a core i5...

Actually i find it's quite slow. Recovery software such as FinderOuter could achieve 64 thousand address per second on i3[3].

[1] https://lbc.cryptoguru.org/
[2] https://lbc.cryptoguru.org/stats
[3] https://bitcointalksearch.org/topic/m.56043632
hero member
Activity: 510
Merit: 4005
Lol.
Ok so started to build the app. First got 12 million computations per day as a test, this generates the private key, and public key etc. I now compare that to a database of 60000 known public keys and balances.

Day 3, improved the code somewhat. Now the same app is running at 500 million computations per 24 hrs, comparing the generated output against a dBASE of 60000 known balances addresses

So my computations are now 500 million * 60000 per 24hrs. The numbers is to big to calculate.
This is running on a Windows 7 pc icore 5.

Let's see what it comes up with in a day, a week, a year.

I know the numbers are huge.

Take a merit for following through on your plan and for being hardcore enough to still be running Windows 7 Grin

Sounds like you're having fun, keep at it! I would double-check your numbers though, they seem a little high for a core i5...
newbie
Activity: 28
Merit: 3
Lol.
Ok so started to build the app. First got 12 million computations per day as a test, this generates the private key, and public key etc. I now compare that to a database of 60000 known public keys and balances.

Day 3, improved the code somewhat. Now the same app is running at 500 million computations per 24 hrs, comparing the generated output against a dBASE of 60000 known balances addresses

So my computations are now 500 million * 60000 per 24hrs. The numbers is to big to calculate.
This is running on a Windows 7 pc icore 5.

Let's see what it comes up with in a day, a week, a year.

I know the numbers are huge.
hero member
Activity: 510
Merit: 4005
If I wrote a computer program that generates private btc addresses and then generated the public address, if that public address has a balance, and if I then imported that private address into a wallet, could I claim the money on that wallet?

Interesting conversation, thanks everyone, now to build the app and try. Lol

Because this task is so computationally infeasible and therefore harmless to try, I'll spare you the morality lecture and just say that I like your methodology. IMHO, getting some code down is the best way to learn about something. Good luck!
newbie
Activity: 28
Merit: 3
Interesting conversation, thanks everyone, now to build the app and try. Lol
hero member
Activity: 510
Merit: 4005
I understand all of the above, but the point I am making is this.

I can generate a private key, and from there I can generate a public address, from that same private key.

If I did this enough times, and it may take forever, eventually I will match a public address, and I will have the private key from it, so I can claim the balance if it had one, in theory?

Yup, that's pretty much all there is to it.

Edit: Of course, it's not realistic to undertake this search and expect results, but it's possible, both in theory and in practice. The only thing protecting any given bitcoin address (ignoring exotic redeem scripts) from unauthorized spending is lack of knowledge about the private key, there are no other protections in place. That's why it's so important to keep your private key(s) safe.
newbie
Activity: 28
Merit: 3
I understand all of the above, but the point I am making is this.

I can generate a private key, and from there I can generate a public address, from that same private key.

If I did this enough times, and it may take forever, eventually I will match a public address, and I will have the private key from it, so I can claim the balance if it had one, in theory?
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Hi, is the hash 160 for legacy addresses?
Yes, it's one of the address type that uses "HASH160" or RIPEMD160[SHA256(PubKey)] for P2PKH.
P2SH also uses HASH160 of the redeem script, P2WPKH also uses it, the rest of the steps are just difference in encoding.
So when pointlessly bruteforcing addresses, you can derive those address types from each 160bit result.

The figures above are quoted to cycle through the entire range of addresses from start to finish.
If I wrote a computer program that generates private btc addresses and then generated the public address,
There's no "private BTC address" and "public address".
Only "Private Key" and its "Public Key" pair, then the "Bitcoin address" generated from the public key.
It's a one way process "PrvKey->PubKey->Address", not the other way around.

As an analogy, let' use a "lock" and "key" scenario:
  • Let the "lock" be the HASH160.
  • Let the "key" be the Private Key.
  • In your scenario, your theoretical computer program cycles through all the "locks" which can only unlocked by the "key".
  • Even if you can generate all the locks, it's pointless since you can't unlock them without their keys.
  • So, if you want "collision", you need search through the keys which have a tremendously larger search space than the locks.
hero member
Activity: 510
Merit: 4005
Hi, is the hash 160 for legacy addresses?

That's a little beside the point. As nc50lc said, if you want to be able spend what you find, then you need to search the "private key" space and not the "address" space.

Let's consider "legacy" P2PKH addresses for the moment. To create one you have to choose a number between 1 and 115792089237316195423570985008687907852837564279074904382605163141518161494336.

Then you take this number and do some irreversible math on it (elliptic curve cryptography) to produce another number.

Then you take this number and do some more irreversible math on it (cryptographic hash) to produce the final "address".

If you try to search for non-empty addresses by "cheating" and not doing the full address derivation, then when you find an address that has money in it, you won't be able to spend it (because you don't have the first number, the private key).

The figures above are quoted to cycle through the entire range of addresses from start to finish.

No, those figures are for illustrating how much harder searching a space gets as you add bits. The takeaway should be that if you can search a 2^160 space in 9 days, then searching a 2^256 space will take you roughly 2 octillion years (~140 quadrillion times longer than the age of the universe).

It may be a case that your my particular address gets cycled in the first hour.

That's true, but 2^256 is a massive search space. It's tempting to visualize it as a line and think that there "must" be some addresses near the beginning of that line, but with a space this big "near" can still be really, really far. If you've selected your private key at random, you have nothing to worry about.
newbie
Activity: 28
Merit: 3
Hi, is the hash 160 for legacy addresses?

The figures above are quoted to cycle through the entire range of addresses from start to finish.

It may be a case that your my particular address gets cycled in the first hour.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
I have seen that there are

1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976

Bitcoin addresses.

If I wrote a computer program that generates private btc addresses and then generated the public address, if that public address has a balance, and if I then imported that private address into a wallet, could I claim the money on that wallet?

How many addresses would nee to be checked before I found an address with a balance?
The number you've given is merely based on the HASH160 of the public key that is 160bit which is correct, but that's merely for addresses that relies on that PubkeyHash.
There are other address types out there, anyways, that's not the important part of this reply.

The Bitcoin address generation starts from Private key if you want to be able to spend its funds so what you need to bruteforce are private keys.
Which has roughly 2^256 combinations or
115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936
But since some of them are invalid, the number "shrinks" to:
115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336
If you can theoretically bruteforce even 1% of that, you "may" be able to find one with funds.

-snip- as I know the fastest super computer on the planet can cycle through the combinations in 9 days.
Maybe yes (for 2^160), but they can't spend it since they've bruteforced addresses, not private keys.
newbie
Activity: 28
Merit: 3
I know this is all theory, but it seems to me that if btc wallets just reply on you not matching the private key, then it's a lack of security surely, as I know the fastest super computer on the planet can cycle through the combinations in 9 days.
hero member
Activity: 510
Merit: 4005
There are 2160 P2PKH addresses + 2160 P2SH addresses + 2160 P2WPKH addresses + 2256 P2WSH addresses + 2256 P2TR addresses, which is the number that greatly exceeds the number of possible private keys (slightly less than 2256).

What about P2PK? Smiley

Why do you need a separate address format, if you'are paying directly to a public key (as a name suggests)?

P2PK was before my time, but wasn't it just the Base58 encoding of the public key? So, if you're adding up all the different ways that you can specify an "address", doesn't it belong in your sum?
legendary
Activity: 2450
Merit: 4415
🔐BitcoinMessage.Tools🔑
I have seen that there are

1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976

Bitcoin addresses.
There are 2160 P2PKH addresses + 2160 P2SH addresses + 2160 P2WPKH addresses + 2256 P2WSH addresses + 2256 P2TR addresses, which is the number that greatly exceeds the number of possible private keys (slightly less than 2256).

What about P2PK? Smiley
Why do you need a separate address format, if you'are paying directly to a public key (as a name suggests)?

If I wrote a computer program that generates private btc addresses and then generated the public address, if that public address has a balance, and if I then imported that private address into a wallet, could I claim the money on that wallet?
You don't need a special program to generate private and public keys, any bitcoin wallet can do the trick. The odds of you accidentally finding a private key with a balance are extremely slim, but no one can stop you from trying. However, keep in mind that stealing someone else's coins is to be considered a crime in most jurisdictions.
legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
If I wrote a computer program that generates private btc addresses and then generated the public address
You're missing a point:

Private address to public address, there is no process like this.

It's one-way flow from k > K > A
Private key (Elliptic Curve Multiplication: one-way) > Public key (Hash-function: one-way) > Public address

It is one-way and irreversible process as you can read more in Chapter 3: Key, addresses in Mastering Bitcoin book
legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
Is it true if that were to happen, all I need is the private key to spend the funds?
Private keys are the means by which transactions are signed from corresponding addresses on the blockchain which were generated from they xpriv key. So, with the private keys you will be able to spend funds from that address.

If it were possible to generate private keys and public keys which has a balance on it, then it would not have been worth it, as the network would haveko value.
hero member
Activity: 1659
Merit: 687
LoyceV on the road. Or couch.
If I wrote a computer program that generates private btc addresses and then generated the public address, if that public address has a balance, and if I then imported that private address into a wallet, could I claim the money on that wallet?
Yes. And by all means: try it! Convince yourself how secure Bitcoin is, you'll never find a fixed address that was properly generated.
hero member
Activity: 868
Merit: 952
Thanks for the answer.

Is it true if that were to happen, all I need is the private key to spend the funds?

Thanks
I don't have that much knowledge on this but base on my study. Yes you can spend the funds if a collision happens
newbie
Activity: 28
Merit: 3
Thanks for the answer.

Is it true if that were to happen, all I need is the private key to spend the funds?

Thanks
hero member
Activity: 868
Merit: 952
It seems almost impossible in bitcoin to have collision of private keys but since generation is base on random numbers theoretically it is possible. If it then happens as such both original and colliding owner of the address can spend funds in the wallet

Check here for more clarification
https://crypto.stackexchange.com/questions/33821/how-to-deal-with-collisions-in-bitcoin-addresses#:~:text=Since%20Bitcoin%20addresses%20are%20basically,money%20sent%20to%20that%20address.
newbie
Activity: 28
Merit: 3
I have seen that there are

1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976

Bitcoin addresses.

If I wrote a computer program that generates private btc addresses and then generated the public address, if that public address has a balance, and if I then imported that private address into a wallet, could I claim the money on that wallet?

How many addresses would nee to be checked before I found an address with a balance?

Thanks.
Jump to: