LearnSecurity and privacy

Privacy

What the blockchain, your backend and the price service learn about your wallet, and how to give them less.

Your keys protect your bitcoin, not your privacy. Anyone can read the blockchain, while your backend has to know your addresses to find your coins.

In the Bitcoin white paper, privacy rests on anonymous public keys. Anyone can see that coins moved, but not who owns them. Chain analysis works to name the owners, in two moves:

  1. It links your coins: Heuristics, rules drawn from how wallet software usually behaves, group the coins that likely share an owner into a cluster. Each one gives a likely reading, never a proof. Together, they narrow the doubt.
  2. It ties the cluster to you: One entry point is enough. A withdrawal from an exchange that verified your identity, an address you published, or a payment to someone who knows you each ties every coin of the cluster to you.

Each risk on this page comes from one kind of observer:

ObserverWhat it can learnSection
Anyone who reads the blockchainYour policy, which coins share an owner, which output is your changeEach spend, a recovery, a refresh, your addresses, your change
The peers of Bitcoin Core, or the operator of your backendYour IP address. The operator of an Electrum server also learns your addresses and balance. With Liana Connect, Wizardsardine holds your descriptor and labels, tied to your email address.What each backend learns
Whoever reads your descriptor, labels or backupsYour balance, history and policy, with your notesYour descriptor and labels
The fiat price serviceYour IP address, and when Liana is openThe fiat price

A spend reveals your policy, in whole or in part

An unspent coin shows its address and amount, and nothing of its script. What a spend reveals depends on the script type. Take a Simple inheritance wallet. Its Primary key can always spend. Its Inheritance key can spend a coin once it has waited 52,596 blocks (about 1 year).

Every spend publishes the whole script, every path included. From the first payment, an observer learns:

  • The policy: The wallet has a timelocked recovery path, unlike a single-key wallet or a plain multisig.
  • The timelock: 52,596 blocks, so how long your coins can sit before the Inheritance key can move them.
  • The keys: The Primary key of that address, and a hash of the Inheritance key.

Every coin carries the same script with new keys. If that script is unusual, an observer who meets it twice can guess that both spends share a wallet.

The first payment of a Simple inheritance wallet as an observer sees it on-chain: in SegWit (P2WSH) a signature plus the whole script, with the Primary key, a hash of the Inheritance key and 52,596 blocks, and in Taproot (P2TR) a single signature, identical to a payment from any single-key Taproot wallet.

Under Taproot, a recovery path you never use never reaches the blockchain. The Script types page covers what else Taproot changes.

A recovery spend stands out under both script types

A recovery transaction has to declare its wait, in the nSequence field of each input, as the Timelocks page explains. That field sits outside the script, so Taproot cannot hide it. It tells an observer that each coin had sat unmoved for at least 52,596 blocks.

With several recovery paths, a Taproot (P2TR) spend reveals only the one it uses, as the Script types page explains. The hashes in its control block still show that the wallet has other paths, not what they hold.

In a recovery, lianad also sends every coin you leave ticked to a single address, with no change. That links all of them to one owner, and to the destination.

A recovery transaction whose three inputs each carry nSequence 52596, outside the script and visible under SegWit (P2WSH) and Taproot (P2TR), and whose single output goes to one address with no change, above a primary path payment input whose nSequence is 0xFFFFFFFD.

To link fewer coins, untick some and recover them later to another address, as Use coin control shows.

A refresh sends the coins you tick back to your wallet, in a transaction that lianad builds with one output. A transaction with a single output often reads as a transfer to yourself, so an observer is likely to assume that the new coin keeps the old owner. A refresh of one coin links that coin to its successor and to nothing else. With several, it shows for good that they share an owner.

An observer reads this through the common input ownership heuristic (CIOH): when a transaction spends several coins, one owner most likely holds them all. The observer first rules out the known patterns of a transaction built by several people. A coinjoin, for example, spends the coins of several participants into outputs of equal amounts, so the heuristic does not apply to it. A refresh matches no such pattern. Once an observer ties one of its coins to you, the heuristic ties the others to you too.

Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.

Satoshi Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System, section 10

Three coins received from payers A, B and C show no visible link; refreshed together into one new coin they show for good that they share an owner, while refreshed separately each coin links only to its successor.

In a P2WSH wallet, a refresh also publishes the policy. Liana warns you when a coin has 10% of its timelock left, so refreshing on each warning moves your coins at a pace that hints at the timelock.

Each refresh trades fees against privacy:

  • One coin per refresh: Each coin pays its own fee, so the total is higher. The refresh adds no link through common inputs. The timing, the amounts and the script type can still hint that the coins share a wallet.
  • Several coins in one refresh: One transaction and one fee cover them all. The CIOH links the coins for good.

