Descriptor registration
A signing device can check your addresses and change only once it knows the descriptor, and each device keeps that registration its own way.
Your signing device holds one key and knows nothing about the wallet around it. You approve the registration of the descriptor on the device's own screen.
A device that knows only its key cannot check what it signs
Liana hands a signing device each transaction as a PSBT. Say you pay 0.1 BTC from a coin of 0.5 BTC. One output sends 0.1 BTC to the recipient. The other returns the rest, minus the fee, to your wallet as change.
Every Liana address depends on the whole policy, every key and every timelock. A device that holds one key cannot rebuild an address, so it cannot check three things:
- Which output is change: The PSBT can say the second output is yours, but the computer wrote the PSBT. Malware could put its own address there.
- Whether an address is yours: The device cannot derive your receive addresses, so it cannot confirm the one Liana shows you.
- Whether the policy is yours: The computer could swap your recovery key for its own, or shorten the timelock.
Registration closes these gaps. You approve the policy once, on the device's screen. From then on, the device derives your addresses itself, shows them, and recognizes your change. That screen is your check when the computer running Liana is compromised.
A wallet policy cuts the descriptor to fit a screen
A Ledger, a BitBox02 and a Blockstream Jade receive the descriptor as a BIP 388 wallet policy. The policy splits the descriptor into a template and a list of keys. Registration adds a name. Here is the Simple inheritance descriptor from Descriptors as Liana sends it:
Descriptor template:
wsh(or_d(pk(@0/<0;1>/*),and_v(v:pkh(@1/<0;1>/*),older(52596))))
Keys:
@0 [73c5da0a/48'/0'/0'/2']xpub6DkFAXWQ2dHx...
@1 [b8688df1/48'/0'/0'/2']xpub6FQya7zGhR92...
Name: Liana-v86zu0e3- Descriptor template: The policy, with each key replaced by
@0,@1, and so on. It is short enough for a small screen./<0;1>/*is the pair of receive and change branches, which BIP 388 also writes/**. The shorthand stands for/<0;1>/*only. Another pair, such as/<2;3>/*, stays written out. - Keys: The fingerprint, derivation path and xpub behind each placeholder.
Liana's Register descriptor step shows the same split. On the device, check the keys and the timelock against your descriptor backup, not against Liana's screen, which the computer controls.
Liana names the wallet after its checksum
Liana registers a wallet as Liana- followed by the descriptor's checksum,
the eight characters after the #: Liana-v86zu0e3 above. The checksum
covers the whole descriptor, so a new descriptor gets a new name. A Coldcard
and a Specter DIY receive this name with the full descriptor.
Liana registers the descriptor over USB. It offers the Register descriptor step when a key of a new wallet comes from a connected device, and whenever you import a descriptor. Later, go to Settings > Wallet and select Register on device.
A device you use with an SD card loads the descriptor from a file, as Sign air-gapped shows. A hot signer has nothing to register, since it lives inside Liana.
Where each device keeps the registration
BIP 388 allows two designs. A stateful device stores the policy. A stateless device stores nothing and returns a proof of registration instead.
| Device | What it keeps | Without the registration |
|---|---|---|
| Ledger | Nothing. Liana stores the proof it returns. | Refuses to sign or show an address. |
| BitBox02 | A hash of the policy, and the name. | Refuses to sign or show an address. |
| Blockstream Jade | The policy, under its name. | Signs without checking change. Refuses to show an address. |
| Coldcard | The policy, under its name. | Signs none of the wallet's inputs. Refuses to show an address. |
| Specter DIY | The descriptor and the name. | Warns that it cannot check change, and asks whether to go on. Refuses to show an address. |
| Krux | The descriptor you load, until it restarts. | Warns, and asks whether to go on. Cannot check an address. |
Liana checks the registration of a Ledger, a BitBox02 and a Blockstream Jade.
When you sign, Liana marks one that lacks it with
The wallet descriptor is not registered on the device. and does not let you
select it. Liana does not check a Coldcard or a Specter DIY.
The Ledger returns a proof that Liana keeps
When you approve, the Ledger's Bitcoin app returns a 32-byte proof: an HMAC of the policy and its name, computed with a key derived from the Ledger's seed. Nobody can forge it without that seed.
With Bitcoin Core or an Electrum server, Liana stores the proof in
settings.json on this computer. With Liana Connect, it stores the proof on
Liana Connect. To sign or show an address, Liana sends the Ledger the policy
with its proof. The Ledger recomputes the proof and refuses a mismatch.
Registration is not a backup
Any device can be lost or reset. A Ledger keeps nothing. Without the descriptor, your seed phrases alone cannot restore the wallet. Keep a descriptor backup.
Register again for a new descriptor, copy or device
A registration covers one descriptor on one device. Register again in three cases:
- A new descriptor: Liana cannot edit a policy. A new policy means a new wallet and a new descriptor, as Change a policy shows. Register it on every device, recovery keys included.
- A copy without the Ledger's proof: On another computer, for an heir, or after you move the wallet to another backend, register the Ledger again. With Liana Connect, a computer that opens the same wallet gets the proof. Devices that store the registration keep it.
- A replacement device: A seed phrase restores the key, not what the old device stored. Register the descriptor on the new one. A Ledger restored from the same seed phrase accepts the proof Liana already keeps.
Your device's page under Signing devices gives the steps.