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

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

sign_psbt: review BIP-322 message signing requests as messages

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

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

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

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

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

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

Not allowed during swap.

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

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

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

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

ui: add the BIP-322 message review flow

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

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

Not used yet.

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

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

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

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

bip322: add the BIP-322 primitives

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

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

Not used yet.

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

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

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

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

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

Merge pull request #570 from LedgerHQ/python_bip322

python client: first-class PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE field

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

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

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

test_utils: deduplicate the musig2 key aggregation helpers

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

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

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

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

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

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

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

python client: first-class PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE field

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

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

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

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

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

Clear the sign_psbt state on every exit path of handler_sign_psbt

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

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

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

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

Test that the session is actually deleted once round 2 starts

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

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

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

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

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

Make the MuSig2 psbt_session_id independent of the transaction

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

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

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

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

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

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

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

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

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

Verify the pubnonce in the PSBT during round 2 of MuSig2

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

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

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

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

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

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

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

Merge pull request #568 from LedgerHQ/locktimes

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

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

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

Extract a single helper for MuSig2 nonce derivation

The code was repeated essentially verbatim in both rounds.

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

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

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

Add the MuSig2 nonce pre-generation changes to the changelog

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

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

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

fuzzing: Update manifest and seed corpus generation

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

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

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

Add functional tests for the BIP-370 lock time derivation

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

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

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