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 36 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.

AI review queuedFix ops computation for l: and u: fragmentsby Salvatore Ingala · b6ac1de8 · Oct 22, 2026 · 3 filesMessage 78 · AdequateHigh 74Details
Commit message · Salvatore Ingala

Fix ops computation for l: and u: fragments

The computation was undercounting the number of ops, which would
potentially allow certain policies that are actually unspendable.

Tests generated with Claude Opus 5.5.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · High 74/100

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 are actually impossible to spend from under certain conditions. The fix makes the operation count more conservative so such unspendable policies are rejected. New tests are added to prevent the bug from returning.

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.

AI review queuedmusig_sessions: store up to 32 sessionsby Salvatore Ingala · a6798172 · Oct 21, 2026 · 4 filesMessage 78 · AdequateInformational 15Details
Commit message · Salvatore Ingala

musig_sessions: store up to 32 sessions

The previous limit of 8 is rather small, as a user might have multiple
accounts using MuSig2, each of them in a wallet that pre-generates
nonces.

Filling the whole storage makes the eviction test rather slow, so it
now only runs with --enable_slow_tests.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

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 pre-generate nonces could hit the old limit. The documentation and a test constant are updated to match, and the full-storage eviction test is made optional because filling 32 sessions is slow.

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.

AI review queuedMerge pull request #574 from LedgerHQ/harden-bip340by Salvatore Ingala · 92d330c2 · Oct 19, 2026 · 1 fileMessage 58 · ThinModerate 59Details
Commit message · Salvatore Ingala

Merge pull request #574 from LedgerHQ/harden-bip340

Improve BIP-340 conformance

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
defensive validationsigning or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100

This commit hardens how the Ledger Bitcoin app creates Schnorr (BIP-340) signatures when signing Bitcoin transactions. It now injects its own auxiliary randomness and asks the device's crypto library to use it, then verifies every signature before releasing it. These changes reduce the risk that a broken random number generator or a computation fault could produce a weak or invalid signature that might leak the private key or be rejected by the network.

AI review queuedMerge pull request #573 from LedgerHQ/misc-fixesby Salvatore Ingala · 017aee47 · Oct 14, 2026 · 7 filesMessage 53 · ThinModerate 59Details
Commit message · Salvatore Ingala

Merge pull request #573 from LedgerHQ/misc-fixes

Miscellaneous fixes

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100

This commit fixes three separate safety checks in Ledger's Bitcoin app. First, it prevents the app from building a response larger than the APDU buffer, which could previously overwrite the status word. Second, it refuses to register wallet policies containing multisig setups inside old-style P2SH scripts with more than 15 public keys, because Bitcoin consensus rejects scripts larger than 520 bytes. Third, it now rejects wallet policies at registration time that the device would later be unable to sign for, specifically policies where a single MuSig2 group contains more than one internal key, or where more than 8 key expressions involve internal keys. These are hardening fixes rather than a single critical vulnerability.

Lower-priorityAccept maximum-length responses in ioe_finalize_responseby Salvatore Ingala · 2d60945b · Oct 14, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Accept maximum-length responses in ioe_finalize_response

A response length of exactly IO_APDU_BUFFER_SIZE - 2 should be
accepted, rather than returning SW_WRONG_RESPONSE_LENGTH. Also,
this aligns it to the behaviour of ioe_add_to_response.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
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.

Lower-priorityGuard against underflow in ioe_add_to_responseby Salvatore Ingala · c69379f8 · Oct 8, 2026 · 1 fileMessage 60 · AdequateTriage 8Details
Commit message · Salvatore Ingala

Guard against underflow in ioe_add_to_response

Hardening for future purposes; not happening today as no response
can be that long.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
defensive validation
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.

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.

Lower-priorityunit-tests: cover the merkleized map wrappers of check_merkle_tree_sortedby Salvatore Ingala · 742de176 · Oct 2, 2026 · 1 fileMessage 83 · StrongTriage 8Details
Commit message · Salvatore Ingala

unit-tests: cover the merkleized map wrappers of check_merkle_tree_sorted

call_check_merkleized_map_sorted_with_callback() and its
call_check_merkleized_map_sorted() wrapper had no unit tests. The new
tests check that the callback is invoked once per key, in order, with
the map commitment, and before the map is marked as validated; that the
map is marked as validated when the walk succeeds (including for an
empty map); and that it ends up marked as not validated when the keys
are not sorted or the size does not match the keys tree, even if it was
marked as validated before the call.

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
defensive validation
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.

Lower-prioritycheck_merkle_tree_sorted: add a callback variant for merkleized mapsby Salvatore Ingala · 51508b79 · Oct 2, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Salvatore Ingala

check_merkle_tree_sorted: add a callback variant for merkleized maps

call_check_merkleized_map_sorted_with_callback() checks that the keys
of a merkleized map are sorted, like call_check_merkleized_map_sorted(),
and also calls a callback on each key. As every key is authenticated
against the committed keys root during the walk, this is a sound way to
learn which keys are present in the map, at no extra round trip cost.
call_check_merkleized_map_sorted() becomes a wrapper with no callback.

No functional change.

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

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context