BB
← All projectsBitBox

BitBox02 firmware

Firmware and bootloader for BitBox02 signing devices.

BitcoinHardware walletsNormal
Repository coverage

939 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
89commits · 30 days
145commits · 60 days
337commits · 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
382Thin · 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 Dusenlund17251144057
Cedric Wiese24919051
NickeZ Agent1669077
cedwies12512063
Sebastian Sutter655060
Tomas Vrba12410068
Yasser Aziza333070
Jad14210060
benma312069
Niklas211054
Analysis record

Published AI watches

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

Lower-prioritytest: add option for the simulator to write to file.by Nikolas De Giorgis · 5eaaabb3 · Sep 15, 2025 · 2 filesMessage 95 · StrongInformational 20Details
Commit message · Nikolas De Giorgis

test: add option for the simulator to write to file.

If the env variable FAKE_MEMORY_FILEPATH is provided, the simulator will
write to file using three different files:

- ${FAKE_MEMORY_FILEPATH}_shared
- ${FAKE_MEMORY_FILEPATH}_app
- ${FAKE_MEMORY_FILEPATH}_eeprom

mimicking the behaviour used when reading/writing to memory.

This allows us to re-launch the simulator after making changes in the
BBApp (e.g. renaming the device, accounts etc) while testing, simulating
the effect that unplugging/replugging a device would have.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 20/100

This commit adds a testing-only feature to the BitBox02 simulator that lets it save and reload its pretend device memory from files on disk. It is meant to help developers test things like renaming a device without restarting from scratch. The change only affects test/simulator code, not the real hardware wallet firmware, and there is no indication it fixes or introduces a security vulnerability.

AI review queuedkeystore: reduce SC operations in the seed checkby Marko Bencun · 212bf399 · Sep 10, 2025 · 4 filesMessage 80 · StrongLow 29Details
Commit message · Marko Bencun

keystore: reduce SC operations in the seed check

verify_seed() after storing a seed currently re-stretches the
password, which needs 5 securechip events.

We can skip that because we still have access to the stretched
password.

If the check succeeds, but there was an error involving the password
or secure chip (e.g. the stretching result was corrupted the first
time), the consequence is that the user won't be able to unlock, but
the seed itself on the MCU, on the backup and retained (encrypted) in
seed is unaffected. That trade-off is good, because a failure
there (securechip returns no error but actually had a corruption)
should be exceedingly rare.

This effort is part of mitigating Optiga's throttling mechanism that
kicks in after 133 events - users can run into this by repeatedly
resetting/restoring).

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Low 29/100

This commit changes how the BitBox02 hardware wallet verifies a newly stored seed. Instead of re-stretching the user's password through the secure chip (which consumes several secure-chip operations), it reuses the already-stretched encryption key. This is a performance/reliability improvement to avoid hitting a secure-chip throttling limit after many device resets or restores. The commit itself is a defensive hardening change, not an obvious vulnerability fix, but it slightly changes the security assumptions around seed verification.

Security candidatekeystore: pass seed to unlock_bip39() to reduce secure chip eventsby Marko Bencun · bbcdabcc · Sep 10, 2025 · 8 filesMessage 78 · AdequateInformational 18Details
Commit message · Marko Bencun

keystore: pass seed to unlock_bip39() to reduce secure chip events

When restoring a wallet, the seed is already known, so no need to do
another `copy_seed()` which is a secure chip security event. This
reduces the number of secure chip operations when restoring.

The hashed seed is retained so it can be compared without storing it
in plaintext.

This effort is part of mitigating Optiga's throttling mechanism that
kicks in after 133 events - users can run into this by repeatedly
resetting/restoring).

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

This commit is a performance and reliability improvement, not a security fix. It changes how the BitBox02 hardware wallet restores a wallet so that the device does not repeatedly ask its secure chip for the same seed during restore. Instead, the seed is passed directly to the BIP39 unlock step and verified against a stored hash. The goal is to avoid hitting the secure chip's throttling limit (133 events) when users repeatedly reset or restore the device. The change does not remove any security check; it only avoids an unnecessary secure-chip read by comparing a hash of the seed instead.

AI review queuedreduce number of secure chip security events when creating/restoringby Marko Bencun · f8c1614d · Sep 10, 2025 · 6 filesMessage 78 · AdequateLow 30Details
Commit message · Marko Bencun

reduce number of secure chip security events when creating/restoring

Before, `keystore_encrypt_and_store_seed()` (called when
creating/restoring a seed) would always be followed by
`keystore_unlock(<password>)` with the password the user just chose,
so unlock could never fail. The unlocking part costs many secure chip
operations (for stretching the password).

By making the first function already unlock the keystore, we can avoid
calling `keystore_unlock()`, reducing the number of secure chip events
by 5.

