Skip to content

feat(taproot): hold and spend P2TR (BIP-340/341/86) - #355

Closed
BitHighlander wants to merge 1 commit into
feature/715-13-hivefrom
feature/715-14-taproot
Closed

feat(taproot): hold and spend P2TR (BIP-340/341/86)#355
BitHighlander wants to merge 1 commit into
feature/715-13-hivefrom
feature/715-14-taproot

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

7.15 review stack position 14/17.

This PR is intentionally one coherent commit, based on feature/715-13-hive, for individual auditing.
The full stack is linear from the clean fork develop at 1af2ffe.

Review scope: feat(taproot): hold and spend P2TR (BIP-340/341/86).

The preserved pre-restage candidate remains available at preserve/alpha-2026-08-05.

The device could already send to bech32m addresses but could not hold them.
This adds the key-path Taproot support:

- BIP-340 Schnorr signing, wired from the pinned crypto fork, with the official
  test vectors in unittests/crypto/bip340.cpp.
- P2TR addresses via GetAddress and BIP-86 accounts, including xpub export.
- BIP-341 signing: the sighash commits to every input's amount and script, and
  signing fails closed if any input commitment is incomplete rather than
  producing a signature over a partial commitment.
- The serialized witness and transaction footer are returned to the host — a
  Taproot spend was previously handed back missing 70 bytes of witness and
  locktime because the Taproot path bypassed the shared hashing step.
- A change output claiming to be BIP-86 is rejected unless its script type is
  actually Taproot.
- GetFeatures reports supports_taproot, so hosts stop inferring capability from
  a version number.
- coins.def marks Taproot support; signing uses a zero aux_rand, documented at
  the call site.
- Gate-3 OLED frames under docs/security/evidence/7.15.0-rc26-taproot-witness-and-address
  show full 62-character P2TR addresses on spend, change and mixed-input flows.
@BitHighlander

Copy link
Copy Markdown
Owner Author

Superseded by the smaller audit-ready 7.15 stack: #359 release foundation, #360 authenticated clear-signing, #361 recovery and entropy, #362 Zcash Orchard, #363 chain integrations, and #364 Bitcoin/release security. All release changes remain preserved in the replacement branches and preservation tags. The replacement aggregate was tree-verified against the prior release and passed the local CI-equivalent container suite (405 firmware, 2 board, 18 crypto, and 7 Pallas constant-time tests). GitHub-hosted checks have been explicitly dispatched and are currently queued.

@BitHighlander
BitHighlander deleted the feature/715-14-taproot branch August 9, 2026 04:26
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