Bitcoin Forum
November 23, 2026, 04:58:31 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 [170] 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 »
  Print  
Author Topic: Vanitygen: Vanity bitcoin address generator/miner [v0.22]  (Read 1155338 times)
buglab.co
Newbie
*
Offline

Activity: 49
Merit: 0


View Profile
November 29, 2017, 07:08:36 PM
 #3381

This is really interesting, was looking for a custom BTC address.

Will give it a go!  Smiley
Wall-ET
Full Member
***
Offline

Activity: 224
Merit: 100


View Profile
December 01, 2017, 09:30:29 AM
 #3382

Hello

I have noticed that when I use CPU to generate keys I get keys and they are input into a file, but when GPU is used I get 2 hashes and nothing is written into the file...
why is that?
Any suggestions?
Am I doing something wrong or is this the normal output?

Code:
oclvanitygen.exe -D 0:0 1abc
Difficulty: 4553521
[721.08 Kkey/s][total 6291456][Prob 74.9%][75% in 0.0s]                        Match idx: 0
CPU hash: 386a5934bae84191aaee047841e98bf5a781e52a
GPU hash: 065a9cd212b19a22740d563ce438f3b7a051e23e
Found delta: 1786828 Start delta: 6291457
[837.78 Kkey/s][total 18874368][Prob 98.4%]

██████████████████████▔|▔▔|      LEDGER WALLET ▶ Second factor ✓ Malware Proof ✓                   █  Win Free Bitcoins every hour! - www.freebitco.in
██████████████████████▔|▔▔|   ✓                                                                                              █     Get free $500 on UPcoin Exchange
██████████████████████▔|▔▔| ◀◀ Smartcard based Hardware Wallet - Worldwide Shipping              █   Best Casino █ For Tips: 0x2d3e3e232b8dc1fa9e862bbef90760ff2f18c0f9
LoyceV
Legendary
*
Offline

Activity: 4228
Merit: 23222


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
December 01, 2017, 12:38:08 PM
 #3383

I have noticed that when I use CPU to generate keys I get keys and they are input into a file, but when GPU is used I get 2 hashes and nothing is written into the file...
You'll need to use this command line option:
Code:
Options:
-o <file>     Write pattern matches to <file>

This works for me:
Code:
./oclvanitygen -o supersecretprivatekeys.txt 1abc
Difficulty: 4553521
Pattern: 1abc                                                                 
Address: 1abccg8oV9D2fv~~
Privkey: 5JeHscp1YEYpZQMVB~~

This should work for you:
Code:
oclvanitygen.exe -D 0:0 -o supersecretprivatekeys.txt 1abc

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
[MUSIC] The Ballad of LoyceV
Wall-ET
Full Member
***
Offline

Activity: 224
Merit: 100


View Profile
December 01, 2017, 12:57:30 PM
 #3384

I have noticed that when I use CPU to generate keys I get keys and they are input into a file, but when GPU is used I get 2 hashes and nothing is written into the file...
You'll need to use this command line option:
Code:
Options:
-o <file>     Write pattern matches to <file>

This works for me:
Code:
./oclvanitygen -o supersecretprivatekeys.txt 1abc
Difficulty: 4553521
Pattern: 1abc                                                                 
Address: 1abccg8oV9D2fv~~
Privkey: 5JeHscp1YEYpZQMVB~~

This should work for you:
Code:
oclvanitygen.exe -D 0:0 -o supersecretprivatekeys.txt 1abc

This is what I used and it does not work.
Supposed I use GPU to do the calculation and not CPU. if I use CPU it works like in your example..

██████████████████████▔|▔▔|      LEDGER WALLET ▶ Second factor ✓ Malware Proof ✓                   █  Win Free Bitcoins every hour! - www.freebitco.in
██████████████████████▔|▔▔|   ✓                                                                                              █     Get free $500 on UPcoin Exchange
██████████████████████▔|▔▔| ◀◀ Smartcard based Hardware Wallet - Worldwide Shipping              █   Best Casino █ For Tips: 0x2d3e3e232b8dc1fa9e862bbef90760ff2f18c0f9
Andre_Goldman
Sr. Member
****
Offline

