BB
← All projectsBitBox

BitBox02 firmware

Firmware and bootloader for BitBox02 signing devices.

BitcoinHardware walletsNormal
Repository coverage

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

314security candidates186second-pass queue827AI analyses
88commits · 30 days
149commits · 60 days
340commits · 180 days
723commits · 365 days
Backfill bands
Aug 5 → Feb 6335 seen28 candidatesComplete
Feb 6 → Jun 6265 seen19 candidatesComplete
Jun 6 → Jul 619 seen5 candidatesComplete
Jul 6 → Aug 526 seen3 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.

59/100 average clarity
86Strong · 80–100
381Adequate · 60–79
381Thin · 40–59
90Opaque · 0–39
27security 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.
Marko Bencun504157459656
benma's agent15566140267
Niklas Dusenlund17151144057
Cedric Wiese24919051
NickeZ Agent1669077
cedwies12512063
Sebastian Sutter655060
Tomas Vrba12410068
Yasser Aziza333070
Jad14210060
benma312069
Niklas211054
Analysis record

Published AI watches

Last scanned 24 minutes ago

Informational 12 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/remove-aes-hmac-c-exports'

This commit removes unused C-language export functions for AES encryption/HMAC from the BitBox02 firmware's Rust code. It is a cleanup change: the functions are deleted, the crate is no longer included in firmware builds, and simulators st…

Reduction of C FFI attack surface by removing no_mangle AES/HMAC exportsDependency cleanup: bitbox-aes no longer linked into firmware or simulatorsNo patch of an identified vulnerability in cryptographic logic
0b6365c6by Marko Bencun+2−5913 files
No security note in commit
Low 43 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/btc-root-xpub-m49'

This firmware update makes two changes to how the BitBox02 hardware wallet handles Bitcoin-related requests. First, it blocks apps from exporting the wallet's master public key (the 'root xpub') at the top-level path 'm/'. Second, it allow…

Root xpub export blocked at empty keypath (m/)Changelog describes root-xpub restriction as a security-relevant changeExternal service message signing expanded to m/49 unhardened purpose
5294645cby Marko Bencun+79−195 files
Vendor flagged security relevance
Informational 17 AI analysisMessage 78 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

cipher: remove unused AES-HMAC C exports

This commit removes two unused C-language bridge functions that wrapped an AES-HMAC encryption/decryption module. The functions themselves were not called from C code; the firmware now calls the same encryption logic directly from Rust. Re…

Removal of C FFI wrappers that could panic on malformed inputsCommit message acknowledges potential panic conditions (invalid IV length, undersized output buffer)No functional change to the underlying AES-HMAC implementation
090a263fby benma's agent+2−5913 files
Vendor flagged security relevance
Low 34 AI analysisMessage 85 · Strong
BB BitBoxBitBox02 firmware BitcoinHardware wallets

u2f: bound DER signature component reads

This commit fixes a small but real bug in how U2F signature components are converted to DER format. The old code could strip too many leading zeros and then read past the end of a 32-byte signature piece, potentially producing an invalid o…

Out-of-bounds read at component boundary during DER encodingPotential malformed DER output for all-zero signature componentDefensive hardening in U2F signature handling
dd17bed7by benma's agent+21−43 files
Vendor flagged security relevance
Low 30 AI analysisMessage 78 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

btc: allow message signing under m/49

This commit expands the BitBox02 hardware wallet's Bitcoin message-signing feature to also accept key paths starting with the unhardened purpose 'm/49'. Previously only hardened m/45' and m/48' were treated as valid 'external service' keyp…

Relaxation of keypath allowlist for message signingUnhardened purpose m/49 added to external-service signing namespaceUser confirmation prompt still required ('External service key')
1f377f72by benma's agent+63−194 files
No security note in commit
High 72 AI analysisMessage 73 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

btc: reject master xpub exports

This commit closes a security gap in the BitBox02 hardware wallet's Bitcoin API. Previously, a host app could ask the device to export the 'master xpub' (the public key at the very top of the wallet, keypath m/). Combined with any leaked p…

Master xpub export preventedPrivate-key derivation risk described in commit messageUnhardened path key compromise scenario
c4524b15by benma's agent+16−02 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge branch 'nickez-agent/configure-stage1-embedding'

This commit is a build-system refactor for the BitBox02 hardware wallet firmware. It replaces a set of separate 'bootloader upgrade' firmware images with a configurable option to embed the same bootloader update data into the normal firmwa…

