Skip to content

Draft BIPXXX: interactive anti-exfiltration for single-signer Taproot - #2

Open
Sjors wants to merge 1 commit into
masterfrom
2026/10/taproot-anti-exfil
Open

Sjors wants to merge 1 commit into
masterfrom
2026/10/taproot-anti-exfil

Conversation

@Sjors

@Sjors Sjors commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

This draft specifies an interactive anti-exfiltration protocol for single-signer BIP340 signatures and provisional PSBT input fields. A malicious device can return a valid transaction signature while encoding secrets in its nonce. The honest host commits to a random scalar, records the device's original nonce point, reveals its scalar, and verifies both ordinary signature validity and the prescribed additive nonce relation.

The construction follows Scheme 6 in Pieter Wuille's overview and Stepan Snigirev's nonce-blinding/PSBT proposal. The contribution is a precise Taproot profile, interoperable fields, independent vectors, and experimental implementations across the host, bridge, and devices. It does not claim a new formal security proof.

Scope and trust model

  • Single signer, Taproot key path, no annex, DEFAULT or explicit ALL.
  • Domain-separated deterministic nonce derivation, full compressed nonce points including parity, and an additive host contribution.
  • Exceptional cases, signer self-verification, independently retained transcripts, and exact-transcript automatic retries after a commitment.
  • Experimental proprietary PSBT input fields under ae, for PSBTv0 and PSBTv2. Canonical encodings, input-only placement, consistent rounds, and no new untargeted signatures are required. Field allocation could move to a separate BIP.
  • All requested proofs pass before signatures leave the private signing exchange. Verified PSBT responses preserve the original host data and copy only checked nonce receipts or signatures; arbitrary device metadata must not be exported as part of a protected result.

The two asymmetric models are an honest host with a malicious device, and an honest device with a malicious host. The host includes wallet software, coordinators, bridges, drivers and their dependencies. It may delegate proof checking and retained session state to a checked trusted component; duplicate verification by every component is not required. Independent checks within the host provide defense in depth, without isolating a compromised host process. An honest device must still protect its signing key and authorize the transaction on its display. A malicious device cannot be trusted to enforce its own preflight checks.

The nonce property concerns verified on-chain signatures for a fixed request. Exposing the private transcript or unrelated device output creates additional channels; timing, selective failures, malicious seed generation and physical leakage remain separate limitations. Deterministic stateless recovery does not itself provide fresh signer-side synthetic nonce randomness.

ECDSA, general sign-to-contract, script-path signing, MuSig2 and FROST are outside this draft. Existing BitBox02/Jade ECDSA anti-klepto deployments and earlier libsecp proposals are acknowledged in Markdown footnotes.

The informative MuSig2 section explains a conditional argument for blocking adaptive nonce grinding by privately collecting and freezing contributions. It requires fresh independent honest entropy hidden from the colluding malicious subset, fixed session parameters, retained original full nonce pairs and partial-signature checks. Selective aborts and public transcripts remain separate channels. BIP327's unforgeability proof does not establish this anti-exfil property; MuSig2 extensions remain outside the specification.

BIP-EXFIL/host and BIP-EXFIL/nonce are placeholders. Number assignment requires a coordinated domain update and regenerated vectors across every implementation.

Companion implementations

The draft remains one commit, Draft interactive anti-exfiltration for BIP340 signatures, with no implementation build dependencies.

Pull request Role
libsecp256k1 Dedicated signing and host-verification API.
Bitcoin Core Two-round external-signer coordinator and independent proof verification.
HWI Verified PSBT bridge and device/emulator integration tests.
Ledger Bitcoin app Ledger firmware implementation.
Trezor firmware Trezor One and T firmware implementations.
Jade Jade firmware implementation.
BitBox02 firmware BitBox02 firmware implementation.
libngu Cryptographic helpers used by Coldcard.
Coldcard firmware Coldcard Edge firmware integration.

Companion descriptions identify dependencies by PR and commit subject. Firmware implementations need not consume the standalone libsecp PR: existing custom-nonce APIs can implement the same protocol. These proposals do not claim released-device support.

HWI's verified-response sanitization is implemented and locally validated, including actual Jade/Coldcard driver decoding of device-controlled PSBT bytes. This addresses additional PSBT export exposure; Core already copies only verified signatures. Ledger's invocation-wide native PSBT preflight alignment is being validated as conformance and robustness work. It is not a change to the nonce construction or a claim that malicious firmware can be constrained by its own preflight.

Validation

The eight reference vectors regenerate byte for byte, with no nonce, wire-format, reference-code or vector changes from these clarifications. Independent checks cover all 15 applicable 32-byte official BIP340 cases, the eight vectors through compiled native libsecp commit/sign/verify APIs, scalar/point boundaries, changed transcripts and invalid signatures, infinity, and injected exceptional nonce failures.

Markdown footnotes/local references, repository link-format and table checks, and whitespace checks pass. Specialist cryptographic review remains necessary, including malicious-host concurrency and cross-protocol interactions. Transport acceptance and completed-PSBT export rules are tightened without claiming a new cryptographic result.

Specify the additive two-round single-signer protocol, provisional proprietary PSBT input fields, transcript validation and interruption handling. Include independent Python reference arithmetic and reproducible vectors.
@Sjors
Sjors force-pushed the 2026/10/taproot-anti-exfil branch from 68ec8de to 75e3f23 Compare October 25, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant