<p>Check out <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" rel="nofollow">Hierarchical Deterministic Wallets (BIP32)</a> and eventually this <a href="http://blog.richardkiss.com/?p=313" rel="nofollow">blog-post to get a better understanding of the implications it brings</a>.</p>

<p>There are many wallets today that have <code>BIP32</code> implemented. <code>Bitcoin Core</code> is NOT one of them and should probably not be used for the wallet feature.</p>

<p>In the scenario you described, your webserver will provide new public addresses, but will also know the private keys to them. Therefore, if your webserver were hacked, the bitcoins could be spend from those addresses.</p>

<p>With <code>BIP32</code> you can separate the information to create public keys from the information needed to create the corresponding private keys. 
The information to generate the corresponding private keys can be kept in Cold Storage.</p>

CC BY-SA 3.0
2015-10-02T17:13:16.670Z
2015-10-09T12:14:43.790Z
2015-10-09T12:14:43.790Z
Bjarne Magnussen
<p>Yes.</p>

<p>This works. Wallet can stay locked and 5000 addresses will be generated. It is completely safe, even server is hacked.</p>

<p>After that you need to unlock the wallet so another 5000 addresses to be pre-generated. However, this step is not completely safe. Suppose server is hacked and someone got the password via key logger.</p>

<p>Another possibility is... when 5000 addresses are generated, you stop bitcoind and upload new wallet with new 5000 addresses.</p>

CC BY-SA 4.0
2019-07-26T16:50:26.020Z
2019-07-26T16:50:26.020Z
Nick
<p>Say for example an encrypted wallet has 5000 addresses already pre-generated in the keypool.</p>

<p>Can <code>getnewaddress</code> be called via RPC command without knowing the actual wallet password?</p>

<p>I envisage a shopping cart script which calls <code>getnewaddress</code> to provide a customer with an address to spend to. The shopping cart would know the RPC password, but not the wallet password. The shopping cart never needs to <em>spend</em> funds.</p>

<p>If the shopping cart was hacked, can bitcoin be stolen?</p>

CC BY-SA 3.0
2015-10-03T01:57:13.067Z
You could just try it (on testnet to be safe) and see what happens...
Nate Eldredge
<security><json-rpc><bip32-hd-wallets><website-integration>
getnewaddress (RPC) on encrypted bitcoin wallet without wallet password?
Harol32
# getnewaddress (RPC) on encrypted bitcoin wallet without wallet password?

(Asked by: username_0 on 2015-10-02)

Say for example an encrypted wallet has 5000 addresses already pre-generated in the keypool.

Can `getnewaddress` be called via RPC command without knowing the actual wallet password?

I envisage a shopping cart script which calls `getnewaddress` to provide a customer with an address to spend to. The shopping cart would know the RPC password, but not the wallet password. The shopping cart never needs to *spend* funds.

If the shopping cart was hacked, can bitcoin be stolen?

**Tags:** security, json-rpc, bip32-hd-wallets, website-integration

> **Comments:**
> **username_1**: You could just try it (on testnet to be safe) and see what happens...  

---

## 2 answers

### Answer by username_2 on 2015-10-02. Score: 1

Check out [Hierarchical Deterministic Wallets (BIP32)](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) and eventually this [blog-post to get a better understanding of the implications it brings](http://blog.richardkiss.com/?p=313).

There are many wallets today that have `BIP32` implemented. `Bitcoin Core` is NOT one of them and should probably not be used for the wallet feature.

In the scenario you described, your webserver will provide new public addresses, but will also know the private keys to them. Therefore, if your webserver were hacked, the bitcoins could be spend from those addresses.

With `BIP32` you can separate the information to create public keys from the information needed to create the corresponding private keys.
The information to generate the corresponding private keys can be kept in Cold Storage.


---

### Answer by username_3 on 2019-07-26. Score: 0

Yes.

This works. Wallet can stay locked and 5000 addresses will be generated. It is completely safe, even server is hacked.

After that you need to unlock the wallet so another 5000 addresses to be pre-generated. However, this step is not completely safe. Suppose server is hacked and someone got the password via key logger.

Another possibility is... when 5000 addresses are generated, you stop bitcoind and upload new wallet with new 5000 addresses.


---