Activity: 322
Merit: 253

Property1of1OU


View Profile
December 10, 2017, 10:33:55 PM
 #3385

dev from VanityGen ... I tried some random-fu but I was spotted out straight

https://dev.gnupg.org/rD6021eb85de1a4dbb043eb345be75f2bc47235f11

Patent1number: ****-****
uccoin
Newbie
*
Offline

Activity: 25
Merit: 0


View Profile
December 13, 2017, 11:49:14 AM
 #3386

Cant seem to get it up and running.
stuck at regex
professor9
Jr. Member
*
Offline

Activity: 45
Merit: 1


View Profile
December 21, 2017, 04:52:17 AM
 #3387

Dear samr7, we really need SegWit feature
za3toor
Newbie
*
Offline

Activity: 23
Merit: 0


View Profile
December 22, 2017, 08:50:49 PM
 #3388

Hello Guys...

This is a very interesting software. Would it be possible to add a feature that instead of looking to match the public key, can it match the RIPEMD-160 instead.

This will save a lot of computations and it will be far more efficient. Once it matches the RIPEMD-160, it will be very easy to calculate the public key from there. Of course the requirement that the user has to supply with the desired RIPEMD-160 key.

We can use this site to determine the RIPMED-160. http://gobittest.appspot.com/Address

With this approach, we will save a lot of computations for the double SHA-256  + BASE58 conversion for each trial.

Thanks,
Z
markasoftware
Full Member
***
Offline

Activity: 166
Merit: 100


View Profile WWW
December 24, 2017, 04:48:44 AM
 #3389

Hello Guys...

This is a very interesting software. Would it be possible to add a feature that instead of looking to match the public key, can it match the RIPEMD-160 instead.

This will save a lot of computations and it will be far more efficient. Once it matches the RIPEMD-160, it will be very easy to calculate the public key from there. Of course the requirement that the user has to supply with the desired RIPEMD-160 key.

We can use this site to determine the RIPMED-160. http://gobittest.appspot.com/Address

With this approach, we will save a lot of computations for the double SHA-256  + BASE58 conversion for each trial.

Thanks,
Z

But, with just the RIPEMD hash, how do you know anything about the final address without generating it? What is the point of having a cool RIPEMD-160 hash? The whole point of vanitygen is to have cool addresses, not intermediate values.

Check out MarkaPool.
Also check out my open source projects.
nullius
Copper Member
Hero Member
*****
Offline

Activity: 672
Merit: 2900


Privacy is necessary & sufficient for fungibility.


View Profile WWW
December 24, 2017, 11:02:54 AM
Last edit: February 12, 2018, 07:04:43 PM by nullius
Merited by dbshck (2), Chris! (2), LoyceV (1), jtipt (1)
 #3390

In reply to these, and likely others earlier in the thread:

Is there anyone working on vanitygen fork to generate vanity bech32 addresses? Seems like it might be easier to get longer firstbits that make sense because it's more limited in characters.

Dear samr7, we really need SegWit feature

Smart thinking!  A day or two ago, I whipped up a quickie Segwit address generator with a simple regex search.  It can produce both P2WPKH-nested-in-P2SH and Bech32 addresses.  It’s quite trivial; it lacks vanitygen’s features, and probably also falls short in performance.  [Edit 2018-02-12:  segvan: Segwit vanity address & bulk address generator (Github).]

Some sample outputs from short patterns:

3NULL3ZCUXr7RDLxXeLPDMZDZYxuaYkCnG  (^3NULL[0-9])

bc1qcash96s5jqppzsp8hy8swkggf7f6agex98an7h (hahah; ^bc1qcash[0-9])

From earlier tests, WIF private key import was confirmed by me to work perfectly in Electrum:


