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 48 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 candidatetests: pin all Python test dependencies to exact versionsby Salvatore Ingala · def417a3 · Nov 9, 2026 · 2 filesMessage 83 · StrongInformational 20Details
Commit message · Salvatore Ingala

tests: pin all Python test dependencies to exact versions

requirements.txt used version ranges (with no upper bound for speculos
and ragger), so every CI run could install a newly published release
of any direct or transitive dependency without review.

Move the ranges to requirements.in, and generate requirements.txt from
it with uv, pinning every package to an exact version:

uv pip compile requirements.in --universal --python-version 3.9 -o requirements.txt

--python-version 3.9 matches the oldest Python in CI (the speculos:0.25.5
image of the legacy app job); --universal keeps the lock valid for the
newer versions in ledger-app-dev-tools.

Hashes are intentionally not generated: pip rejects the editable
./bitcoin_client requirement in hash-checking mode, which would require
installing the client separately in every job and in the setup script.

The published ledger_bitcoin package is not affected, as its
dependencies come from bitcoin_client/setup.cfg.

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
access control
AI analysis · Informational 20/100

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 changes or malicious code from a compromised dependency into the CI/test environment. Pinning versions is a routine supply-chain hygiene improvement; it does not fix a known vulnerability in the app itself.

Security candidateMerge pull request #581 from LedgerHQ/client-fixesby Salvatore Ingala · f8f790a3 · Nov 5, 2026 · 18 filesMessage 68 · AdequateModerate 66Details
Commit message · Salvatore Ingala

Merge pull request #581 from LedgerHQ/client-fixes

Miscellaneous client and test fixes

68/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
signing or wallet pathauthentication pathmerge-commit duplicate discount
AI analysis · Moderate 66/100

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 after the PSBT, duplicate keys inside PSBT maps, and PSBTv0 files that contain fields only allowed in PSBTv2. It also fixes a C-language integer-overflow check when parsing PSBT maps on the device. These changes are defensive hardening: they prevent the client/device from silently accepting a malformed or intentionally crafted PSBT that could later influence transaction details such as locktime.

Security candidatepython client: reject PSBTv2-only fields in a PSBTv0by Salvatore Ingala · 84165be7 · Nov 5, 2026 · 2 filesMessage 73 · AdequateLow 47Details
Commit message · Salvatore Ingala

python client: reject PSBTv2-only fields in a PSBTv0

Similarly to the HS and Rust client, make the python client reject
deserializing PSBTs of version 0 if they contain v2-only fields.

Also clear the required locktimes in convert_to_v2(), as the locktime
of a PSBTv0 is defined by its unsigned transaction.

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 path
AI analysis · Low 47/100

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 belong to the newer version 2 format, and it makes sure lock-time values are taken from the original transaction when converting an old PSBT to the new format. The change brings the Python client in line with the existing hardware-side (HS) and Rust clients. It is a defensive consistency fix rather than a confirmed exploit patch.

Security candidatetests: update authproxy.py to the latest version from Bitcoin Coreby Salvatore Ingala · c7ca508e · Nov 5, 2026 · 2 filesMessage 83 · StrongInformational 24Details
Commit message · Salvatore Ingala

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

The old version transparently resent a request after a connection reset,
which could execute a non-idempotent RPC (e.g. sendtoaddress) twice if the
server had already processed the first one. The latest version no longer
retries.

The retry also handled bitcoind closing idle connections after
-rpcservertimeout, which can happen while tests interact with the device.
Instead, configure the test RPC proxies to use a new connection for each call.

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
authentication path
AI analysis · Informational 24/100

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 sending coins to happen twice. The new version removes that automatic retry and instead opens a fresh connection for each test command. This is a test-infrastructure hardening change, not a fix in the Ledger app that users install on their device.

Security candidateReject duplicate keys and trailing data when parsing a PSBT in the JS clientby Salvatore Ingala · 4942a4ae · Nov 5, 2026 · 2 filesMessage 65 · AdequateLow 40Details
Commit message · Salvatore Ingala

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

Now both cases are rejected, improving compliance to BIP-174.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 40/100

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 accepted, potentially causing the parser to behave inconsistently or mix up data from one PSBT with another. The fix also clears internal state before parsing, so reusing the same parser object does not accidentally keep old data.

Security candidateragger: fail if a request succeeds without showing the expected screensby Salvatore Ingala · 202d352a · Nov 5, 2026 · 7 filesMessage 73 · AdequateInformational 15Details
Commit message · Salvatore Ingala

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

