LD
← All projectsLedger

Ledger Bitcoin app

Open-source Bitcoin application running on Ledger devices; the device OS is outside this repository.

BitcoinHardware walletsNormal
Repository coverage

447 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

148security candidates154second-pass queue402AI analyses
19commits · 30 days
63commits · 60 days
249commits · 180 days
414commits · 365 days
Backfill bands
Aug 5 → Feb 670 seen8 candidatesComplete
Feb 6 → Jun 6149 seen21 candidatesComplete
Jun 6 → Jul 623 seen0 candidatesComplete
Jul 6 → Aug 555 seen5 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

57/100 average clarity
50Strong · 80–100
152Adequate · 60–79
186Thin · 40–59
59Opaque · 0–39
6security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Salvatore Ingala2981122561062
Ilya Artemov962696145
Ruben Waterman666083
Aymeric Robert434063
github-actions[bot]17117046
Mathias BROUSSET17015039
José Luis Landabaso Díaz404067
iartemov-ledger201051
Cerberus Merlin101062
Michael Evans101073
Charles-Edouard de la Vergne101045
Analysis record

Published AI watches

Last scanned 44 minutes ago

Informational 20 AI analysisMessage 83 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

tests: pin all Python test dependencies to exact versions

This commit pins the exact versions of Python testing tools used by the project's automated tests. Previously, the test setup allowed any newly released version of those tools to be installed automatically, which could introduce unexpected…

Supply-chain risk reduction for test/CI dependenciesPrevents unreviewed automatic upgrades of speculos and raggerNo change to firmware or published package code
def417a3by Salvatore Ingala+329−142 files
No security note in commit
Informational 15 AI analysisMessage 38 · Opaque
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Bump version to 2.6.0

This commit is a routine version bump from 2.5.1 to 2.6.0 in the Ledger Bitcoin app. It only updates the version number in the Makefile and the release date in the CHANGELOG. There are no code changes, no bug fixes, and no security-related…

2b424b54by Salvatore Ingala+4−42 files
No security note in commit
Moderate 66 AI analysisMessage 68 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #581 from LedgerHQ/client-fixes

This commit tightens how the Ledger Bitcoin app and its companion client libraries read PSBT (Partially Signed Bitcoin Transaction) data. It adds checks that reject malformed or suspicious PSBTs: truncated fields, unexpected extra bytes af…

Hardened PSBT deserialization against truncation and trailing dataAdded duplicate-key detection in PSBT mapsRejected PSBTv2-only fields inside PSBTv0 to prevent locktime/field override attacks
f8f790a3by Salvatore Ingala+544−17018 files
No security note in commit
Low 47 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

python client: reject PSBTv2-only fields in a PSBTv0

This commit tightens input validation in the Python helper library that prepares Bitcoin transaction data for Ledger hardware wallets. It now rejects PSBT files that claim to be the older version 0 format but contain fields that only belon…

Input-validation hardening: stricter parsing of PSBT version 0 to reject v2-only key typesConsistency fix across clients: aligns Python client with HS and Rust client behaviorLocktime normalization during v0-to-v2 conversion to prevent per-input locktime from overriding transaction locktime
84165be7by Salvatore Ingala+92−02 files
No security note in commit
Informational 24 AI analysisMessage 83 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

tests: update authproxy.py to the latest version from Bitcoin Core

This commit updates a test helper file used to talk to a Bitcoin node during automated testing. The old helper could accidentally send the same command twice if the network connection hiccuped, which could cause a test-only action like sen…

Removed transparent retry of non-idempotent RPC requests after connection resetsTest helper could execute state-changing RPCs twice before the fixNew connection-per-call configuration mitigates idle-timeout disconnects without retry risk
c7ca508eby Salvatore Ingala+91−522 files
Vendor flagged security relevance
Low 40 AI analysisMessage 65 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject duplicate keys and trailing data when parsing a PSBT in the JS client

This commit fixes the JavaScript PSBT (Partially Signed Bitcoin Transaction) parser in Ledger's Bitcoin app so it now rejects malformed PSBTs that contain duplicate keys or extra trailing bytes. Previously, such malformed data could be acc…

BIP-174 non-compliance: duplicate keys and trailing data were previously acceptedState reuse bug: deserializing multiple PSBTs in the same instance could merge mapsInput validation gap in client-side PSBT parsing
4942a4aeby Salvatore Ingala+40−02 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

ragger: fail if a request succeeds without showing the expected screens

This commit fixes the automated test harness, not the Ledger Bitcoin app itself. Previously, the test framework could silently pass even when the device completed a request without showing the expected on-screen review. The change makes te…

Test-hardening only: no firmware or runtime application code changedFixes false-negative test results where a request could succeed without expected UI reviewCorrects scope of navigation settings to avoid leaking across nested or subsequent calls
202d352aby Salvatore Ingala+76−957 files
No security note in commit
Low 37 AI analysisMessage 88 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

