Concepts · Long keys
xprv, ypub, zpub: what those long keys are, in plain English
These keys are intimidating because they are very long, but you only need to read the first few letters. The third letter tells you whether the key can spend or only look, and the first tells you which address type it generates. With that you know everything that matters.
prv versus pub: spending or looking
If the header contains prv, that key is private: it controls the money. If it contains pub, it is public: it lets you see the whole wallet, its addresses and its history, but it cannot move a cent.
That distinction settles a lot of scares. If someone asks for a key to «check your wallet» and it starts with xpub, there is no theft risk, though there is a privacy cost. If it starts with xprv, it is your entire wallet and it is never shared.
The first letter: which addresses it generates
| Starts with | Generates addresses starting with |
|---|---|
| xpub / xprv | 1 (the classic format) |
| ypub / yprv | 3 (intermediate format) |
| zpub / zprv | bc1 (modern format) |
And here is the practical detail that solves a lot of «I restored and can’t see my money» cases: if your wallet used addresses starting with 1 and the new app shows you bc1 addresses, you are looking at the wrong part of the same wallet. It is the problem I explain in the phrase works but I can’t see my funds.
The analogy that clears it up
Think of an apartment building. The master private key is the caretaker’s master key: it opens every flat. The master public key is a list of all the flats with the windows open: you can see what’s inside each one, but not go in. And the three variants — x, y, z — are three different ways of numbering the flats in the same building.