Repository navigation
Conversation
This was referenced Oct 25, 2026
Sjors
force-pushed
the
2026/10/taproot-anti-exfil
branch
from
October 25, 2026 09:50
409ac5d to
ff8b53f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jade's native PSBT signer currently chooses the entire BIP340 nonce. A
compromised signer can use that freedom to encode information in otherwise valid
signatures. This implements the draft single-signer BIP-EXFIL protocol: the host
commits to its entropy, Jade returns a public nonce without signing, and a second
PSBT invocation opens the commitment. Jade recomputes and checks the original
nonce, incorporates the host scalar, and verifies the final BIP340 signature
before returning it. HWI independently verifies both the signature and the nonce
relation before accepting the result.
This is an experimental fork PR. The provisional PSBT namespace and
BIP-EXFIL/host/BIP-EXFIL/noncetags must be regenerated together with theshared vectors when a BIP number is assigned.
Related PRs and build dependencies
The two anti-exfil increments build on upstream Jade master and use its bundled
ESP-IDF, libwally and secp256k1-zkp dependencies.
checks, failure/retry behavior, provisional PSBT fields and eight shared vectors.
host verification. Its Jade increments are Enable Jade Taproot key-path
signing for current firmware, Support draft Taproot anti-exfil in Jade
native PSBT signing, and Test refusal of anti-exfil on released Jade
firmware.
the same protocol and vectors. It is a companion API, not a compile dependency
of this PR. Jade uses the existing public custom-nonce API of its bundled
secp256k1-zkp through libwally. The dedicated API could replace the small adapter
in a later library update.
at application level. It is not a Jade build dependency; these device tests
use released Core for funding, finalization and broadcast.
Increments
derivation and commit/sign helpers, shared vectors, transcript rejection and
scalar-boundary tests, and wires the helper into both firmware build modes.
both rounds, advertises the capability, rejects unsupported transcript forms
and documents the API. It uses upstream's shared PSBT/PSET pipeline, preserves
ordinary Liquid signing, and rejects anti-exfil requests for Liquid.
Scope and failure behavior
get_version_infoaddsJADE_TAPROOT_ANTI_EXFIL: true. HWI requires this beforesending a protected signing request, so released firmware cannot ignore unknown
fields and sign normally. The commitment round returns only the full compressed
public nonce. The reveal round requires the exact commitment and nonce from the
first round.
The implementation supports Bitcoin PSBTv0/v2, SIGHASH_DEFAULT/ALL and BIP86
key-path inputs. Every input must belong to this Jade and carry a request for
the same round. It rejects Liquid/PSET anti-exfil requests, script paths, merkle
roots, pre-existing signatures, mixed rounds, fields outside input maps and an
output key that differs from the actual tweaked signing key. Ordinary transaction
and fee review runs in both invocations.
No secret nonce state persists between calls. Hosts must retain the original
transcript, verify the ordinary signature and
sig.r == x(R0 + rho*G), and mustnot automatically restart a failed session with fresh entropy.
Local validation
python3 test_anti_exfil.pypasses against the actual bundled secp dependency:all eight shared vectors, changed key/message/commitment/nonce/entropy rejection,
invalid entropy and scalar-order boundaries.
CONFIG_AMALGAMATED_BUILDusingthe upstream-pinned ESP-IDF toolchain and matching QEMU.
reconnect/repeat commitment stability, five direct firmware transcript faults,
independent host proofs, mempool acceptance, broadcast and confirmation. Core
receives v0 only after v2 preservation and proofs have been checked.
device runs use the shared device-suite lock to prevent enumeration collisions.
mixed/external-input signing. An actual-QEMU test verifies both HWI entry points
refuse AE and guards that no signing RPC is called on released firmware.
The HWI PR contains the common host,
application obligations, reproduction commands and temporary fork CI wiring.
GitHub CI results are recorded by the PR checks.