unit tests: Fix length overflow in unit-test PSBT parser

This commit fixes an arithmetic overflow bug in a test-only PSBT (Bitcoin transaction format) parser used in unit tests. The bug could let a crafted test input make the parser think a data length is huge, potentially confusing the mock dis…

Integer overflow/wrap-around in length calculationOut-of-bounds length derived from arithmetic on attacker-influenced offsetsUnit-test-only code path, not device firmware
6a2a9262by Salvatore Ingala+6−21 file
No security note in commit
Low 48 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

rust client: reject PSBTv2-only fields when converting a PSBTv0

This commit fixes a bug in the Ledger Bitcoin app's Rust client where a PSBT v0 (an older transaction format) could silently carry fields that only have meaning in PSBT v2. When converting v0 to v2, those fields could override values taken…

Input validation added for cross-format PSBT conversionPrevents v2-only fields from overriding unsigned-transaction-derived valuesBIP-370 compliance enforcement for PSBTv0
602055d6by Salvatore Ingala+66−91 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject PSBTv2-only fields when converting a PSBTv0 in the JS client

This commit fixes a bug in the Ledger Bitcoin app's JavaScript client library. When converting an older-style Bitcoin transaction file (PSBT version 0) into the newer PSBT version 2 format, the library previously ignored fields that are on…

Input validation fix: rejects malformed PSBTv0 containing v2-only fieldsPrevents silent override of transaction locktime during PSBTv0-to-v2 conversionAdds missing BIP-370 key type constants for required time/height locktime
a1f6dc84by Salvatore Ingala+66−22 files
No security note in commit
High 72 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject duplicate keys and truncated maps when parsing PSBT maps in sign_psbt

This commit fixes a bug in how the Ledger Bitcoin app client parses PSBT (Partially Signed Bitcoin Transaction) maps. Previously, if the same key appeared twice in a map, the parser silently kept the last value. A malicious or malformed PS…

Silent overwrite of duplicate PSBT map keys could create commitment mismatch between client and deviceTruncated PSBT maps were silently accepted due to exception swallowing in deserialization loopsTrailing data after PSBT maps was ignored, allowing reserialization to silently normalize malformed inputs
75df80f9by Salvatore Ingala+107−104 files
Vendor flagged security relevance
High 72 AI analysisMessage 53 · Thin
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #579 from LedgerHQ/misc-fixes

This commit fixes several bugs in Ledger's Bitcoin app. The most serious ones are: (1) a set of miniscript policy analyzer mistakes that could let the app accept Bitcoin wallet policies whose scripts are too large or too expensive to execu…

Miniscript cost/property analysis errors that could allow oversized/undercosted wallet policiesHost-driven infinite-loop / denial-of-service via zero-length GET_MORE_ELEMENTS responsesUI state inconsistency causing a security warning to be prematurely dismissed
ec389348by Salvatore Ingala+413−3113 files
No security note in commit
Low 26 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #576 from LedgerHQ/musig2_improvements

This commit improves the Ledger Bitcoin app's MuSig2 multi-signature feature. It lets wallet software pre-generate public nonces before a transaction is known, adds an optional MUSIG2_SESSION_ID field so multiple signing sessions can be in…

New PSBT proprietary field parsing with length validation (1-32 bytes, empty rejected)Session ID now commits to wallet policy plus optional MUSIG2_SESSION_IDSession storage limit raised from 8 to 32 with LRU eviction
26d22adcby Salvatore Ingala+710−7216 files
No security note in commit
Informational 18 AI analysisMessage 85 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Use signed scratch arrays in the thresh ops and stack size computations

This commit is a small code cleanup in Ledger's Bitcoin app. It changes two local arrays from unsigned (uint16_t) to signed (int16_t) in functions that count operations and stack sizes for Bitcoin miniscript 'thresh' policies. The commit m…

Signed/unsigned type mismatch in sentinel handlingPotential latent integer interpretation bug in miniscript threshold policy analysisCode clarity improvement around invalid (dis)satisfaction markers
4ff6f2f0by Salvatore Ingala+4−41 file
No security note in commit
Low 48 AI analysisMessage 91 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Align miniscript type and ops computations with bitcoin-core

This commit fixes the Ledger Bitcoin app's internal checker for Miniscript wallet policies. The checker was incorrectly rejecting some valid Bitcoin spending policies as unsafe, and in a few places it was computing safety properties using …

Logic change in Miniscript policy analysisAlignment with upstream Bitcoin Core reference implementationRelaxation of overly strict non-malleability and timelock-mixing checks
4694d317by Salvatore Ingala+26−132 files
No security note in commit
Moderate 68 AI analysisMessage 86 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Fix ops computation for andor fragments

This commit fixes a bug in how the Ledger Bitcoin app counts the number of Bitcoin script operations (ops) needed to spend certain wallet policies that use a 'miniscript andor' fragment. Because the count was wrong, the app could allow use…

