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
150commits · 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 10 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 candidateda14531: restore BLE UART backpressureby Marko Bencun · 3201c5d2 · Apr 28, 2026 · 7 filesMessage 95 · StrongModerate 60Details
Commit message · Marko Bencun

da14531: restore BLE UART backpressure

ListBackups returns one protobuf containing all SD card backups. With many backups, the response spans many 64-byte HWW/U2FHID reports. USB sends those reports directly over HID, but BLE first serial-frames each report for the DA14531 and queues the escaped bytes in the fixed-size UART ByteQueue.

The Rust ByteQueue port kept the panicking single-byte put() API and the BLE poller used it for every framed byte. That removed the previous v9.25 backpressure behavior: da14531_protocol_poll() consumed the pending HWW report before knowing whether the whole framed BLE packet fit in the 2048-byte UART queue. If ListBackups produced data faster than UART drained it, put() eventually hit capacity and panicked with bytequeue overflow. USB does not use this UART queue, which is why the same request worked there.

Add ByteQueue::try_put_slice() plus an extern C wrapper that takes util::Bytes and performs an all-or-nothing enqueue. The BLE HWW path now formats the 64-byte report into a temporary serial frame and only clears hww_data after try_put_slice() succeeds. If the queue is full, it returns without writing any bytes, preserving frame boundaries and leaving the same report pending for the next poll after UART has drained.

Keep the existing panicking put() behavior for the other bytequeue callers so the change stays scoped to the actual backpressure boundary. The separate Rust and extern-wrapper tests cover successful writes and failed overflow attempts being atomic.

95/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
memory safetyparser or protocol path
AI analysis · Moderate 60/100

This update fixes a crash in the BitBox02 hardware wallet when a user lists many backups over a Bluetooth connection. Previously, the device could run out of temporary buffer space while sending a large response, causing it to panic and stop working. The fix makes the Bluetooth sender check whether the whole next chunk fits before writing it, and if not, wait until space becomes available. USB connections were not affected because they use a different path.

Lower-priorityAGENTS: run make commands seriallyby Marko Bencun · 8730c1c6 · Apr 28, 2026 · 1 fileMessage 72 · AdequateInformational 15Details
Commit message · Marko Bencun

AGENTS: run make commands serially

Otherwise the dev-machine can easily lock up.

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

This commit only updates developer documentation (AGENTS.md). It adds a warning that running multiple make commands in parallel can lock up a development machine, and instructs developers to run them one at a time. There is no code change and no security relevance.

AI review queuedoptiga: fix detached buffer reuseby Marko Bencun · b5a2fcc2 · Apr 26, 2026 · 1 fileMessage 68 · AdequateModerate 69Details
Commit message · Marko Bencun

optiga: fix detached buffer reuse

The Optiga C API keeps raw pointers to the Rust wrapper's static
buffers until the asynchronous callback completes. The Rust wrapper
has a Detached state for futures that were dropped after launching a
command, but the individual wrappers initialized their per-operation
static buffers before calling begin_async_op().

That meant a repeated call to the same wrapper could clear or
overwrite the exact static storage still owned by the detached C
command before begin_async_op() noticed the Detached state and waited
for the old callback.

Move begin_async_op().await before every static buffer or length-cell
mutation. Detached operations are now reclaimed before any static
storage is reused, and live concurrent operations still panic before
their buffers can be corrupted.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 69/100

This patch fixes a timing bug in how the BitBox02 hardware wallet talks to its secure chip (Optiga). Previously, the code could overwrite memory buffers that were still being used by an unfinished, dropped secure-chip operation. That could corrupt data or cause the device to behave unpredictably when secure-chip commands were started and then abandoned. The fix simply makes sure the code checks for and reclaims any leftover detached operation before touching the shared buffers.

Lower-prioritybitbox-lvgl-sys/build.rs: remove warningby Marko Bencun · a79ea6b8 · Apr 23, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Marko Bencun

bitbox-lvgl-sys/build.rs: remove warning

Agents feel the urge to fix it.

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

This commit simply removes a printed warning message during the build process. When a certain environment variable (LV_CONF_PATH) is missing, the build script used to warn the developer; now it silently uses a default configuration file instead. There is no change to security logic, runtime behavior, or how the firmware works.

Lower-priorityclippy: warn for large futuresby Niklas Dusenlund · c9c522f0 · Apr 23, 2026 · 2 filesMessage 76 · AdequateInformational 18Details
Commit message · Niklas Dusenlund

