Bitcoin Forum
April 23, 2024, 05:34:44 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Vanity addresses are unsafe  (Read 416 times)
Lionel (OP)
Sr. Member
****
Offline Offline

Activity: 613
Merit: 305


View Profile
August 18, 2020, 11:01:41 PM
 #1

If i , with my humble PC, am able to generate a vanity address in reasonable time ...
then a team of hackers with a cluster of PCs can generate all the possible vanity addresses, and constantly monitor them for stealing the funds as soon as they receive a tx.

All the addresses that begin with any keyword like "GIFT" or any business name like "bitstamp" are a very infinitesimal fraction of all possible addresses, so this attack is feasible for a moderately equipped hacker team.
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713893684
Hero Member
*
Offline Offline

Posts: 1713893684

View Profile Personal Message (Offline)

Ignore
1713893684
Reply with quote  #2

1713893684
Report to moderator
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
August 18, 2020, 11:06:45 PM
Merited by ebliever (5), ABCbits (3), o_e_l_e_o (2), vapourminer (1), pooya87 (1), bitmover (1), Heisenberg_Hunter (1)
 #2

Before trying to educate people on something, you should make sure you know the subject matter yourself. In this case, you're exactly wrong. Assuming the vanity-address generating software is written correctly, a vanity address is no easier to brute force than any other address.

At it's most fundamental level, vanity address generation is just generating addresses in a loop until you find one that looks pretty and you use that.

A worked example: this is the ultimate vanity address:
Code:
1BitcoinEaterAddressDontSendf59kuE
  tell me the private key, and I'll give you 13.24 BTC.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
August 19, 2020, 12:55:12 AM
Merited by Heisenberg_Hunter (1)
 #3

All the addresses that begin with any keyword like "GIFT" or any business name like "bitstamp" are a very infinitesimal fraction of all possible addresses, so this attack is feasible for a moderately equipped hacker team.
There is nothing inherently different between trying to brute force a vanity address and a regular address. The fact that the first few characters have a pattern that humans recognize is completely irrelevant at a code level.

All the addresses which begin with "HQ3G" or "LdRc" are a similarly small fraction of all possible addresses as those beginning "GIFT". Given those two addresses have a combined bounty of $1.5 billion, why are there not thousands of "moderately equipped hacker teams" creating competing transactions trying to clear them out by now?

Vanity addresses will be insecure if you generate them on an online computer or use an online service to generate them for you, but they are not insecure simply because they have a particular string of characters at the start.


bitmover
Legendary
*
Online Online

Activity: 2282
Merit: 5880


bitcoindata.science


View Profile WWW
August 19, 2020, 02:00:15 AM
 #4

There is nothing inherently different between trying to brute force a vanity address and a regular address. The fact that the first few characters have a pattern that humans recognize is completely irrelevant at a code level.

Exactly.

A vanity address generator is not a magical tool. It does the same that a wallet does: generates a new address from a private key.
However, the vanity generator will be generating private keys / addresses  pairs until it finds one that matches the text you are looking for.

If you software is safe, in an offline environment, it is safe.




somehow offtopic:
It would be amazing if there was a third party software for ledger nano / trezor that could generate vanity addresses from the hardware wallet seed. That would be much safer.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10495



View Profile
August 19, 2020, 03:43:12 AM
 #5

i think you are confused about how vanity generation works.
the reason why you are wrong is that you are forgetting about the starting point of searching for the address. it is a random number not a fixed one. and since the private key range is vast it doesn't matter how many keys you check before you get to the final result, it won't be reproduced as long as the initial key was selected randomly.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ebliever
Legendary
*
Offline Offline

Activity: 1708
Merit: 1035


View Profile
August 19, 2020, 06:08:14 AM
 #6

On an unrelated note - I had a person recently tell me they were unable to donate bitcoin to a vanity address I had generated in early 2019, using software from probably a couple years earlier. They said their wallet or service (they never told me what they were using) said it was an invalid address. I pointed out the address has a couple test deposits in it and that Bitcoin devs are very careful to maintain backward compatibility during updates to the bitcoin code so that BTC does not become stranded, but does anyone know why a bitcoin wallet would be refusing a transaction to a vanity address?