Incorrect miniscript ops accounting for andor fragmentPolicy sanity check bypass leading to unspendable registered walletsReference alignment with Bitcoin Core implementation
86159d1eby Salvatore Ingala+40−13 files
Vendor flagged security relevance
High 74 AI analysisMessage 78 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Fix ops computation for l: and u: fragments

This commit fixes a bug in how the Ledger Bitcoin app counts Bitcoin script operations ('ops') for two specific Miniscript fragments, 'l:' and 'u:'. Because the count was too low, the app could accept wallet policies that look valid but ar…

Undercounting of script operation budget leading to acceptance of unspendable policiesIncorrect handling of Miniscript wrapper dissatisfaction semanticsPolicy sanity check bypass via operation-count accounting flaw
b6ac1de8by Salvatore Ingala+39−33 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 68 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

doc: document the MUSIG2_SESSION_ID PSBT field

This commit only updates documentation and the changelog. It explains a new optional PSBT field called MUSIG2_SESSION_ID that lets software wallets manage multiple MuSig2 signing sessions for the same wallet policy on a Ledger device. Ther…

8d8ed9afby Salvatore Ingala+28−62 files
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

musig_sessions: store up to 32 sessions

This commit is a simple capacity increase, not a security fix. It raises the number of simultaneous MuSig2 signing sessions the Ledger Bitcoin app can keep in memory from 8 to 32, because users with multiple MuSig accounts or wallets that …

a6798172by Salvatore Ingala+12−54 files
No security note in commit
Low 26 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

sign_psbt: fail before the UI if the MuSig2 session is missing

This commit improves the user experience and error handling for Ledger's Bitcoin app when using MuSig2 multi-signatures. Previously, if a required MuSig2 session was missing during the second round of signing, the device would only report …

UX-hardening: fail-fast before user approval instead of afterNew specific error code EC_SIGN_PSBT_MUSIG2_SESSION_NOT_FOUND for missing MuSig2 sessionsRefactored session storage lookup to support non-destructive existence check
2d04b144by Salvatore Ingala+118−187 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidatesign_psbt: review BIP-322 message signing requests as messagesby Ruben Waterman · b3c21b90 · Oct 5, 2026 · 10 filesMessage 78 · AdequateLow 35Details
Commit message · Ruben Waterman

sign_psbt: review BIP-322 message signing requests as messages

A PSBT carrying the PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE global field
(0x09, BIP-322 v1.0.0+) is now recognized as a request to sign the
BIP-322 to_sign virtual transaction, and reviewed on-screen as a
message signature instead of the normal transaction signing UX.

The security checks per BIP-322 ensure that the signatures are bound
to the intended message and can be utilized in the indended ways per
BIP-322, but result in a non-spendable transaction, since all
signatures are with SIGHASH_ALL/DEFAULT, and the first input spends
a non-existing UTXO.

A structurally invalid PSBT carrying the field is rejected; however
it is acceptable for the app to produce invalid signatures that
would not pass full BIP-322 validation, as some of the checks
require a full node anyway.

Timelocked BIP-322 signatures are not supported: the locktime and the
sequence of the first input (the "age" of the signature) must be 0.
The sequence of a proof-of-funds input has no meaning in BIP-322, so
it may be 0 or any value with the BIP-68 disable flag set, including
the final sequence implied by an omitted PSBT_IN_SEQUENCE. Any other
value would be a relative timelock with version 2, and is rejected.

Warnings for missing non-witness utxos are still shown when they
apply, in the case of proofs of funds. The first input spending the
to_spend transaction is exempt, as it is validated per BIP-322.

The 'processing' screen is adapted to show "Loading message" and
"Signing message" during signatures for BIP-322 PSBTs.

Not allowed during swap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Salvatore Ingala <6681844+bigspider@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydefensive validationprivacy or spend-authorization protocolcryptography-sensitive pathsigning or wallet path
AI analysis · Low 35/100

This commit adds support for signing Bitcoin messages using the BIP-322 standard inside Ledger's Bitcoin app. Instead of reviewing these as regular money transfers, the device now shows them as message signatures. The change includes safety checks to make sure the signed data is a valid BIP-322 request, cannot be spent as a real transaction, and is tied to the exact message shown to the user. It also blocks this feature when the app is being used in a cryptocurrency swap.

Security candidateui: add the BIP-322 message review flowby Salvatore Ingala · 17d00318 · Oct 2, 2026 · 4 filesMessage 85 · StrongInformational 15Details
Commit message · Salvatore Ingala

ui: add the BIP-322 message review flow

ui_display_bip322_message_and_confirm() reviews a BIP-322 message
signature: the account (optional), the address being proven, the total
amount of the proven coins (proof-of-funds only), and the message, or
its sha256 hash when it cannot be shown in full.

The GA_LOADING_MESSAGE and the new GA_SIGNING_MESSAGE processing screen
texts are now declared in display.h, so that SIGN_PSBT can use them too.

