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

AI review queuedeth: fix data streaming issue when data lenght is exactly 1 byteby Tomas Vrba · a2579c78 · Mar 10, 2026 · 6 filesMessage 73 · AdequateModerate 59Details
Commit message · Tomas Vrba

eth: fix data streaming issue when data lenght is exactly 1 byte

When transaction data is streamed from the host in chunks, the
first_byte() method was called synchronously but the byte hadn't
been fetched yet for 1-byte payloads. Make first_byte() async so
it can request the byte from the host on demand, and handle the
1-byte special case in next() by returning the cached byte
directly instead of issuing a redundant chunk request.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 59/100

This commit fixes a bug in the BitBox02 hardware wallet's Ethereum transaction signing. When signing an Ethereum transaction whose 'data' field is exactly 1 byte long and is streamed from the host computer in chunks, the device could call for the first byte before it had actually been fetched, leading to a crash or failed signing. The fix makes the first-byte lookup asynchronous so it can request the byte from the host on demand, and avoids asking for an extra chunk when the whole payload is just that one byte. New unit tests and regenerated test vectors confirm the 1-byte case now works.

Lower-priorityAGENTS.md: prefer hex! literalsby Jad · d73d7e90 · Mar 10, 2026 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · Jad

AGENTS.md: prefer hex! literals

Documented the test-style preference in AGENTS.md to prefer hex!
literals for Rust unit-test byte arrays/constants.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates an internal coding-style guide (AGENTS.md) for developers. It adds a recommendation to use a particular Rust macro (`hex!`) when writing unit tests. There is no code change, no bug fix, and no security relevance.

Lower-prioritycardano: harden Cardano host xpub derivation checksby Jad · bfc8bfdd · Mar 10, 2026 · 3 filesMessage 73 · AdequateModerate 58Details
Commit message · Jad

cardano: harden Cardano host xpub derivation checks

Cardano host-facing xpub usage now follows the same bitflip-mitigation
pattern already used for critical Bitcoin xpub operations.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
defensive validation
AI analysis · Moderate 58/100

This commit hardens how the BitBox02 firmware derives and exposes Cardano public keys (xpubs) by computing them twice and comparing the results. This matches a safety pattern already used for Bitcoin, meant to catch rare hardware errors or malicious bit flips that could silently produce a wrong xpub. A wrong xpub could lead a wallet app to generate addresses the user does not actually control, so the change is a defensive security improvement.

Lower-priorityAGENTS: add review guidelinesby Marko Bencun · 3b0b85d5 · Mar 9, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Marko Bencun

AGENTS: add review guidelines

Document review guidance for removed function calls.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds two sentences of documentation to the project's AGENTS.md file, giving reviewers guidance on what to check when a function call is removed in a code change. It does not modify any firmware code, cryptographic logic, build scripts, tests, or configuration. There is no security issue in this change.

Lower-priorityda14531.c: fix name len in memcpyby Marko Bencun · 75629365 · Mar 7, 2026 · 1 fileMessage 80 · StrongLow 35Details
Commit message · Marko Bencun

da14531.c: fix name len in memcpy

The BLE name was always <63 bytes due to validation in the
SetDeviceName API call, but since the function itself truncates to the
payload size when copying to the payload stack array, it should also
do so when passing its length to da14531_protocol_format.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 35/100

This commit fixes a small but real bug in how the BitBox02 hardware wallet tells its Bluetooth chip what name to broadcast. The code that copies the device name into a fixed-size buffer correctly limited the copy to 63 bytes, but then accidentally reported the original, possibly longer length to the next processing step. That mismatch could make the Bluetooth formatting function read past the end of the 64-byte buffer, leaking nearby memory or crashing the device. The fix makes the reported length match the actual copied length.

AI review queueddelay: remove unused delay_is_elapsedby Marko Bencun · d7eba581 · Mar 7, 2026 · 3 filesMessage 35 · OpaqueInformational 15Details
Commit message · Marko Bencun

delay: remove unused delay_is_elapsed

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 simply removes a software function named delay_is_elapsed that is no longer used anywhere in the code. It is a routine cleanup change with no apparent security relevance.