Segwit addresses are sexy!
(Typo correction:  Of course, that should be “imported from WIF”.
I pray that the god of prepositions not smite me.)

The code is in C, Unix-only.  It’s fairly trivial; it essentially glues together Core’s secp256k1 library, luke-jr’s libbase58, and sipa’s reference Bech32 code.  It has almost no features; it won’t even try to tell you if the pattern you seek is impossible.  I’d intended to toss it out there somewhere for others to play with; but it devolved into a patchwork of #ifdefs with multiple different code paths, due to an build-time problem with dependencies.  It would require time and effort to clean up.

How great is the interest in this?

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███
██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀

 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|███████▄███▄███▄███▄██
█████████▄▀█████▀▄████
███▄████████▀█▀████████▄
█████████▀███████▀██████
████████████████████████
█▄██▄▀▀▀▀▀██▄▀▄██▀▀▀▀▀▄▀
▄████▄▀▀▀██▀███▀██▀▀▀▄
████████████████████
▀███████████████████▄
█▀████████████████████▄▄
████████████████████████
████████████████████████
███▀███████████████████▀
|
exander77
Newbie
*
Offline

Activity: 32
Merit: 0


View Profile
December 26, 2017, 12:05:53 AM
 #3391

Anyone here actually managed to get this to compile under Windows?

Seems every dependancy is outdatted and tons of warnings/errors.

I crosscompile it for Windows on Linux (Ubuntu 17.10).
Thirdspace
Hero Member
*****
Offline

Activity: 1232
Merit: 740


Mixing reinvented for your privacy | chipmixer.com


View Profile
December 26, 2017, 01:02:47 AM
 #3392

Smart thinking!  A day or two ago, I whipped up a quickie Segwit address generator with a simple regex search.  It can produce both P2WPKH-nested-in-P2SH and Bech32 addresses.  It’s quite trivial; it lacks vanitygen’s features, and probably also falls short in performance.
Quote
How great is the interest in this?

interesting... I'm pretty sure there is big interest in them. did you fork samr's vanitygen or start from scratch?
though since bech32 addresses are not yet implemented by most wallet,
the interest in bech32 addresses would be somewhat lower than that for segwit 3xxx addresses
any stats on how many addresses/second your generator can do?

markasoftware
Full Member
***
Offline

Activity: 166
Merit: 100


View Profile WWW
December 26, 2017, 02:26:06 AM
 #3393

In reply to these, and likely others earlier in the thread:

Is there anyone working on vanitygen fork to generate vanity bech32 addresses? Seems like it might be easier to get longer firstbits that make sense because it's more limited in characters.

Dear samr7, we really need SegWit feature

Smart thinking!  A day or two ago, I whipped up a quickie Segwit address generator with a simple regex search.  It can produce both P2WPKH-nested-in-P2SH and Bech32 addresses.  It’s quite trivial; it lacks vanitygen’s features, and probably also falls short in performance.

Some sample outputs from short patterns:

3NULL3ZCUXr7RDLxXeLPDMZDZYxuaYkCnG  (^3NULL[0-9])

bc1qcash96s5jqppzsp8hy8swkggf7f6agex98an7h (hahah; ^bc1qcash[0-9])

From earlier tests, WIF private key import was confirmed by me to work perfectly in Electrum:


Segwit addresses are sexy!
(Typo correction:  Of course, that should be “imported from WIF”.
I pray that the god of prepositions not smite me.)

The code is in C, Unix-only.  It’s fairly trivial; it essentially glues together Core’s secp256k1 library, luke-jr’s libbase58, and sipa’s reference Bech32 code.  It has almost no features; it won’t even try to tell you if the pattern you seek is impossible.  I’d intended to toss it out there somewhere for others to play with; but it devolved into a patchwork of #ifdefs with multiple different code paths, due to an build-time problem with dependencies.  It would require time and effort to clean up.

How great is the interest in this?