The navigation only advanced through the instruction groups while an APDU
was pending, so a request that completed without showing the expected
review was accepted, and its screens were never compared.

Require every instruction group to be navigated when a request succeeds.
The only exception is a final status screen, since the response APDU is
sent before showing it.

A few of the instructions were outdated and contained useless extra
instructions, so they were removed. The silent MuSig2 round 1 is no longer
given the instructions meant for the signing review.

The navigation settings of a call also applied to nested calls (for
example, the address check in register_wallet) and, after an exception,
to later calls. They now apply to the requests of that call only.

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 path
AI analysis · Informational 15/100

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 tests fail if the expected screens are not shown, and it tidies up some test instructions. It does not change the security behavior of the device firmware or the wallet application that users interact with.

Security candidateunit tests: Fix length overflow in unit-test PSBT parserby Salvatore Ingala · 6a2a9262 · Nov 5, 2026 · 1 fileMessage 88 · StrongLow 37Details
Commit message · Salvatore Ingala

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

Avoid addition that could be larger than UINT64_MAX and wrap around,
causing a bogus length to reach the mock dispatcher.

Also make psbt_parse() reject trailing bytes after the last output map.

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 boundarymemory safetysigning or wallet path
AI analysis · Low 37/100

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 dispatcher in tests. It also adds a check that no unexpected trailing bytes remain after parsing. The fix only affects unit-test code, not the actual Ledger app that runs on devices.

Security candidaterust client: reject PSBTv2-only fields when converting a PSBTv0by Salvatore Ingala · 602055d6 · Nov 4, 2026 · 1 fileMessage 73 · AdequateLow 48Details
Commit message · Salvatore Ingala

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

Reject all the global, input and output fields that BIP-370 excludes
from PSBTv0, whatever their keydata, before converting to PSBTv2.
This avoids accidentally overwriting the intended value from the
unsigned transaction.

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 path
AI analysis · Low 48/100

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 from the unsigned transaction, potentially changing transaction details such as locktime. The patch now rejects such fields before conversion.

Security candidateReject PSBTv2-only fields when converting a PSBTv0 in the JS clientby Salvatore Ingala · a1f6dc84 · Nov 4, 2026 · 2 filesMessage 73 · AdequateModerate 51Details
Commit message · Salvatore Ingala

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

Reject all the global, input and output fields that BIP-370 excludes
from PSBTv0 before converting, instead of silently overwriting the
(possibly) intended value.

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 path
AI analysis · Moderate 51/100

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 only legal in version 2. Those fields could silently override important transaction details, such as when the transaction can be spent (the locktime). The change now rejects such files with an error instead of converting them, preventing accidental or malicious transaction tampering from being hidden.

Security candidateReject duplicate keys and truncated maps when parsing PSBT maps in sign_psbtby Salvatore Ingala · 75df80f9 · Nov 4, 2026 · 4 filesMessage 73 · AdequateHigh 72Details
Commit message · Salvatore Ingala

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

parse_stream_to_map silently kept the last value of a repeated key, so a
PSBTv2 object whose unknown entries collided with a typed key could make
the client commit to maps different from the typed fields of the object.

Further tightening: also fail on truncated maps and on trailing data
after the PSBT maps in sign_psbt. PSBT.deserialize now rejects trailing
data, missing map separators and truncated strings too: for bytes and
base64 inputs, the PSBT is reserialized before reaching the checks in
sign_psbt, which would drop the trailing data and restore the missing
bytes.

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 path
AI analysis · High 72/100

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 PSBT could use this to make the device commit to one set of data while the client software saw another, potentially causing the user to sign a transaction different from what they reviewed. The fix also rejects truncated PSBTs and extra trailing data, which could otherwise be silently repaired during reserialization and hide attacks.

Security candidatedoc: document the MUSIG2_SESSION_ID PSBT fieldby Salvatore Ingala · 8d8ed9af · Oct 21, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Salvatore Ingala

doc: document the MUSIG2_SESSION_ID PSBT field

Describe the field (key, value, semantics), how psbt_session_id commits to
it, and mention the eviction of the oldest session when the storage is full.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarydocumentation-only discount
AI analysis · Informational 15/100

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. There are no code changes in the diff, so it does not by itself fix or introduce a security vulnerability.

Security candidatesign_psbt: fail before the UI if the MuSig2 session is missingby Salvatore Ingala · 2d04b144 · Oct 21, 2026 · 7 filesMessage 73 · AdequateLow 26Details
Commit message · Salvatore Ingala

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