Not used yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

85/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
secret or key materialsigning boundarysigning or wallet path
AI analysis · Informational 15/100

This commit adds a new on-screen review flow for BIP-322 message signatures in the Ledger Bitcoin app. It only displays information to the user and asks for confirmation; it does not change how signatures are computed or how data is validated. The code is marked 'Not used yet,' meaning the new function is not wired into any signing handler. There is no security issue visible in the change itself.

Security candidatebip322: add the BIP-322 primitivesby Ruben Waterman · 425c4561 · Oct 2, 2026 · 4 filesMessage 78 · AdequateInformational 15Details
Commit message · Ruben Waterman

bip322: add the BIP-322 primitives

src/common/bip322.c implements the parts of BIP-322 that do not depend
on how a signing request reaches the app:

- bip322_message_hash_init() starts the BIP0322-signed-message tagged
hash of a message;
- bip322_serialize_to_spend() and bip322_compute_to_spend_txid() build
the to_spend virtual transaction for a message hash and a
message_challenge (the scriptPubKey whose control is proven), and
compute its txid. The to_sign transaction, which is the one that gets
signed, spends its output 0.

Not used yet.

The unit tests check the message hash, the to_spend serialization and
the txid computation against the test vectors published in BIP-322
(empty message and "Hello World" for the P2WPKH address used by the
BIP). They only link src/common/bip322.c.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key materialsigning boundaryfuzzing or regression evidencecryptography-sensitive path
AI analysis · Informational 15/100

This commit adds new, unused helper code for BIP-322 generic Bitcoin message signing. It only implements low-level building blocks (message hashing and a virtual transaction serializer) and includes unit tests that check the results against official BIP-322 test vectors. The code is not wired into any user-facing signing flow, so it cannot by itself change app behavior or expose user funds.

Security candidateMerge pull request #570 from LedgerHQ/python_bip322by Salvatore Ingala · dab93a1a · Oct 1, 2026 · 4 filesMessage 73 · AdequateInformational 21Details
Commit message · Salvatore Ingala

Merge pull request #570 from LedgerHQ/python_bip322

python client: first-class PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE field

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
secret or key materialsigning boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 21/100

This commit adds support in the Ledger Bitcoin app's Python client for a new PSBT global field called PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE, defined by Bitcoin improvement proposal BIP-322. It lets a PSBT carry a signed message alongside transaction data. The change is a feature addition to serialization/deserialization code, with tests that check the field survives round-trips and that malformed inputs (duplicate keys, extra key data) are rejected. There is no indication in the commit that this fixes a security bug or is being released as a security patch.

Security candidatetest_utils: deduplicate the musig2 key aggregation helpersby Salvatore Ingala · e29c4fc1 · Sep 29, 2026 · 3 filesMessage 83 · StrongInformational 15Details
Commit message · Salvatore Ingala

test_utils: deduplicate the musig2 key aggregation helpers

test_utils/musig2.py had its own tapleaf_hash, musig key aggregation
(unsorted_musig, musig, aggregate_musig_pubkey), derive_from_key_info
and derive_plain_descriptor, behaving exactly as those in
test_utils/wallet_policy.py once the latter learned about musig() for
the BIP-322 tests; and txmaker.py kept a third copy of the BIP-328
chaincode.

Keep a single copy of each in wallet_policy.py, which musig2.py
imports from (so they cannot live in musig2.py), with
aggregate_musig_pubkey returning the (xpub, KeyAggContext) pair as in
musig2.py, and BIP328_CHAINCODE shared with txmaker.py. musig2.py
re-exports them, so its importers are unaffected.

The Tree and TrDescriptorTemplate classes of musig2.py are left
alone: its TrDescriptorTemplate has a different parser, and is used
by the musig tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key materialsigning or wallet path
AI analysis · Informational 15/100

This commit is a code cleanup in the project's test utilities. It removes duplicated helper functions for MuSig2 key aggregation and moves them into a single shared file. There is no change to the actual Ledger Bitcoin app firmware or to how cryptographic operations are performed. It is purely a refactoring of test-only Python code.

Security candidatepython client: first-class PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE fieldby Salvatore Ingala · 60573e28 · Sep 29, 2026 · 4 filesMessage 83 · StrongInformational 19Details
Commit message · Salvatore Ingala

python client: first-class PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE field

Add PSBT.generic_signed_message, for the BIP-322 global field (0x09)
that carries the message of a generic signed message request. It is
parsed (rejecting duplicates and keydata) and serialized in both PSBT
versions, and survives the v0/v2 conversions.

Covered by a pure-Python round-trip test in bitcoin_client/tests.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 19/100

This commit adds support in Ledger's Python Bitcoin client for a new PSBT global field used by BIP-322 generic signed messages. It is a feature addition: parsing, serialization, and round-trip tests for the new field. There is no indication of a security bug being fixed or introduced.