May I ask why you wrote it from scratch? Why not just modify the code from vanitygen to change how it converts ECDSA keypair to address?

Check out MarkaPool.
Also check out my open source projects.
nullius
Copper Member
Hero Member
*****
Offline

Activity: 672
Merit: 2900


Privacy is necessary & sufficient for fungibility.


View Profile WWW
December 26, 2017, 04:10:29 AM
 #3394

Smart thinking!  A day or two ago, I whipped up a quickie Segwit address generator with a simple regex search.  It can produce both P2WPKH-nested-in-P2SH and Bech32 addresses.  It’s quite trivial; it lacks vanitygen’s features, and probably also falls short in performance.
Quote
How great is the interest in this?

interesting... I'm pretty sure there is big interest in them. did you fork samr's vanitygen or start from scratch?
though since bech32 addresses are not yet implemented by most wallet,
the interest in bech32 addresses would be somewhat lower than that for segwit 3xxx addresses
any stats on how many addresses/second your generator can do?

I am thrilled to see the interest in Bravo Charlie Addresses!  Spread the word, “Bravo Charlie One means money.”

I wrote it from “scratch”—well, not really.  At first, I simply glued together sipa’s reference bech32 code, Core’s secp256k1, luke-jr’s libbase58, and standard POSIX extended regular expressions.  Then due to build dependency problems on my airgap machine, I had to semi-rewrite it with OpenSSL secp256k1 and my own base58check encoder using OpenSSL bignums.  This was supposed to be what you might call an “little pastime project”, done on a whim.

To be absolutely clear, I do handle both Bech32 and P2SH-nested Segwit “3” addresses.  Right now, pattern-matching is done on either one or the other; that’s stupid.  I intend to change it to check the same trial key against different patterns for both, if the operator so desires.

The code is slow, partly because I do a real bruteforce search:  Read a new private key off /dev/urandom, try its corresponding public key, and throw it away if that doesn’t match.  I always somewhat distrusted vanity addresses; and this is the paranoid way to make them.  Partly also because I made no attempt to make it fast.  I will try to get you some useful benchmark numbers after I do some immediately planned improvements.  Moreover, although I paid careful attention to basic tests, I’ll want to test more and play with testnet coins before foisting my code on other people where a bug could lose Other People’s Money.

The precursor idea popped into my head when I observed that ChipMixer is still not using Segwit; thus, I had in the back of my mind to see how hard it would be to make bulk Segwit addresses on demand.  It’s trivial; and my code will churn out as many thousands of nested-P2SH or Bech32 addresses and matching private keys as you could want, lightning-fast.  (Of course, ordinary users should use an HD wallet!)  I was pushed to action when I hit a thread where somebody was criticizing the aesthetics of Bech32.  What better way to persuade that Bech32 is pretty, than to show off a sweet vanity address?  So, I whipped up my bulk address generator and tacked on a regex pattern loop function.

Note for Microsoft Windows users:  My vanity generator uses POSIX regular expressions and other standard Unix APIs; and I want to keep dependencies to a minimum, for my own usage.  Thus, I doubt there would ever be a version which could be compiled with MSVC.  But I think that mingw has regex support; so perhaps there may be hope.  I would not be able to test the resulting binaries myself; for I have no Windows in my home or office.  I may try to get this working, if I see signs of sufficient interest (viz., potential for tips).  I myself will build and test on FreeBSD and Linux, in that order.


May I ask why you wrote it from scratch? Why not just modify the code from vanitygen to change how it converts ECDSA keypair to address?