In MuSig2 round 2, the session was only looked up while signing, after the
user had already reviewed and approved the transaction; a missing session
then resulted in an error, and in a "Transaction rejected" screen.

With pubnonces generated in advance, a missing session is an expected case
(for example, it was evicted when the storage was full). The session id only
depends on the wallet policy and on the MUSIG2_SESSION_ID, so its existence
is now checked before the transaction is shown, without deleting it or
accessing its content if present.

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 path
AI analysis · Low 26/100

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 the error after the user had already reviewed and approved the transaction on screen, causing a confusing 'Transaction rejected' message. Now, the app checks for the session before showing the transaction to the user, so it fails earlier and more clearly. There is no direct evidence this fixes a security vulnerability, but it reduces the chance of user confusion and wasted approvals.

Security candidatemusig_sessions: evict the oldest session when the storage is fullby Salvatore Ingala · 4c26f17d · Oct 21, 2026 · 3 filesMessage 78 · AdequateLow 30Details
Commit message · Salvatore Ingala

musig_sessions: evict the oldest session when the storage is full

Addresses the TODO by making sure that the oldest session is the evicted
one.

Each stored session now has a counter, larger than the counters of all
the other stored sessions; when there is no free slot, the session with
the smallest counter is evicted. To keep each session in a single 64-byte
NVRAM page, only the first 28 bytes of the psbt_session_id are stored.

The counter is enough for 2^32-1 sessions, so there is no practical risk
of overflow.

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 boundarymemory safetysigning or wallet path
AI analysis · Low 30/100

This commit changes how the Ledger Bitcoin app manages saved MuSig2 signing sessions in its limited persistent storage. Previously, when storage was full, the app would simply overwrite the first slot, which could discard a newer session instead of the oldest one. The fix adds an age counter so the oldest session is always evicted first. It also shrinks the stored session data to fit within a single memory page, storing only a 28-byte prefix of the session ID instead of the full 32 bytes. The commit itself treats this as a robustness improvement rather than a security fix, and there is no disclosed vulnerability or attacker benefit shown in the diff.

Security candidatesign_psbt: commit to the optional MUSIG2_SESSION_ID in psbt_session_idby Salvatore Ingala · ef7116ce · Oct 21, 2026 · 8 filesMessage 73 · AdequateLow 34Details
Commit message · Salvatore Ingala

sign_psbt: commit to the optional MUSIG2_SESSION_ID in psbt_session_id

This allows software wallets to manage several in flight MuSig2 rounds
for the same wallet policy by adding distinct MUSIG2_SESSION_IDs for
each of them; if used in Round 1, the same value must be used in
Round 2.

If the field is absent, psbt_session_id still only depends on the
wallet policy.

A present but empty or too long value is rejected with
EC_SIGN_PSBT_INVALID_MUSIG2_SESSION_ID. Accepted values are at least
1 and at most 32 bytes long.

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 path
AI analysis · Low 34/100

This commit adds an optional 'session ID' field to MuSig2 multi-signature signing sessions in Ledger's Bitcoin app. Previously, the device could only track one unfinished signing session per wallet policy; starting a second one would overwrite the first. The change lets wallet software label each session with a unique ID so multiple signing rounds can run in parallel. It also rejects malformed IDs (empty or too long). This is a feature enhancement that reduces the chance of a wallet accidentally mixing up or losing in-flight signing sessions.

Security candidatepython client: first-class MUSIG2_SESSION_ID fieldby Salvatore Ingala · f7d93d18 · Oct 20, 2026 · 2 filesMessage 73 · AdequateInformational 18Details
Commit message · Salvatore Ingala

python client: first-class MUSIG2_SESSION_ID field

Add PSBT.musig2_session_id, for the proprietary global field with
identifier "MUSIG2_SESSION_ID", subtype 0 and no keydata. It will
be used in the next commits to allow a software wallet to handle
parallel MuSig2 signing sessions for the same wallet policy.

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 path
AI analysis · Informational 18/100

This commit adds support in Ledger's Python PSBT library for a new optional metadata field called MUSIG2_SESSION_ID. It is a preparatory client-side change for upcoming MuSig2 multi-signature features. The commit does not change any device firmware, cryptographic operations, or security-critical logic; it only lets the Python client recognize, parse, and serialize this new PSBT field correctly.

Security candidateMerge pull request #571 from LedgerHQ/musig-test-vectorsby Salvatore Ingala · 0cb80dd4 · Oct 14, 2026 · 5 filesMessage 68 · AdequateLow 44Details
Commit message · Salvatore Ingala

