Shamir secret sharing for PSBT distribution. GF(256) field arithmetic, AES-GCM encryption, manifest validation, reveal challenges, and race condition protection.
Partially Signed Bitcoin Transactions (PSBTs) are the atomic unit of Bitcoin ordinal trades. Because a PSBT contains enough information to complete a transaction, it must be protected during distribution to quorum nodes. The protocol uses Shamir's Secret Sharing to ensure no single node (or insufficient subset) can reconstruct the PSBT independently.
The sharing scheme operates over the Galois Field GF(256) using the irreducible polynomial 0x1b. All arithmetic (addition, multiplication, inversion) happens in this finite field, which provides the information-theoretic security guarantee.
Information-theoretic security: given T-1 shares (where T is the threshold), an attacker learns absolutely nothing about the secret. This is not computational security -- it holds even against an adversary with unbounded computing power.
The default configuration is 3-of-4 threshold: 4 shares are created, and any 3 can reconstruct the AES key to decrypt the PSBT. This tolerates 1 node failure while preventing any pair of colluding nodes from accessing the PSBT.
Every PSBT distribution includes a manifest that is validated before shares are accepted:
2 <= T <= N.When a quorum needs to reconstruct the PSBT (at transaction finalization), nodes must respond to reveal challenges:
A node only reveals its share in response to a valid, non-expired, non-duplicate challenge from an authorized quorum participant.
For ordinal trades, the PSBT structure is validated against specific sighash requirements:
ANYONECANPAY | SIGHASH_SINGLE to allow buyer inputs to be added without invalidating the seller signature.A critical failure mode in PSBT distribution is partial delivery: some nodes receive their shares while others do not, leaving the transaction in an unrecoverable state. The protocol addresses this with:
Nodes running in full-node mode (storing all chat threads and media cache) do not gain access to PSBT shards outside their assigned quorum. PSBT share distribution is strictly scoped to quorum membership, regardless of the node storage configuration.