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

Fix taptree hash computation in test_utils

Public commit record

What the developer wrote

Authored by Salvatore Ingala

45/100 · Thin
Fix taptree hash computation in test_utils
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a copy-paste bug in test helper code used during automated testing of Ledger's Bitcoin app. The bug caused the right-hand branch of a Taproot script tree to be ignored and the left-hand branch to be hashed twice when computing the tree's root hash. This only affects Python test utilities, not the device firmware or production wallet code, so real user funds are not at risk. However, the bug could have made some tests silently pass with an incorrect taptree hash, weakening test coverage for Taproot/MuSig2 features.

Recommended action

No immediate user action required. Ledger should verify that any tests relying on these utilities now produce the expected taptree hashes and, if any test vectors were previously wrong, regenerate or update them. Consider adding regression tests for asymmetric taptrees to catch similar mistakes.

Security signals we found

01

Incorrect cryptographic hash construction in Taproot taptree root computation

02

Copy-paste error causing left subtree to be hashed twice and right subtree omitted

03

Test-only code path, not production firmware

04

Silent test-coverage degradation risk for Taproot/MuSig2 wallet policies

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 2/15
Affected reach 2/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.