Sundry reasons:

  • I was scratching an itch.
  • I needed a bulk address generator anyway.
  • I wanted something small and light, with as few dependencies as practicable.
  • vanitygen is AGPL.  As an advocate of liberal licensing and best of all, the public domain, I will avoid contributing my time and effort to a project whose code I can’t borrow without virally infecting my own codebase; GPL is a one-way street, and worst of all is AGPL.
  • vanitygen appears to be abandonware, with accumulating pull requests and an otherwise-maintained fork which people don’t seem to be switching to.
  • I do not have the requisite cryptanalytic expertise for evaluating the safety of the EC trick which vanitygen uses for speedup.  This is not to criticize vanitygen specifically:  I have significant general misgivings about vanity addresses; and anything other than fully random key selection makes me uncomfortable.
  • I have no idea what it would take to make vanitygen use compressed public keys as mandatory for Segwit (one pull request is open since 2013, with a severe bug as noted in the comments), then add the other needed code for Segwit address generation.  (Aside:  Even if you were to desire to still use old-style addresses without the Segwit fee discount, use of uncompressed public keys is really throwing away your money on fees.)  Whereas I already know exactly how to create such an implementation myself—on a whim—which this was.
  • I have never used vanitygen.  I first looked at its codebase a few minutes ago, to inform myself for an intelligent reply to you.  I didn’t actively choose not to patch a program I’ve never used; I independently wanted something, so I wrote it, and that’s that.

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███
██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀

 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|███████▄███▄███▄███▄██
█████████▄▀█████▀▄████
███▄████████▀█▀████████▄
█████████▀███████▀██████
████████████████████████
█▄██▄▀▀▀▀▀██▄▀▄██▀▀▀▀▀▄▀
▄████▄▀▀▀██▀███▀██▀▀▀▄
████████████████████
▀███████████████████▄
█▀████████████████████▄▄
████████████████████████
████████████████████████
███▀███████████████████▀
|
arulbero
Legendary
*
Online Online

Activity: 2209
Merit: 2617


View Profile
December 26, 2017, 07:26:22 AM
Last edit: December 26, 2017, 07:59:07 AM by arulbero
 #3395


The code is slow, partly because I do a real bruteforce search:  Read a new private key off /dev/urandom, try its corresponding public key, and throw it away if that doesn’t match.  I always somewhat distrusted vanity addresses; and this is the paranoid way to make them.  Partly also because I made no attempt to make it fast.  I will try to get you some useful benchmark numbers after I do some immediately planned improvements.  Moreover, although I paid careful attention to basic tests, I’ll want to test more and play with testnet coins before foisting my code on other people where a bug could lose Other People’s Money.

....

  • I do not have the requisite cryptanalytic expertise for evaluating the safety of the EC trick which vanitygen uses for speedup.  This is not to criticize vanitygen specifically:  I have significant general misgivings about vanity addresses; and anything other than fully random key selection makes me uncomfortable.

....


To speed up the generation of the public keys from the private keys you need to use consecutive private keys. Moreover you should generate batches of public keys instead of generating only one key each time from /dev/urandom.

I developed a ecc library for the LBC collider project. Just to give you a benchmark, my program generates 16.77 consecutive MKeys in 1 second, but to generate 16.77 no consecutive Mkeys it takes 39 seconds (on a Xeon mobile Kabylake cpu, 1 core). If I don't use the batches neither (i.e. if I compute a field inverse for each key) it takes 98 seconds. Then: 1  -> 39 -> 98 seconds.

If an address generator is well optimized, the ecc part should take only the 7-8% of the time, sha256 + ripemd160 the 92% (on a cpu, on a gpu the things are different). On my cpu I can get 3 Maddresses/s with 1 core (using only compressed keys because compressed addresses are faster to generate).
kain134
Newbie
*
Offline

Activity: 14
Merit: 0


View Profile
December 30, 2017, 03:05:00 PM
 #3396

Why are certain patters so much harder to find then other patterns?

I was looking for somebodies name with the -i option so non case sensitive.

It found last name first name in under a minute (guess I got really lucky) with a difficulty of 778316249440 which with 15Mkey/s would take 10 hours for a 50% chance.

Now I searched for the exact name but with first name last name and that gave a difficulty of 23349487483220 which would take 13 days for a 50% chance.

Why is this?