Lower-prioritybitbox02/delay: call delay_cancel after initby Marko Bencun · b07b98ba · Mar 7, 2026 · 1 fileMessage 72 · AdequateLow 33Details
Commit message · Marko Bencun

bitbox02/delay: call delay_cancel after init

Otherwise after 10 uses of delay_for().await, there is a `Too many
concurrent delays` abort.

72/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode
AI analysis · Low 33/100

This commit fixes a bug in the BitBox02 hardware wallet's Rust delay system. Previously, calling delay_for() 10 times without cleanup caused the device to abort with 'Too many concurrent delays'. The fix ensures each delay is cancelled automatically when finished, preventing the device from crashing. It is a reliability fix rather than a clear security vulnerability, though any device crash could theoretically affect availability or user workflow.

Lower-priorityBuild: move host hardware fakes into bitbox02-sysby Cedric Wiese · 191a5982 · Mar 5, 2026 · 8 filesMessage 57 · ThinInformational 13Details
Commit message · Cedric Wiese

Build: move host hardware fakes into bitbox02-sys

also stabilize fatfs diskio linking

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
AI analysis · Informational 13/100

This is a build-system cleanup, not a security fix. It moves test-only fake hardware code into a lower-level Rust crate and adds a linker trick so the fake disk storage implementation is not accidentally left out when building the desktop simulator. There is no change to how real devices work and no reported vulnerability.

Lower-priorityworkflow: use std::println! over C printf in C simulatorby Marko Bencun · 24b9cbae · Mar 3, 2026 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Marko Bencun

workflow: use std::println! over C printf in C simulator

No need to depend on bitbox02/C for this.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a small code cleanup in a test-only file for the C simulator. It replaces calls to a C-style print function with Rust's standard println macro. There is no security relevance: no real secrets are handled, no production code is changed, and no vulnerability is introduced or fixed.

Lower-priorityhal: add print_screen to Hal Uiby Marko Bencun · 0cedfa0d · Mar 3, 2026 · 9 filesMessage 68 · AdequateInformational 18Details
Commit message · Marko Bencun

hal: add print_screen to Hal Ui

The `print_debug_internal` function is removed from bitbox02_rust as
it depends on bitbox02, but one can use the print_screen HAL fn
instead.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This commit is a routine internal code cleanup in the BitBox02 firmware. It moves a debug/error screen-printing function into a hardware-abstraction layer (HAL) so different parts of the code can use it without directly depending on low-level screen drivers. The visible behavior—showing error messages on the device screen—stays the same. There is no indication this fixes a security vulnerability or introduces a new attack path.

Lower-priorityrust-c: rename alloc module to c_allocby Marko Bencun · d4a29363 · Mar 3, 2026 · 3 filesMessage 68 · AdequateInformational 15Details
Commit message · Marko Bencun

rust-c: rename alloc module to c_alloc

Rename the internal allocator module in bitbox02-rust-c from `alloc`
to `c_alloc`.

This avoids a name clash with the Rust `alloc` crate, whichwill be
imported explicitly in a follow-up commit.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit simply renames an internal Rust module from `alloc` to `c_alloc` to avoid a naming conflict with Rust's standard `alloc` crate in a future change. The actual allocator code is identical; only file paths and a module reference are updated. There is no security-relevant change.

AI review queuedhal: add resetby Marko Bencun · d85daea2 · Mar 2, 2026 · 4 filesMessage 28 · OpaqueInformational 18Details
Commit message · Marko Bencun

hal: add reset

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 18/100

This commit is a small internal cleanup: it adds a new 'reset' method to the user-interface layer and makes the start of a new secure session call that method instead of calling a lower-level screen-clearing function directly. The behavior is essentially the same as before—clearing leftover screens when a new connection begins—so there is no new security problem. It is a refactoring change, not a fix for a known vulnerability.

AI review queuedUi: Display address in groups of 4 charactersby Cedric Wiese · a871abc7 · Mar 2, 2026 · 12 filesMessage 45 · ThinInformational 15Details
Commit message · Cedric Wiese

Ui: Display address in groups of 4 characters

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