Security candidateClear the sign_psbt state on every exit path of handler_sign_psbtby Salvatore Ingala · b0d662cb · Sep 25, 2026 · 1 fileMessage 85 · StrongModerate 59Details
Commit message · Salvatore Ingala

Clear the sign_psbt state on every exit path of handler_sign_psbt

Move the handler's body in an internal function, so that initialization
and zeroing of any internal state used in the handler is guaranteed.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 59/100

This commit refactors the Bitcoin app's PSBT signing handler so that sensitive temporary data (keys, transaction details, signing state) is always wiped from the device's stack memory when the handler finishes, even if it exits early due to an error. Before the change, some early return paths could leave that data in memory. The patch itself does not claim to fix an active exploit, but it removes a class of information-disclosure risk.

Security candidateTest that the session is actually deleted once round 2 startsby Salvatore Ingala · 67735677 · Sep 25, 2026 · 3 filesMessage 83 · StrongModerate 63Details
Commit message · Salvatore Ingala

Test that the session is actually deleted once round 2 starts

The session must be deleted once round 2 starts, whether signing was
successful or not.

This makes sure that musigsession_pop() actually deletes the session.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 63/100

This commit adds a security test and a small code change for Ledger's Bitcoin app to make sure a secret signing session is wiped from memory once the second round of a MuSig2 multi-signature operation starts. The concern is that if the session were not deleted, an attacker could trick the device into reusing secret randomness (a 'nonce') for a different transaction, which can leak the private key. The patch zeroes out the signing state at the end of round 1 and adds tests proving the session is consumed whether round 2 succeeds or fails.

Security candidateMake the MuSig2 psbt_session_id independent of the transactionby Salvatore Ingala · ee152d11 · Sep 25, 2026 · 4 filesMessage 83 · StrongLow 26Details
Commit message · Salvatore Ingala

Make the MuSig2 psbt_session_id independent of the transaction

The psbt_session_id used to commit to the transaction hashes, making it
impossible to pre-generate nonces for a future transaction.

Derive the id from the wallet policy alone: the hash of its descriptor
template, and the root of the Merkle tree of its keys.

A client can now execute round 1 whenever it likes -- for example while the
device happens to be connected -- and use the resulting pubnonces for
whichever transaction it later builds. This works as long as its inputs sit
at the same indexes, and the pubnonces are moved to the new PSBT in the
right place and with the right key - which depend on the tweaked aggregate
key, and therefore on the actual UTXOs spent in round 2.

The tradeoff is that at most one round-1 session can be pending per wallet
policy, since a new round 1 replaces the session in storage.

New tests:
- round 1 is executed on a transaction that spends a different UTXO, at a
different (change, address_index), and pays a different output; round 2
for the actual transaction must succeed.
- the same, for a musig() in a tapleaf: round 1 is executed on a transaction
that spends a different UTXO and pays a different output.
- round 1 for another policy with the same keys, executed between round 1
and round 2, must not affect round 2. This simulates a software wallet
that pregenerates nonces before knowing the transaction.
- a second round 1 for the same policy replaces the pending session: round 2
with the pubnonces of the first round 1 must fail.

The documentation in doc/musig.md is updated accordingly.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 26/100

This commit changes how the Ledger Bitcoin app identifies an in-progress MuSig2 multi-signature session. Previously, the session ID was tied to the specific transaction, so you could only start the signing process after the transaction was known. Now the session ID depends only on the wallet policy (the spending rules), allowing users to generate public nonces ahead of time for a later transaction. This is a deliberate feature change, not a fix for an active exploit. The trade-off is that only one pending session is allowed per wallet policy, and starting a new session overwrites the old one.

Security candidateVerify the pubnonce in the PSBT during round 2 of MuSig2by Salvatore Ingala · 79b60da9 · Sep 25, 2026 · 2 filesMessage 88 · StrongModerate 60Details
Commit message · Salvatore Ingala

Verify the pubnonce in the PSBT during round 2 of MuSig2

doc/musig.md (following BIP-327) prescribes that round 2 verifies that
the pubnonce contained in the psbt matches the one synthetically
recomputed, but the check was missing.

Without this check, the signer would produce an (invalid) partial
signature, and other cosigners would identify this signer as the disruptive one.

Added the check, and a test to validate that the signer fails as expected
if provided with a mismatching pubnonce at the beginning of Round 2.

This check also replaces the guarantee that used to come from having the
transaction in the psbt_session_id: rather than approximating "same
transaction", it directly verifies "these are the nonces of the session I
am about to use", which is the property that actually matters.

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydefensive validationsigning or wallet path
AI analysis · Moderate 60/100

This commit fixes a missing safety check in the Ledger Bitcoin app when using the MuSig2 multi-signature protocol. During round 2 of signing, the app now verifies that the public nonce in the PSBT (the data file used to coordinate signing) matches the nonce the device itself generated earlier. Without this check, the device could produce a partial signature that doesn't match what other signers expect, making the final combined signature invalid and causing other participants to blame this device as the 'disruptive signer.' The fix prevents that by failing cleanly instead of producing a bad signature.

