AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 30 Bitcoin

transaction: support all sighash types in legacy preimage

Public commit record

What the developer wrote

Authored by ThomasV

83/100 · Strong
transaction: support all sighash types in legacy preimage

serialize_preimage now supports NONE, SINGLE and ANYONECANPAY for
legacy inputs. With strict=False, any sighash byte is accepted for
non-taproot inputs, as in consensus; by default, undefined sighash
bytes are rejected, as in mempool policy. verify_sig_for_txin takes
the same parameter, and handles legacy SIGHASH_SINGLE without a
corresponding output.

Tested against the legacy sighash vectors of Bitcoin Core.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit expands Electrum's transaction-signing code to correctly handle several Bitcoin 'sighash' modes that were previously unsupported for old-style (legacy) inputs. Sighash flags tell the network which parts of a transaction the signature covers. Before this change, legacy inputs using SIGHASH_NONE, SIGHASH_SINGLE, or SIGHASH_ANYONECANPAY would fail. The patch also adds a 'strict' option: by default it rejects unusual sighash bytes (matching normal network policy), but with strict=False it accepts any byte the Bitcoin consensus rules allow. It includes tests that compare Electrum's output against Bitcoin Core's official sighash test vectors. There is no indication in the commit that this fixes an active security vulnerability; it appears to be a correctness and compatibility improvement.

Recommended action

Review as a normal correctness/compatibility improvement. No urgent security response is indicated by the commit itself. If Electrum is used to sign or verify non-standard legacy transactions, ensure callers set strict=False where consensus behavior is required, and keep strict=True for standard wallet operations.

Security signals we found

01

Correctness fix for legacy sighash preimage construction

02

Adds strict parameter to distinguish policy-standardness from consensus-validity

03

Handles SIGHASH_SINGLE without corresponding output (legacy consensus quirk)

04

Adds test vectors from Bitcoin Core to prevent regression

05

No mention of vulnerability, CVE, bug bounty, or security advisory in commit

Risk score

Why this scored 30/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 3/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.