This commit only changes how wallet addresses are shown on the BitBox02 screen. It inserts spaces every four characters (for example, a Bitcoin address becomes "bc1q k5f9 em9q ..." instead of one long string). There is no code that changes security logic, cryptography, or how transactions are approved. It is a user-experience improvement to make long addresses easier to read and compare.

Security candidatereplace asf4 C ringbuffer with Rust ByteQueueby Marko Bencun · 4c69f5c5 · Mar 2, 2026 · 26 filesMessage 45 · ThinLow 38Details
Commit message · Marko Bencun

replace asf4 C ringbuffer with Rust ByteQueue

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
boot or update pathparser or protocol path
AI analysis · Low 38/100

This commit swaps out an old C ringbuffer for a new Rust-based byte queue used to hold data sent to the Bluetooth chip. The change touches many files but is mostly a rewrite/refactor. It removes several explicit 'will it fit?' size checks before adding data to the queue, and it changes how callers pass the queue around. The Rust ByteQueue implementation itself is not shown in the diff, so we cannot verify whether it safely handles overflow, memory allocation failures, or concurrent access. The change is therefore a security-relevant refactor with some risk, but no proven vulnerability is visible in the supplied commit.

Lower-priorityadd bitbox-bytequeue workspace crateby Marko Bencun · ad7f8c9b · Mar 2, 2026 · 9 filesMessage 80 · StrongInformational 12Details
Commit message · Marko Bencun

add bitbox-bytequeue workspace crate

Trivial wrapper around `VecDeque`, with methods and a C API matching the
asf4 utils_ringbuffer.h interface shape. With a similar API, we can replace
all uses of it easily.

The old C ringbuffer was fixed-size and not heap allocated. This queue uses
`VecDeque` and panics once we go above the intended fixed size to avoid
filling RAM in case of bugs.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 12/100

This commit adds a brand-new Rust helper crate called bitbox-bytequeue. It is a small wrapper around Rust's standard growable queue type (VecDeque) that exposes a C-compatible API matching an older fixed-size C ringbuffer. The code is purely additive and does not change any existing security-critical logic. It includes overflow protection by deliberately crashing (panicking) if too many bytes are queued, which is intended to prevent memory exhaustion bugs.

Lower-prioritybitbox02-sys/build.rs: remove duplicate da14531_power_downby Marko Bencun · 46fa14bc · Mar 2, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Marko Bencun

bitbox02-sys/build.rs: remove duplicate da14531_power_down

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit removes a duplicate function name from a Rust build script list. It is a harmless cleanup change with no security relevance.

AI review queuedhal: add communication_timeout_resetby Marko Bencun · eae607ad · Mar 2, 2026 · 5 filesMessage 35 · OpaqueInformational 17Details
Commit message · Marko Bencun

hal: add communication_timeout_reset

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

This commit refactors how the BitBox02 hardware wallet resets its USB communication watchdog during long-running operations. It introduces a new method in the hardware abstraction layer so Rust code can reset the timeout without directly calling a lower-level USB module. The change itself is a structural cleanup; it does not appear to fix or introduce a security vulnerability, but it touches code that prevents tasks from being cancelled while handling sensitive operations like seed encryption and device reset.

AI review queuedhal/ui: add empty_create to Ui Halby Marko Bencun · 274acabe · Mar 2, 2026 · 5 filesMessage 45 · ThinInformational 19Details
Commit message · Marko Bencun

hal/ui: add empty_create to Ui Hal

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 19/100

This commit is a small internal code cleanup in the BitBox02 hardware wallet firmware. It moves the creation of an empty on-screen placeholder component into a common hardware-abstraction layer (HAL) so that both real device code and automated test code use the same interface. There is no direct security fix here; it is a refactoring that makes the code easier to test and maintain.

Lower-priorityutil/bytes: document that NULL is allowed in rust_util_bytesby Marko Bencun · 471b82fa · Feb 28, 2026 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Marko Bencun

util/bytes: document that NULL is allowed in rust_util_bytes

When length is 0. The as_ref/as_mut functions already explicitly
handle this.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit only updates documentation comments and adds unit tests to clarify that a NULL pointer is acceptable when the length is zero. No code behavior was changed, so there is no security issue.

Security candidateAdd coin purchase memo supportby cedwies · 10746100 · Feb 26, 2026 · 8 filesMessage 45 · ThinLow 27Details
Commit message · cedwies

Add coin purchase memo support

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 27/100

This commit adds a new 'coin purchase memo' feature to BitBox02 payment requests. It lets a payment request include details about a separate coin purchase (e.g., '0.25 ETH to address 0x...') and verifies that the listed Ethereum address really belongs to the wallet by deriving it from a provided keypath. The change is mostly a feature addition, but it introduces cross-currency validation logic and a TODO noting that the user-interface confirmation for this new memo type is not yet implemented.

Lower-priorityspi: prefix MEMORY_SPI_BLE_FIRMWARE_(1|2)_ADDR with BITBOX02_by Marko Bencun · c39028bf · Feb 25, 2026 · 4 filesMessage 65 · AdequateInformational 15Details
Commit message · Marko Bencun

spi: prefix MEMORY_SPI_BLE_FIRMWARE_(1|2)_ADDR with BITBOX02_

Avoid any confusion that these should be used outside of BitBox02.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit simply renames internal constants so they start with BITBOX02_. It does not change any values, memory addresses, or program behavior. The change is purely cosmetic/clarifying to avoid confusion when these constants are used in shared code.

Lower-prioritybluetooth: add upgrade unit testsby Marko Bencun · 1a58c01b · Feb 25, 2026 · 2 filesMessage 55 · ThinInformational 15Details
Commit message · Marko Bencun

bluetooth: add upgrade unit tests

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 adds unit tests for the Bluetooth firmware upgrade logic and improves the test-only mock memory implementation so it actually records firmware chunks. There are no changes to production code, no bug fixes, and no security-relevant behavior changes.

Lower-prioritymemory_spi: move SPI memory constants to Rustby Marko Bencun · 46b822b8 · Feb 25, 2026 · 8 filesMessage 80 · StrongInformational 15Details
Commit message · Marko Bencun

memory_spi: move SPI memory constants to Rust

bitbox_hal has the one needed for bitbox02-rust and all HAL impls to
function.

bitbox02-rust-c defines the constants needed by C. We can't keep part
in C and part in Rust because it there would be circular deps (C
headers can't include "rust/rust.h").

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 15/100

This commit is a routine code reorganization: it moves constants that describe where Bluetooth firmware is stored in SPI memory from C header files into Rust source files. The values themselves (32 KB max firmware size, two slots at addresses 0x00 and 0x8000, 4096-byte erase sectors) are unchanged. The change adds compile-time checks to ensure the Rust and C definitions stay consistent. There is no security bug being fixed here.

Lower-priorityhal: route BLE FW flashing through Memory HALby Marko Bencun · 9fd3ceea · Feb 25, 2026 · 4 filesMessage 68 · AdequateInformational 12Details
Commit message · Marko Bencun

hal: route BLE FW flashing through Memory HAL

Add BleFirmwareSlot, BLE_FW_FLASH_CHUNK_SIZE, and
ble_firmware_flash_chunk() to the Memory trait as higher level
concepts.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 12/100

This commit is a software architecture refactor: it moves the Bluetooth firmware flashing logic behind a higher-level 'Memory HAL' interface. It does not change the actual security behavior of the firmware upgrade process; it only reorganizes the code so that the same operations go through a trait method instead of being called directly. There is no indication this fixes a vulnerability or introduces a new one.

Lower-priorityhal: add get_active_ble_firmware_version to Memoryby Marko Bencun · 04f212e0 · Feb 25, 2026 · 4 filesMessage 50 · ThinInformational 15Details
Commit message · Marko Bencun

hal: add get_active_ble_firmware_version to Memory

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit is a small internal code cleanup. It moves the way the device reads its Bluetooth firmware version from a direct hardware call into a shared memory interface, so the same code can be used in both real devices and automated tests. There is no visible change in behavior for end users, and nothing in the commit suggests a security fix or vulnerability.