Security candidateMerge pull request #568 from LedgerHQ/locktimesby Salvatore Ingala · 58ab28b3 · Sep 25, 2026 · 16 filesMessage 53 · ThinHigh 76Details
Commit message · Salvatore Ingala

Merge pull request #568 from LedgerHQ/locktimes

53/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
seed or entropy pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · High 76/100

This commit fixes how the Ledger Bitcoin app decides the 'lock time' for a transaction when signing a PSBTv2. Previously, the app always used the global fallback lock time and ignored per-input required lock times. That meant a wallet or attacker could set hidden per-input lock-time requirements that the device would not actually enforce, while still producing a valid-looking signature. The change makes the app derive the lock time correctly per the BIP-370 standard, using each input's required height or time lock time when present, and rejecting the PSBT when inputs disagree. This is a correctness fix for a security-critical signing rule.

Security candidateExtract a single helper for MuSig2 nonce derivationby Salvatore Ingala · ebbf6108 · Sep 25, 2026 · 1 fileMessage 65 · AdequateInformational 13Details
Commit message · Salvatore Ingala

Extract a single helper for MuSig2 nonce derivation

The code was repeated essentially verbatim in both rounds.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
nonce handlingsigning or wallet path
AI analysis · Informational 13/100

This commit is a simple code cleanup: it pulls out duplicated code for generating MuSig2 cryptographic nonces into a single helper function, then uses that helper in two places where the same logic previously appeared. There is no change to security behavior, no bug fix, and no disclosed vulnerability.

Security candidateAdd the MuSig2 nonce pre-generation changes to the changelogby Salvatore Ingala · 90ed47a0 · Sep 24, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Salvatore Ingala

Add the MuSig2 nonce pre-generation changes to the changelog

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
nonce handlingdocumentation-only discount
AI analysis · Informational 15/100

This commit only updates the changelog text. It documents a design change in the MuSig2 multi-signature feature: the random public nonces used during signing are no longer tied to a specific transaction, which lets them be generated ahead of time. It also notes a breaking behavior that only one signing session can be pending per wallet policy. There is no code change, no bug fix, and no security patch in this commit itself.

Security candidatefuzzing: Update manifest and seed corpus generationby Salvatore Ingala · 7c1efc49 · Sep 22, 2026 · 2 filesMessage 50 · ThinInformational 12Details
Commit message · Salvatore Ingala

fuzzing: Update manifest and seed corpus generation

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
fuzzing or regression evidenceseed or entropy path
AI analysis · Informational 12/100

This commit only updates the fuzzing test harness: it adds a new source file to the fuzzing manifest and expands the seed corpus generator with test cases for BIP-370 lock-time handling. There are no changes to the actual application code that runs on the Ledger device, so this commit does not fix or introduce a security vulnerability by itself.

Security candidateAdd functional tests for the BIP-370 lock time derivationby Salvatore Ingala · ab7131cb · Sep 22, 2026 · 1 fileMessage 88 · StrongInformational 12Details
Commit message · Salvatore Ingala

Add functional tests for the BIP-370 lock time derivation

Since the signed locktime is never displayed, the tests use an
indirect method to verify that the app is computing the correct
value: recomputing the sighash with an independent Python
implementation, and verifying if the produced Schnorr signature
passes for that message.

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit only adds new automated tests for how the Ledger Bitcoin app chooses a transaction's lock time when signing a PSBTv2. It does not change the app's actual signing code. The tests verify that the app derives the expected lock time and rejects malformed or contradictory inputs. There is no security patch here.

Security candidateUnit tests for PSBTv2 locktime fields, and nLocktime calculationby Salvatore Ingala · c1453b81 · Sep 22, 2026 · 3 filesMessage 60 · AdequateInformational 12Details
Commit message · Salvatore Ingala

Unit tests for PSBTv2 locktime fields, and nLocktime calculation

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit only adds new automated tests for how the Bitcoin app figures out transaction lock times from PSBTv2 data. It does not change the actual app logic, so by itself it cannot introduce a security bug or fix one. The tests are defensive: they check edge cases that could matter for security if the underlying code were wrong, but the commit only verifies behavior, it does not alter it.

Security candidateCompute nLocktime in compliance with BIP-370by Salvatore Ingala · 50c69a4c · Sep 22, 2026 · 8 filesMessage 68 · AdequateModerate 59Details
Commit message · Salvatore Ingala

Compute nLocktime in compliance with BIP-370

Before this, the app used to simplify the specs by taking the
PSBT's fallback locktime (or its absence) at face value.

It was documented as a deviation from the specs, but it might
lead to future unexpected behaviors from software wallets that
expect the BIP-370 computation.

This fixes the gap.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 59/100

