Skip to content

Verify one Schnorr signer from hashed key identifiers - #334

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/hash-committed-schnorr-set
Nov 9, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/hash-committed-schnorr-set

Conversation

@brenorb

@brenorb brenorb commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Verify one native Schnorr signature after checking a revealed x-only key against a public list of HASH160 identifiers. The exact 32-byte guard runs before membership and signature verification. A committed one-byte key and nonempty dummy signature pass the unguarded variant under the local unknown-key behavior. The guarded leaf rejects before charging a signature check.

The two embedded-key baselines scan the same revealed key or select a key using a witness index. A singleton embedded key needs no index. Each fixture uses a separately signed synthetic Taproot transaction under the exact policy-compiled leaf, then verifies one signature and ends with true. The complete witness includes the leaf and depth-zero control block with no annex. All inputs and hints coexist at entry.

Keys Schedule Leaf bytes Data witness bytes Complete witness bytes Ordinary items Hint items (bytes) Peak Executed Initial budget Charge
1 HASH160 scan 35 99 169 2 0 (0) 6 10 219 50
1 Raw-key scan 40 99 174 2 0 (0) 5 5 224 50
1 Embedded key 35 66 136 1 0 (0) 2 1 186 50
4 HASH160 scan 107 99 241 2 0 (0) 6 19 291 50
4 Raw-key scan 148 99 282 2 0 (0) 5 14 332 50
4 Embedded index 145 68 248 1 1 (2) 6 10 298 50
32 HASH160 scan 779 99 915 2 0 (0) 6 103 965 50
32 Raw-key scan 1,156 99 1,292 2 0 (0) 5 98 1,342 50
32 Embedded index 1,085 68 1,190 1 1 (2) 34 25 1,240 50
129 HASH160 scan 3,107 99 3,243 2 0 (0) 6 394 3,293 50
129 Raw-key scan 4,648 99 4,784 2 0 (0) 5 389 4,834 50
129 Embedded index 4,335 69 4,441 1 1 (3) 131 73 4,491 50

At width 129, HASH160 saves 1,198 complete witness bytes and 125 stack items against embedded indices, while executing 321 additional non-push operations. The direct key is smaller at one. Tests cover every signer in a four-key set, correct DEFAULT and ALL sighashes, wrong leaf and nonmember signatures, malformed keys, and the exact combined-stack boundary.

Evidence is locally reproduced and execution is unclassified. Focused tests, metric snapshots, knowledge validation, formatting, and diff checks passed. The required full non-field suite passed on this exact published commit.

@brenorb
brenorb marked this pull request as ready for review November 6, 2026 12:49
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T12:54:05.003381Z 901370d Draft marked ready
ℹ️ 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.

@RobinLinus
RobinLinus merged commit 5c2bad7 into solving-bitcoin:main Nov 9, 2026
3 checks passed
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.

2 participants