Block Matrix
Menu

How BIP-138 would let a cosigner decrypt a Bitcoin wallet metadata backup

BIP-138 proposes a compact, encrypted backup for Bitcoin wallet data other than the seed. A Chinese translation published on November 26, 2026, describes a format that can hold output script descriptors (BIP-380), wallet policies (BIP-388) and other metadata. Any holder of an eligible public key could decrypt the backup without a separate password or another cosigner’s participation.

How recovery works. The proposal sorts all public keys in the descriptor lexicographically and uses a BIP-340 tagged hash to derive a shared secret, s. It also derives an individual secret, s_i, for each eligible key. Rather than store s directly, the backup records s ⊕ s_i for that key. A holder can derive s_i from their own public key and XOR it with the stored entry to recover s. The payload is encrypted with ChaCha20-Poly1305.

Key eligibility matters because recovery uses public-key material. The proposal excludes literal public keys, bare extended public keys (xpubs) and publicly known NUMS points. Its design aims to prevent a third party from reconstructing the secret using information exposed on-chain.

What the backup reveals. The encoded record contains a format marker (MAGIC), a version, derivation-path information, individual-secret entries and ciphertext. Decoy entries obscure how many cosigners are represented, while padding to length buckets conceals the exact payload length. Content types distinguish descriptors, policies and strings, and the proposal defines 0x80 as a type boundary. The specification also covers decryption, test vectors and backward compatibility.