Ledger's Bitcoin app changed how it calculates the 'nLockTime' value when signing a PSBT (Partially Signed Bitcoin Transaction). Previously, it simply used the PSBT's fallback locktime and ignored per-input locktime requirements. Now it follows the BIP-370 standard: it looks at each input's required locktime, picks the correct type (block height or timestamp), and uses the maximum required value. This prevents a wallet from preparing a PSBT where the Ledger would sign with a different locktime than the wallet intended, which could in some cases let funds be spent earlier or later than expected, or cause the signed transaction to be rejected by the network.

Security candidateMerge pull request #569 from LedgerHQ/client-fixesby Salvatore Ingala · 034b9d04 · Sep 21, 2026 · 11 filesMessage 58 · ThinLow 37Details
Commit message · Salvatore Ingala

Merge pull request #569 from LedgerHQ/client-fixes

Client fixes on PSBTv2 field handling

58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing boundarysigning or wallet pathparser or protocol pathmerge-commit duplicate discount
AI analysis · Low 37/100

This commit fixes how Ledger's Bitcoin client libraries convert older PSBTv0 transaction data into the newer PSBTv2 format that Ledger hardware wallets expect. The changes correct several field-handling bugs: the transaction locktime is now written to the right place, missing input sequence numbers are treated as the default final value, and the Rust client now forwards unknown PSBTv2 fields (such as required locktimes) instead of dropping them. It also rejects malformed PSBTs where v0 and v2 fields contradict each other, rather than producing an invalid PSBT that the device would refuse. These are client-side robustness fixes; they do not appear to be a security patch for the device firmware itself.

Security candidateBump ledger_bitcoin_client version to 0.7.0by Salvatore Ingala · cfb530b9 · Sep 18, 2026 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · Salvatore Ingala

Bump ledger_bitcoin_client version to 0.7.0

The public interface in the psbt module changed, therefore a
minor version bump is necessary.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundary
AI analysis · Informational 15/100

This commit only updates a version number from 0.6.2 to 0.7.0 in two Rust package files. It is a routine bookkeeping change because the public interface of the PSBT module changed, requiring a minor version bump under semantic versioning rules. No code behavior changes are present in the diff.

Security candidatejs tests: drop a bogus required height locktime of 0 from test PSBTsby Salvatore Ingala · ec992074 · Sep 18, 2026 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Salvatore Ingala

js tests: drop a bogus required height locktime of 0 from test PSBTs

The hardcoded PSBTs that were used in the tests are actually
invalid, as they have PSBT_IN_REQUIRED_HEIGHT_LOCKTIME = 0;
but the field is required to be > (or absent) per BIP-370.

The PSBT_IN_REQUIRED_HEIGHT_LOCKTIME field is therefore
dropped in this commit.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100

This commit only changes hardcoded test data used in JavaScript unit tests. It removes an invalid zero-value locktime field from two PSBT (Partially Signed Bitcoin Transaction) test fixtures so they conform to the BIP-370 standard. No production code, device firmware, or user-facing behavior is changed.

Security candidatepython client: fix three PSBTv2 defects in psbt.pyby Salvatore Ingala · 04ba9e7b · Sep 17, 2026 · 1 fileMessage 95 · StrongLow 48Details
Commit message · Salvatore Ingala

python client: fix three PSBTv2 defects in psbt.py

- get_unsigned_tx assigned the computed lock time to `self.nLockTime`
instead of `tx.nLockTime`, so the CTransaction it returned always kept
the nLockTime 0.

- cache_unsigned_tx_pieces tested `self.tx is not None`, but __init__
always creates a CTransaction, so the condition is always true -- its
own docstring says "does nothing if the PSBT is already v2". For a
deserialized PSBTv2, whose tx is null, setup_from_tx therefore
overwrote tx_version with 1 and fallback_locktime with 0, discarding
the values just parsed. Test the version instead.

- convert_to_v0 cleared tx_version and fallback_locktime and only then
called get_unsigned_tx(). Build the transaction first to avoid the
values of those fields.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 48/100

This commit fixes three bugs in a Python helper that converts modern PSBTv2 transaction data into the older PSBTv0 format used by Ledger hardware wallets. The bugs could silently corrupt the transaction's lock time and version fields during conversion, which might alter when a transaction becomes valid or what transaction format the device signs. The fixes ensure the correct values are copied before they are erased. There is no direct evidence this was exploitable as a security attack, but it could cause unexpected or invalid signatures in wallet software relying on this library.

Security candidaterust client: build PSBTv2 maps from all pairs, not an enumerated listby Salvatore Ingala · a16bb101 · Sep 17, 2026 · 4 filesMessage 73 · AdequateLow 35Details
Commit message · Salvatore Ingala

rust client: build PSBTv2 maps from all pairs, not an enumerated list

`get_v2_{global,input,output}_pairs` were a hand-maintained copy of
rust-bitcoin's `Map::get_pairs`.

This is error-prone, and forced us to reimplement a lot of the
(de)serialization logic.

