BIP375: validate scan-key keydata lengths #2318

pull myetcd wants to merge 1 commits into bitcoin:master from myetcd:master changing 3 files +107 −6
  1. myetcd commented at 3:37 AM on September 30, 2026: none

    BIP375 requires 33-byte scan-key keydata for PSBT_GLOBAL_SP_ECDH_SHARE, PSBT_GLOBAL_SP_DLEQ, PSBT_IN_SP_ECDH_SHARE, and PSBT_IN_SP_DLEQ.

    The reference structure validator currently checks the value lengths of these fields but ignores their keydata lengths. This change enforces the 33-byte keydata requirement for all four fields, with errors identifying the field and, for per-input fields, the input index.

    Add unit tests covering missing, short, and oversized keydata, accepted 33-byte keydata, and the existing value-length checks. Document the unit test command in the validation reference README.

  2. BIP375: validate scan-key keydata lengths
    Signed-off-by: myetcd <mytech@139.com>
    4ab0b00599
Contributors

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-10-14 03:10 UTC

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