Luke 12:15-21

Ephesians 2:8-9
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10495



View Profile
August 19, 2020, 06:26:08 AM
 #7

but does anyone know why a bitcoin wallet would be refusing a transaction to a vanity address?

possible reasons could be buggy implementation of:
- base58 encoding
- checksum computation
- SHA256 calculation
or it is possible the person copying the address simply copied less or more characters than the real address.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
August 19, 2020, 07:29:43 PM
 #8

but does anyone know why a bitcoin wallet would be refusing a transaction to a vanity address?

The bible quote in your signature reminded me of a fanatical Christian dude who maintained (maintains?) a patchset that blacklisted certain prefixes of bitcoin addresses. The blacklist worked by looking at the start of an address and rejecting vanity addresses corresponding to some gambling sites (e.g. satoshidice).

As I recall there was some drama at the time (2014?) when this ridicilious patchset was snuck into the default build in gentoo.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
August 19, 2020, 08:54:51 PM
 #9

Was it a legacy or a bech32 vanity address? It could simply be that the person was using an old wallet/web wallet/exchange which still did not support SegWit addresses.
bitmover
Legendary
*
Online Online

Activity: 2282
Merit: 5880


bitcoindata.science


View Profile WWW
August 20, 2020, 12:41:21 PM
 #10

Theoretically it's possible if you continue generate address from the seed until you find prefix that match your needs.

As a seed can generate billions of addresses [1], it would be as efficient as a normal vanity generator.

But you need to remember the index.

That is what the software would do Wink
you could just save the derivation path/index with the seed to be safe.



[1]https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#navigating-the-hd-wallet-tree-structure
Quote
The HD wallet tree structure offers tremendous flexibility. Each parent extended key can have 4 billion children: 2 billion normal children and 2 billion hardened children. Each of those children can have another 4 billion children, and so on. The tree can be as deep as you want, with an infinite number of generations.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
August 20, 2020, 02:46:42 PM
Merited by bitmover (3)
 #11

As a seed can generate billions of addresses [1], it would be as efficient as a normal vanity generator.

That's not nearly the case. A normal vanity generation is something like:

Step 1: Pick a random private key `p`
Step 2: Compute  the elliptical operation `P=p*G`
Step 3: Let V = to_bitcoin_address(P)
Step 4: If V matches our vanity filter, we are done. And the private key is p.
Step 5: Compute p = p+1
Step 6: Compute the elliptical operation P = P + G
Step 7: GO TO step 3.


This is insanely more efficient than using an HD seed which every iteration requires a lot of pointless, slow and complex steps (hashes, EC multiplications) . And also you can resume the process easily by just substituting "Step 1" for using the last `p` you want to continue the process from. In short: Using an HD seed makes absolutely zero sense. I can't think of a single upside.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
August 20, 2020, 03:45:25 PM
 #12

This is insanely more efficient than using an HD seed which every iteration requires a lot of pointless, slow and complex steps (hashes, EC multiplications) .

Using hardened children it's a single HMACSHA512 and a single modular addition (HMAC can also be optimized to only perform 2 block compressions instead of 4). But yeah it makes no sense to use this method.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
bitmover
Legendary
*
Online Online

Activity: 2282
Merit: 5880


bitcoindata.science


View Profile WWW
August 20, 2020, 04:05:45 PM
 #13

As a seed can generate billions of addresses [1], it would be as efficient as a normal vanity generator.

That's not nearly the case. A normal vanity generation is something like:

Step 1: Pick a random private key `p`
Step 2: Compute  the elliptical operation `P=p*G`
Step 3: Let V = to_bitcoin_address(P)
Step 4: If V matches our vanity filter, we are done. And the private key is p.
Step 5: Compute p = p+1
Step 6: Compute the elliptical operation P = P + G
Step 7: GO TO step 3.