Instead, we let rust-bitcoin serialization the psbt as v0, instead, and
only touch the keys where v0 and v2 actually differ: drop
PSBT_GLOBAL_UNSIGNED_TX, add the global v2 fields and each input's and
output's v2 fields.

This also simplifies the code, as more is delegated to rust-bitcoin.

`get_v2_global_pairs`, `get_v2_input_pairs` and `get_v2_output_pairs`
are replaced with a single `get_v2_maps` function, so the whole PSBT
is serialized once rather than once per input and output.

Key order is irrelevant -- `add_known_mapping` and
`get_merkleized_map_commitment` both sort -- so the commitments
remain valid as per the app's expectations.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet pathparser or protocol path
AI analysis · Low 35/100

This commit refactors how the Ledger Bitcoin app's Rust client converts a PSBT (Partially Signed Bitcoin Transaction) from version 0 to version 2. Previously, the code manually listed every PSBT field it knew how to serialize, which risked silently dropping newer or unknown fields. The new code lets the rust-bitcoin library do most of the serialization, then only adds, removes, or changes the specific fields that differ between v0 and v2. It also adds checks that reject malformed PSBTs where v2 fields already exist and conflict with the v0 transaction data. The change is a defensive cleanup that reduces the chance of an incomplete or inconsistent PSBT being sent to the hardware wallet.

Security candidateunit-tests: drive the BIP-322 tests from the BIP's pinned test vectorsby Ruben Waterman · 2e1d265c · Sep 8, 2026 · 7 filesMessage 91 · StrongInformational 15Details
Commit message · Ruben Waterman

unit-tests: drive the BIP-322 tests from the BIP's pinned test vectors

Replace the two hand-copied cases with the "tx_hashes" table of
bip-0322/basic-test-vectors.json, vendored verbatim in specs/bip322/
(pinned to bips commit d77863fb, 2026-05-06) and rendered into
unit-tests/bip322_vectors.inc.c by specs/bip322/gen.py. The generator
recomputes every hash independently before emitting anything, and CI
now runs its --check alongside the BIP388 one, in the workflow renamed
to codegen-check.yml.

This adds the UTF-8 vector that was missing, and covers the to_sign
txid of each vector on top of the to_spend one.

Also check, for every vector, that the message hashes to the vector's
message_hash with bip322_message_hash_init().

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KAfA54Ci4gLkZnxHa6qrgV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
secret or key materialfuzzing or regression evidencecryptography-sensitive path
AI analysis · Informational 15/100

This commit is a routine improvement to the project's automated tests. It replaces two hand-copied BIP-322 test cases with a larger set of official, pinned test vectors (including a new UTF-8 message case) and adds a code generator plus CI check to keep the generated test data in sync. It does not change the actual Bitcoin app code that users run, so it cannot directly affect device security or user funds.

Security candidatebip322: label as v2.0.0 and test proof-of-funds without message_challengeby Ruben Waterman · 056fad95 · Sep 8, 2026 · 7 filesMessage 100 · StrongInformational 12Details
Commit message · Ruben Waterman

bip322: label as v2.0.0 and test proof-of-funds without message_challenge

BIP-322 v2.0.0 (2026-06-04) clarifies that the message_challenge input is
not optional in a proof of funds. The validator already enforces this, as
the first input is always checked against the recomputed to_spend txid;
this commit updates the references to the BIP version and adds a
regression test for a proof-of-funds request made only of real UTXOs.

The test uses a zero-valued real UTXO at output index 0 as the first
input, so that it passes the amount and prevout index checks and is
rejected by the txid binding itself.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KAfA54Ci4gLkZnxHa6qrgV

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
secret or key materialfuzzing or regression evidencecryptography-sensitive pathsigning or wallet path
AI analysis · Informational 12/100

This commit is a documentation and test update for the Ledger Bitcoin app. It updates references to BIP-322 from an unspecified version to v2.0.0, clarifies that a proof-of-funds message signature must still include the virtual first input, and adds a regression test to confirm the app already rejects malformed requests that omit that virtual input. The actual security check in the device code was already present and is not changed.

Security candidateMerge pull request #556 from LedgerHQ/mem_optby Salvatore Ingala · 3aa53954 · Sep 1, 2026 · 5 filesMessage 68 · AdequateLow 32Details
Commit message · Salvatore Ingala

Merge pull request #556 from LedgerHQ/mem_opt

Remove obsolete workaround on stack utilization on Nano X

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
cryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 32/100

This commit removes an old memory workaround in Ledger's Bitcoin app. Previously, a large data structure used during transaction signing was stored in global memory instead of on the function's stack, because some Ledger devices were thought to have only 8 KB of stack space. The update increases the allowed stack size for the Nano X and moves that data structure back onto the stack. This is a routine code cleanup, but it changes how memory is allocated during the most memory-intensive signing operation. If the new stack limit is slightly wrong, it could in theory cause stack overflows or memory corruption during signing on a Nano X.