70a32f5bby Niklas Dusenlund+152−33111 files
No security note in commit
High 70 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/merge-firmware-v9.29.0'

This firmware update hardens how the BitBox02 handles SwapKit-style cryptocurrency swaps and Bitcoin multisig addresses. It adds a new 'refund memo' to payment requests so the device can verify that any refund address belongs to the same w…

CHANGELOG labels prior changes as 'Bitcoin security fixes (multisig keypath and previous-transaction hash length validation)'CHANGELOG labels v9.29.0 as 'Require wallet-owned refund addresses for SwapKit'New RefundMemo protobuf message with address and optional derivation info
9b16af63by Marko Bencun+867−12411 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/merge-bootloader-v1.2.3'

This commit hardens the BitBox02 bootloader's stored version-rollback protection data. It adds a SHA-256 checksum over the firmware and signing-key version 'floors' and a one-time migration marker, so the device can detect tampering or cor…

Adds integrity checksum (SHA-256) for anti-rollback version floors in bootloader flash dataIntroduces one-time migration marker to prevent repeated downgrade/migration windowsProduction bootloader now aborts on invalid bootdata instead of silently reinitializing it
a4ddb764by Marko Bencun+2124−3123 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/high-fee-wording-v9.27.2'

This commit only updates test data and test expectations to reflect that a wording change for high Bitcoin transaction fees was released in firmware version 9.27.2 instead of 9.28.0. It does not change any device firmware code, security lo…

00f9eb22by Marko Bencun+65−1123 files
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

btc: fix high-fee wording cutoff in vectors

This commit only updates test data and test expectations for the BitBox02 firmware. It changes which firmware versions are expected to show an old versus new high-fee warning message, because the real firmware already started showing the n…

dc5702d0by benma's agent+65−1123 files
No security note in commit
High 77 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/stage0-reject-zero-signatures'

This update hardens the BitBox02 hardware wallet's bootloader so it refuses to accept a firmware update signed with an all-zero signature. Previously, the cryptographic verification routine could treat a zero-filled signature as valid unde…

Rejects all-zero ECDSA signatures that may verify as validAdds volatile signature read to mitigate LTO-based read eliminationORs all signature bytes without early exit to ensure full-byte inspection
aec4595dby Marko Bencun+81−22 files
No security note in commit
Low 35 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/stage1-pairing-lifecycle'

This update fixes a Bluetooth pairing bug in the BitBox02 Nova hardware wallet. When the device switched from Bluetooth back to USB mode, it could keep an old pairing request active. The fix clears that stale pairing state so the device do…

Clearing of stale Bluetooth pairing state on mode switchPairing code/request flag left set across BLE->USB transition before fixBluetooth pairing lifecycle change in bootloader startup path
1047430dby Marko Bencun+7−65 files
Vendor flagged security relevance
Low 47 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge remote-tracking branch 'agent/benma-agent/silent-payment-constant-time-ecdh'

This commit changes how the BitBox02 hardware wallet computes a secret value used in Bitcoin silent payments. Previously, the device used a function that could leak timing information about the secret key through how long the calculation t…

Constant-time cryptographic operation addedVariable-time secret-key multiplication removedSide-channel hardening for silent payments
c1590222by Marko Bencun+21−122 files
No security note in commit
Moderate 59 AI analysisMessage 68 · Adequate
BB BitBoxBitBox02 firmware BitcoinHardware wallets

btc: use constant-time ECDH for silent payments

This commit hardens the BitBox02 hardware wallet's silent-payments feature against a side-channel attack. Previously, the device multiplied a secret key with a public key using a routine whose execution time could leak information about th…

Constant-time cryptographic operation introduced to replace variable-time secret-key multiplicationVariable-time scalar multiplication retained only on public operandsSilent payments private input key material (a_sum) no longer used in variable-time path
7e741cfdby benma's agent+21−122 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 50 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge branch 'nickez-agent/pin-protobuf-generators'

This commit is a build-system and developer-environment change. It pins the protobuf compiler and related Python tools to specific versions via a project-managed Python virtual environment, instead of relying on whatever version a develope…

Pinning build tools to exact versions reduces non-determinism in generated codeMoves protobuf compiler from system/Docker-installed binary to a version-locked Python wheelNo changes to firmware, cryptography, authentication, or device protocol logic
d072b0f9by Niklas Dusenlund+107−6411 files
No security note in commit
Informational 15 AI analysisMessage 92 · Strong
BB BitBoxBitBox02 firmware BitcoinHardware wallets