Merge pull request #571 from LedgerHQ/musig-test-vectors

Add musig unit test vectors

68/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
fuzzing or regression evidencecryptography-sensitive pathmerge-commit duplicate discount
AI analysis · Low 44/100

This commit adds a safety check to a cryptographic helper used in Bitcoin Taproot/MuSig2 operations. The function now rejects x-coordinates that are equal to or larger than the prime number defining the secp256k1 curve, instead of potentially allowing them to be silently reduced. The commit also adds many unit tests, including official BIP-327 MuSig2 test vectors, to verify the implementation behaves correctly. The change is defensive and improves robustness against malformed public keys and nonces.

Security candidateLimit legacy multisig to 15 keys maximum, per consensus limitsby Salvatore Ingala · c43c3901 · Oct 12, 2026 · 3 filesMessage 85 · StrongModerate 58Details
Commit message · Salvatore Ingala

Limit legacy multisig to 15 keys maximum, per consensus limits

The redeem script would otherwise be bigger than 520 bytes, which
is the consensus limit; therefore, such scripts are unspendable
and funds sent to such addresses would be lost.

Therefore, we prevent registration altogether.

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
consensus or confidential-proof validationsigning or wallet path
AI analysis · Moderate 58/100

This commit fixes a bug in Ledger's Bitcoin app where users could register a wallet policy for a legacy P2SH multisig with up to 16 public keys. Such a redeem script would be larger than the 520-byte Bitcoin consensus limit, making the coins unspendable and effectively lost. The patch caps legacy P2SH multisig at 15 keys and rejects anything larger during wallet registration. It does not affect SegWit P2WSH or nested sh(wsh(...)) wallets, which have different limits.

Security candidateMerge pull request #552 from LedgerHQ/musig-pregen-noncesby Salvatore Ingala · bc76e7b6 · Oct 9, 2026 · 8 filesMessage 73 · AdequateLow 37Details
Commit message · Salvatore Ingala

Merge pull request #552 from LedgerHQ/musig-pregen-nonces

Allow pregenerating nonces for future MuSig2 signing

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
signing boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 37/100

This commit changes how the Ledger Bitcoin app prepares nonces for MuSig2 multi-signature transactions. Previously, the nonce derivation included transaction-specific data, so a wallet had to know the exact transaction before asking the device for nonces. Now the nonces depend only on the wallet policy and input/key indexes, allowing a wallet to pre-generate nonces on one transaction and later use them for a different transaction of the same wallet policy. The change is intentional and documented, but it narrows session identity to the wallet policy: only one pending signing session is allowed per wallet policy, and starting a new round 1 silently replaces the old one. The commit also adds a check that the pubnonce in the PSBT matches the one the device would recompute, so a replaced session fails cleanly in round 2.

Security candidateMerge pull request #536 from LedgerHQ/bip322by Salvatore Ingala · 765aa7ca · Oct 9, 2026 · 298 filesMessage 68 · AdequateLow 35Details
Commit message · Salvatore Ingala

Merge pull request #536 from LedgerHQ/bip322

BIP-322 v2.0.0 signed messages and proofs of reserves

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
secret or key materialcryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 35/100

This commit adds a new feature to the Ledger Bitcoin app: support for BIP-322 generic signed messages and proof-of-funds. It lets users sign messages and prove ownership of coins through a PSBT, with on-screen review. The change is a feature addition, not a documented security fix, but it touches sensitive signing code and introduces new validation rules that could affect app safety if implemented incorrectly.

Security candidateVerify Schnorr signatures before returning themby Salvatore Ingala · 39cc6bb2 · Oct 8, 2026 · 1 fileMessage 83 · StrongLow 47Details
Commit message · Salvatore Ingala

Verify Schnorr signatures before returning them

As an optional but recommended check in BIP-340, verify that each
produced Schnorr signature is valid before returning it, as a
defense-in-depth measure to detect computational integrity failures
during signing.

83/100 · StrongMessage clarity
✓ 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 · Low 47/100

This commit adds a safety check to the Ledger Bitcoin app: after creating a Schnorr signature, the app now immediately verifies that signature using the public key. If verification fails, the app aborts and returns an error instead of handing out a potentially malformed signature. This is a defense-in-depth measure against rare hardware or computation faults during signing, not a fix for a known exploitable bug.

Security candidateUse BIP-340 synthetic nonces for Schnorr signaturesby Salvatore Ingala · e2efbae9 · Oct 8, 2026 · 1 fileMessage 78 · AdequateModerate 63Details
Commit message · Salvatore Ingala