This effort is part of mitigating Optiga's throttling mechanism that
kicks in after 133 events - users can run into this by repeatedly
resetting/restoring).

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
second-pass: broader security terminology
AI analysis · Low 30/100

This commit is a performance and reliability improvement, not a security vulnerability fix. It changes how a hardware wallet sets up a new wallet seed so that it performs fewer operations on the secure chip. Previously, after creating or restoring a seed, the software immediately unlocked the wallet with the same password, which wasted secure chip operations. Now the creation/restore step also unlocks the wallet, reducing secure chip events by 5. This helps avoid hitting the secure chip's throttling limit (133 events) when users repeatedly reset or restore their device.

Lower-prioritykeystore: move funcsby Marko Bencun · b3e384fb · Sep 10, 2025 · 1 fileMessage 43 · ThinInformational 15Details
Commit message · Marko Bencun

keystore: move funcs

To be below the static function `_retain_seed()` that will be needed later.

43/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit simply moves two functions (keystore_encrypt_and_store_seed and keystore_create_and_store_seed) to a different location within the same C source file so they appear after a static helper function called _retain_seed(). No code logic, behavior, or security properties were changed. It is a pure refactoring/reordering change.

Lower-priorityapi/restore: more robust unit testby Marko Bencun · db63e396 · Sep 10, 2025 · 1 fileMessage 55 · ThinInformational 15Details
Commit message · Marko Bencun

api/restore: more robust unit test

Test against fixtures.

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only strengthens a unit test for the wallet restore feature. It replaces a weak check (seed length is 32 bytes) with exact expected seed values derived from a hardcoded test recovery phrase. There is no change to production firmware code, no bug fix, and no security vulnerability.

Security candidateapi: add BTCXpubsRequest to fetch multiple xpubs at onceby Marko Bencun · 0334a516 · Sep 10, 2025 · 14 filesMessage 90 · StrongLow 30Details
Commit message · Marko Bencun

api: add BTCXpubsRequest to fetch multiple xpubs at once

To reduce the number of secure chip operations needed, we introduce a
new API call to fetch multiple xpubs at once. This only requires two
operations in total, instead of two per xpub.

We want to reduce the number of secure chip operations to avoid
running into Optiga's throttling security measure.

90/100 · StrongMessage clarity
✓ Specific, 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
cryptography-sensitive path
AI analysis · Low 30/100

This commit adds a new device API that lets a host computer request up to 20 Bitcoin extended public keys (xpubs) in a single call, instead of making one call per key. The goal is to reduce how often the device talks to its secure chip, avoiding a throttling safeguard. The change itself is a feature addition, not a fix for a known vulnerability, and the code applies existing keypath validation and a double-check against bitflips.

Lower-prioritybuild: fix sanitizersby Niklas Dusenlund · a33c43b0 · Sep 10, 2025 · 6 filesMessage 73 · AdequateInformational 12Details
Commit message · Niklas Dusenlund

build: fix sanitizers

The recommended way to enable sanitizers nowadays is to add
`-fsanitize=*` as a compiler and linking flags.

Also fix some warnings and remove some targets from "all" to speed up
builds.

Bumping macosx version to 11 since that seems to be necessary for asan
to work.

Add CI check to verify that address santizier is turned on for unit
tests

73/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validation
AI analysis · Informational 12/100

This is a build-system maintenance commit. It updates how the project enables AddressSanitizer and UndefinedBehaviorSanitizer so they work on modern toolchains, bumps the minimum macOS version for compatibility, and adds a CI check to confirm the sanitizer is actually linked into unit tests. There is no indication it fixes a security vulnerability in shipped firmware or in user funds.

AI review queuedxpubcache: typo in docstringby Marko Bencun · 1aa11698 · Sep 10, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Marko Bencun

