Skip to content

Add Taproot BIP-322 message signing - #652

Open
Jacksper13 wants to merge 1 commit into
dev-v2.4.0from
taproot-bip322-message-signing
Open

Add Taproot BIP-322 message signing#652
Jacksper13 wants to merge 1 commit into
dev-v2.4.0from
taproot-bip322-message-signing

Conversation

@Jacksper13

Copy link
Copy Markdown
Collaborator

Summary

  • add BIP-322 simple message signatures for single-key Taproot addresses
  • keep the existing BIP-137 path and output unchanged for other address formats
  • return the finalized textual signature consistently to both signed-message file and QR flows
  • add simulator coverage using the official BIP-322 transaction vectors and a generated P2TR vector

Why

BIP-137 recoverable ECDSA signatures cannot identify or prove control of a P2TR address. Taproot message signatures therefore failed verification in strict wallets such as Sparrow.

The new path constructs the BIP-322 to_spend and to_sign virtual transactions, computes the BIP-341 key-path sighash, signs it with the existing tweaked Schnorr key helper, and serializes the result as the completed-spec smp simple signature.

Validation

  • Python syntax compilation for all changed modules
  • full Passport pycodestyle check
  • official BIP-322 to_spend and to_sign transaction hash vectors
  • P2TR sighash checked against the published generated vector and its valid Schnorr signature
  • output encoding checked against Sparrow's current BIP-322 verifier format

The full firmware/simulator build is left to CI because Docker is not available in the local Windows environment.

@Jacksper13
Jacksper13 marked this pull request as ready for review July 23, 2026 14:24
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