Skip to content

Reject unrepresentable Binohash sighash high bytes - #342

Open
adrienlacombe wants to merge 1 commit into
solving-bitcoin:mainfrom
adrienlacombe:codex/binohash-sighash-byte-bound
Open

adrienlacombe wants to merge 1 commit into
solving-bitcoin:mainfrom
adrienlacombe:codex/binohash-sighash-byte-bound

Conversation

@adrienlacombe

@adrienlacombe adrienlacombe commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Question

Can the host Binohash digest helper accept a legacy sighash value that no ECDSA signature can select?

Change

Reject hash_type > 0xff with InvalidHashType, preserving the public u32 API. A regression compares raw rust-bitcoin digests for 0x00 and 0x100 on a fixed template, verifies valid byte-bound values, and rejects three high-byte values. NR-111 and the catalog document the host/on-chain boundary.

Validation

  • cargo test --locked binohash --lib (5 passed)
  • python3 tools/kb.py validate (203 records, 782 configurations)
  • cargo fmt --all -- --check
  • git diff --check
  • All three CI jobs passed, including the locked non-field Rust suite and pinned Core comparisons.

This is a host API boundary. It does not claim a full Binohash construction or change the set of signed one-byte Core sighash flags.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T19:20:05.355883Z e49a3f2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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