build: prefer local protoc for Rust bindings

This commit changes the build script that generates Rust code from protobuf definitions. It makes the build prefer a specific local copy of the protobuf compiler (protoc) installed in the repository's virtual environment, rather than relyi…

de8be632by NickeZ Agent+4−01 file
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
BB BitBoxBitBox02 firmware BitcoinHardware wallets

build: use IPv4 for container downloads

This change forces the build system to use IPv4 instead of IPv6 when downloading tools and software packages during Docker image creation. It is a build reliability fix for GitHub Actions CI runners that lack IPv6 connectivity, not a secur…

bc434dcfby NickeZ Agent+6−41 file
No security note in commit
Informational 15 AI analysisMessage 80 · Strong
BB BitBoxBitBox02 firmware BitcoinHardware wallets

build: check regenerated protobuf bindings

This change improves a build/CI script that checks whether automatically generated protobuf binding files are up to date. It now also checks Python bindings and deletes old generated files before regenerating them, so stale files cannot hi…

No security-relevant code changeBuild/CI hardening onlyNo vulnerability fix or exploit mitigation present in diff
ff3f7474by NickeZ Agent+13−22 files
No security note in commit
Informational 15 AI analysisMessage 45 · Thin
BB BitBoxBitBox02 firmware BitcoinHardware wallets

Merge branch 'translate-passphrase-on-host'

This commit is a localization (translation) update for the BitBox02 hardware wallet. It replaces hard-coded English text strings in the passphrase unlock feature with calls to the device's internationalization system, so the same messages …

4dfa26b4by Marko Bencun+33−103 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 candidaterust: since rust 1.64, bindgen can use the c types from coreby Niklas Dusenlund · 9e5ebf7e · Aug 27, 2025 · 14 filesMessage 65 · AdequateLow 29Details
Commit message · Niklas Dusenlund

rust: since rust 1.64, bindgen can use the c types from core

There was a bug also, (u)int is 32bits on 64 byte systems.

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

This commit updates the BitBox02 firmware's Rust code to use Rust's built-in C type definitions instead of a custom module. The commit message notes a bug: the custom module incorrectly defined 'unsigned int' as 64 bits on 64-bit systems, when it should always be 32 bits. The change removes the buggy custom type definitions and switches to the standard Rust core::ffi types. This is primarily a code-quality and correctness fix, but the wrong type sizes could have caused subtle memory or interface mismatches between Rust and C code, especially during testing on 64-bit computers.

Security candidatebitbox02-rust-c: fix wrong features in platform-bitbox02plusby Marko Bencun · 59a4c0ff · Aug 27, 2025 · 1 fileMessage 65 · AdequateInformational 19Details
Commit message · Marko Bencun

bitbox02-rust-c: fix wrong features in platform-bitbox02plus

This platform is only activated in Nova bootloaders, where we don't
need these deps.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
update trust
AI analysis · Informational 19/100

This is a tiny build-configuration fix for a specific BitBox02 hardware variant (the 'BitBox02 Plus' platform used in Nova bootloaders). The change removes two optional Rust dependencies that were accidentally enabled for that platform. The commit message says those dependencies are not needed there. There is no direct evidence in the commit of a security vulnerability; it looks like a cleanup to avoid compiling unnecessary code in the bootloader.

Security candidatemove bip39 functionby Marko Bencun · 14417b14 · Aug 27, 2025 · 5 filesMessage 43 · ThinInformational 15Details
Commit message · Marko Bencun

move bip39 function

The bitbox02 crate is meant to wrap C code, which this function is not
doing anymore.

43/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides an explanatory body
Why it was queued
secret or key materialcryptography-sensitive path
AI analysis · Informational 15/100

This commit simply moves a helper function that looks up a BIP39 word by its index from one Rust module to another. The code itself is unchanged, and there is no indication of a security fix or vulnerability.

Security candidateport bip39 functionality from libwally-core to rust-bip39by Marko Bencun · 04833009 · Aug 27, 2025 · 11 filesMessage 85 · StrongLow 27Details
Commit message · Marko Bencun

port bip39 functionality from libwally-core to rust-bip39

rust-bip39 is much faster than libwally, so the unlock animation is
speed up so that the last animation frame lingers for a bit, otherwise
the change felt too abrupt.

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
secret or key materialcryptography-sensitive path
AI analysis · Low 27/100