Wizardsardine does not recommend one over the other. The choice is yours, and you can make it again at each refresh. A consolidation merges small coins into one so that spending them later costs less. It makes the same trade-off. It lowers the fee, and the CIOH links the merged coins. Refresh coins shows how to pick the coins of each refresh.

Liana generates a new address for each payment and each change output

Each time you generate an address in Receive, lianad derives the next one, even if the last one is still unused. It sends each change output to a new address, on a separate change chain. With Liana Connect, Wizardsardine's servers derive the addresses instead.

Three things still link your coins:

Three things still link your coins:

  • A reused address: Liana cannot stop a payer from sending to the same address twice. The coins on one address share an owner with no room for doubt. Whoever knows the address, the payer included, sees every coin it receives. An address you publish, on a website for example, invites reuse and ties every coin it receives to you.
  • A guessed change output: An observer who tells your change from the payment follows your coins into your next transaction.
  • One wallet on two computers: With Bitcoin Core or an Electrum server, each computer counts its own addresses. Each learns of the other's only when a coin arrives, so both can hand out the same unused address.

A new address for each payer keeps their payments apart. Labels record where each coin comes from. With coin control, you decide which coins a payment spends together.

An observer guesses which output is your change

Chain analysis names this guess change detection. In a payment from Liana, three hints point to the change:

  • Position: With Bitcoin Core or an Electrum server, lianad always places the change output after the payments. An observer who recognizes a transaction built by Liana reads the last output as your change.
  • Script type: The change goes to an address of your wallet, so it has the script type of the coins you spend. A payment to an address of another type leaves your change as the only output of your type.
  • Amount: A payment of a round amount, such as 0.1 BTC, leaves your change as the output with the uneven amount.
A payment from a Taproot (P2TR) Liana wallet with one input and two outputs: 0.1 BTC to a SegWit (P2WPKH) address in first position, and 0.3872 BTC to a Taproot (P2TR) address in last position, which the position, the script type and the uneven amount mark as the change.

The change position is part of Liana's wallet fingerprint. Such traits help an observer guess which software built a transaction, and group the transactions of one wallet.

What each backend learns

The backend finds your coins, so it learns your addresses:

BackendWho reads your addressesWhat else it sees
Bitcoin CoreOnly you. Bitcoin Core checks each block on your computer.Its peers receive the transactions you broadcast, from your IP address. About once a day, Bitcoin Core announces again each unconfirmed transaction of the wallet, payments to you included.
An Electrum serverIts operator, once each address appears on-chain. The Backends page lists the addresses Liana asks about.Your balance, history, broadcast transactions and IP address.
Liana ConnectWizardsardine, which stores your descriptor and so knows every address, past and future.Your coins, labels, saved PSBTs and key names, tied to your email address.
The same row of your addresses under three backends: with Bitcoin Core only you read them, with an Electrum server its operator reads each address once it appears on-chain, and with Liana Connect Wizardsardine reads every address, past and future, through the descriptor it stores.

With Bitcoin Core, or an Electrum server you run yourself, no third party reads your addresses. A Bitcoin Core you run yourself can also reach its peers through Tor, so that they do not see your IP address, as Bitcoin Core's Tor guide explains. Change your backend moves a wallet without changing a key.

Whoever reads your descriptor or labels reads your history

Whoever reads your descriptor sees your balance, history and policy, as the Descriptors page explains. Your labels add what you wrote about each payment. Copies in clear text sit in these places:

  • Liana's data directory: With Bitcoin Core or an Electrum server, lianad keeps both in an unencrypted database.
  • The wallet backup file: Export wallet saves both, with your key names.
  • The BIP 329 export: It lists each address, coin and transaction that carries a label, with that label.

Requires Liana 13.0+ Liana can also save the descriptor encrypted. Keep the label backups under your own control. Wizardsardine does not recommend keeping a plain-text descriptor as a backup, for privacy, as Keep only the encrypted backup explains.

The fiat price comes from a third party

Requires Liana 13.0+ Liana can show amounts in a fiat currency once you turn on Fiat price: in Settings > General. Under Exchange rate source:, select mempool.space, the default, or coingecko.

The request carries no address, no amount, and not even your currency. Liana downloads every rate and keeps yours. The service still sees your IP address each time Liana asks, about every five minutes while the wallet is open. CoinGecko also receives your Liana version. With Liana Connect, Liana gets the rate from Liana Connect instead.

If no price service should know when you open Liana, leave Fiat price: off.

Next steps