Use BIP-340 synthetic nonces for Schnorr signatures

Instead of only relying on the TRNG, pass the randomness from the TRNG
as aux_rand and use mode CX_RND_PROVIDED, which computes the synthetic
nonce as per BIP-340 recommendations.

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
entropy or randomnesssigning boundarysigning or wallet path
AI analysis · Moderate 63/100

This commit changes how the Ledger Bitcoin app creates Schnorr (BIP-340) signatures. Previously it relied entirely on the device's hardware random number generator (TRNG) for the signing nonce. Now it feeds TRNG output as auxiliary randomness into BIP-340's synthetic nonce derivation. This is a defensive hardening measure: even if the TRNG were to fail or produce weak values, the nonce still depends uniquely on the private key and message, reducing the risk that two signatures leak the secret key.

Security candidatePrevent registering policies with too many internal key expressionsby Salvatore Ingala · ba19c8d1 · Oct 8, 2026 · 3 filesMessage 73 · AdequateLow 45Details
Commit message · Salvatore Ingala

Prevent registering policies with too many internal key expressions

Signing would fail for wallet policies with more than
MAX_INTERNAL_KEY_EXPRESSIONS internal key expressions, therefore it
is better to avoiding their registration altogether.

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 path
AI analysis · Low 45/100

This commit adds a safety check in Ledger's Bitcoin app so that users cannot register wallet policies that the device would later be unable to sign for. Specifically, it rejects policies containing more than the supported number of internal key expressions. Previously, such policies could be registered but signing would fail later; now registration itself is blocked with a clear error code.

Security candidatePrevent registration of policies with musigs we cannot fully signby Salvatore Ingala · 06569553 · Oct 8, 2026 · 3 filesMessage 78 · AdequateLow 39Details
Commit message · Salvatore Ingala

Prevent registration of policies with musigs we cannot fully sign

In MuSig2 signing, the app only produces one partial signature per
key expression that contains internal keys. Therefore, if a key
expression contains several internal keys, it would not be possible
to complete the full signing protocol.

It seems useless anyway to create such policies, so we just filter
them out at registration time to make sure we don't let users
register policies they would later be unable to sign for.

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 boundarysigning or wallet path
AI analysis · Low 39/100

This commit adds a safety check in Ledger's Bitcoin app to stop users from registering wallet policies that contain a MuSig2 group with more than one Ledger-managed internal key. The app can only produce one partial signature per MuSig2 group, so such policies would be impossible to fully sign later. The change rejects the registration early with a clear error code, preventing users from accidentally creating a wallet they could not spend from.

Security candidateAdd unit tests for musig.c based on the BIP-327 test vectorsby Salvatore Ingala · d223be93 · Oct 7, 2026 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Salvatore Ingala

Add unit tests for musig.c based on the BIP-327 test vectors

Covers the key_sort, key_agg, nonce_agg, sign_verify (signing cases only)
and tweak vectors that apply to the subset of BIP-327 implemented in the
app. Key aggregation with tweaks is tested via musig_sign.

None of the official nonce_gen vectors match the restricted inputs
supported by musig_nonce_gen (no sk, msg nor extra_in; aggpk always
present), so its expected values are computed with nonce_gen_internal
from the BIP-327 reference implementation.

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
signing boundaryfuzzing or regression evidence
AI analysis · Informational 15/100

This commit only adds new unit tests for an existing MuSig2 cryptographic implementation in a Ledger Bitcoin app. It does not change any production code, fix bugs, or alter behavior. The tests verify that the existing code produces the correct outputs for standard BIP-327 test vectors and rejects invalid inputs. There is no security vulnerability introduced here.

Security candidatecrypto_tr_lift_x: reject x-coordinates not smaller than pby Salvatore Ingala · c84e6725 · Oct 7, 2026 · 3 filesMessage 65 · AdequateLow 47Details
Commit message · Salvatore Ingala

crypto_tr_lift_x: reject x-coordinates not smaller than p

BIP-327 requires rejecting such points, so this improves conformance.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Low 47/100

This commit tightens a cryptographic check in Ledger's Bitcoin app. A function that converts an x-coordinate into a point on the secp256k1 curve now rejects any x value that is equal to or larger than the curve's prime field size. Before, such values could be silently reduced modulo the prime, potentially producing a valid point that BIP-327 says must be rejected. The change improves standards conformance and removes a subtle way to feed the function an out-of-range input.