<p>What Electrum describes as 'Master Public Keys' are more commonly know as 'extended public keys' and are an excellent way for a Point of Sale terminal to accept payment without being able to spend that payment.</p>

<blockquote>
  <p>Is there any other approach one could generate addresses without a private key available?</p>
</blockquote>

<p>Well, there's always the approach of generating all of your addresses in advance. That has the advantage of simplicity. Other than that, I don't think there are any other approaches which work as well as BIP32.</p>

<blockquote>
  <p>Are there any problems one could face with the MPK derivation approach?</p>
</blockquote>

<p>You mentioned that you have <em>multiple</em> terminals, which means that you need to avoid using the same index with the same MPK , or you'll generate the same address. You can avoid this by either using different indexes, or different MPK's.</p>

<blockquote>
  <p>Which wallets expose the MPK and furthermore which wallets get a notice of transactions done to addresses derived outside of their knowledge (however from the seed they know)?</p>
</blockquote>

<p>Electrum does this. It's called a 'gap limit.' It will check for transactions beyond the last address with a balance that it knows about. By default it only checks 5 extra addresses, but you can increase that. Having an adjustable gap limit is pretty common.</p>

CC BY-SA 3.0
2015-08-02T01:21:29.887Z
2015-08-02T01:21:29.887Z
Nick ODell
<p>In my case a store owner has different POS terminals. On none of the terminals should be a private key stored! The owner has one wallet, where he wants to get all transactions aggregated, done on the POS terminals.</p>

<p>According to my reasearch I came up with 2 possibilities:</p>

<ul>
<li>Stealth addresses (BIP 63), which to my knowledge is not implemented anywhere in a library, so that I could use it easily.</li>
<li>Master Public Key: E.g. the electrum wallet gives you an MPK by which one could derive addresses (through HD Derivation).</li>
</ul>

<p>Now to my questions:</p>

<ul>
<li>Is there any other approach one could generate addresses without a private key available?</li>
<li>Are there any problems one could face with the MPK derivation approach?</li>
<li>Which wallets expose the MPK and furthermore which wallets get a notice of transactions done to addresses derived outside of their knowledge (however from the seed they know)? </li>
</ul>

CC BY-SA 3.0
2015-08-01T18:14:30.707Z
Of course, there is always the naive approach where you generate one single address (or one per terminal) and use that address for all incoming transactions.  I assume that for improved anonymity (both for your store owner and the customers), you wish to avoid this?
Nate Eldredge
CC BY-SA 3.0
2015-08-01T18:17:14.587Z
@NateEldredge Or improved auditability.
Nick ODell
CC BY-SA 3.0
2015-08-01T18:21:43.997Z
@NateEldredge absolutely, reusing the same address should be avoided!
Stefan
CC BY-SA 3.0
2015-08-01T18:23:38.267Z
@NickODell Auditing is not an issue in my case, as the orders are stored in a POS system, only the payments should go via bitcoin.
Stefan
CC BY-SA 3.0
2016-07-29T04:27:51.563Z
Just checking, if you are still looking you can try https://medium.com/@blockonomics_co/payment-companion-for-your-wallet-dc3766b14e7a#.sh1h017gy. Can generate address/invoice using ur MPK
dark knight
<electrum><public-key><address-generation><bip32-hd-wallets><stealth-address>
Generate addresses without private key: Stealth addresses vs Master Public Key
Stefan
# Generate addresses without private key: Stealth addresses vs Master Public Key

(Asked by: username_0 on 2015-08-01)

In my case a store owner has different POS terminals. On none of the terminals should be a private key stored! The owner has one wallet, where he wants to get all transactions aggregated, done on the POS terminals.

According to my reasearch I came up with 2 possibilities:

* Stealth addresses (BIP 63), which to my knowledge is not implemented anywhere in a library, so that I could use it easily.
* Master Public Key: E.g. the electrum wallet gives you an MPK by which one could derive addresses (through HD Derivation).

Now to my questions:

* Is there any other approach one could generate addresses without a private key available?
* Are there any problems one could face with the MPK derivation approach?
* Which wallets expose the MPK and furthermore which wallets get a notice of transactions done to addresses derived outside of their knowledge (however from the seed they know)?

**Tags:** electrum, public-key, address-generation, bip32-hd-wallets, stealth-address

> **Comments:**
> **username_1**: Of course, there is always the naive approach where you generate one single address (or one per terminal) and use that address for all incoming transactions.  I assume that for improved anonymity (both for your store owner and the customers), you wish to avoid this?  
> **username_2**: @NateEldredge Or improved auditability.  
> **username_0**: @NateEldredge absolutely, reusing the same address should be avoided!  
> **username_0**: @NickODell Auditing is not an issue in my case, as the orders are stored in a POS system, only the payments should go via bitcoin.  
> **username_3**: Just checking, if you are still looking you can try https://medium.com/@blockonomics_co/payment-companion-for-your-wallet-dc3766b14e7a#.sh1h017gy. Can generate address/invoice using ur MPK  

---

## 1 answers

### Answer by username_2 on 2015-08-02. Score: 3 | Accepted answer

What Electrum describes as 'Master Public Keys' are more commonly know as 'extended public keys' and are an excellent way for a Point of Sale terminal to accept payment without being able to spend that payment.

> Is there any other approach one could generate addresses without a private key available?

Well, there's always the approach of generating all of your addresses in advance. That has the advantage of simplicity. Other than that, I don't think there are any other approaches which work as well as BIP32.

> Are there any problems one could face with the MPK derivation approach?

You mentioned that you have *multiple* terminals, which means that you need to avoid using the same index with the same MPK , or you'll generate the same address. You can avoid this by either using different indexes, or different MPK's.

> Which wallets expose the MPK and furthermore which wallets get a notice of transactions done to addresses derived outside of their knowledge (however from the seed they know)?

Electrum does this. It's called a 'gap limit.' It will check for transactions beyond the last address with a balance that it knows about. By default it only checks 5 extra addresses, but you can increase that. Having an adjustable gap limit is pretty common.


---

