<p>I ran <code>vanitygen -k 1</code>, which will keep creating addresses matching the pattern <strong>1*</strong> until stopped, for approximately five seconds and it generated more than 3,000 addresses. No GPU assistance here.</p>

<p>So, do this:</p>

<p>In one Terminal tab, run vanitygen or oclvanitygen:</p>

<pre><code>vanitygen -k -o addrs 1
</code></pre>

<p>In another Terminal tab, run this:</p>

<pre><code>watch 'echo "`wc -l addrs | egrep -o "[0-9]+"` / 3" | bc'
</code></pre>

<p>When the number in the second terminal tab is greater than 100M, you're done! The divisor is three because the output file will contain addresses in three line sets: Pattern, Address, Private Key.</p>

<p>Now, find a way to automate that and you'll be golden. You can also just shuffle bits around with another program that just gets the first 100M addresses from the file you generated.</p>

CC BY-SA 3.0
2013-05-08T23:04:32.007Z
Mine ran for ~15 minutes and generated 770k addresses. This is on a Macbook Air with an i7, using vanitygen.
Colin Dean
CC BY-SA 3.0
2013-05-10T01:00:40.107Z
That is perfect, thank you both for the suggestion and testing.
user3145
CC BY-SA 3.0
2013-05-08T23:02:42.017Z
2013-05-08T23:02:42.017Z
Colin Dean
<p>If you just need the keys, but not imported into bitciond:</p>

<ol>
<li>Generate 100M random numbers, each 256-bits long - these are your private keys.*</li>
<li>For each of the numbers execute the curve's ScalarBaseMult - to get X and Y.</li>
<li>The X (and Y) is your public key - you just need to hash and b58 encode it, to turn it into a bitcoin address.</li>
</ol>

<p>*) You might want to check if the numbers are in a range, but it's extremely unlikely that they would not.</p>

<p>If you need 100M keys imported into bitcoind - well, that could be a challenge...</p>

CC BY-SA 3.0
2013-05-08T19:17:01.903Z
2013-05-08T19:17:01.903Z
Gigi
<p>The <code>keypool</code> flag can accomplish that, but it would certainly take a long time. At this scale you might want to look into modifying vanitygen to create such a big number of addresses using GPU. However, there are no off-the-shelf solutions for what you are aiming to do, asides using <code>keypool</code> flag.</p>

CC BY-SA 3.0
2013-05-10T01:13:29.743Z
It's humbling to know that bitcoind is so robust.
user3145
CC BY-SA 3.0
2013-05-08T19:50:05.233Z
2013-05-08T19:50:05.233Z
ThePiachu
<p>What is the best method to generate large numbers of bitcoin addresses?</p>

<p>I imagine something like the following would break bitcoind in some fashion:</p>

<blockquote>
  <p>./bitcoind keypool=100000000</p>
</blockquote>

CC BY-SA 3.0
2013-05-08T20:31:35.323Z
I think you need to share a bit more about what your real use case is. (According to [this](http://bitcoin.stackexchange.com/questions/2828/how-many-bitcoin-addresses-are-have-been-carrying-a-balance) there were only a few million address used at all through May 2012.) Why would you need 100 million just for yourself? And do you just need them generated, or do you need to watch all of them? Watching all of them would be the much bigger chore.
David Ogren
CC BY-SA 3.0
2013-05-09T15:06:38.033Z
Yeah, the only real uses I could see for that many addresses are malicious.  Instead of generating so many addresses, you should just re-use addresses.
Julian Goldsmith
CC BY-SA 3.0
2013-05-10T01:10:46.440Z
@DavidOgren I can't disclose too much about my intent unfortunately, but I will try. The addresses are not for myself, they are for a permanent cold storage vault solution where it will be exceedingly difficult to add new addresses to the vault. The reason I need so many is to continue to allow real customers to continue registering to the website in the event of a powerful DDoS registration attack. If 50M visitors register and only 1 of them is real, I want every one of those new registrations to have a working deposit address. So no, I wouldn't need to watch all of them.
user3145
<bitcoind><address><vanity-address><vanitygen>
How to pre-generate 100M bitcoin addresses?
user3145
# How to pre-generate 100M bitcoin addresses?

(Asked by: username_0 on 2013-05-08)

What is the best method to generate large numbers of bitcoin addresses?

I imagine something like the following would break bitcoind in some fashion:

> ./bitcoind keypool=100000000

**Tags:** bitcoind, address, vanity-address, vanitygen

> **Comments:**
> **username_1**: I think you need to share a bit more about what your real use case is. (According to [this](http://bitcoin.stackexchange.com/questions/2828/how-many-bitcoin-addresses-are-have-been-carrying-a-balance) there were only a few million address used at all through May 2012.) Why would you need 100 million just for yourself? And do you just need them generated, or do you need to watch all of them? Watching all of them would be the much bigger chore.  
> **username_2**: Yeah, the only real uses I could see for that many addresses are malicious.  Instead of generating so many addresses, you should just re-use addresses.  
> **username_0**: @username_1 I can't disclose too much about my intent unfortunately, but I will try. The addresses are not for myself, they are for a permanent cold storage vault solution where it will be exceedingly difficult to add new addresses to the vault. The reason I need so many is to continue to allow real customers to continue registering to the website in the event of a powerful DDoS registration attack. If 50M visitors register and only 1 of them is real, I want every one of those new registrations to have a working deposit address. So no, I wouldn't need to watch all of them.  

---

## 3 answers

### Answer by username_3 on 2013-05-08. Score: 7

I ran `vanitygen -k 1`, which will keep creating addresses matching the pattern **1\*** until stopped, for approximately five seconds and it generated more than 3,000 addresses. No GPU assistance here.

So, do this:

In one Terminal tab, run vanitygen or oclvanitygen:

```
vanitygen -k -o addrs 1

```

In another Terminal tab, run this:

```
watch 'echo "`wc -l addrs | egrep -o "[0-9]+"` / 3" | bc'

```

When the number in the second terminal tab is greater than 100M, you're done! The divisor is three because the output file will contain addresses in three line sets: Pattern, Address, Private Key.

Now, find a way to automate that and you'll be golden. You can also just shuffle bits around with another program that just gets the first 100M addresses from the file you generated.

> **Comments:**
> **username_3**: Mine ran for ~15 minutes and generated 770k addresses. This is on a Macbook Air with an i7, using vanitygen.  
> **username_0**: That is perfect, thank you both for the suggestion and testing.  

---

### Answer by username_4 on 2013-05-08. Score: 3

If you just need the keys, but not imported into bitciond:

1. Generate 100M random numbers, each 256-bits long - these are your private keys.\*
2. For each of the numbers execute the curve's ScalarBaseMult - to get X and Y.
3. The X (and Y) is your public key - you just need to hash and b58 encode it, to turn it into a bitcoin address.

\*) You might want to check if the numbers are in a range, but it's extremely unlikely that they would not.

If you need 100M keys imported into bitcoind - well, that could be a challenge...


---

### Answer by username_5 on 2013-05-08. Score: 1

The `keypool` flag can accomplish that, but it would certainly take a long time. At this scale you might want to look into modifying vanitygen to create such a big number of addresses using GPU. However, there are no off-the-shelf solutions for what you are aiming to do, asides using `keypool` flag.

> **Comments:**
> **username_0**: It's humbling to know that bitcoind is so robust.  

---

