<p>This is not complete answer, but hope this will help you to understand some concepts.</p>

<ol>
<li><strong>xpriv</strong> and <strong>xpub</strong> are key pairs, which are possessed by every (online) wallet when it is created. xpriv is actually the private key of the wallet (which you must not share with anyone). while xpub is the public key of the wallet (which is used to derive the receiving addresses of wallet, where it can receive funds or coins).</li>
</ol>

<p>This is brief explanation. you can read more to understand its working and purpose from given link.
<a href="https://bitcoin.stackexchange.com/questions/19950/how-are-public-and-private-keys-related-to-the-wallet">How are public and private keys related to the wallet?</a> </p>

<ol start="2">
<li>In order to create wallet we use Network Parameters. So, in bitcoinj, we use MainNet (ProdNet) and TestNet. So, <strong>xpub</strong> is the public key which is used to create the public addresses of Online wallet using MainNet. while <strong>tpub</strong> is the public key, which is used to create the Receiving addresses of Testing wallet (which doesn't contain real coins).</li>
</ol>

<p>You can check more difference between mainNet and testNet in following questions.</p>

<p><a href="https://bitcoin.stackexchange.com/questions/66827/practical-difference-between-mainnet-and-testnet?rq=1">Practical difference between mainnet and testnet</a>
<a href="https://ethereum.stackexchange.com/questions/6278/whats-the-difference-between-the-testnet-and-the-production-network-technical">https://ethereum.stackexchange.com/questions/6278/whats-the-difference-between-the-testnet-and-the-production-network-technical</a></p>

<p>Good Day!</p>

CC BY-SA 4.0
2018-05-09T13:32:02.373Z
2018-05-09T13:32:02.373Z
FairyRosie
<p>Can anyone please tell me the difference in the following Bitcoin terms?</p>

<ol>
<li>Difference between xpriv and xpub</li>
<li>Difference between xpub and tpub.</li>
<li>Difference between ypub and upub.</li>
<li>Difference between public key and standard public key.</li>
<li>Is xpub and ypub are same? also tpub and upub?</li>
</ol>

<bitcoin-core><wallet><private-key><public-key><testnet>
Basic Concept of Bitcoin (public and private) Keys
Cleo Indigo
# Basic Concept of Bitcoin (public and private) Keys

(Asked by: username_0 on 2018-04-17)

Can anyone please tell me the difference in the following Bitcoin terms?

1. Difference between xpriv and xpub
2. Difference between xpub and tpub.
3. Difference between ypub and upub.
4. Difference between public key and standard public key.
5. Is xpub and ypub are same? also tpub and upub?

**Tags:** bitcoin-core, wallet, private-key, public-key, testnet


---

## 1 answers

### Answer by username_1 on 2018-05-09. Score: 0 | Accepted answer

This is not complete answer, but hope this will help you to understand some concepts.

1. **xpriv** and **xpub** are key pairs, which are possessed by every (online) wallet when it is created. xpriv is actually the private key of the wallet (which you must not share with anyone). while xpub is the public key of the wallet (which is used to derive the receiving addresses of wallet, where it can receive funds or coins).

This is brief explanation. you can read more to understand its working and purpose from given link.
[How are public and private keys related to the wallet?](https://bitcoin.stackexchange.com/questions/19950/how-are-public-and-private-keys-related-to-the-wallet)

2. In order to create wallet we use Network Parameters. So, in bitcoinj, we use MainNet (ProdNet) and TestNet. So, **xpub** is the public key which is used to create the public addresses of Online wallet using MainNet. while **tpub** is the public key, which is used to create the Receiving addresses of Testing wallet (which doesn't contain real coins).

You can check more difference between mainNet and testNet in following questions.

[Practical difference between mainnet and testnet](https://bitcoin.stackexchange.com/questions/66827/practical-difference-between-mainnet-and-testnet?rq=1)
<https://ethereum.stackexchange.com/questions/6278/whats-the-difference-between-the-testnet-and-the-production-network-technical>

Good Day!


---