This commit replaces the BIP39 (seed phrase) implementation inside the BitBox02 hardware wallet from one library (libwally-core) to another (rust-bip39). The main user-visible reason is speed: unlocking the device is now faster, so the unlock animation was shortened. The change touches how seed phrases are converted to cryptographic seeds and how individual BIP39 words are looked up. There is no direct evidence in the commit that this fixes a known security bug, but any change to cryptographic code can introduce subtle risks, so it deserves careful review.

Security candidateu2f: port app_string to Rust using rust-bip39 for the short mnemonicby Marko Bencun · 1a5d05cb · Aug 26, 2025 · 6 filesMessage 73 · AdequateInformational 19Details
Commit message · Marko Bencun

u2f: port app_string to Rust using rust-bip39 for the short mnemonic

Introducing rust-bip39 to get rid of libwally's bip39, starting with
u2f, where libwally was used to create the short mnemonic for unknown
sites.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key material
AI analysis · Informational 19/100

This commit rewrites a small part of the BitBox02 U2F feature from C to Rust. When you register or authenticate with an unknown website, the device shows a short mnemonic phrase instead of a site name. The change swaps the old libwally BIP39 library for the Rust bip39 crate to generate that phrase. It is a routine refactoring/porting change; there is no direct evidence it fixes or introduces a security vulnerability, though any rewrite can carry subtle bugs.

Security candidaterust: add bip39 dep and vendor itby Marko Bencun · f7f7fbe7 · Aug 26, 2025 · 29 filesMessage 45 · ThinInformational 18Details
Commit message · Marko Bencun

rust: add bip39 dep and vendor it

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
secret or key materialcryptography-sensitive path
AI analysis · Informational 18/100

This commit adds a new software library (a BIP-39 implementation for handling recovery seed phrases) to the BitBox02 firmware and stores a copy of it inside the project's source tree (vendoring). It does not change any device behavior by itself; it is purely a dependency addition. There is no direct evidence in the commit of a security vulnerability, but adding a new dependency always slightly increases the attack surface and supply-chain risk.

Security candidatetest: unify unit-test/simulator mocks and fakes into libraryby Niklas Dusenlund · 919d157b · Aug 26, 2025 · 41 filesMessage 72 · AdequateInformational 15Details
Commit message · Niklas Dusenlund

test: unify unit-test/simulator mocks and fakes into library

72/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
seed or entropy path
AI analysis · Informational 15/100

This commit is a pure test-infrastructure refactoring. It merges duplicate mock and fake hardware-implementation files that previously existed separately for unit tests and the simulator into a single shared library called 'hardware-mocks'. It also adjusts Rust build flags so RTT logging only compiles for the real firmware target (target_os='none'). There is no change to the actual device firmware or to any security-critical runtime behavior.

Security candidatescreen: Abstract out oled functionsby Niklas Dusenlund · 72e8aa24 · Aug 21, 2025 · 15 filesMessage 72 · AdequateInformational 15Details
Commit message · Niklas Dusenlund

screen: Abstract out oled functions

The oled functionality needs to be an interface so that we can replace
those functions in a simulator

72/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit is a routine code cleanup that turns the screen drawing code into a generic interface so the same code can run on both the real device and a software simulator. It does not fix or introduce any security issue.

Security candidaterust/bitbox02/keystore: remove Bip39Wordlistby Marko Bencun · 2077f3d6 · Aug 20, 2025 · 3 filesMessage 60 · AdequateInformational 15Details
Commit message · Marko Bencun

rust/bitbox02/keystore: remove Bip39Wordlist

After the previous refactor, this became a thin wrapper, and is not
even wrapping any C function anymore.

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

This commit is a routine code cleanup. It removes a thin Rust wrapper type called Bip39Wordlist and replaces it with direct use of a plain list of word indices. The behavior of the BIP39 wordlist used for entering recovery words on the device stays the same; no security vulnerability is introduced or fixed.

Security candidateui/trinary_input_string: merge autocomplete to optimize speedby Marko Bencun · a3a602bd · Aug 20, 2025 · 1 fileMessage 73 · AdequateInformational 12Details
Commit message · Marko Bencun

ui/trinary_input_string: merge autocomplete to optimize speed

_maybe_autocomplete is folded into _set_alphabet, so we avoid looping
over all bip39 words yet another time, making the keyboard more speedy.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key material
AI analysis · Informational 12/100

This commit is a routine code cleanup in the on-screen keyboard used to type BIP39 wallet recovery words. It merges two functions that both scanned the BIP39 wordlist into one loop, aiming to make typing feel faster. There is no indication in the commit or supplied references that this fixes a security bug.