This is insanely more efficient than using an HD seed which every iteration requires a lot of pointless, slow and complex steps (hashes, EC multiplications) . And also you can resume the process easily by just substituting "Step 1" for using the last `p` you want to continue the process from. In short: Using an HD seed makes absolutely zero sense. I can't think of a single upside.


thanks.
yeah, really there are many additional steps as you said...

But there is one upside. Security. You can then use your vanity address with the same security as a HW wallet. wouldn't it be worth? at least for small vanity addresses (such as 3-4 characters).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
August 20, 2020, 04:12:45 PM
 #14

But there is one upside. Security. You can then use your vanity address with the same security as a HW wallet. wouldn't it be worth? at least for small vanity addresses (such as 3-4 characters).
You can create a vanity address on a permanently airgapped computer, and encrypt the wallet or even the entire disk when you are done. Keep the private key on that computer, and set up a watch only wallet with the address on an internet enabled device. Such a set up is more secure than a hardware wallet.
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
August 20, 2020, 04:22:38 PM
 #15

But there is one upside. Security. You can then use your vanity address with the same security as a HW wallet. wouldn't it be worth? at least for small vanity addresses (such as 3-4 characters).

Well, if you wanted to do that -- you'd use the HD derived value for "Step 1" part. But you wouldn't actually use bip32 to try brute force a vanity address.


Actually if you wanted to make a "vanity hardware wallet" it's not too hard, and the cool thing is the hardware wallet can safely outsource the work to a computer without [realistically] compromising security. (In short: The hardware wallet keeps `p` a secret, but gives you `P` and then you keep track of how many times you need to add `G` to P to get a good vanity address.)


I don't think there's much demand for this sort of thing though, as it'd be pretty toxic for privacy

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
August 20, 2020, 04:55:27 PM
 #16

Such a set up is more secure than a hardware wallet.

But also less convenient.
Having a seed from which the private key of a vanity address is derived, definitely has its charm.

