bip-0352: fix input encodings in test vectors #2348

pull Yudis-bit wants to merge 1 commits into bitcoin:master from Yudis-bit:fix/bip352-vector-input-encoding changing 1 files +90 −90
  1. Yudis-bit commented at 1:54 PM on November 5, 2026: contributor

    Bitcoin Core's DER check fails on six distinct signature encodings missing a sighash byte. These encodings occur in 20 distinct inputs in the BIP352 fixtures. Vector 19 also has a Taproot control parity mismatch in both sending and receiving copies.

    Append SIGHASH_ALL outside DER and correct the control parity. DER R/S values and all expected derivations remain unchanged.

    The official reference runner passes all 29 vectors before and after. Native DER and Taproot commitment checks accept the corrected encodings. The fixtures omit full transactions, so this does not establish complete transaction consensus validity.

    Follow-up to bitcoin/bips#2339.

  2. bip-0352: fix input encodings in test vectors
    BIP352 scanning assumes consensus-valid transactions. These fixtures
    have a Taproot control parity mismatch and ECDSA encodings without
    a sighash byte.
    
    Correct both sending and receiving copies. The DER lengths and R/S
    stay unchanged. Append SIGHASH_ALL outside DER as an encoding
    correction. Complete transaction signature validity remains outside
    these input-only fixtures.
    
    The 29 vectors pass the official reference runner before and after.
    Expected outputs, addresses and shared secrets are unchanged.
    04393c98c0
  3. jonatack added the label Tests on Nov 5, 2026
  4. jonatack commented at 5:36 PM on November 5, 2026: member

    ACK, this seems to address @fametrano's #2339 (comment).

    These are partial (input-only, not full transactions); they do not constitute complete transaction-level consensus validation.

  5. jonatack commented at 5:41 PM on November 5, 2026: member
  6. Eunovo approved
  7. Eunovo commented at 1:34 PM on November 6, 2026: contributor

    tACK https://github.com/bitcoin/bips/pull/2348/commits/04393c98c0e5268e02f465dbbfc6ea09bb599c99

    Fixed the Taproot control parity mismatch for the NUMS point test vector and the missing sighash byte for legacy scripts. Ran the new test vectors with Bitcoin-core/bip352 module, and all vectors passed.

  8. murchandamus commented at 8:00 PM on November 6, 2026: member

    Thanks, @Eunovo, @Yudis-bit, and @jonatack

  9. murchandamus merged this on Nov 6, 2026
  10. murchandamus closed this on Nov 6, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-23 08:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me