xpubcache: typo in docstring

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit fixes a single typo in a code comment (docstring). The example Bitcoin keypath was missing an apostrophe in one place (m/84/0'/0'/0/0 changed to m/84'/0'/0'/0/0). No actual program code was changed, so there is no functional or security impact.

Lower-prioritykeystore: port keystore_get_u2f_seed to Rustby Marko Bencun · fa2791e7 · Sep 9, 2025 · 6 filesMessage 45 · ThinInformational 18Details
Commit message · Marko Bencun

keystore: port keystore_get_u2f_seed to Rust

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 18/100

This commit rewrites a small function that derives the U2F security seed from the wallet seed, moving it from C to Rust. The change is a routine code port, not a security fix. It keeps the same cryptographic calculation and the same requirement that the device be unlocked. There is no indication this addresses a known vulnerability.

Security candidatekeystore: use bitcoin_hashes for hmacby Marko Bencun · 5c0907f9 · Sep 9, 2025 · 1 fileMessage 68 · AdequateInformational 18Details
Commit message · Marko Bencun

keystore: use bitcoin_hashes for hmac

We use both RustCrypto and bitcoin_hashes for hmac, but the latter
is much harder to remove, as it's in bip39, bip32, etc, so we prefer
this over RustCrypto.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key material
AI analysis · Informational 18/100

This commit swaps one internal cryptographic library for another when computing a special fingerprint used in a backup/recovery feature (BIP-85). The change is described by the developer as a cleanup to use a single, consistent library. There is no direct evidence in the commit that it fixes a security bug or that any vulnerability exists.

AI review queuedsimulator: Simulate Nova platformby Niklas Dusenlund · d5db2a17 · Sep 9, 2025 · 4 filesMessage 35 · OpaqueInformational 15Details
Commit message · Niklas Dusenlund

simulator: Simulate Nova platform

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit adds a new simulator/testing feature that pretends the device is a 'Nova' model. It only touches test and simulator code, not the real firmware that runs on customer hardware. There is no indication of a security bug or fix.

Security candidatekeystore: reduce secure chip operations by precomputing fingerprintby Marko Bencun · e3b21df8 · Sep 8, 2025 · 8 filesMessage 73 · AdequateInformational 19Details
Commit message · Marko Bencun

keystore: reduce secure chip operations by precomputing fingerprint

The root fingerprint API call, calling
`bitbox02_rust::keystore::root_fingerprint()`, used two securechip
operations. Using too many operations too quickly in Optiga leads to
throttling, and the BitBoxApp fetches the root fingerprint every time
the BitBox is unlocked.

We can get away with not using hte securechip at all to get the root
fingerprint, by computing and storing it during unlock.

The global static mut could have lived in keystore.c with the other
static muts there, but adding more C code and Rust wrappers seemed
wrong. For now it lives in bitbox02::keystore, and would move over to
bitbox02_rust::keystore when the unlocking functions are migrated to Rust.

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

This commit is a performance and reliability improvement, not a security fix. It precomputes a wallet's 'root fingerprint' during device unlock and stores it in memory, so the BitBoxApp can read it later without repeatedly asking the secure chip. The secure chip was being throttled by too many rapid requests, which could slow down or temporarily block the device. The change removes that throttling risk and slightly reduces secure-chip wear, but it does not patch an exploitable vulnerability.

Lower-priorityCargo.toml: split feature into many linesby Marko Bencun · ac2b1505 · Sep 8, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Marko Bencun

Cargo.toml: split feature into many lines

For readability and better diffs.

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only reformats a Rust package configuration file (Cargo.toml) by splitting a long list of features onto separate lines. No features were added, removed, or changed. It is a pure readability/cosmetic change with no security relevance.

Lower-prioritycompile p256 only for u2fby Marko Bencun · bde1a9c6 · Sep 8, 2025 · 1 fileMessage 45 · ThinInformational 11Details
Commit message · Marko Bencun

compile p256 only for u2f

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 11/100

This commit is a build cleanup: it removes an unused cryptography library (p256) from the main firmware feature set and enables it only for the U2F app feature. There is no direct evidence in the commit or message that this fixes a security vulnerability.

Lower-prioritykeystore: compile rust_secp256k1_get_private_key only for testingby Marko Bencun · c9a3dd89 · Sep 8, 2025 · 1 fileMessage 60 · AdequateInformational 24Details
Commit message · Marko Bencun

keystore: compile rust_secp256k1_get_private_key only for testing

Not used in the firmware.

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 24/100

This commit removes a function that can extract a private key from the compiled firmware build, leaving it available only for automated tests. The change reduces the amount of sensitive key-extraction code present in the final device firmware, which is a defensive hardening step rather than a fix for an active attack.

Security candidatetest: refactor tests/simulator to compile more with cargoby Niklas Dusenlund · cf482332 · Sep 8, 2025 · 78 filesMessage 95 · StrongInformational 15Details
Commit message · Niklas Dusenlund

test: refactor tests/simulator to compile more with cargo

* Build C files from build.rs script and remove "bitbox_merged" hack.
* Move cmake specifics out of build.rs.
* Rust functions exposed as a C api has been moved to the respective
crates to remove circular dependencies.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100

This commit is a large internal cleanup of how the BitBox02 firmware's test code and simulator are built. It switches more of the build process to use Rust's standard Cargo tooling, removes a workaround called 'bitbox_merged,' and reorganizes Rust code to avoid circular dependencies. There is no indication this change fixes a security bug or introduces a new security feature.

Security candidaterust: Reduce count of depsby Niklas Dusenlund · 19d84ffe · Sep 5, 2025 · 414 filesMessage 72 · AdequateInformational 15Details
Commit message · Niklas Dusenlund

rust: Reduce count of deps

We use the same versions of the deps as the standard library to avoid
vendoring additional versions

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

This commit removes several vendored Rust library dependencies (libc, proc-macro2, quote, syn, unicode-ident) and updates the Cargo.lock file. The stated goal is to reduce dependency count by using the same versions as the Rust standard library. There is no direct code change to the BitBox02 firmware logic, no bug fix, and no security patch visible in the diff.

Lower-prioritysecp: Don't build benchmarks/tests for depsby Niklas Dusenlund · abbb63b6 · Sep 4, 2025 · 1 fileMessage 55 · ThinInformational 18Details
Commit message · Niklas Dusenlund

secp: Don't build benchmarks/tests for deps

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 18/100

This change adjusts the build settings for a cryptographic dependency (libsecp256k1) so that its benchmark and test programs are not compiled into the firmware build. It is a build-hygiene and size-reduction change, not a fix for an exploitable vulnerability. It removes unnecessary code from the build but does not change any runtime security logic.

Lower-priorityhardfault: Make Abort more useful when developingby Niklas Dusenlund · f6c68c57 · Sep 4, 2025 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · Niklas Dusenlund

hardfault: Make Abort more useful when developing

If testing code calls abort, print the error message to stderr and exit
the process.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit changes how the firmware's emergency abort function behaves only during internal software testing. When the TESTING flag is set, calling Abort() now prints the error message to standard error and exits the program, instead of hanging or triggering hardware-specific behavior. This makes debugging test failures easier and has no effect on the real device firmware.

Lower-priorityrust: make workdirs more coherent amongst various cargo invocationsby Niklas Dusenlund · aac763ea · Sep 4, 2025 · 1 fileMessage 85 · StrongInformational 12Details
Commit message · Niklas Dusenlund

rust: make workdirs more coherent amongst various cargo invocations

* Always execute cargo from the same place so that relative paths to CWD
always are the same.
* Always use the "same depth" target dir, so that relative paths to the
c-sources and files built by cmake stays the same.
* Give clippy its own target dir so that we don't have to wipe it before
every run

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
documentation-only discount
AI analysis · Informational 12/100

This commit is a build-system cleanup for the Rust parts of the BitBox02 firmware. It makes the working directories and output folders consistent across different Cargo commands (build, test, clippy, documentation) and gives the Clippy linter its own output folder so it no longer has to delete the build cache before every run. There is no indication this fixes a security vulnerability or changes runtime behavior of the firmware.

Lower-priorityapi/restore: add unit test and count security chip eventsby Marko Bencun · 9f146f9c · Sep 4, 2025 · 1 fileMessage 65 · AdequateInformational 13Details
Commit message · Marko Bencun

api/restore: add unit test and count security chip events

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification✓ Names security-relevant behavior explicitly! No meaningful explanatory body
AI analysis · Informational 13/100

This commit only adds a new automated test for the wallet-restore feature. It does not change any production code, fix a bug, or alter device behavior. The test checks that restoring from a mnemonic phrase prompts the user twice for a password and triggers a specific number of secure-chip events.

Lower-prioritysecurechip: count optiga security events and integrate into testsby Marko Bencun · 13d636a6 · Sep 4, 2025 · 7 filesMessage 88 · StrongInformational 15Details
Commit message · Marko Bencun

securechip: count optiga security events and integrate into tests

We count the number of security events the securechip functions take,
and then assert in the keystore unit tests how many events the
functions take there.

This is a basis for trying to reduce the count, so we can measure the
changes properly. Too many events induce throttling.

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

This commit only adds test-only instrumentation. It counts how many times the simulated secure chip performs security-sensitive operations during unit tests, so future work can reduce that count and avoid real-device throttling. It does not change production firmware behavior or fix a security bug.

Security candidateexternal/vendor: update bitcoin to v0.32.7by Marko Bencun · 3d18dfdf · Sep 3, 2025 · 46 filesMessage 45 · ThinLow 45Details
Commit message · Marko Bencun

external/vendor: update bitcoin to v0.32.7

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Low 45/100

This commit updates the vendored rust-bitcoin library inside the BitBox02 firmware from version 0.32.2 to 0.32.7. It is a routine dependency refresh that pulls in several upstream bug fixes and small feature additions, such as support for testnet4 and pay-to-anchor outputs. The commit does not describe itself as a security fix, and the visible changes are mostly API cleanups and correctness improvements rather than patches for an active vulnerability.

AI review queuedrust: use bitcoin::bech32 re-exportby Marko Bencun · 38d5a5e8 · Sep 3, 2025 · 8 filesMessage 60 · AdequateInformational 15Details
Commit message · Marko Bencun

rust: use bitcoin::bech32 re-export

No need to depend on it explicitly, which removes the need to keep the
versions in sync.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a routine dependency cleanup in the BitBox02 hardware wallet firmware. The developers removed a direct dependency on a small library called 'bech32' and instead started using the version that is already included through the larger 'bitcoin' library. The actual code behavior is unchanged; this is purely about simplifying package management and avoiding version mismatches.