Is there also a reason why people are only looking for patterns in the beginning of the adress?

I probably don't understand all the ins and outs yet but basically the program starts with some randomness to create usefull privatekeys and then just generates millions of keys just looking for some key to fly by that resolved to a public address that has the pattern we are looking for.

If that is true then why can't I search with oclvanitygen for patterns anywhere in the address, not just in the beginning.

Or am I missing something here?

raaaj100
Newbie
*
Offline

Activity: 14
Merit: 0


View Profile
December 30, 2017, 10:16:52 PM
 #3397

Currently, it is difficult to import the private key into bitcoin.  Sipa's showwallet branch has a new command called "importprivkey" that accepts the base-58 encoded private key.  Vanitygen has been tested to work with that version of bitcoin, although it had to be restarted to get the imported vanity address to show up on the list in the GUI.

I've just pushed a bugfix, and can't reproduce the problem now. Could you try again?

PS: yes, it's quite normal your code is a lot faster - the vanity patch just tried generating random keys until a match was found, requiring generating 256 random bits + an EC multiplication per attempt. Your code only needs an EC addition per attempt.
xhomerx10
Legendary
*
Offline

Activity: 4760
Merit: 12023



View Profile
December 30, 2017, 10:27:12 PM
 #3398

Why are certain patters so much harder to find then other patterns?

I was looking for somebodies name with the -i option so non case sensitive.

It found last name first name in under a minute (guess I got really lucky) with a difficulty of 778316249440 which with 15Mkey/s would take 10 hours for a 50% chance.

Now I searched for the exact name but with first name last name and that gave a difficulty of 23349487483220 which would take 13 days for a 50% chance.

Why is this?

Is there also a reason why people are only looking for patterns in the beginning of the adress?

I probably don't understand all the ins and outs yet but basically the program starts with some randomness to create usefull privatekeys and then just generates millions of keys just looking for some key to fly by that resolved to a public address that has the pattern we are looking for.

If that is true then why can't I search with oclvanitygen for patterns anywhere in the address, not just in the beginning.

Or am I missing something here?



 Use vanitygen with the -r (regex) option and you can search for patterns anywhere in the address.  Be aware that this is much slower than using oclvanitygen though.  Also, the program doesn't check for the validity of your search so you could be searching for something that doesn't exist as a Bitcoin address if you aren't careful.

