12

I would like to generate a large number of public Bitcoin addresses (several hundred thousand) quickly and efficiently into a simple text file. What would be the easiest way to get this done? I'm just wondering if there are any particular scripts or services that handle this already without having to roll my own.

3 Answers 3

6

If you want to generate a lot of keys in the wallet.dat, use command line parameter:

-keypool=<n>       Set key pool size to <n> (default: 100)

Then you can extract the results with Pywallet.

If you want to make them separate, you will have to use a cryptography library that supports secp256k1 ECDSA, like the Bouncy Castle. Simply generate private keys, use the library to generate public keys from them, and then convert them to classic Bitcoin address using this algorithm (requires libraries that support SHA256 and RIPEMD-160).

4
  • Hmmm. So roll my own then? Not a standard feature of bitcoind to produce them outside of the wallet.dat?
    – Gary
    Commented Nov 1, 2011 at 14:56
  • Wouldn't know, what do you want to do with those addresses anyway?
    – ThePiachu
    Commented Nov 1, 2011 at 15:11
  • 1
    One possible use case would be to pre-load an online service with a bucket of transaction addresses. No private keys stored on the server.
    – Gary
    Commented Nov 1, 2011 at 15:45
  • I guess you could also use Pywallet for this, edited my answer.
    – ThePiachu
    Commented Nov 1, 2011 at 18:22
9

Vanitygen is a command-line tool that can be used to generate random bitcoin addresses. It also has OpenCL-compatible GPU version called oclvanitygen. Both can be built from source, GitHub, and both are included in the Windows binary package. PGP signature here.

4
  • Good suggestion, but I need to favour performance over looks. Generating vanity addresses will throw away perfectly acceptable addresses leading to wasted time.
    – Gary
    Commented Nov 2, 2011 at 10:03
  • 2
    @Gary Rowe But couldn't you just provide and empty regular expression (something like 1*) and generate a ton of addresses?
    – nmat
    Commented Nov 2, 2011 at 18:24
  • @nmat Good point - hadn't considered that
    – Gary
    Commented Nov 3, 2011 at 9:13
  • i would think that vanitygen is the best performing address generator, but i don't have numbers to compare. see also bitcoin.stackexchange.com/a/2088/1098 for vanitygen speed
    – hmundt
    Commented Nov 17, 2013 at 20:01
8

You can use bitaddress.org. It is a single HTML file so you can save it and generate lots of addresses offline using their Bulk Wallet tab. The biggest problem here is Javascript performance. With current hardware you can generate around 1000 addresses per minute. If you are willing to wait several hours (maybe leave the computer working overnight), this can solve your problem.

1
  • 1
    Interesting approach, however I'd be looking to create them in blocks of several hundred thousand in a short space of time (a few minutes) so I'd need a compiled execution environment.
    – Gary
    Commented Nov 2, 2011 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.