Obviously the time it would take to find a seed which has the vanity address in the first few derived keys, is much higher.
But it might be worth it under some specific circumstances (e.g. the prefix of the vanity address doesn't have to be too long and mobility is important).

bitmover
Legendary
*
Online Online

Activity: 2282
Merit: 5880


bitcoindata.science


View Profile WWW
August 20, 2020, 06:13:14 PM
 #17

You can create a vanity address on a permanently airgapped computer, and encrypt the wallet or even the entire disk when you are done. Keep the private key on that computer, and set up a watch only wallet with the address on an internet enabled device. Such a set up is more secure than a hardware wallet.

Not convenient, and also costly. I don't have an airgapped computer, I don't have an spare computer computer also...

I don't think there's much demand for this sort of thing though, as it'd be pretty toxic for privacy

Why toxic for privacy? Just as toxic as any other vanity address, which is going to be obviously reused..

You can set your HW balance as unspendable or even create a new seed just for this vanity address.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
j2002ba2
Full Member
***
Online Online

Activity: 204
Merit: 437


View Profile
August 20, 2020, 07:04:45 PM
Merited by bitmover (2)
 #18

As a seed can generate billions of addresses [1], it would be as efficient as a normal vanity generator.

That's not nearly the case. A normal vanity generation is something like:

Step 1: Pick a random private key `p`
Step 2: Compute  the elliptical operation `P=p*G`
Step 3: Let V = to_bitcoin_address(P)
Step 4: If V matches our vanity filter, we are done. And the private key is p.
Step 5: Compute p = p+1
Step 6: Compute the elliptical operation P = P + G
Step 7: GO TO step 3.


This is insanely more efficient than using an HD seed which every iteration requires a lot of pointless, slow and complex steps (hashes, EC multiplications) . And also you can resume the process easily by just substituting "Step 1" for using the last `p` you want to continue the process from. In short: Using an HD seed makes absolutely zero sense. I can't think of a single upside.

With non-hardened keys it's almost the same:

Step 1: generate a seed s, derive (kpar, Kpar, Cpar) using know derivation path m/a'/b'/c'/0, set i32=0 (the index)
Step 2: P = Kpar + HMAC-SHA512(Cpar, Kpar || i32).L * G
Step 3: Let V = to_bitcoin_address(P)
Step 4: If V matches our vanity filter, we are done. And the private key is kpar + HMAC-SHA512(Cpar, Kpar || i32).L, with seed s, and path m/a'/b'/c'/0/i32
Step 5: Compute i32 = i32+1
Step 6: If i32 >= 2^31 GO TO step 1
Step 7: GO TO step 3.

The main slowdown is elliptic point multiplication in Step 2. HMAC-SHA512 is relatively fast.

My guess is that it's 100 times slower than normal vanity gen. Using some memory tradeoffs 30x or even 10x slowdown might be achieved.
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
August 20, 2020, 10:33:06 PM
 #19

Why toxic for privacy? Just as toxic as any other vanity address, which is going to be obviously reused..

Because they (inherently) don't look like other addresses, which is information that heuristics can exploit.


Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
August 21, 2020, 01:23:49 AM
Last edit: August 21, 2020, 01:34:19 AM by gmaxwell
Merited by bitmover (4), ABCbits (2), o_e_l_e_o (2)
 #20

I think that while the OP is technically wrong, there is a kernel of truth in their claim.

Vanity addresses, generated correctly, aren't inherently weaker-- as people were quick to point out.

Attackers can generate lookalike addresses for any address, vanity or not-- but they can only look so alike due to exponential complexity.

It's unsafe to tell if a an address, ANY address, is the right one by comparing only a couple characters especially if an attacker can predict what characters you'll check.  Just like statistical methods in password guessing are surprisingly effective I imagine that a sufficiently smart attacker could make more successful lookalikes than you'd assume on first guess-- maybe because he uses fancy techniques to compute really fast, maybe because he is really good at predicting the visual similarity of addresses.

Why would do people use vanity addresses?  Mostly because they expect people to recognize the name as being associated with them.  They use them because they want people to be comparing those friendly human readable characters.

So essentially vanity addresses encourage an unsafe behaviour-- users validating an address by comparing a few easily predicted characters. Making a predictable and weak comparison is unsafe for any kind of address, but for a vanity address enabling a weak comparison is a lot of the point for people.

Is it possible to use vanity addresses safely?  Absolutely-- validate them by comparing parts other than the vanity part.   But do most users compare them safely? Probably not.

If users could be relied on to compare as much non-vanity part as they would on a non-vanity address, you could make an argument that they increase security by making it more expensive to generate vaguely similar addresses. But I think it's clear that this benefit is dwarfed by people-- even experts-- not being as diligent in comparing them.   While working on BIP173 I contemplated making it expensive to brute force similar addresses-- e.g. applying a expensive cryptographic permutation to the data before encoding it in an address.  But I felt I just couldn't justify making implementers life harder for a speculative benefit that only helps really sloppy users. Any operation expensive enough to really slow attackers would be painfully slow on hardware wallet devices which are uniformly very underpowered.  ... and I also expected that because that kind of strengthening would make vanity address generation much harder too I might have had to navigate opposition from users that didn't want vanity addresses to be much less available to them.

Another alternative I considered but didn't go for was requiring the underlying address data to have an all zeros suffix.  This would also make generation expensive-- but would have the additional benefit of allowing shorter addresses-- so at least the benefit wouldn't just be against sloppy users.   But it would really complicate hdwallet/taproot/multisig usage where generating a key is already complicated.

In any case, ... just because something exists doesn't mean it's a good idea. There is evidence in the wild that lookalike vanity addresses being used to rob people and lookalike onion domains in Tor, so the security concern isn't just a theory.

Given that, as mentioned, they're also pretty toxic for privacy (both due to encouraging reuse and being identifiable) they're probably better avoided.
Pages: [1] 2 »  All
  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!