for example,
vanitygen -r 0f
(that's a zero by the way) will cause the program to search forever because zero is not a valid base58 character.



charlie137
Full Member
***
Offline

Activity: 1246
Merit: 220


(ノಠ益ಠ)ノ


View Profile WWW
January 01, 2018, 11:54:21 AM
 #3399

AXE added Cool https://github.com/AXErunners/vanitygen-plus

/__      ___ (  /
\\--`-'-|`---\\ |
 |' _/   ` __/ /
 '._  W    ,--'
    |_:_._/
Chris!
Legendary
*
Offline

Activity: 1382
Merit: 1133



View Profile
January 01, 2018, 02:23:01 PM
 #3400

Smart thinking!  A day or two ago, I whipped up a quickie Segwit address generator with a simple regex search.  It can produce both P2WPKH-nested-in-P2SH and Bech32 addresses.  It’s quite trivial; it lacks vanitygen’s features, and probably also falls short in performance.
Quote
How great is the interest in this?

interesting... I'm pretty sure there is big interest in them. did you fork samr's vanitygen or start from scratch?
though since bech32 addresses are not yet implemented by most wallet,
the interest in bech32 addresses would be somewhat lower than that for segwit 3xxx addresses
any stats on how many addresses/second your generator can do?

I am thrilled to see the interest in Bravo Charlie Addresses!  Spread the word, “Bravo Charlie One means money.”

I wrote it from “scratch”—well, not really.  At first, I simply glued together sipa’s reference bech32 code, Core’s secp256k1, luke-jr’s libbase58, and standard POSIX extended regular expressions.  Then due to build dependency problems on my airgap machine, I had to semi-rewrite it with OpenSSL secp256k1 and my own base58check encoder using OpenSSL bignums.  This was supposed to be what you might call an “little pastime project”, done on a whim.

To be absolutely clear, I do handle both Bech32 and P2SH-nested Segwit “3” addresses.  Right now, pattern-matching is done on either one or the other; that’s stupid.  I intend to change it to check the same trial key against different patterns for both, if the operator so desires.

The code is slow, partly because I do a real bruteforce search:  Read a new private key off /dev/urandom, try its corresponding public key, and throw it away if that doesn’t match.  I always somewhat distrusted vanity addresses; and this is the paranoid way to make them.  Partly also because I made no attempt to make it fast.  I will try to get you some useful benchmark numbers after I do some immediately planned improvements.  Moreover, although I paid careful attention to basic tests, I’ll want to test more and play with testnet coins before foisting my code on other people where a bug could lose Other People’s Money.

The precursor idea popped into my head when I observed that ChipMixer is still not using Segwit; thus, I had in the back of my mind to see how hard it would be to make bulk Segwit addresses on demand.  It’s trivial; and my code will churn out as many thousands of nested-P2SH or Bech32 addresses and matching private keys as you could want, lightning-fast.  (Of course, ordinary users should use an HD wallet!)  I was pushed to action when I hit a thread where somebody was criticizing the aesthetics of Bech32.  What better way to persuade that Bech32 is pretty, than to show off a sweet vanity address?  So, I whipped up my bulk address generator and tacked on a regex pattern loop function.

Note for Microsoft Windows users:  My vanity generator uses POSIX regular expressions and other standard Unix APIs; and I want to keep dependencies to a minimum, for my own usage.  Thus, I doubt there would ever be a version which could be compiled with MSVC.  But I think that mingw has regex support; so perhaps there may be hope.  I would not be able to test the resulting binaries myself; for I have no Windows in my home or office.  I may try to get this working, if I see signs of sufficient interest (viz., potential for tips).  I myself will build and test on FreeBSD and Linux, in that order.


May I ask why you wrote it from scratch? Why not just modify the code from vanitygen to change how it converts ECDSA keypair to address?

Sundry reasons:

  • I was scratching an itch.
  • I needed a bulk address generator anyway.
  • I wanted something small and light, with as few dependencies as practicable.
  • vanitygen is AGPL.  As an advocate of liberal licensing and best of all, the public domain, I will avoid contributing my time and effort to a project whose code I can’t borrow without virally infecting my own codebase; GPL is a one-way street, and worst of all is AGPL.
  • vanitygen appears to be abandonware, with accumulating pull requests and an otherwise-maintained fork which people don’t seem to be switching to.
  • I do not have the requisite cryptanalytic expertise for evaluating the safety of the EC trick which vanitygen uses for speedup.  This is not to criticize vanitygen specifically:  I have significant general misgivings about vanity addresses; and anything other than fully random key selection makes me uncomfortable.
  • I have no idea what it would take to make vanitygen use compressed public keys as mandatory for Segwit (one pull request is open since 2013, with a severe bug as noted in the comments), then add the other needed code for Segwit address generation.  (Aside:  Even if you were to desire to still use old-style addresses without the Segwit fee discount, use of uncompressed public keys is really throwing away your money on fees.)  Whereas I already know exactly how to create such an implementation myself—on a whim—which this was.
  • I have never used vanitygen.  I first looked at its codebase a few minutes ago, to inform myself for an intelligent reply to you.  I didn’t actively choose not to patch a program I’ve never used; I independently wanted something, so I wrote it, and that’s that.

I'm extremely interested but I'm sure this will be way over my head. I'm not a coder by any means but I've used Vanitygen to generate addresses in the past so I can get by if I know the basic commands to use. I'll be checking this out and using it if I'm able to!
Pages: « 1 ... 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 [170] 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 »
  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!