clippy: warn for large futures

Large async state machines keep their captured data alive across await
points. That can silently bloat task allocations and stack usage, which
is especially risky on memory-constrained embedded targets and makes
regressions harder to spot in review.

Add the Clippy lint so oversized futures are flagged early instead of
only showing up later as memory pressure or failures.

Reference: https://rust-lang.github.io/rust-clippy/master/index.html#large_futures

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 18/100

This change adds a Rust code-quality warning (Clippy lint) that flags async functions whose internal state machines get too large. It is a preventive development tool, not a fix for an existing security bug. The commit does not change any runtime firmware behavior or patch a known vulnerability.

Lower-priorityDisable Rust Debug formattingby Marko Bencun · 831453fa · Apr 23, 2026 · 9 filesMessage 66 · AdequateLow 25Details
Commit message · Marko Bencun

Disable Rust Debug formatting

Pass `-Zfmt-debug=none` in the firmware Rust build.

According to
clippy::no_debug (https://rust-lang.github.io/rust-clippy/master/index.html?search=use_debug):

> It should not be used in user-facing output

This tells rustc not to emit normal `Debug` formatter implementations into
the cross-compiled firmware image. The option also makes `{:?}` print
nothing, so app-visible error status messages must not rely on derived
`Debug`.

Keep the live keystore and backup error status screens explicit by formatting
those errors through small match-based helpers instead of `Debug`. This
preserves the visible diagnostic strings while still allowing derived Debug
formatting to be compiled out of the firmware.

There are still live library `Debug` formatting paths in a no-flag build even
when our callers map those errors to `InvalidInput`. Protobuf and Miniscript
parsers construct detailed errors internally before the caller discards them,
for example `WireType` decode errors and Miniscript `NonTopLevel(format!("{:?}",
...))` errors. `fmt-debug=none` prevents those detailed `Debug` formatters and
their generic formatting helpers from being linked.

Savings: 6464 bytes

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Low 25/100

This commit strips out Rust's automatic 'Debug' text-formatting code from the hardware wallet firmware to save space. It replaces a few user-facing error messages that previously relied on Debug formatting with small, hand-written formatters so users still see useful text. The change is primarily a size optimization and code-hardening step, not a fix for an active security bug.

AI review queuedEnable blake2 size_optby Marko Bencun · 7c20eb38 · Apr 22, 2026 · 1 fileMessage 61 · AdequateInformational 15Details
Commit message · Marko Bencun

Enable blake2 size_opt

The blake2 crate exposes a size_opt feature that trades aggressive
inlining for a smaller implementation. In this firmware build the
Blake2b compression path was still one of the largest Rust code
contributors, so this is a direct ROM for speed trade that matches the
current goal.

Enable size_opt for the existing optional dependency. The algorithm,
test vectors, and call sites stay the same; only the crate internal
code generation strategy changes.

In the resulting image, the large Blake2b compression routine is split
into much smaller outlined helpers instead of one heavily inlined
body. That is where the ROM reduction comes from.

Saves 11576 bytes in firmware.bin.

61/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesecond-pass: broader security terminology
AI analysis · Informational 15/100

This commit flips a build-time option in the blake2 Rust library from 'fast and large' to 'smaller and less inlined.' It is a pure code-size optimization that does not change the hashing algorithm, inputs, outputs, or how the firmware calls it. There is no security-relevant change visible in the diff.

Lower-prioritymbedtls: use RAM instead of ROM to shrink sizeby Marko Bencun · 9cee2da4 · Apr 22, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Marko Bencun

mbedtls: use RAM instead of ROM to shrink size

Saves 2104 bytes.

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

This commit changes a build-time configuration option for the mbedTLS cryptography library. It disables AES lookup tables stored in read-only flash memory (ROM) and instead uses tables computed at runtime in regular working memory (RAM). The stated purpose is to reduce the overall firmware size by 2,104 bytes. This is a size-optimization change, not a security fix.

Lower-priorityShrink mbedtls SHA256 coreby Marko Bencun · 75e7982a · Apr 22, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Marko Bencun

Shrink mbedtls SHA256 core

Enable MBEDTLS_SHA256_SMALLER in the Optiga Trust M mbedTLS
user config.

This keeps the same SHA256 and HMAC-SHA256 behavior, but switches
mbedTLS to its smaller SHA256 implementation for the live Optiga
crypto path.

Savings: 1392 bytes.

The main win is that mbedtls_internal_sha256_process shrinks by
1396 bytes in the final image. The surrounding PAL, HMAC, and CCM
entry points remain live, so this is a pure ROM-for-speed tradeoff
rather than a functionality change.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit changes a single compiler setting in the firmware's cryptography library (mbedTLS) to use a smaller, slower implementation of the SHA-256 hashing routine. The commit message explicitly states this is a size-versus-speed tradeoff and does not change functionality. There is no indication of a security bug or vulnerability fix.

Lower-priorityShrink mbedtls AES tablesby Marko Bencun · c435b22c · Apr 22, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Marko Bencun

Shrink mbedtls AES tables

Enable MBEDTLS_AES_FEWER_TABLES in the Optiga Trust M mbedTLS
user config.

This keeps the same AES/CCM functionality, but trades a small
amount of AES speed for smaller ROM usage by deriving the extra
AES lookup tables from FT0/RT0 instead of keeping all eight
tables in flash.

- savings: 6208 bytes

The main win is that six live 1024-byte AES tables drop out of
the final image: FT1, FT2, FT3, RT1, RT2, and RT3. FT0 and RT0
remain, and the AES encrypt/decrypt functions shrink slightly as
well.

No functionality changes are intended; this is a ROM-for-speed
tradeoff in the mbedTLS AES implementation used by the Optiga
Trust M integration.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit changes a single configuration line in the firmware's cryptography library setup. It tells the AES encryption code to use smaller lookup tables, saving about 6 KB of storage space at the cost of a small speed reduction. The commit explicitly states there are no intended functionality changes, and the diff shows only the addition of one configuration macro.

Security candidateShrink secp256k1 callbacksby Marko Bencun · 51964811 · Apr 22, 2026 · 2 filesMessage 58 · ThinInformational 14Details
Commit message · Marko Bencun

Shrink secp256k1 callbacks

Override libsecp256k1's default callbacks with tiny local stubs.

The vendored callbacks print an error and then call abort(). In the
firmware image those failure-only paths pull in a large chunk of newlib
stdio and signal handling even though the callbacks are only used for
fatal illegal-argument and internal-consistency failures and must never
return.

Saved: 2672 bytes

The final linked image drops the abort/stdio path retained only by those
callbacks, including the public symbols abort, raise, _raise_r,
_kill_r, _getpid_r, fprintf, printf, and _vfprintf_r. It also drops the
private stdio helpers behind them, such as __sfputc_r, __sfputs_r,
__swsetup_r, __swbuf_r, _fflush_r, _fwalk_sglue, __swhatbuf_r,
__swrite, __sread, __sseek, __sclose, __sinit, and __smakebuf_r.
Meanwhile secp256k1_default_illegal_callback_fn and
secp256k1_default_error_callback_fn shrink from 28 bytes each to 2
bytes each.

This keeps the relevant behavior intact: both callbacks still trap the
firmware in a non-returning fatal path, but without dragging in unused
diagnostic formatting code.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Informational 14/100

This commit is a size-optimization cleanup, not a security fix. It replaces libsecp256k1's default fatal-error callbacks with smaller stubs so the firmware binary no longer pulls in unused standard-library printing and abort code. The behavior stays the same: on an internal or illegal-argument failure, the device still hangs forever instead of returning.

Lower-prioritydrop unneeded -mlong-callsby Marko Bencun · 973c4dc8 · Apr 22, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Marko Bencun

drop unneeded -mlong-calls

Firmware builds for Cortex-M4 in Thumb mode, where direct BL calls
reach roughly +/-16 MiB. The firmware image is well within that range,
so forcing -mlong-calls only bloats call sites and C code built
through Rust build scripts.

Remove -mlong-calls from the cross-compilation C flags and from
CARGO_C_FLAGS so the compiler can emit direct calls again.

This saves 11432 bytes in firmware.bin.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit removes a compiler flag called -mlong-calls from the firmware build settings. The flag was forcing the compiler to use a larger, longer-range calling convention for function calls, even though the firmware is small enough that the normal direct calling convention works fine. Removing it only reduces code size (saves about 11 KB) and has no security relevance.

Lower-priorityoptiga: inline async launchesby Marko Bencun · 2efa3adc · Apr 22, 2026 · 1 fileMessage 70 · AdequateInformational 12Details
Commit message · Marko Bencun

optiga: inline async launches

Each Optiga async wrapper currently goes through a generic async
helper that accepts a per-call launch closure. That shape is expensive
in firmware builds: every distinct closure type causes another
monomorphized async state machine, along with duplicate drop glue and
wrapper-specific launch/wait/cleanup control flow.

Inline the Optiga C launch in each wrapper instead and keep only a
non-generic shared wait/cleanup helper. The async behavior does not
change: begin_async_op()/AsyncOpGuard still owns the shared static
buffers, Detached recovery still prevents buffer reuse after
cancellation, and all zeroization and length checks remain in place.

This saves about 1400 bytes in the firmware binary because the
compiler no longer needs to materialize a separate future for each
Optiga operation wrapper just to carry a different launch closure. The
launch step becomes plain local code in each wrapper, while the common
polling and cleanup path stays shared in one non-generic async helper.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 12/100

This commit is a code-size optimization for the BitBox02 hardware wallet's secure chip driver. It rewrites how asynchronous Optiga chip operations are started so the compiler produces less duplicate code, saving about 1,400 bytes of firmware space. The commit message and diff show no functional change to security behavior such as buffer zeroization, length checks, or cancellation recovery.

Lower-priorityoptiga: remove unused interface bitsby Marko Bencun · c9da585f · Apr 22, 2026 · 3 filesMessage 45 · ThinInformational 12Details
Commit message · Marko Bencun

optiga: remove unused interface bits

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

This commit is a small internal cleanup in the BitBox02 firmware's code for talking to the Optiga secure chip. It removes an unused callback pointer and simplifies how some factory-only data is written. There is no indication this fixes a security bug or introduces a vulnerability; it appears to be ordinary maintenance.

Lower-prioritysecurechip: port U2F counter opsby Marko Bencun · 34b061c1 · Apr 22, 2026 · 17 filesMessage 45 · ThinLow 27Details
Commit message · Marko Bencun

securechip: port U2F counter ops

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

This commit moves the U2F counter read/write logic out of C code and into Rust code for the BitBox02 firmware. It is a refactoring/porting change: the same secure-chip storage object is still used, and the same operations (set counter, increment counter) are preserved. There is no obvious new security vulnerability in the diff, but the change touches sensitive secure-chip code and is only a partial port (some platforms still have placeholder 'todo!' implementations).

Security candidatesecurechip: port attestation signby Marko Bencun · 2bccdebf · Apr 22, 2026 · 25 filesMessage 35 · OpaqueInformational 20Details
Commit message · Marko Bencun

securechip: port attestation sign

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body! Opaque security-relevant change
Why it was queued
update trustboot or update path
AI analysis · Informational 20/100

This commit is a code refactoring that moves the device attestation signing function from C code into Rust code. It converts the function to be asynchronous (async/await) and rewrites the parsing of the secure chip's DER-encoded signature in Rust. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a normal portability and maintainability improvement. The change does add safety checks for signature length and zeroizes sensitive buffers after use, which are good defensive practices.

Security candidatesecurechip: make random asyncby Marko Bencun · 797a37e6 · Apr 22, 2026 · 17 filesMessage 40 · ThinLow 33Details
Commit message · Marko Bencun

securechip: make random async

40/100 · ThinMessage clarity
✓ Descriptive subject✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
seed or entropy path
AI analysis · Low 33/100

This commit rewrites how the BitBox02 hardware wallet fetches random numbers from its secure chip. Previously, the secure chip's random generator was called in a blocking (synchronous) way. The change makes it asynchronous, so the firmware can do other work while waiting. It also removes an older, simpler random interface and now mixes the secure-chip randomness with the microcontroller's own randomness before using it for sensitive key material. The commit itself is a defensive refactor; it does not appear to fix a known exploit, but it removes a synchronous call that could stall the device and strengthens how random values are combined when creating password-stretching secrets.

Security candidateassert 9.26.1by Niklas Dusenlund · 0b6e2efb · Apr 22, 2026 · 2 filesMessage 28 · OpaqueInformational 15Details
Commit message · Niklas Dusenlund

assert 9.26.1

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body! Opaque security-relevant change
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit only adds two new digital signature files for an already-released firmware version (9.26.1). These signatures are used by independent builders to publicly attest that they reproduced the official firmware exactly from source code. No code, no firmware binary, and no behavior of the device changed. There is nothing here that could affect security of the BitBox02 itself.

Security candidateFormat generated protobufs explicitlyby Niklas Dusenlund · f22f12cd · Apr 22, 2026 · 3 filesMessage 58 · ThinInformational 15Details
Commit message · Niklas Dusenlund

Format generated protobufs explicitly

Run rustfmt from the explicit protobuf regeneration script and include
the generated Rust files in check-style.

This keeps firmware builds working by avoiding formatting inside the
generator/build path while making the manual regen workflow produce
style-clean committed outputs.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive pathparser or protocol path
AI analysis · Informational 15/100

This commit is purely a code-style and build-maintenance change. It makes the Rust code generated from protocol-buffer definitions be formatted by rustfmt automatically and included in style checks. No security-sensitive behavior is changed.

Security candidateMove protobuf bindings into bitbox-protoby Niklas Dusenlund · 06f33ef3 · Apr 22, 2026 · 21 filesMessage 68 · AdequateInformational 15Details
Commit message · Niklas Dusenlund

Move protobuf bindings into bitbox-proto

Add a committed bitbox-proto crate for the generated Rust protobuf
bindings.

Switch regeneration to a Cargo-driven flow, add a make shortcut and CI
drift check, and keep the generator copy-on-change so no-op regen runs
do not churn timestamps or invalidate build caches.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
defensive validationcryptography-sensitive pathsigning or wallet pathparser or protocol path
AI analysis · Informational 15/100

This commit is a build-system and code-organization refactor. It moves the automatically generated Rust protobuf message definitions from inside the main bitbox02-rust crate into a new, separate bitbox-proto crate. It also switches the generation flow from CMake to Cargo, adds a CI check to ensure the committed generated files stay in sync with the .proto source files, and avoids touching timestamps when regeneration produces identical output. There is no change to the actual device firmware logic or to how messages are parsed and validated.

Lower-priorityoptiga: dedup busy pollingby Marko Bencun · 53996787 · Apr 21, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Marko Bencun

optiga: dedup busy polling

Share the busy-wait polling logic between reclaim_detached_op() and
wait() in the async Optiga wrapper.

This keeps the async behavior unchanged while shaving a small amount of
future state-machine code from the firmware.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a simple internal cleanup: it takes two places in the firmware that were doing the same 'wait until the secure chip is no longer busy' loop and makes them share one copy of that loop. There is no change in behavior, no new feature, and no indication of a security fix.

Lower-priorityport lost docstring from deleted C codeby Marko Bencun · c8be625d · Apr 21, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Marko Bencun

port lost docstring from deleted C code

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

This commit only adds a comment explaining that a function behaves like Python's HMAC-SHA256. No code behavior changed, and there is no security issue.

AI review queuedtighten typesby Marko Bencun · a89b258d · Apr 21, 2026 · 4 filesMessage 18 · OpaqueLow 29Details
Commit message · Marko Bencun

tighten types

18/100 · OpaqueMessage clarity
✓ Subject identifies a change! Too few words to establish purpose! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Low 29/100

This commit tightens Rust type signatures for functions that talk to the secure chip (Optiga). Instead of accepting arbitrary-length byte slices and then checking lengths at runtime, the functions now require fixed-size arrays. This is a defensive hardening change: it moves some length checks from runtime to compile time, reducing the chance of a length mismatch bug being exploited. There is no direct evidence in the commit that an exploitable vulnerability existed before this change.

Security candidatesecurechip: port password opsby Marko Bencun · 9bd67713 · Apr 21, 2026 · 27 filesMessage 68 · AdequateLow 34Details
Commit message · Marko Bencun

securechip: port password ops

Move the OPTIGA password flows into Rust in one step, including the async command wrappers and the migrated unit tests. This keeps the commit focused on the securechip password migration itself; the unrelated Box::pin(...) call-site changes were split into a separate commit.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
cryptography-sensitive path
AI analysis · Low 34/100

This commit is a large refactoring that moves the password-stretching and secure-chip password operations from C into Rust for the BitBox02 firmware. It does not add new user-facing features or change the cryptographic algorithm; it reimplements the same OPTIGA secure-chip flows (HMAC verification, symmetric encryption, key generation, counter resets) in Rust with async wrappers. The old C implementation and its unit tests are removed, and equivalent Rust unit tests with deterministic fakes are added. There is no indication in the commit that this fixes a known security vulnerability.

Security candidateutil/sha2: fix safety docs syntaxby Marko Bencun · c0f75679 · Apr 21, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Marko Bencun

util/sha2: fix safety docs syntax

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

This commit only reformats the Rust documentation comments for unsafe functions so they use the standard '# Safety' heading. No actual code logic, memory handling, or behavior changed. It is a documentation cleanup with no security impact.