Security candidateui/trinary_input_string: merge two funcs to optimize speedby Marko Bencun · 966f5415 · Aug 20, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Marko Bencun

ui/trinary_input_string: merge two funcs to optimize speed

_set_can_confirm can be folded into _set_alphabet, so we avoid looping
over all bip39 words a second time, making the keyboard more speedy.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key material
AI analysis · Informational 15/100

This is a harmless code cleanup in the BitBox02 hardware wallet's on-screen keyboard. The developer merged two functions that did similar work into one, so the device no longer loops through the BIP39 word list twice when typing a recovery word. The visible behavior is unchanged; only performance improved.

Security candidateui/trinary_input_string: directly fetch bip39 wordsby Marko Bencun · e6b29798 · Aug 20, 2025 · 5 filesMessage 73 · AdequateInformational 15Details
Commit message · Marko Bencun

ui/trinary_input_string: directly fetch bip39 words

Previously the component was passed an array of string pointers, which
worked well with libwally's static BIP39 word list.

When we want to move to a Rust bip39 wordlist, we can't directly pass
Rust word string pointers (not null terminated).

This commit adapts the component to call a function to get a BIP39
word by index, which can be replaced with a Rust implementation later.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key material
AI analysis · Informational 15/100

This is a routine internal refactoring of how the on-screen keyboard looks up BIP39 seed words. It changes the code from carrying around actual word strings to carrying around word numbers and asking a helper function for the word when needed. There is no security bug being fixed here and no new attack path introduced by the change itself.

Security candidatexpubcache: allow choosing if xpub computation should be repeatedby Marko Bencun · 73836b67 · Aug 19, 2025 · 11 filesMessage 78 · AdequateLow 29Details
Commit message · Marko Bencun

xpubcache: allow choosing if xpub computation should be repeated

End-goal: reduce the number of secure chip ops when signing a BTC
transaction, to reduce the chance of going over the Optiga chip's
"rate limit", which induces throttling.

By default keystore::get_xpub computed the xpub twice, to mitigate
potential bitflips, which could be bad when delivering the wrong
xpub (or derivatives) to the host.

When signing a transaction however, one does not need the extra
protection - if there is a bit flip, the resulting signature will be
invalid.

This commit reduces the number of secure chip ops needed when the
bitflip mitigation is not required.

The existing method `get_xpub` was renamed so the compiler can tell us
all the instances where we need to decide between one or the other.

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 boundarycryptography-sensitive pathsigning or wallet path
AI analysis · Low 29/100

This commit is a performance and reliability optimization, not a typical security bug fix. It lets the BitBox02 firmware choose whether to compute an extended public key (xpub) once or twice. Computing twice helps catch rare hardware bit-flip errors when sharing xpubs with a computer. Computing once reduces workload on the secure chip during Bitcoin transaction signing, lowering the risk of hitting the chip's rate limit and causing throttling. The change is intentional and the security trade-off is documented: during signing, a bit flip would just produce an invalid signature, not leak or lose funds.

Security candidatekeystore: pass private key to nonce_commit() and sign()by Marko Bencun · cb3ddcee · Aug 7, 2025 · 9 filesMessage 78 · AdequateInformational 18Details
Commit message · Marko Bencun

keystore: pass private key to nonce_commit() and sign()

End-goal: reduce the number of secure chip ops when signing a BTC
transaction, to reduce the chance of going over the Optiga chip's
"rate limit", which induces throttling.

With antiklepto, we derived the private key twice for each input that
is signed: once to commit to the nonce, and after that to sign.

This commit decouples the nonce commit and sign functions from the
underlying keystore, and allows reusing a private key instead of
re-deriving it, which requires secure chip operations.

This halves the number of secure chip ops needed per input when
signing a BTC transaction.

We do not reuse the privkey for the other instances of
antiklepto (signing a msg, signing an ETH tx), as there it's one
commit/sign pair only and unlikely to cause secure chip throttling.

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
secret or key materialsigning boundarysigning or wallet path
AI analysis · Informational 18/100

This commit is a performance optimization for the BitBox02 hardware wallet. It changes how Bitcoin transaction signing uses the secure chip, so the device only derives a private key once per transaction input instead of twice. This reduces the chance of hitting the secure chip's rate limit and avoids throttling. The change does not appear to introduce a security flaw; it is a refactoring to reuse an already-derived key for two related signing steps.